/* =============================================================
   1. TOKENS
   ============================================================= */
:root {
  --bg:          #080a10;
  --bg-2:        #0d1018;
  --bg-card:     #111420;
  --bg-card-2:   #161928;
  --cream:       #e4e0d8;
  --cream-2:     #b0aba2;
  --cream-3:     #6a6560;
  --accent:      #4c9eff;
  --accent-2:    #c49a5b;
  --accent-glow: rgba(76,158,255,0.18);
  --gold:        #c49a5b;
  --gold-glow:   rgba(196,154,91,0.25);
  --line:        rgba(228,224,216,0.08);
  --line-2:      rgba(228,224,216,0.14);

  --serif:  "Cormorant Garamond", Georgia, serif;
  --sans:   "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:   "JetBrains Mono", "Fira Mono", monospace;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --nav-h:    72px;
  --gutter:   clamp(1.5rem, 5vw, 4rem);
  --max-w:    1260px;
  --radius:   12px;
  --radius-lg:20px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--cream);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.02em; }
em { font-style: italic; }

::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* =============================================================
   3. UTILITIES
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .5rem 1rem; background: var(--cream); color: var(--bg);
  z-index: 9999; border-radius: 8px; font-weight: 500; font-size: .875rem;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-tag {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.mono { font-family: var(--mono); }

/* =============================================================
   4. SPLASH
   ============================================================= */
.splash {
  position: fixed; inset: 0; z-index: 9000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  pointer-events: all;
  transition: opacity .8s var(--ease-in), visibility .8s var(--ease-in);
  /* CSS safety: auto-hide at 7s even if JS fails */
  animation: splashSafety .01s 7s forwards;
}
@keyframes splashSafety { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.splash.is-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.splash-lz {
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300;
  color: var(--cream);
  letter-spacing: .06em;
  animation: splashFade 1.4s var(--ease-out) forwards;
}
@keyframes splashFade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.splash-line {
  display: block;
  width: 60px;
  height: 1px;
  background: var(--accent);
  transform-origin: left;
  animation: splashLine 1s .4s var(--ease-out) both;
}
@keyframes splashLine {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

/* =============================================================
   5. CURSOR
   ============================================================= */
.cursor { pointer-events: none; position: fixed; inset: 0; z-index: 8000; }

.cursor-dot,
.cursor-ring {
  position: absolute;
  top: 0; left: 0;
  border-radius: 50%;
  will-change: transform;
  transition: opacity .25s var(--ease-out);
}

.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(76,158,255,.45);
  transform: translate(-50%, -50%);
  transition: width .3s var(--ease-out), height .3s var(--ease-out),
              border-color .3s, opacity .25s var(--ease-out);
}

.cursor { opacity: 0; }
.cursor.is-ready { opacity: 1; }

.cursor.is-hovering .cursor-ring {
  width: 52px; height: 52px;
  border-color: rgba(76,158,255,.7);
}

@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}

/* =============================================================
   6. NAV
   ============================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 500;
  transition: background .4s var(--ease-out), backdrop-filter .4s;
}

.nav.is-scrolled {
  background: rgba(8, 10, 16, 0.88);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  transition: opacity .2s;
  position: relative;
}
.nav-logo:hover { opacity: .8; }
.nav-logo[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(15,15,20,.92);
  color: var(--cream);
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: .4rem .8rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.nav-logo[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.nav-logo-lz {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--cream);
  border: 1px solid var(--line-2);
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
}

.nav-logo-name {
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cream-2);
  display: none;
}
@media (min-width: 720px) { .nav-logo-name { display: block; } }

.nav-links {
  display: none;
  align-items: center;
  gap: 2.5rem;
}
@media (min-width: 720px) { .nav-links { display: flex; } }

.nav-link {
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cream-2);
  transition: color .2s;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute; bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .3s var(--ease-out);
}
.nav-link:hover { color: var(--cream); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-cta {
  color: var(--accent) !important;
  border: 1px solid rgba(76,158,255,.35);
  padding: .45rem 1.1rem;
  border-radius: 6px;
  transition: background .2s, border-color .2s !important;
}
.nav-cta::after { display: none; }
.nav-cta:hover {
  background: rgba(76,158,255,.1);
  border-color: var(--accent);
}

/* Burger */
.nav-burger {
  display: flex; flex-direction: column;
  justify-content: center; gap: 5px;
  width: 36px; height: 36px;
  padding: 4px;
  border-radius: 6px;
  transition: background .2s;
}
.nav-burger:hover { background: var(--line); }
.nav-burger span {
  display: block; height: 1px; background: var(--cream);
  transition: transform .3s var(--ease-out), opacity .3s;
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (min-width: 720px) { .nav-burger { display: none; } }

/* Mobile menu */
.nav-mobile {
  background: rgba(8,10,16,.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  padding: 0 var(--gutter);
  display: flex; flex-direction: column; gap: 1.25rem;
  max-height: 0; overflow: hidden;
  visibility: hidden;
  transition: max-height .4s var(--ease-out), padding .4s var(--ease-out),
              visibility 0s .4s;
}
.nav-mobile.is-open {
  max-height: 300px;
  padding: 1.5rem var(--gutter) 2rem;
  visibility: visible;
  transition: max-height .4s var(--ease-out), padding .4s var(--ease-out),
              visibility 0s 0s;
}

.nav-mobile-link {
  font-size: 1.2rem;
  font-family: var(--serif);
  font-weight: 300;
  color: var(--cream);
  letter-spacing: .02em;
  transition: color .2s;
}
.nav-mobile-link:hover { color: var(--accent); }

/* =============================================================
   7. REVEAL ANIMATIONS
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Defensive: split elements can't be hidden by reveal */
.reveal[data-split] { opacity: 1; transform: none; }

/* Stagger children inside .reveal */
.hero-stats.reveal.is-visible .stat:nth-child(1) { transition-delay: .1s; }
.hero-stats.reveal.is-visible .stat:nth-child(3) { transition-delay: .2s; }
.hero-stats.reveal.is-visible .stat:nth-child(5) { transition-delay: .3s; }

/* =============================================================
   8. BUTTONS
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.8rem;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: transform .25s var(--ease-out), box-shadow .25s, background .2s, border-color .2s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 0 0 rgba(76,158,255,0);
}
.btn-primary:hover {
  background: #6aaeff;
  box-shadow: 0 8px 32px rgba(76,158,255,.35);
}

.btn-ghost {
  border: 1px solid var(--line-2);
  color: var(--cream-2);
}
.btn-ghost:hover {
  border-color: var(--cream-2);
  color: var(--cream);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

/* =============================================================
   9. HERO
   ============================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: clip;
  padding-top: var(--nav-h);
}

/* Mouse-reactive gradient */
.hero-gradient {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(circle 700px at var(--mx, 30%) var(--my, 50%),
      rgba(14,40,100,.7) 0%, transparent 60%),
    radial-gradient(circle 900px at calc(var(--mx, 30%) + 20%) calc(var(--my, 50%) - 15%),
      rgba(30,10,80,.5) 0%, transparent 55%),
    radial-gradient(circle 600px at 80% 70%,
      rgba(20,60,40,.4) 0%, transparent 55%),
    radial-gradient(ellipse 120% 80% at 50% 100%,
      rgba(5,10,30,.8) 0%, transparent 70%),
    var(--bg);
  filter: blur(50px) saturate(140%);
  animation: gradientPulse 20s ease-in-out infinite;
  transition: background .15s linear;
}
@keyframes gradientPulse {
  0%, 100% { filter: blur(50px) saturate(140%) brightness(1); }
  50%       { filter: blur(60px) saturate(160%) brightness(1.08); }
}

/* Vignette */
.hero-vignette {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, transparent 30%, rgba(8,10,16,.6) 100%),
    linear-gradient(to bottom, rgba(8,10,16,.3) 0%, transparent 30%,
                    transparent 60%, rgba(8,10,16,.8) 100%);
  pointer-events: none;
}

/* Noise texture */
.hero-noise {
  position: absolute; inset: 0; z-index: 2;
  opacity: .04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* Layout */
.hero-layout {
  position: relative; z-index: 3;
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: clamp(4rem, 8vw, 7rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 4rem;
    min-height: calc(100svh - var(--nav-h));
  }
}
@media (min-width: 1280px) {
  .hero-layout { grid-template-columns: 1fr; }
}

/* CSS-driven hero entrance — no JS dependency */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-animate {
  animation: heroIn .9s var(--ease-out) both;
  animation-delay: .85s;
}
.hero-animate--2 { animation-delay: 1.05s; }
.hero-animate--3 { animation-delay: 1.25s; }

/* Content */
.hero-eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: 1.5rem;
}
.hero-eyebrow-sep { color: var(--cream-3); }

.hero-title {
  font-family: var(--serif);
  font-size: clamp(4rem, 10vw, 8.5rem);
  font-weight: 400;
  line-height: .92;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 1.25rem;
}
.hero-title em {
  display: block;
  color: var(--accent);
  font-style: italic;
  font-weight: 300;
  letter-spacing: .02em;
}

.hero-sub {
  font-family: var(--mono);
  font-size: clamp(.75rem, 1.4vw, .9rem);
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cream-2);
  margin-bottom: 2.5rem;
  padding-left: .15em;
}

/* Stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat-value {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 300;
  color: var(--cream);
  letter-spacing: -.01em;
  line-height: 1;
}
.stat-label {
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cream-3);
}
.stat-div {
  display: block;
  width: 1px; height: 36px;
  background: var(--line-2);
  flex-shrink: 0;
}

.hero-ctas {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}

/* Hero photo */
.hero-photo {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: clip;
  aspect-ratio: 4 / 3;
  box-shadow: 0 32px 80px rgba(0,0,0,.6), 0 0 0 1px var(--line);
}
/* Left-edge gradient so the photo bleeds into the dark background */
.hero-photo::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 35%;
  background: linear-gradient(to right, var(--bg) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}
.hero-photo::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 55%,
    rgba(8,10,16,.6) 100%
  );
  z-index: 1;
  pointer-events: none;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: saturate(1.1) contrast(1.05);
  transition: transform .6s var(--ease-out);
}
.hero-photo:hover img {
  transform: scale(1.03);
}

/* Scroll indicator */
.hero-scroll {
  position: absolute; bottom: 2.5rem; left: var(--gutter);
  z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  opacity: .5;
  animation: scrollFade 2s 2s ease-in-out infinite alternate;
}
@keyframes scrollFade {
  from { opacity: .25; transform: translateY(0); }
  to   { opacity: .55; transform: translateY(4px); }
}
.hero-scroll-line {
  display: block;
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, transparent, var(--cream-2));
}
.hero-scroll-label {
  font-size: .6rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--cream-3);
  writing-mode: vertical-rl;
}

/* =============================================================
   10. ABOUT
   ============================================================= */
.about {
  padding-block: clamp(5rem, 10vw, 9rem) 1rem;
  background: var(--bg-2);
  position: relative;
}
.about::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line-2), transparent);
}

.about-intro {
  margin-bottom: clamp(3rem, 5vw, 5rem);
}

.about-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--cream);
  line-height: 1.1;
}
.about-title em { color: var(--accent-2); font-style: italic; }

.about-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: clamp(3rem, 6vw, 6rem);
}
@media (min-width: 960px) {
  .about-split { grid-template-columns: 1fr 420px; gap: 5rem; }
}

.about-lead {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 1.25rem;
  line-height: 1.75;
}
.about-text p {
  color: var(--cream-2);
  margin-bottom: 1.2rem;
  font-size: .95rem;
}
.about-text p em { color: var(--cream); font-style: italic; }
.about-text strong { color: var(--cream); font-weight: 500; }

.about-portrait {
  position: relative;
}
.about-portrait::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse at center,
    rgba(76,158,255,.08) 0%, transparent 70%);
  border-radius: var(--radius-lg);
  pointer-events: none;
}
.about-portrait img {
  width: 100%;
  border-radius: var(--radius-lg);
  filter: saturate(1.05) contrast(1.02);
}

/* Timeline */
.timeline {
  margin-top: clamp(5rem, 10vw, 8rem);
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.timeline-list { margin-top: 1.5rem; }

.timeline-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.5rem 2rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  position: relative;
}
.timeline-item:last-child { border-bottom: 1px solid var(--line); }

@media (max-width: 539px) {
  .timeline-item { grid-template-columns: 1fr; gap: .5rem; }
}

.timeline-year {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .06em;
  color: var(--accent);
  padding-top: .15rem;
  white-space: nowrap;
}

.timeline-body strong {
  display: block;
  color: var(--cream);
  font-weight: 500;
  font-size: .95rem;
  margin-bottom: .35rem;
}
.timeline-body p {
  color: var(--cream-3);
  font-size: .85rem;
  line-height: 1.55;
}

/* Skills */
.skills { margin-bottom: clamp(3rem, 6vw, 5rem); }
.skills-list {
  display: flex; flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1rem;
}
.skill-tag {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cream-2);
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: .4rem .9rem;
  border-radius: 40px;
  transition: border-color .2s, color .2s;
}
.skill-tag:hover {
  border-color: var(--accent);
  color: var(--cream);
}

/* Photo grid */
.about-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
}
@media (min-width: 720px) {
  .about-photos {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
  }
}

.aphoto {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-card);
}
.aphoto img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease-out), filter .6s;
}
.aphoto:hover img {
  transform: scale(1.05);
  filter: saturate(1.15) brightness(1.05);
}
.aphoto--a { aspect-ratio: 3/4; }
.aphoto--b { aspect-ratio: 16/9; }
.aphoto--c { aspect-ratio: 3/4; }
.aphoto--d { aspect-ratio: 3/4; }

@media (max-width: 539px) {
  .about-photos { grid-template-columns: 1fr; }
  .aphoto--a,
  .aphoto--b,
  .aphoto--c,
  .aphoto--d { aspect-ratio: 16/9; }
}

/* =============================================================
   11. PORTFOLIO
   ============================================================= */
.portfolio {
  padding-block: clamp(5rem, 10vw, 9rem);
  position: relative;
}

.portfolio-header {
  margin-bottom: clamp(3rem, 5vw, 5rem);
}

.portfolio-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--cream);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.portfolio-title em { color: var(--accent); font-style: italic; }

.portfolio-sub {
  font-size: clamp(.9rem, 1.6vw, 1.05rem);
  color: var(--cream-2);
  max-width: 56ch;
  font-weight: 300;
  line-height: 1.75;
}

/* Featured work */
.work-featured {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: clip;
  margin-bottom: clamp(3rem, 5vw, 4rem);
  transition: border-color .3s, box-shadow .3s;
}
.work-featured:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 32px rgba(76,158,255,.12);
}
.work-featured:has(.work-item-link) .work-featured-text::after {
  content: "Ver más →";
  display: block;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 1.1rem;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .3s, transform .3s;
}
.work-featured:has(.work-item-link):hover .work-featured-text::after {
  opacity: 1;
  transform: none;
}

.work-featured-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 30% 50%,
    rgba(196,154,91,.06) 0%, transparent 70%);
  pointer-events: none;
}

.work-featured-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: clamp(2rem, 4vw, 3.5rem);
}
@media (min-width: 720px) {
  .work-featured-body {
    grid-template-columns: 1fr 340px;
    gap: 3rem;
    align-items: center;
  }
}

.work-featured-badges {
  display: flex; gap: .6rem; flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.badge {
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .35rem .85rem;
  border-radius: 40px;
}
.badge-gold {
  background: rgba(196,154,91,.15);
  border: 1px solid rgba(196,154,91,.45);
  color: var(--gold);
}
.badge-outline {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--cream-3);
}

.work-featured-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--cream);
  line-height: 1.08;
  margin-bottom: 1rem;
}
.work-featured-title em { color: var(--gold); font-style: italic; }

.work-featured-meta {
  font-size: .7rem;
  letter-spacing: .06em;
  color: var(--cream-3);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.work-featured-desc {
  font-size: .95rem;
  color: var(--cream-2);
  line-height: 1.8;
  max-width: 55ch;
}
.work-featured-desc em { color: var(--cream); font-style: italic; }

.work-featured-image {
  border-radius: var(--radius);
  overflow: clip;
  aspect-ratio: 4/3;
}
.work-featured-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
  transition: transform .6s var(--ease-out);
}
.work-featured:hover .work-featured-image img {
  transform: scale(1.04);
}
.work-featured-image--duo {
  aspect-ratio: unset;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.work-featured-image--duo img {
  width: 100%; height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Works grid */
.works-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 540px)  { .works-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px)  { .works-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .works-grid { grid-template-columns: repeat(4, 1fr); } }

/* ─────────────────────────────────────────
   WORKS LIST — horizontal card layout
   ───────────────────────────────────────── */
.works-list {
  display: flex;
  flex-direction: column;
  gap: .875rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

/* quitar margin-bottom del featured cuando está dentro de la lista */
.works-list .work-featured {
  margin-bottom: 0;
}

.work-item {
  display: grid;
  grid-template-columns: 1fr 38%;
  min-height: 200px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .3s;
}
.work-item:hover {
  border-color: var(--line-2);
}

/* Cards con case study — borde azul + "Ver más" al hover */
.work-item:has(.work-item-link):hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 32px rgba(76,158,255,.12);
}
.work-item:has(.work-item-link) .work-item-text::after {
  content: "Ver más →";
  display: block;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 1.1rem;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .3s, transform .3s;
}
.work-item:has(.work-item-link):hover .work-item-text::after {
  opacity: 1;
  transform: none;
}

.work-item-text {
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .35rem;
}

.work-item-channel {
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.work-item-title {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.2;
  margin: .1rem 0;
}

.work-item-year {
  font-size: .7rem;
  color: var(--cream-3);
  margin: 0;
}

.work-item-desc {
  font-size: .875rem;
  color: var(--cream-2);
  line-height: 1.65;
  margin: .3rem 0 0;
  max-width: 58ch;
}

.work-item-role {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-top: .6rem;
  display: inline-block;
}

.work-item-image {
  position: relative;
  overflow: hidden;
}

.work-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) brightness(.92);
  transition: transform .6s var(--ease-out);
}

.work-item:hover .work-item-image img {
  transform: scale(1.04);
}

.work-item-gradient {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--g1, #0a0a14) 0%, var(--g2, #1a1a3a) 100%);
  opacity: .65;
}

@media (max-width: 720px) {
  .work-item {
    grid-template-columns: 1fr;
  }
  .work-item-image {
    aspect-ratio: 16/9;
    order: 2;
  }
  .work-item-text {
    order: 1;
  }
}

.work-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: clip;
  border: 1px solid var(--line);
  background: var(--bg-card);
  cursor: default;
  transition: border-color .3s, box-shadow .35s, transform .35s var(--ease-out);
  will-change: transform;
}
.work-card:hover {
  border-color: var(--line-2);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.work-card-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--g1, #0a1628), var(--g2, #1a3d72));
  opacity: .6;
  transition: opacity .4s;
}
.work-card:hover .work-card-bg { opacity: .8; }

.work-card-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  z-index: 0;
}

/* ── Photo card variant ────────────────── */
.work-card--photo { aspect-ratio: 3/4; }
.work-card--photo .work-card-img {
  opacity: 1;
  filter: brightness(.88) saturate(1.05);
  transition: transform .6s var(--ease-out);
}
.work-card--photo:hover .work-card-img { transform: scale(1.06); }
.work-card--photo .work-card-bg {
  z-index: 1;
  background: linear-gradient(to bottom,
    rgba(0,0,0,0)    0%,
    rgba(0,0,0,.08) 40%,
    rgba(0,0,0,.86) 72%,
    rgba(0,0,0,.97) 100%);
  opacity: 1;
}
.work-card--photo:hover .work-card-bg { opacity: 1; }
.work-card--photo .work-card-inner {
  justify-content: flex-end;
  min-height: unset;
}

.work-card-inner {
  position: relative; z-index: 2;
  padding: 1.75rem 1.5rem;
  display: flex; flex-direction: column;
  min-height: 220px;
  gap: .4rem;
}

.work-card-channel {
  font-family: var(--mono);
  font-size: .63rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .2rem;
}

.work-card-title {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.15;
  flex: 1;
}

.work-card-year {
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .06em;
  color: var(--cream-3);
}

.work-card-desc {
  font-size: .82rem;
  color: var(--cream-2);
  line-height: 1.65;
  margin-top: .4rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.work-card:hover .work-card-desc {
  opacity: 1;
  transform: translateY(0);
}

.work-card-role {
  display: inline-block;
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(76,158,255,.25);
  padding: .25rem .65rem;
  border-radius: 40px;
  margin-top: auto;
  width: fit-content;
}

/* =============================================================
   12. MARQUEE
   ============================================================= */
.marquee-label {
  text-align: center;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fg-muted, rgba(255,255,255,.38));
  margin-bottom: 2rem;
}

.marquee-section {
  padding-block: 1.5rem 3rem;
  background: var(--bg-2);
  border-block: 1px solid var(--line);
  overflow: clip;
}

.marquee-row {
  overflow: clip;
}
.marquee-row:first-child { margin-bottom: 1.25rem; }

.marquee-track {
  display: flex;
  align-items: center;
  gap: 2rem;
  width: max-content;
  will-change: transform;
  backface-visibility: hidden;
  animation: marqueeScroll 38s linear infinite;
}
.marquee-track--rev {
  animation-direction: reverse;
  animation-duration: 48s;
  gap: 1.5rem;
}

@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-logo {
  height: 40px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  opacity: .7;
  display: block;
}
.marquee-logo--lg {
  height: 58px;
  max-width: 180px;
}
.marquee-logo--xl {
  height: 82px;
  max-width: 240px;
}
.marquee-logo--2xl {
  height: 124px;
  max-width: 170px;
}
.marquee-logo--tight {
  margin-inline: -1rem;
}
.marquee-logo--tight-l {
  margin-left: -1rem;
}
.marquee-track .mi {
  display: inline-flex;
  align-items: center;
  height: 40px;
}

.mi {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 300;
  letter-spacing: .02em;
  color: var(--cream-2);
  white-space: nowrap;
  transition: color .2s;
}
.mi:hover { color: var(--cream); }

.mi--prog {
  font-style: italic;
  color: var(--cream-3);
  font-size: clamp(.9rem, 2vw, 1.3rem);
}
.mi--prog:hover { color: var(--cream-2); }

.ms {
  color: var(--accent);
  font-size: .5rem;
  flex-shrink: 0;
  opacity: .5;
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation-play-state: paused; }
}

/* =============================================================
   13. CONTACT
   ============================================================= */
.contact {
  position: relative;
  padding-block: clamp(5rem, 10vw, 9rem);
  overflow: clip;
}

.contact-glow {
  display: none;
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 400px;
  background: radial-gradient(ellipse at center top,
    rgba(76,158,255,.07) 0%, transparent 65%);
  pointer-events: none;
}

.contact-inner { position: relative; z-index: 1; }

.contact-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 300;
  color: var(--cream);
  line-height: 1.08;
  margin-bottom: 1.25rem;
  max-width: 16ch;
}
.contact-title em { color: var(--accent); font-style: italic; }

.contact-sub {
  color: var(--cream-2);
  font-size: clamp(.9rem, 1.6vw, 1.05rem);
  font-weight: 300;
  margin-bottom: 3rem;
  max-width: 46ch;
}

.contact-links {
  display: flex; flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
}

.contact-email {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.5vw, 2.5rem);
  font-weight: 300;
  color: var(--cream);
  letter-spacing: -.01em;
  border-bottom: 1px solid var(--line-2);
  transition: color .25s, border-color .25s;
  display: inline-block;
  padding-bottom: .3rem;
}
.contact-email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-phone {
  font-family: var(--mono);
  font-size: clamp(.95rem, 2vw, 1.2rem);
  color: var(--cream-2);
  transition: color .2s;
}
.contact-phone:hover { color: var(--cream); }

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

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

.footer-name {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--cream);
  letter-spacing: .02em;
}

.footer-meta {
  font-size: .8rem;
  color: var(--cream-3);
  letter-spacing: .02em;
}

.footer-copy {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .06em;
  color: var(--cream-3);
}

/* =============================================================
   15. TILT EFFECT
   ============================================================= */
[data-tilt] {
  transform-style: preserve-3d;
  perspective: 800px;
}
[data-tilt] .work-card-inner {
  transform-style: preserve-3d;
}

/* =============================================================
   16. RESPONSIVE
   ============================================================= */
@media (max-width: 539px) {
  .hero-stats { gap: 1rem; }
  .stat-div { display: none; }
  .hero-ctas { flex-direction: column; align-items: flex-start; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .timeline-item { grid-template-columns: 1fr; }
  .contact-links { width: 100%; }
  .contact-email { font-size: 1.2rem; word-break: break-all; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 540px) and (max-width: 959px) {
  .hero-photo { max-height: 340px; }
}

@media (min-width: 1600px) {
  .hero-title { font-size: 8.5rem; }
}

/* =============================================================
   17. SCROLLBAR
   ============================================================= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--cream-3); }

/* =============================================================
   18. PRINT
   ============================================================= */
@media print {
  .nav, .splash, .cursor, .hero-gradient,
  .hero-scroll, .marquee-section { display: none !important; }
  body { color: #000; background: #fff; }
}

/* =============================================================
   CASE STUDY PAGES
   ============================================================= */

.nav-back-link {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  text-decoration: none;
  transition: background .2s, box-shadow .2s, transform .2s;
  padding: .4rem .9rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
}
.nav-back-link:hover {
  background: #6aaeff;
  border-color: #6aaeff;
  box-shadow: 0 6px 24px rgba(76,158,255,.35);
  transform: translateY(-1px);
}

.cs-hero {
  position: relative;
  height: 72vh;
  min-height: 440px;
  overflow: hidden;
  margin-top: 64px;
}
.cs-hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(.6) saturate(1.1);
}
.cs-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(8,10,16,.2) 0%, rgba(8,10,16,.5) 50%, var(--bg) 100%);
}
.cs-hero-content {
  position: absolute;
  bottom: clamp(2.5rem, 6vw, 5rem);
  left: 50%; transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  padding-inline: clamp(1.5rem, 5vw, 4rem);
  animation: csIn .9s .15s var(--ease-out) both;
}
@keyframes csIn {
  from { opacity: 0; transform: translateX(-50%) translateY(18px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.cs-channel {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
  display: block;
}
.cs-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  color: var(--cream);
  line-height: 1.05;
  margin: 0 0 .75rem;
}
.cs-title em { color: var(--accent-2); font-style: italic; }
.cs-meta-bar {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cream-3);
}
.cs-badges {
  display: flex; gap: .6rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}

.cs-body {
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
  animation: csFadeUp .7s .3s var(--ease-out) both;
}
@keyframes csFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.cs-desc {
  font-size: clamp(.95rem, 1.4vw, 1.15rem);
  color: var(--cream-2);
  line-height: 1.85;
  max-width: 72ch;
}
.cs-desc strong { color: var(--cream); font-weight: 500; }
.cs-desc em     { color: var(--cream); font-style: italic; }

.cs-gallery {
  padding-block: clamp(3rem, 6vw, 5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3.5rem);
}
.cs-section-label {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cream-3);
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: -.75rem;
}
.cs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .625rem;
}
@media (min-width: 900px) { .cs-grid { grid-template-columns: repeat(3, 1fr); } }
.cs-photo {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/2;
  background: var(--bg-card);
}
.cs-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(.9) saturate(1.05);
  transition: transform .5s var(--ease-out), filter .3s;
}
.cs-photo:hover img {
  transform: scale(1.04);
  filter: brightness(1) saturate(1.1);
}
.cs-photo--full {
  aspect-ratio: unset;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}
.cs-photo--full img {
  width: 100%; height: auto;
  display: block;
}

/* ── Case study link overlay ──────────────────────── */
.work-item  { position: relative; }
.work-item-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: var(--radius-lg);
}
.work-item-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
