/* =============================================
   PORTFOLIO — styles.css
   Theme: Dark editorial with amber accent
   Fonts: Syne (display) · DM Mono (body)
   ============================================= */

/* ── Custom Properties ─────────────────────── */
:root {
/* Colors - Blue Palette */
--bg:          #0b1d3a;   /* oscuro profundo, reemplaza #0e0e0e */
--bg-2:        #112750;   /* un azul ligeramente más claro, reemplaza #141414 */
--bg-3:        #1a357a;   /* azul medio para secciones secundarias, reemplaza #1c1c1c */
--surface:     #1f3b8b;   /* azul intenso para tarjetas o superficies, reemplaza #1f1f1f */
--border:      #26408f;   /* azul más apagado para bordes, reemplaza #2a2a2a */
--text:        #e0e7ff;   /* azul muy claro casi blanco, reemplaza #e8e6e0 */
--text-muted:  #a0aec0;   /* gris azulado suave, reemplaza #777570 */
--accent:      #4fc3f7;   /* azul celeste brillante, reemplaza el ámbar */
--accent-dim:  rgba(79, 195, 247, 0.12);  /* versión translúcida del acento */
--accent-glow: rgba(79, 195, 247, 0.25);  /* resplandor azul sutil */
--white:       #ffffff;   /* se mantiene igual */

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Mono', monospace;

  /* Spacing */
  --gap:    clamp(1.5rem, 4vw, 3rem);
  --radius: 12px;

  /* Transitions */
  --ease:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --fast:   0.18s;
  --med:    0.35s;
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, video, iframe { display: block; max-width: 100%; }
ul { list-style: none; }

/* ── Utilities ──────────────────────────────── */
.container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.accent { color: var(--accent); }

/* ── Fade-up animation (JS adds .visible) ──── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Buttons ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .75rem 1.75rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--fast) var(--ease);
}

.btn--primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn--primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--sm  { padding: .5rem 1.2rem; font-size: .8rem; }
.btn--lg  { padding: .95rem 2.25rem; font-size: 1rem; }

/* ── Section helpers ─────────────────────────── */
.section { padding-block: clamp(5rem, 10vw, 9rem); }

.section__label {
  font-family: var(--font-body);
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: .9;
}

.section__heading {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 550;
  line-height: 1.1;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -.02em;
}

/* ── Pills ───────────────────────────────────── */
.pill {
  display: inline-block;
  font-family: var(--font-body);
  font-size: .75rem;
  letter-spacing: .04em;
  padding: .3rem .85rem;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(245, 166, 35, .2);
}
.pill--sm { font-size: .7rem; padding: .2rem .7rem; }

/* =============================================
   NAVIGATION
============================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 5vw, 3rem);
  background: transparent;
  transition: background var(--med) var(--ease),
              box-shadow var(--med) var(--ease),
              backdrop-filter var(--med) var(--ease);
}
.nav.scrolled {
  background: rgba(14, 14, 14, .85);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
  transition: opacity var(--fast);
}
.nav__logo:hover { opacity: .7; }

.nav__links {
  display: flex;
  gap: 2.5rem;
}
.nav__links a {
  font-family: var(--font-body);
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--fast);
}
.nav__links a:hover { color: var(--accent); }

/* Hamburger toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--fast) var(--ease), opacity var(--fast);
}
.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav ─────────────────────────────── */
@media (max-width: 768px) {
  .nav__toggle { display: flex; }
  
  .nav__links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 998;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--med) var(--ease);
  }
  
  .nav__links.open {
    opacity: 1;
    pointer-events: all;
  }
  
  .nav__links a {
    font-size: 1.4rem;
    letter-spacing: .15em;
    color: var(--text);
  }
  
  .nav__links a:hover {
    color: var(--accent);
  }

  .nav__links li {
    list-style: none;
  }
}

/* =============================================
   HERO
============================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 7rem clamp(1.25rem, 5vw, 3rem) 5rem;
  overflow: hidden;
}

/* Subtle dot-grid background */
.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, var(--border) 1px, transparent 0);
  background-size: 40px 40px;
  opacity: .6;
  pointer-events: none;
}

/* Amber glow blob */
.hero::after {
  content: '';
  position: absolute;
  top: -15%;
  right: -10%;
  width: 55vw;
  height: 55vw;
  max-width: 700px;
  max-height: 700px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  animation: blob-drift 8s ease-in-out infinite alternate;
}

@keyframes blob-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-40px, 30px) scale(1.05); }
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  transition-delay: .05s;
}
.hero__eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 7.5rem);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.04em;
  margin-bottom: 1.5rem;
  transition-delay: .12s;
}

.hero__title {
  margin-bottom: 1.5rem;
  transition-delay: .2s;
}

.tag {
  display: inline-block;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(245, 166, 35, .35);
  padding: .4rem 1rem;
  border-radius: 999px;
}

.hero__desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 2.5rem;
  line-height: 1.9;
  transition-delay: .28s;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  transition-delay: .36s;
}

/* Scroll hint */
.hero__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: clamp(1.25rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  animation: bounce 2.5s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* =============================================
   ABOUT
============================================= */
.about { background: var(--bg-2); }

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: start;
}

.about__text p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: .95rem;
}

.about__stack {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 2rem;
}

/* Avatar placeholder */
.about__aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.about__avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.about__avatar::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px dashed rgba(245, 166, 35, .2);
  animation: spin 18s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.about__avatar-inner {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
}

/* Stats */
.about__stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}
.stat { text-align: center; }
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -.03em;
}
.stat__label {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__aside { order: -1; }
}

/* =============================================
   LINKS
============================================= */
.links { background: var(--bg); }

.links__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--fast) var(--ease),
              transform var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease);
}
.link-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .3), 0 0 0 1px var(--accent-dim);
}

.link-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  background: var(--bg-3);
}

/* Colored icon variants */
.link-card--github .link-card__icon  { color: #fff; }
.link-card--linkedin .link-card__icon { color: #0a66c2; }
.link-card--email .link-card__icon   { color: var(--accent); }
.link-card--pdf .link-card__icon     { color: #e74c3c; }

.link-card__body { flex: 1; min-width: 0; }

.link-card__label {
  display: block;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
}
.link-card__sub {
  display: block;
  font-size: .75rem;
  color: var(--text-muted);
  letter-spacing: .04em;
}

.link-card__arrow {
  color: var(--text-muted);
  font-size: .8rem;
  flex-shrink: 0;
  transition: color var(--fast), transform var(--fast);
}
.link-card:hover .link-card__arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* =============================================
   PROJECTS
============================================= */
.projects { background: var(--bg-2); }

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color var(--fast) var(--ease),
              transform var(--med) var(--ease),
              box-shadow var(--med) var(--ease);
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .35);
}

.project-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-card__number {
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--text-muted);
}

.project-card__links {
  display: flex;
  gap: .75rem;
}
.project-card__links a {
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: color var(--fast);
}
.project-card__links a:hover { color: var(--accent); }

.project-card__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.project-card__desc {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.8;
  flex: 1;
}

.project-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

/* ── Optional video embed inside project card ── */
.project-card__video {
  border-radius: 8px;
  overflow: hidden;
}

.project-card__video video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
.project-card__video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Optional PDF link inside project card ── */
.project-card__pdf {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .45rem 1rem;
  transition: color var(--fast), border-color var(--fast);
}
.project-card__pdf:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* =============================================
   MEDIA
============================================= */
.media { background: var(--bg); }

.media__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.media-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--fast), transform var(--med);
}
.media-item:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.media-item__badge {
  padding: .6rem 1rem;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* Video */
.media-item__video-wrap {
  aspect-ratio: 16 / 9;
  flex: 1;
}
.media-item__video-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* PDF placeholder */
.media-item__pdf-preview {
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  min-height: 220px;
}
.media-item__pdf-preview i { font-size: 2.5rem; color: #e74c3c; }
.media-item__pdf-preview p { font-size: .9rem; }

/* Image placeholder */
.media-item__img-wrap { min-height: 180px; }
.media-item__img-placeholder {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  background: var(--bg-3);
  color: var(--text-muted);
}
.media-item__img-placeholder i { font-size: 2.5rem; color: var(--accent); opacity: .5; }
.media-item__img-placeholder span { font-size: .8rem; }

/* If you have real <img> tags */
.media-item__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-item__caption {
  padding: .85rem 1rem;
  font-size: .78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  letter-spacing: .03em;
}

/* =============================================
   CONTACT
============================================= */
.contact {
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}
/* Bottom glow accent */
.contact::before {
  content: '';
  position: absolute;
  bottom: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 60vw;
  height: 40vw;
  background: radial-gradient(ellipse, var(--accent-dim) 0%, transparent 70%);
  pointer-events: none;
}

.contact__inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.contact__heading { margin-inline: auto; }

.contact__sub {
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 2rem;
  line-height: 1.9;
}

.contact__email {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .02em;
  margin-bottom: 2.5rem;
  transition: opacity var(--fast);
}
.contact__email:hover { opacity: .75; }

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* =============================================
   FOOTER
============================================= */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding-block: 1.75rem;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__copy {
  font-size: .78rem;
  color: var(--text-muted);
  letter-spacing: .04em;
}

.footer__socials {
  display: flex;
  gap: 1.25rem;
}
.footer__socials a {
  font-size: 1rem;
  color: var(--text-muted);
  transition: color var(--fast);
}
.footer__socials a:hover { color: var(--accent); }

/* =============================================
   RESPONSIVE TWEAKS
============================================= */
@media (max-width: 600px) {
  .hero__name { letter-spacing: -.03em; }
  .hero__actions { flex-direction: column; }
  .contact__actions { flex-direction: column; align-items: center; }
  .footer__inner { flex-direction: column; align-items: center; text-align: center; }
  .links__grid { grid-template-columns: 1fr; }
}

.about__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.about__avatar-inner {
  overflow: hidden;
  border-radius: 50%; /* o el valor que ya tengas */
}

.video-wrapper:has(video) {
  padding-bottom: 0;
  height: auto;
}

.media-item {
  display: flex;
  flex-direction: column;
}

.media-item__pdf-preview {
  flex: 1;
  justify-content: center;
}

.media-item__yt-link {
  position: relative;
  display: block;
}

.media-item__yt-link img {
  width: 100%;
  height: auto;
  display: block;
}

.media-item__yt-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.45);
  color: white;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.media-item__yt-overlay i {
  font-size: 2.5rem;
  color: #FF0000;
}

.media-item__yt-link:hover .media-item__yt-overlay {
  opacity: 1;
}

.about__avatar::before {
  display: none;
}


