/* =====================================================
   ABSOLUTE CINEMA — Stylesheet
   Mobile-first · Film-stock theme · Scroll animations
   ===================================================== */

/* ── TOKENS ─────────────────────────────────────────── */
:root {
  --cream-50:  #FBF6EC;
  --cream-100: #F6EFE2;
  --cream-200: #EFE5D3;
  --cream-300: #E4D6BE;

  --ink-900: #1C1813;
  --ink-700: #3C342A;
  --ink-600: #564B3C;
  --ink-500: #6E6150;
  --ink-400: #8A7B66;
  --ink-300: #A99B85;

  --amber-700: #8A4516;
  --amber-600: #A85A20;
  --amber-500: #C06A2B;
  --amber-400: #D08A4E;
  --amber-300: #DFA878;
  --amber-200: #ECCDA6;
  --amber-100: #F6E6CE;

  --restored:     #3F7A57;
  --restored-100: #DCEBE0;
  --restored-600: #2F6243;

  --degraded:     #B23A2E;
  --degraded-100: #F2DCD6;
  --degraded-600: #8F2A20;

  --emulsion-900: #14110C;
  --emulsion-800: #1C1812;
  --emulsion-700: #261F16;
  --emulsion-600: #332817;
  --emulsion-500: #42341E;

  --accent: var(--amber-500);

  --sp-1: 4px;   --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px;  --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --sp-9: 96px;  --sp-10: 128px;

  --max-w:    1100px;
  --wide-w:   1320px;
  --gutter:   clamp(1.25rem, 5vw, 4rem);
  --nav-h:    60px;

  --r-xs:   2px;  --r-sm:  4px;  --r-md:  6px;
  --r-lg:   10px; --r-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(28,24,19,.08);
  --shadow-md: 0 4px 12px rgba(28,24,19,.10), 0 1px 3px rgba(28,24,19,.06);
  --shadow-lg: 0 12px 32px rgba(28,24,19,.14);
  --shadow-frame: inset 0 0 0 1px rgba(28,24,19,.5), inset 0 0 28px rgba(0,0,0,.4);

  --ease-out:    cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.25, 1);
  --dur-fast:    120ms;
  --dur-base:    220ms;
  --dur-slow:    380ms;
}

/* ── RESET ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  background: var(--cream-100);
  color: var(--ink-900);
  overflow-x: hidden;
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a  { color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ── LAYOUT ──────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--wide { max-width: var(--wide-w); }

/* ── FILM-GRAIN OVERLAY (disabled) ──────────────────── */
.grain { display: none; }

/* ── TYPOGRAPHY UTILITIES ────────────────────────────── */
.kicker {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker--light { color: var(--amber-300); }
.kicker--muted { color: var(--ink-400); }

.badge {
  display: inline-flex;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.badge--accent {
  color: var(--amber-700);
  background: var(--amber-100);
  border: 1px solid var(--amber-200);
}
.badge--accepted {
  color: var(--restored-600);
  background: var(--restored-100);
  border: 1px solid #b8d6c2;
}
.badge--progress {
  color: var(--restored-600);
  background: var(--restored-100);
  border: 1px solid #b8d6c2;
}

.caption {
  font-family: 'JetBrains Mono', monospace;
  font-size: .6875rem;
  color: var(--ink-400);
  margin-top: 10px;
  line-height: 1.55;
}
.caption--light { color: var(--ink-300); }

/* ── SECTION HEADERS ─────────────────────────────────── */
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 1.25rem;
}
.sec-index {
  font-family: 'JetBrains Mono', monospace;
  font-size: .6875rem;
  color: var(--ink-300);
  border-bottom: 1px solid var(--ink-300);
  padding-bottom: 2px;
}
.sec-index--light { color: var(--ink-300); border-color: var(--ink-500); }

.sec-title {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-weight: 300;
  font-size: clamp(1.85rem, 4vw, 2.9rem);
  line-height: 1.04;
  letter-spacing: -.025em;
  color: var(--ink-900);
}
.sec-title--light { color: var(--cream-50); }

.sec-lead {
  font-size: 1.0625rem;
  color: var(--ink-600);
  max-width: 62ch;
  margin-top: 1rem;
  line-height: 1.72;
}
.sec-lead--light { color: var(--cream-200); }

section { position: relative; }

/* ── NAVIGATION ──────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(20,17,12,.91);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(192,106,43,.12);
  transition: border-color var(--dur-slow) ease, background var(--dur-slow) ease;
}
.nav--light {
  background: rgba(246,239,226,.94);
  border-bottom-color: var(--cream-300);
}
.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--cream-100);
  flex: none;
}
.nav--light .nav__brand { color: var(--ink-900); }
.nav__brand svg { flex: none; }
.nav__brand span {
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav__hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  background: none;
  border: none;
  padding: 8px;
  color: var(--cream-200);
  border-radius: var(--r-sm);
}
.nav--light .nav__hamburger { color: var(--ink-700); }
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) ease;
}
.nav__hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__links {
  display: none;
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--emulsion-900);
  border-bottom: 1px solid rgba(192,106,43,.14);
  padding: .5rem var(--gutter) 1.25rem;
  flex-direction: column;
}
.nav__links.open { display: flex; }
.nav__links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: .8125rem;
  color: var(--ink-300);
  text-decoration: none;
  letter-spacing: .04em;
  padding: .75rem 0;
  border-bottom: 1px solid rgba(192,106,43,.08);
  transition: color var(--dur-fast) ease;
}
.nav__links a:last-child { border-bottom: none; }
.nav__links a:hover { color: var(--amber-400); }

/* ── HERO ─────────────────────────────────────────────── */
.hero {
  background: var(--emulsion-900);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}

/* Projector beam */
.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(320px, 90vw, 800px);
  height: 80vh;
  background: radial-gradient(
    ellipse at top center,
    rgba(192,106,43,.14) 0%,
    rgba(192,106,43,.04) 35%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: var(--sp-8) 0 var(--sp-5);
  animation: fade-up 1.1s var(--ease-out) .1s both;
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.hero__content .kicker { display: block; margin-bottom: var(--sp-5); }

.hero__title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(3.6rem, 14vw, 10rem);
  line-height: .9;
  letter-spacing: -.03em;
  color: var(--cream-50);
  margin-bottom: var(--sp-6);
}
.hero__title em {
  font-style: italic;
  color: var(--amber-400);
  display: block;
}

.hero__lead {
  font-size: clamp(.9375rem, 2vw, 1.1rem);
  color: var(--cream-300);
  max-width: 54ch;
  line-height: 1.72;
  margin-bottom: var(--sp-6);
}

.hero__meta { margin-bottom: var(--sp-6); }
.hero__names {
  font-size: .9375rem;
  color: var(--cream-200);
  line-height: 1.65;
}
.hero__names a {
  text-decoration: none;
  border-bottom: 1px solid rgba(251,246,236,.2);
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.hero__names a:hover { color: var(--amber-400); border-color: var(--amber-400); }
.hero__advisors { color: var(--ink-300); }
.hero__affil {
  font-family: 'JetBrains Mono', monospace;
  font-size: .6875rem;
  color: var(--ink-400);
  margin-top: 6px;
  letter-spacing: .04em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 24px;
  margin-bottom: var(--sp-5);
}
.hero__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero__group + .hero__group {
  padding-left: 24px;
  border-left: 1px solid rgba(251,246,236,.18);
}
.hero__group-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .6875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.hero__group-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 539px) {
  .hero__group + .hero__group {
    padding-left: 0;
    border-left: 0;
  }
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .8125rem;
  font-weight: 500;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) ease, border-color var(--dur-fast) ease;
  letter-spacing: .03em;
  border: 1px solid transparent;
}
.btn svg { width: 14px; height: 14px; flex: none; }
.btn--primary {
  background: var(--emulsion-700);
  color: var(--cream-100);
  border-color: var(--emulsion-600);
}
.btn--primary:hover { background: var(--emulsion-600); color: var(--cream-50); }
.btn--ghost {
  background: transparent;
  color: var(--cream-300);
  border-color: rgba(251,246,236,.22);
}
.btn--ghost:hover { background: rgba(251,246,236,.07); border-color: rgba(251,246,236,.38); }

.btn--soon {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  position: relative;
}
.btn--soon::after {
  content: 'soon';
  position: absolute;
  top: -7px;
  right: -2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .45rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--amber-700);
  color: var(--cream-50);
  padding: 2px 5px;
  border-radius: var(--r-pill);
  pointer-events: none;
}

.hero__badges { display: flex; flex-wrap: wrap; gap: 8px; }

.hero__teaser {
  position: relative;
  z-index: 2;
  padding-bottom: var(--sp-8);
  animation: fade-up 1.1s var(--ease-out) .45s both;
}

/* Scroll caret */
.scroll-hint {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 3;
  animation: hint-appear 1s ease 2.2s both;
}
@keyframes hint-appear { from { opacity: 0; } to { opacity: 1; } }
.scroll-hint__text {
  font-family: 'JetBrains Mono', monospace;
  font-size: .6rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.scroll-hint__caret {
  width: 18px;
  height: 18px;
  border-right: 1px solid var(--amber-700);
  border-bottom: 1px solid var(--amber-700);
  transform: rotate(45deg);
  animation: caret-bounce 1.6s ease-in-out infinite;
}
@keyframes caret-bounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 1; }
  50%       { transform: rotate(45deg) translate(4px, 4px); opacity: .5; }
}

/* ── BEFORE/AFTER SLIDER ─────────────────────────────── */
.slider {
  position: relative;
  aspect-ratio: 16/9;
  width: 100%;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--emulsion-900);
  box-shadow: var(--shadow-frame), var(--shadow-lg);
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  will-change: clip-path;
}
.slider__before { clip-path: inset(0 50% 0 0); }
.slider__label {
  position: absolute;
  bottom: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .5625rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  color: var(--cream-50);
  z-index: 3;
  pointer-events: none;
}
.slider__label--before { left: 12px; background: var(--degraded); }
.slider__label--after  { right: 12px; background: var(--restored); }
.slider__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
}
.slider__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: rgba(251,246,236,.9);
  box-shadow: 0 0 0 1px rgba(0,0,0,.3);
}
.slider__knob {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cream-50);
  box-shadow: var(--shadow-md), 0 0 0 2px rgba(251,246,236,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-900);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  transition: transform var(--dur-fast) ease;
}
.slider:active .slider__knob { transform: scale(1.1); }

/* ── FILM STRIP SECTION ──────────────────────────────── */
.filmstrip-section {
  background: var(--emulsion-900);
  position: relative;
  /* height set by JS on desktop */
}

.filmstrip-sticky {
  display: flex;
  flex-direction: column;
  padding: 2.5rem 0;
  background: var(--emulsion-900);
}

.filmstrip-header {
  padding: 0 var(--gutter) 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.filmstrip-header .kicker { display: block; }
.filmstrip-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--cream-300);
  line-height: 1.2;
}

/* Sprocket-hole rows */
.perf-row {
  height: 30px;
  flex: none;
  background-color: #0C0904;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='30'%3E%3Crect x='7' y='5' width='18' height='20' rx='3' fill='%23C06A2B' fill-opacity='0.2'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 32px 30px;
}

.filmstrip-viewport { overflow: hidden; }

.filmstrip-rail {
  display: flex;
  flex-direction: column;
  background: #0C0904;
}

.filmstrip-track {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #0C0904;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Individual film frame */
.film-frame {
  position: relative;
  background: var(--emulsion-800);
  width: 100%;
  flex: none;
}
/* Frame number */
.film-frame::before {
  content: attr(data-frame);
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .5rem;
  color: rgba(192,106,43,.45);
  letter-spacing: .2em;
  z-index: 5;
  pointer-events: none;
}
/* Vignette — hidden on mobile, restored at desktop breakpoint */
.film-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(0,0,0,.6) 100%);
  pointer-events: none;
  z-index: 2;
  display: none;
}
.film-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

/* Text-only frame */
.film-frame--text {
  background: linear-gradient(135deg, var(--emulsion-700) 0%, var(--emulsion-900) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
}
.film-frame--text::after { display: none; }

.film-frame__content { position: relative; z-index: 3; }
.film-frame__kicker {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: .5625rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--amber-400);
  margin-bottom: .875rem;
}
.film-frame__title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(1.4rem, 4vw, 2.6rem);
  line-height: 1.04;
  letter-spacing: -.025em;
  color: var(--cream-50);
  margin-bottom: .875rem;
}
.film-frame__body {
  font-size: clamp(.8rem, 1.5vw, .9375rem);
  color: var(--cream-300);
  line-height: 1.65;
  max-width: 38ch;
}
.film-frame__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  margin-bottom: 1rem;
}
.film-stat { display: flex; flex-direction: column; gap: 4px; }
.film-stat__val {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  color: var(--amber-400);
}
.film-stat__lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: .5rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-300);
}

/* Overlay on image frames — flows below the image on mobile */
.film-frame__overlay {
  display: flex;
  flex-direction: column;
  background: rgba(14,11,7,.97);
  padding: clamp(.875rem, 2.5vw, 1.5rem);
}
.film-frame__overlay p {
  font-size: clamp(.75rem, 1.5vw, .875rem);
  color: var(--cream-200);
  line-height: 1.5;
  margin-top: 5px;
  max-width: 42ch;
}

.film-badge {
  display: inline-flex;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: .5rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  color: var(--cream-50);
}
.film-badge--degraded { background: var(--degraded); }
.film-badge--restored { background: var(--restored); }
.film-badge--neutral  { background: var(--emulsion-500); border: 1px solid var(--emulsion-600); }

/* Pipeline stage badge colours */
.pipe-stage-badge--art  { background: rgba(179,91,65,.85); }
.pipe-stage-badge--neg  { background: rgba(78,126,164,.85); }
.pipe-stage-badge--core { background: rgba(168,124,29,.85); }
.pipe-stage-badge--fin  { background: rgba(125,90,148,.85); }
.pipe-stage-badge--scr  { background: rgba(110,140,72,.85); }

/* Pipeline filmstrip: bigger, readable text */
.pipe-filmstrip-section .film-badge {
  font-size: .8125rem;
  letter-spacing: .06em;
  padding: 6px 16px;
}
.pipe-filmstrip-section .film-frame__overlay {
  padding: clamp(1.5rem, 4vw, 3rem);
}
.pipe-filmstrip-section .film-frame__overlay p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
  margin-top: var(--sp-3);
  max-width: 52ch;
}

/* ── PIPELINE SKIP BUTTON ────────────────────────────── */
.pipe-skip-btn {
  display: none;
}
@keyframes skip-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192,106,43,0), var(--shadow-md); }
  50%       { box-shadow: 0 0 18px 4px rgba(192,106,43,.22), var(--shadow-md); }
}
@keyframes skip-arrow-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(4px); }
}
@media (min-width: 1024px) {
  .pipe-skip-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    position: absolute;
    bottom: clamp(1.25rem, 3vh, 2rem);
    right: var(--gutter);
    z-index: 20;
    font-family: 'JetBrains Mono', monospace;
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--cream-200);
    background: rgba(14,11,7,.82);
    border: 1px solid rgba(192,106,43,.5);
    border-radius: var(--r-pill);
    padding: 11px 22px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: color var(--dur-base) ease, border-color var(--dur-base) ease,
                background var(--dur-base) ease, transform var(--dur-fast) ease,
                box-shadow var(--dur-base) ease;
    animation: skip-glow 2.4s ease-in-out infinite;
  }
  .pipe-skip-btn__arrow {
    display: inline-block;
    animation: skip-arrow-bounce 1.6s ease-in-out infinite;
  }
  .pipe-skip-btn:hover {
    color: var(--amber-300);
    border-color: rgba(192,106,43,.85);
    background: rgba(26,20,12,.95);
    transform: translateY(-2px);
    animation: none;
    box-shadow: 0 6px 20px rgba(192,106,43,.28), var(--shadow-md);
  }
  .pipe-skip-btn:hover .pipe-skip-btn__arrow {
    animation: none;
    transform: translateY(2px);
    transition: transform var(--dur-base) ease;
  }
}

/* ── PIPELINE TRANSITION ARROWS ─────────────────────── */

/* Mobile: block with a downward "v" chevron (same angle as desktop ">" rotated 90°) */
.pipe-arrow {
  display: block;
  height: 64px;
  background: #0C0904;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.pipe-arrow.visible { opacity: 1; }
.pipe-arrow::before,
.pipe-arrow::after {
  content: '';
  position: absolute;
  left: calc(50% - 2px); /* centre the 4px-wide arm */
  bottom: 20px;           /* tip position — more room lets arms spread before being clipped */
  width: 4px;
  height: 170px;         /* long enough; overflow:hidden clips the top */
  background: rgba(150,78,22,.1);
  transform-origin: center bottom;
  transition: background .4s ease;
}
.pipe-arrow::before { transform: rotate(-80deg); } /* left arm  */
.pipe-arrow::after  { transform: rotate(80deg);  } /* right arm */

@media (min-width: 1024px) {
  .pipe-arrow {
    display: block;
    flex: none;
    width: 75px;
    height: auto;          /* override mobile fixed height so align-self:stretch works */
    align-self: stretch;
    background: #0C0904;
    position: relative;
    overflow: hidden;
    opacity: 1;
    transition: none;
  }
  /* Reset mobile geometry and use horizontal arms pointing right */
  .pipe-arrow::before,
  .pipe-arrow::after {
    content: '';
    position: absolute;
    left: auto;            /* reset mobile left */
    bottom: auto;          /* reset mobile bottom */
    right: 20px;           /* tip sits near the right edge */
    top: 50%;
    width: 200px;          /* long enough; overflow:hidden clips the left end */
    height: 4px;
    background: rgba(150,78,22,.1);
    transform-origin: right center;
    transition: background .4s ease;
  }
  .pipe-arrow::before { transform: translateY(-50%) rotate(-80deg); } /* upper arm */
  .pipe-arrow::after  { transform: translateY(-50%) rotate(80deg);  } /* lower arm */

  /* Brighten when the preceding frame is active */
  .pipe-frame--active + .pipe-arrow::before,
  .pipe-frame--active + .pipe-arrow::after {
    background: #1d160a;
  }
}

/* Pipeline frame dim / focus — desktop only */
@media (min-width: 1024px) {
  .pipe-filmstrip-section .film-frame {
    opacity: 0.4;
    transition: opacity 0.5s ease;
  }
  .pipe-filmstrip-section .film-frame.pipe-frame--active {
    opacity: 1;
  }
  /* Overlay and text-frame content start hidden and slide up on activation */
  .pipe-filmstrip-section .film-frame .film-frame__overlay,
  .pipe-filmstrip-section .film-frame--text .film-frame__content {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.4s ease 0.18s,
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.18s;
  }
  .pipe-filmstrip-section .film-frame.pipe-frame--active .film-frame__overlay,
  .pipe-filmstrip-section .film-frame--text.pipe-frame--active .film-frame__content {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── PIPELINE STEP NAVIGATOR ─────────────────────────── */
.pipe-step-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px var(--sp-2);
  padding: var(--sp-3) var(--gutter) var(--sp-1);
}
.pipe-step {
  font-family: 'JetBrains Mono', monospace;
  font-size: .5625rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--emulsion-500);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--emulsion-600);
  transition: color .3s ease, border-color .3s ease, background-color .3s ease;
}
.pipe-step--active {
  color: var(--amber-400);
  border-color: rgba(192,106,43,.55);
  background: rgba(192,106,43,.1);
}
.pipe-step-arrow {
  color: var(--emulsion-600);
  font-size: .75rem;
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
}

/* Progress bar */
.filmstrip-progress {
  height: 2px;
  background: var(--emulsion-700);
  margin: 1rem var(--gutter) 0;
  border-radius: 1px;
  overflow: hidden;
  display: none;
}
.filmstrip-progress__bar {
  height: 100%;
  background: linear-gradient(to right, var(--amber-700), var(--amber-500));
  width: 0%;
  transition: width .06s linear;
  border-radius: 1px;
}

/* ── CONTENT SECTIONS ────────────────────────────────── */
.section { padding: var(--sp-9) 0; }
.section--cream  { background: var(--cream-100); }
.section--raised { background: var(--cream-50);  }
.section--dark   { background: var(--emulsion-900); }
.section--dark .sec-title { color: var(--cream-50); }
.section--dark .sec-lead  { color: var(--cream-200); }

/* ── MOTIVATION ──────────────────────────────────────── */
.feat-grid {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: var(--sp-7);
}
.feat-item {
  padding: var(--sp-5) 0;
  border-top: 1px solid var(--cream-300);
}
.feat-num {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: .6875rem;
  color: var(--accent);
  letter-spacing: .1em;
  margin-bottom: 8px;
}
.feat-item h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -.01em;
  color: var(--ink-900);
}
.feat-item p { font-size: .9375rem; color: var(--ink-600); line-height: 1.65; }

/* ── CONTRIBUTIONS ───────────────────────────────────── */
.contrib-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  margin-top: var(--sp-7);
}
.contrib-card {
  background: var(--cream-100);
  border: 1px solid var(--cream-300);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--dur-base) ease, border-color var(--dur-base) ease, transform var(--dur-base) ease;
}
.contrib-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--amber-200);
  transform: translateY(-2px);
}
.contrib-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--amber-100);
  color: var(--amber-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.contrib-icon svg { width: 22px; height: 22px; }
.contrib-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: .6875rem;
  color: var(--accent);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.contrib-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.1;
  color: var(--ink-900);
  letter-spacing: -.01em;
}
.contrib-card p { font-size: .9375rem; color: var(--ink-600); line-height: 1.65; }

/* ── DATASET ─────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
  margin-top: var(--sp-7);
}
.stat-card { padding: var(--sp-5); border-top: 2px solid var(--accent); }
.stat-val {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--ink-900);
  line-height: 1;
  letter-spacing: -.02em;
}
.stat-val--accent { color: var(--accent); }
.stat-lbl {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: .6875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin-top: 8px;
}

.dataset-video {
  border: 1px solid var(--cream-300);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.dataset-video video {
  display: block;
  width: 100%;
  height: auto;
}
.dataset-video .caption {
  padding: var(--sp-3) var(--sp-5);
  border-top: 1px solid var(--cream-300);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--cream-300);
  border-radius: var(--r-lg);
  height: auto;
  min-width: 0;
}
/* .table-wrap + .table-wrap { margin-top: var(--sp-5); } */

table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: .8125rem;
}
table.tbl caption {
  text-align: left;
  font-size: .6875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-400);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--cream-300);
}
table.tbl th, table.tbl td {
  padding: 11px var(--sp-5);
  text-align: right;
  border-bottom: 1px solid var(--cream-300);
}
table.tbl th:first-child, table.tbl td:first-child { text-align: left; }
table.tbl th {
  font-weight: 500;
  font-size: .625rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-400);
  background: var(--cream-100);
}
table.tbl tbody td { background: var(--cream-50); }
table.tbl td:first-child { color: var(--ink-900); }
table.tbl td.old { color: var(--ink-400); }
table.tbl td.new { color: var(--ink-900); font-weight: 500; }
table.tbl td.num { font-variant-numeric: tabular-nums; }
table.tbl tr.best td { background: var(--amber-100); color: var(--amber-700); font-weight: 700; }
table.tbl tr.best td:first-child { color: var(--amber-700); }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl th.dataset-group {
  text-align: center;
  background: rgba(0,0,0,.025);
}
table.tbl th.sep,
table.tbl td.sep {
  border-left: 2px solid var(--cream-300);
}
table.tbl tr.ref-row td {
  color: var(--ink-400);
  font-style: italic;
  border-bottom: 2px solid var(--cream-300);
}
table.tbl--wide th,
table.tbl--wide td {
  padding: 9px 11px;
}

/* ── ABSOLUTEDEGRADATION PIPELINE VIZ ───────────────── */
.pipe-banner {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  background: rgba(138,56,42,.08);
  border: 1px solid rgba(138,56,42,.28);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  margin: var(--sp-6) 0;
  font-size: .875rem;
  line-height: 1.65;
  color: var(--cream-200);
}
.pipe-banner strong { color: #d9907e; }
.pipe-banner em { font-style: italic; color: var(--cream-100); }
.pipe-banner p { flex: 1; margin: 0; }
.pipe-banner__icon { font-size: 1.125rem; flex: none; margin-top: 2px; line-height: 1; }

.pipe-viz {
  margin-top: var(--sp-6);
  display: flex;
  flex-direction: column;
}

.pipe-row {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
}

.pipe-node {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out), border-color .35s ease, box-shadow .35s ease;
}
.pipe-node:hover { border-color: rgba(192,106,43,.28); }

@keyframes pipe-node-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192,106,43,0); }
  50%       { box-shadow: 0 0 16px 3px rgba(192,106,43,.14); }
}
.pipe-node--active {
  border-color: rgba(192,106,43,.7) !important;
  animation: pipe-node-pulse 1.2s ease-in-out infinite;
}
.pipe-connector--lit::after { color: var(--amber-400) !important; }

.pipe-node--io   { border-color: rgba(192,106,43,.24); }
.pipe-node--crop { border-color: rgba(178,137,54,.22); }
.pipe-node--art  { border-color: rgba(179,91,65,.22);  }
.pipe-node--neg  { border-color: rgba(78,126,164,.22); }
.pipe-node--core { border-color: rgba(168,124,29,.22); }
.pipe-node--fin  { border-color: rgba(125,90,148,.22); }
.pipe-node--scr  { border-color: rgba(110,140,72,.22); }

.pipe-node__img {
  aspect-ratio: 4/3;
  border-radius: var(--r-xs);
  overflow: hidden;
  background: var(--emulsion-900);
  flex: none;
  margin-bottom: 2px;
}
.pipe-node__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pipe-node__img--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.025);
}
.pipe-node__img--icon svg { width: 36%; height: 36%; color: rgba(255,255,255,.22); }

.pipe-node__badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: .5rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--amber-400);
}
.pipe-node--io   .pipe-node__badge { color: var(--amber-400); }
.pipe-node--crop .pipe-node__badge { color: #B28936; }
.pipe-node--art  .pipe-node__badge { color: #B35B41; }
.pipe-node--neg  .pipe-node__badge { color: #4E7EA4; }
.pipe-node--core .pipe-node__badge { color: #A87C1D; }
.pipe-node--fin  .pipe-node__badge { color: #9D7DB8; }
.pipe-node--scr  .pipe-node__badge { color: #6E8C48; }

.pipe-node__title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--cream-100);
  margin: 0;
  line-height: 1.25;
}
.pipe-node__desc {
  font-family: 'JetBrains Mono', monospace;
  font-size: .5625rem;
  color: var(--ink-300);
  line-height: 1.55;
}

.pipe-connector {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 0;
  opacity: 0;
  transition: opacity .4s ease, color .25s ease;
}
.pipe-connector::after {
  content: '↓';
  font-size: .875rem;
  color: var(--amber-700);
  transition: color .25s ease;
}

.pipe-gt-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: .5625rem;
  color: var(--ink-400);
  text-align: center;
  margin-top: var(--sp-5);
  letter-spacing: .04em;
  font-style: italic;
}

/* ── VIDEO SLIDER ────────────────────────────────────── */
.vslider {
  position: relative;
  aspect-ratio: 16/9;
  width: 100%;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--emulsion-900);
  box-shadow: var(--shadow-frame), var(--shadow-lg);
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.vslider video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: block;
}
.vslider__restored { z-index: 1; }
.vslider__original { z-index: 2; clip-path: inset(0 50% 0 0); }

/* Loading overlay — shown until BOTH videos are ready to play */
.vslider__loader {
  position: absolute;
  inset: 0;
  z-index: 5;                      /* above videos (1,2), labels (3), handle (4) */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  background: var(--emulsion-900);
  cursor: default;
  transition: opacity .45s ease, visibility .45s ease;
}
.vslider__loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.vslider__spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(251, 246, 236, .16);
  border-top-color: var(--accent);
  animation: vslider-spin .8s linear infinite;
}
.vslider__loader-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: .625rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cream-300);
}
@keyframes vslider-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .vslider__spinner { animation-duration: 1.8s; }
}

/* ── RESULTS (SLIDERS) ───────────────────────────────── */
.sliders-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-7);
  margin-top: var(--sp-7);
}

/* ── METRICS ─────────────────────────────────────────── */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
  margin: var(--sp-7) 0;
}
.metric__val {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1;
  color: var(--ink-900);
  letter-spacing: -.02em;
}
.metric__val--accent { color: var(--accent); }
.metric__delta {
  font-family: 'JetBrains Mono', monospace;
  font-size: .6875rem;
  color: var(--restored);
  margin-left: 6px;
}
.metric__lbl {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: .625rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin-top: 8px;
}
.table-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  min-width: 0;
}
.table-group + .table-group { margin-top: var(--sp-3); }
.table-group__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .5625rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--amber-500);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--cream-300);
}

.tables-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  align-items: start;
}

/* ── HUMAN STUDY ─────────────────────────────────────── */
.study-chart {
  margin: 0;
  padding: 0 var(--sp-5) var(--sp-5);
  background: var(--cream-50);
  border: 1px solid var(--cream-300);
  border-radius: var(--r-lg);
}
.study-chart__head {
  font-family: 'JetBrains Mono', monospace;
  font-size: .6875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-400);
  padding: var(--sp-4) var(--sp-5);
  margin: 0 calc(-1 * var(--sp-5));
  border-bottom: 1px solid var(--cream-300);
}
.study-group-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: .5625rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin: var(--sp-4) 0 var(--sp-1);
}
.study-rows { list-style: none; margin: 0; padding: 0; }
.study-row,
.study-axis {
  display: grid;
  grid-template-columns: minmax(6.5rem, 9rem) 1fr minmax(5.5rem, 8rem);
  gap: var(--sp-3);
  align-items: center;
}
.study-row {
  padding: 6px 0;
  border-radius: var(--r-sm);
  transition: background var(--dur-fast) var(--ease-out);
}
.study-row:hover { background: var(--cream-100); }
.study-row__name {
  font-size: .875rem;
  color: var(--ink-900);
  line-height: 1.2;
}
.study-row__name small,
.study-row__val small {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: .5625rem;
  letter-spacing: .04em;
  color: var(--ink-400);
  margin-top: 2px;
}
.study-row__plot {
  position: relative;
  height: 28px;
}
/* chance line at 50% (scale 40–100%) */
.study-row__plot::before {
  content: '';
  position: absolute;
  left: 16.667%;
  top: -6px; bottom: -6px;
  border-left: 1px dashed var(--ink-300);
}
.study-ci {
  position: absolute;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: var(--amber-400);
  border-radius: 1px;
}
.study-dot {
  position: absolute;
  top: 50%;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--amber-500);
  box-shadow: 0 0 0 2px var(--cream-50);
}
.study-row--ns .study-dot {
  background: var(--cream-50);
  border: 2px solid var(--amber-500);
}
.study-row--ns .study-ci { background: var(--amber-300); }
.study-row--total .study-row__name { font-weight: 600; }
.study-row--total .study-dot { width: 12px; height: 12px; margin: -6px 0 0 -6px; background: var(--amber-700); }
.study-row--total .study-ci { background: var(--amber-600); }
.study-row__val {
  font-family: 'JetBrains Mono', monospace;
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-900);
  text-align: right;
}
.study-row__val b { font-weight: 700; }
.study-ns {
  margin-left: 6px;
  font-size: .5625rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.study-axis { margin-top: var(--sp-2); }
.study-axis__ticks {
  position: relative;
  height: 3.2em;
  border-top: 1px solid var(--cream-300);
  font-family: 'JetBrains Mono', monospace;
  font-size: .5625rem;
  color: var(--ink-400);
}
.study-axis__ticks span,
.study-axis__ticks em {
  position: absolute;
  top: 4px;
  transform: translateX(-50%);
  font-style: normal;
}
.study-axis__ticks em {
  top: auto; bottom: -2px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-500);
}
@media (max-width: 539px) {
  .study-chart { padding: 0 var(--sp-3) var(--sp-4); }
  .study-chart__head { padding: var(--sp-3); margin: 0 calc(-1 * var(--sp-3)); }
  .study-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "name val" "plot plot";
    gap: 2px var(--sp-2);
    padding: 8px 0 4px;
  }
  .study-row__name { grid-area: name; }
  .study-row__val  { grid-area: val; }
  .study-row__plot { grid-area: plot; height: 22px; }
  .study-row__plot::before { top: 0; bottom: -4px; }
  .study-row__val small { display: inline; margin-left: 6px; }
  .study-axis { grid-template-columns: 1fr; }
  .study-axis > span:not(.study-axis__ticks) { display: none; }
}

/* ── ACHIEVEMENTS ────────────────────────────────────── */
.ach-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--emulsion-700);
  border: 1px solid var(--emulsion-700);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: var(--sp-7);
}
.ach-item { background: var(--emulsion-800); padding: var(--sp-6); }
.ach-num {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(3.5rem, 9vw, 5.5rem);
  line-height: 1;
  color: var(--cream-50);
  letter-spacing: -.03em;
  margin-bottom: var(--sp-3);
}
.ach-lbl {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: .6875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-300);
  line-height: 1.55;
}

/* ── PUBLICATIONS ────────────────────────────────────── */
.pub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  margin-top: var(--sp-7);
}
.pub-card {
  display: flex;
  gap: var(--sp-5);
  align-items: flex-start;
  background: var(--cream-50);
  border: 1px solid var(--cream-300);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  transition: box-shadow var(--dur-base) ease;
}
.pub-card:hover { box-shadow: var(--shadow-md); }
.pub-year {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--accent);
  flex: none;
  min-width: 2.75rem;
}
.pub-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink-900);
  line-height: 1.4;
}
.pub-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: .725rem;
  color: var(--ink-500);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-bottom: 10px;
}
.pub-meta span { display: inline-flex; align-items: center; gap: 5px; }

.bibtex-card {
  background: var(--cream-50);
  border: 1px solid var(--cream-300);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  margin-top: var(--sp-5);
}
.bibtex-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: .6875rem;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--cream-300);
  color: var(--ink-500);
}
pre.bibtex {
  background: var(--emulsion-900);
  color: var(--cream-200);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
  line-height: 1.75;
  overflow-x: auto;
  white-space: pre;
}
.bib-k { color: var(--amber-400); }
.bib-s { color: #7DB88D; }

/* ── TEAM ────────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-7);
  align-items: start;
  margin-top: var(--sp-7);
}
.team-photo {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--cream-300);
}
.team-photo img { width: 100%; display: block; object-fit: cover; }
.team-roster { display: flex; flex-direction: column; }
.person {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--cream-300);
}
.person:last-child { border-bottom: none; }
.person-id {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.person-name { font-size: 1rem; color: var(--ink-900); }
.person-link {
  display: inline-flex;
  color: var(--ink-300);
  transition: color var(--dur-base) ease;
}
.person-link svg { width: 16px; height: 16px; }
.person-link:hover,
.person-link:focus-visible { color: #0A66C2; }
.person-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: .625rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-400);
  white-space: nowrap;
}

/* ── FOOTER ──────────────────────────────────────────── */
.footer {
  background: var(--emulsion-900);
  color: var(--cream-200);
  padding: var(--sp-9) 0 var(--sp-7);
}
.footer-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-7);
}
.footer-brand a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--cream-100);
  text-decoration: none;
  margin-bottom: var(--sp-4);
}
.footer-brand p {
  font-size: .875rem;
  color: var(--cream-300);
  max-width: 340px;
  line-height: 1.6;
}
.footer-partner__lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: .6875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cream-300);
  display: block;
}
.footer-logos {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
  margin-top: var(--sp-4);
}
.footer-logo-plate {
  background: var(--cream-50);
  border-radius: var(--r-sm);
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
}
.footer-logo-plate img { height: 36px; width: auto; }
.footer-bottom {
  border-top: 1px solid var(--emulsion-700);
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.footer-bottom span {
  font-family: 'JetBrains Mono', monospace;
  font-size: .625rem;
  letter-spacing: .04em;
  color: var(--ink-400);
}

/* ── SCROLL REVEAL ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal--d1 { transition-delay: .06s; }
.reveal--d2 { transition-delay: .12s; }
.reveal--d3 { transition-delay: .18s; }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (min-width: 540px) {
  .stats-row { grid-template-columns: repeat(4, 1fr); }
  .metrics-row { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 680px) {
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-grid--3col { grid-template-columns: repeat(3, 1fr); }
  .ach-grid  { grid-template-columns: repeat(3, 1fr); }
  .pub-grid  { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

@media (min-width: 768px) {
  .nav__hamburger { display: none; }
  .nav__links {
    position: static;
    display: flex !important;
    flex-direction: row;
    background: none;
    padding: 0;
    margin-left: auto;
    gap: var(--sp-5);
    border: none;
  }
  .nav__links a {
    padding: 0;
    border-bottom: none;
    font-size: .75rem;
  }
  .contrib-grid { grid-template-columns: repeat(3, 1fr); }
  .sliders-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid    { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
  .feat-grid    { grid-template-columns: repeat(4, 1fr); }
  .feat-grid--3col { grid-template-columns: repeat(3, 1fr); }

  /* Pipeline: 4-column grid on tablet, no scroll */
  .pipe-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-3);
    overflow: visible;
    padding: 0;
  }
  .pipe-connector { display: none; }
  .pipe-node { min-width: 0; }
}

@media (min-width: 1024px) {
  /* Film strip: horizontal pinned scroll */
  .filmstrip-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    padding: 0;
  }
  .filmstrip-header { padding: 1.25rem var(--gutter) 0; }
  .filmstrip-viewport {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
  }
  .filmstrip-track {
    flex-direction: row;
    width: max-content;
    will-change: transform;
  }
  .film-frame {
    overflow: hidden;
    width: min(840px, 68vw);
    aspect-ratio: 16/9;
  }
  .film-frame img {
    aspect-ratio: unset;
    height: 100%;
  }
  /* restore vignette on image frames (text frame keeps its own display:none) */
  .film-frame:not(.film-frame--text)::after { display: block; }
  .film-frame__overlay {
    position: absolute;
    inset: 0;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(14,11,7,.92) 0%, rgba(14,11,7,.4) 50%, transparent 100%);
    z-index: 3;
  }
  .filmstrip-progress { display: block; }

  /* Pipeline: single compact row on wide screens */
  .pipe-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    overflow: visible;
    padding: 0;
  }
  .pipe-node { flex: 1; min-width: 0; }
  .pipe-connector {
    display: flex;
    align-self: center;
    width: 20px;
    flex: 0 0 20px;
    padding: 0;
  }
  .pipe-connector::after { content: '→'; }
}

@media (min-width: 1280px) {
  .film-frame { width: min(920px, 62vw); }
}

/* ── VIDEO CAROUSEL ──────────────────────────────── */
.vcarousel {
  margin-top: var(--sp-7);
  outline: none;
}
.vcarousel__track {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--emulsion-900);
  box-shadow: var(--shadow-frame), var(--shadow-lg);
}
.vcarousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  pointer-events: none;
}
.vcarousel__slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
/* vslider inside carousel fills the slide, no own border/shadow */
.vcarousel .vslider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
  border-radius: 0;
  box-shadow: none;
}
.vcarousel__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-4);
  margin-top: var(--sp-4);
}
.vcarousel__title {
  margin: 0;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vcarousel__nav {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: none;
}
.vcarousel__btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--cream-300);
  background: var(--cream-50);
  color: var(--ink-600);
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.vcarousel__btn:hover {
  background: var(--cream-100);
  border-color: var(--amber-300);
  color: var(--ink-900);
}
.vcarousel__dots {
  display: flex;
  gap: 7px;
  align-items: center;
}
.vcarousel__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: var(--cream-300);
  padding: 0;
  cursor: pointer;
  transition: background var(--dur-base) ease, transform var(--dur-base) ease;
}
.vcarousel__dot.active {
  background: var(--accent);
  transform: scale(1.35);
}
