/* ═══════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:    #000000;
  --white:    #ffffff;
  --dim:      rgba(255,255,255,0.42);
  --dimmer:   rgba(255,255,255,0.18);
  --ghost:    rgba(255,255,255,0.07);
  --gap:      14px;
  --font:     'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}

/* ═══════════════════════════════════════
   CUSTOM CURSOR
═══════════════════════════════════════ */
.cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  background: #ebac1a;
  border: 1.5px solid rgba(255,255,255,0.85);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, opacity 0.2s, background 0.2s;
}
.cursor.is-hovering {
  width: 48px;
  height: 48px;
  opacity: 0.35;
}

/* ═══════════════════════════════════════
   NAV — ultra-thin fixed strip
═══════════════════════════════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2rem;
}

.nav-social {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.nav-social a {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease;
}
.nav-social a:hover { color: var(--white); }
nav.nav--light .nav-social a { color: #a76500; }

.nav-social .social-sep {
  color: rgba(255,255,255,0.4);
  font-size: 0.68rem;
}
nav.nav--light .nav-social .social-sep { color: rgba(167,101,0,0.4); }

.nav-logo,
.nav-right a,
.nav-social a {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.nav-logo:hover,
.nav-right a:hover,
.nav-social a:hover { color: var(--white); }

.nav-right {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  margin-left: auto;
}

/* Nav sobre fondo blanco */
nav.nav--light .nav-logo { opacity: 1; color: #a76500; }
nav.nav--light .nav-right a,
nav.nav--light .nav-social a { color: #a76500; }

/* Nav logo se oculta solo cuando está sobre la imagen */
nav.nav--hide-logo .nav-logo { opacity: 0; }

nav::after {
  content: '';
  position: absolute;
  bottom: 0; left: 2rem; right: 2rem;
  height: 1px;
  background: rgba(255,255,255,0.04);
}

/* ═══════════════════════════════════════
   HERO — fixed background (parallax base)
═══════════════════════════════════════ */
.hero {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #0a0a0a;
  z-index: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('img/hero-desktop.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

@media (max-width: 640px) {
  .hero-bg {
    background-image: url('img/hero-mobile.jpg');
    background-position: center center;
  }
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 80% at 50% 100%, rgba(0,0,0,0.75) 0%, transparent 60%),
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,0,0,0.45) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 2rem 2.5rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.hero-name {
  font-size: clamp(4.5rem, 14vw, 13rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.88;
  color: var(--white);
  display: block;
}

.hero-meta {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-role {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}

.hero-cta {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.22);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.hero-cta:hover { color: var(--white); border-color: var(--white); }

.scroll-indicator {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  z-index: 2;
}
.scroll-indicator span {
  font-size: 0.52rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  writing-mode: vertical-rl;
}
.scroll-line-indicator {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.35));
  animation: grow-line 2s ease-in-out infinite alternate;
}
@keyframes grow-line {
  from { transform: scaleY(0.4); opacity: 0.3; }
  to   { transform: scaleY(1);   opacity: 0.8; }
}

/* ═══════════════════════════════════════
   HERO SPACER
═══════════════════════════════════════ */
.hero-spacer {
  height: 100vh;
  position: relative;
  z-index: 1;
  pointer-events: none;
  background: transparent;
}

/* ═══════════════════════════════════════
   SCROLLABLE CONTENT
═══════════════════════════════════════ */
#trabajo,
#sobre-mi,
#contacto {
  position: relative;
  z-index: 1;
  background: #000;
}

#sobre-mi { background: #fff; }

#trabajo {
  background: rgba(167, 101, 0, 0.20);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#trabajo .section-label-text {
  color: rgba(255,255,255,0.75);
}

/* ═══════════════════════════════════════
   WORK SECTION
═══════════════════════════════════════ */
#trabajo { margin-top: 0; }

.section-bar {
  padding: 4.5rem 2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.section-label-text {
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
}

.section-tagline {
  font-size: clamp(2.25rem, 7vw, 6.5rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.2;
  color: var(--white);
  padding: 1rem 2rem 3rem;
}

/* ── Marquee "Selected Works" ── */
.section-label-marquee {
  display: inline-block;
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 18%, black 82%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 18%, black 82%, transparent 100%);
}

.section-label-anchor {
  visibility: hidden;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  display: block;
  white-space: nowrap;
}

.section-label-track {
  position: absolute;
  top: 50%;
  left: 0;
  display: flex;
  gap: 2rem;
  width: max-content;
  animation: marquee-works 14s linear infinite;
}

.section-label-track span {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.82);
  white-space: nowrap;
  flex-shrink: 0;
}

@keyframes marquee-works {
  from { transform: translateY(-50%) translateX(0); }
  to   { transform: translateY(-50%) translateX(-50%); }
}

/* ── SYMMETRIC 2-COLUMN GRID ── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  padding: 0 3.5rem;
}

.video-card        { grid-column: span 1; }
.video-card.wide   { grid-column: span 2; }

.video-card {
  position: relative;
  overflow: hidden;
  background: #0d0d0d;
}

.video-card video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 9;
  filter: saturate(0.8) brightness(0.9);
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 0.5s ease;
}

.video-card:hover video {
  transform: scale(1.04);
  filter: saturate(1) brightness(1);
}

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.video-card iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
}

/* ── YouTube facade ── */
.yt-facade {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  overflow: hidden;
}

.yt-facade::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  transition: background 0.3s;
}

.yt-facade:hover::after { background: rgba(0,0,0,0.1); }

.yt-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 58px; height: 58px;
  border: 1.5px solid rgba(255,255,255,0.75);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(6px);
  transition: border-color 0.3s, transform 0.3s, background 0.3s;
}

.yt-facade:hover .yt-play {
  border-color: var(--white);
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(0,0,0,0.45);
}

.yt-play svg {
  width: 18px; height: 18px;
  fill: var(--white);
  margin-left: 3px;
}

.video-card:hover .card-overlay { opacity: 1; }

.card-meta {
  transform: translateY(10px);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.video-card:hover .card-meta { transform: translateY(0); }

.card-cat {
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 0.3rem;
}

.card-title {
  font-size: clamp(0.9rem, 1.8vw, 1.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--white);
  line-height: 1.15;
}

.card-role-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.3rem;
}

.card-role {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-year {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.1em;
}

.card-index { display: none; }

/* ═══════════════════════════════════════
   ABOUT
═══════════════════════════════════════ */
#sobre-mi {
  padding: 9rem 3.5rem 8rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.55fr 2fr;
  gap: 4rem;
  align-items: start;
}

.about-image {
  padding-top: 3rem;
}

.about-image-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
}

.about-image-wrap img:first-child {
  width: 100%;
  display: block;
  object-fit: cover;
  border-radius: 12px;
}

.about-bubble {
  position: absolute;
  top: 6%;
  left: -8%;
  width: 55%;
  transform: rotate(-8deg);
  pointer-events: none;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  #sobre-mi { padding: 5rem 1.25rem 4rem; }
}

/* ── Marquee "Who I Am!" ── */
.about-eyebrow {
  display: inline-block;
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 18%, black 82%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 18%, black 82%, transparent 100%);
}

.about-eyebrow-anchor {
  visibility: hidden;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  display: block;
  white-space: nowrap;
}

.about-eyebrow-track {
  position: absolute;
  top: 50%;
  left: 0;
  display: flex;
  gap: 1.8rem;
  width: max-content;
  animation: marquee-who 10s linear infinite;
}

.about-eyebrow-track span {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #ebac1a;
  white-space: nowrap;
  flex-shrink: 0;
}

@keyframes marquee-who {
  from { transform: translateY(-50%) translateX(0); }
  to   { transform: translateY(-50%) translateX(-50%); }
}

.about-statement {
  font-size: clamp(2rem, 5.5vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.95;
  color: #000;
  margin-bottom: 2rem;
}

.about-statement .muted {
  color: rgba(0,0,0,0.18);
}

.about-body {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.3rem, 2.8vw, 2.1rem);
  font-weight: 550;
  color: #000;
  line-height: 1.4;
  text-align: justify;
}

/* ── Word reveal on scroll ── */
.word {
  display: inline-block;
  opacity: 0.18;
  transition: opacity 0.25s ease;
}
.word.visible {
  opacity: 1;
}

.about-email-btn {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.85rem 2rem;
  background: #e8e8e8;
  color: #111;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 0 0 0 transparent;
  transition: box-shadow 0.4s ease, color 0.15s ease;
}

.about-email-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #111;
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
  z-index: 0;
}
.about-email-btn:hover::before { transform: scaleX(1); }

.about-email-btn span {
  position: relative;
  z-index: 1;
}
.about-email-btn:hover {
  color: #fff;
}

/* ═══════════════════════════════════════
   CONTACT
═══════════════════════════════════════ */
#contacto {
  padding: 5rem 3.5rem 6rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ═══════════════════════════════════════
   BIO SLIDER
═══════════════════════════════════════ */
.bio-slider {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: clamp(480px, 60vh, 850px);
  margin: 2.5rem 0 0;
  border-radius: 0;
  overflow: hidden;
}

.bio-text-panel {
  background: #fff;
  display: flex;
  align-items: center;
  padding: 3.5rem;
  position: relative;
}

.bio-slide {
  display: none;
  flex-direction: column;
  gap: 1.2rem;
}
.bio-slide.active { display: flex; }

.bio-slide-label {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ebac1a;
}

.bio-slide-body {
  font-size: clamp(0.82rem, 1.1vw, 1.05rem);
  font-weight: 500;
  color: #666;
  line-height: 1.55;
}
.bio-slide-body strong { font-weight: 700; color: #444; }

.skills-grid {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 3rem;
}
.skills-col {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* Barra de progreso tipo YouTube */
.bio-progress {
  width: 100%;
  height: 8px;
  background: #000;
  position: relative;
}

.bio-progress-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 0%;
  background: #ebac1a;
}

.bio-image-panel {
  position: relative;
  overflow: hidden;
}

.bio-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  z-index: 0;
  transition: opacity 0.5s ease;
}
.bio-img.active {
  opacity: 1;
  z-index: 1;
}

.contact-top {
  margin-bottom: 2rem;
}

.contact-layout {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.contact-photo {
  width: 110px;
  height: 140px;
  object-fit: cover;
  object-position: center top;
  border-radius: 10px;
  flex-shrink: 0;
  display: block;
}

.contact-tagline {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255,255,255,0.45);
  line-height: 1.55;
  max-width: 180px;
  flex-shrink: 0;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  background: #111;
  border-radius: 999px;
  padding: 3rem 4rem;
  font-size: clamp(1.4rem, 3.2vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 0 0 0 transparent;
  transition: box-shadow 0.4s ease;
}

.contact-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #ebac1a;
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.55s cubic-bezier(0.76, 0, 0.24, 1);
  z-index: 0;
}
.contact-pill:hover::before { transform: scaleX(1); }
.contact-pill:hover {
  box-shadow:
    0 0 0 1px rgba(235, 172, 26, 0.6),
    0 0 18px 4px rgba(235, 172, 26, 0.45),
    0 0 50px 12px rgba(235, 172, 26, 0.25),
    0 0 90px 24px rgba(235, 172, 26, 0.12);
  transition: box-shadow 0.4s ease;
}

.contact-pill span,
.contact-pill .at {
  position: relative;
  z-index: 1;
}

.contact-pill .at { color: #ebac1a; }
.contact-pill:hover .at { color: var(--white); transition: color 0.3s ease 0.15s; }

.contact-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 3rem;
}

.social-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.8rem;
}

.social-sep {
  color: rgba(255,255,255,0.2);
  font-size: 0.65rem;
}

.social-row a {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  transition: color 0.2s ease;
}
.social-row a:hover { color: var(--white); }
