/* ============================================================
   Shahnawaz Zali — Portfolio (multi-page, client-side routed)
   Cinematic, dark-first, warm film grade. Home is a scroll-scrubbed
   film hero; Work / Film / About / Contact are separate pages reached
   through a letterbox-wipe transition.
   Type: Söhne Dreiviertelfett (headlines/transitions) + Söhne Leicht
   (body) + DM Mono (labels).
   ============================================================ */

/* ---------- Söhne (self-hosted) ---------- */
@font-face {
  font-family: "Soehne Headline"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../assets/fonts/soehne-dreiviertelfett.woff2") format("woff2");
}
@font-face {
  font-family: "Soehne Headline"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("../assets/fonts/soehne-dreiviertelfett-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Soehne Body"; font-style: normal; font-weight: 100 600; font-display: swap;
  src: url("../assets/fonts/soehne-leicht.woff2") format("woff2");
}
@font-face {
  font-family: "Soehne Body"; font-style: italic; font-weight: 100 600; font-display: swap;
  src: url("../assets/fonts/soehne-leicht-italic.woff2") format("woff2");
}

:root {
  --canvas: #0e0d0b;
  --panel: #1a1712;
  --bg-alt: #16140f;
  --text-primary: #f4efe6;
  --text-secondary: #a89f8f;
  --accent: #BBC2CC;
  --accent-hover: #DCE1E8;
  --accent-muted: rgba(187, 194, 204, 0.14);
  --accent-2: #8A929E;
  --border: #2a251d;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);

  --font-body: "Soehne Body", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Soehne Headline", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 0.25s var(--ease);
  --tshadow: 0 1px 2px rgba(5,5,8,.95), 0 3px 12px rgba(5,5,8,.78), 0 10px 44px rgba(5,5,8,.8);
}

[data-theme="light"] {
  --canvas: #ffffff;
  --panel: #ffffff;
  --bg-alt: #ffffff;
  --text-primary: #211d16;
  --text-secondary: #6b6151;
  --accent: #6b7280;
  --accent-hover: #4b5563;
  --accent-muted: rgba(107, 114, 128, 0.12);
  --accent-2: #6b7280;
  --border: #e5ddce;
  --shadow: 0 20px 50px rgba(60, 45, 20, 0.1);
}

/* ---------- Reset & base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; overflow-x: clip; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--canvas);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition), opacity var(--transition); }
a:hover { opacity: 0.82; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed; top: -60px; left: 1rem; z-index: 200;
  background: var(--accent); color: #16130d; padding: 0.6rem 1rem;
  border-radius: 8px; font-weight: 600; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; opacity: 1; }

/* ---------- Cinematic overlays ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.5s steps(2) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); } 50% { transform: translate(-4%, 3%); } 100% { transform: translate(3%, -2%); }
}
.particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; width: 100%; height: 100%; }
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 0%, var(--accent-muted), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(187, 194, 204, 0.05), transparent 50%);
}
/* Keep the light theme pure white — no warm wash. */
[data-theme="light"] body::before { background: none; }

/* ---------- Nav (fixed, overlays every page) ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 70px;
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--canvas) 62%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
/* Day theme: solid white bar (no translucency), crisp hairline underneath. */
[data-theme="light"] .nav {
  background: #ffffff;
  border-bottom-color: var(--border);
}
.brand {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.05rem, 2vw, 1.25rem);
  letter-spacing: 0.01em; color: var(--text-primary); border: none; background: none;
  padding: 0; cursor: pointer; line-height: 1; white-space: nowrap;
}
.brand:hover { color: var(--accent); opacity: 1; }
.nav__links { display: flex; gap: 1.75rem; list-style: none; }
.nav__link {
  color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; position: relative;
  background: none; border: none; cursor: pointer; font-family: inherit; padding: 0.2rem 0;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: -3px; width: 0; height: 1.5px;
  background: var(--accent); transition: width var(--transition);
}
.nav__link:hover { color: var(--accent); }
.nav__link:hover::after, .nav__link.is-current::after { width: 100%; }
.nav__link.is-current { color: var(--text-primary); }
.nav__theme-toggle { background: none; border: none; font-size: 1.15rem; cursor: pointer; padding: 0.25rem; }

/* ---------- Pages & transition ---------- */
main { position: relative; z-index: 2; }
.page { display: none; min-height: 100vh; padding-top: 70px; }
.page.is-active { display: block; }
.page.home { padding-top: 0; }

.letterbox {
  position: fixed; left: 0; right: 0; height: 52vh; background: #000000; z-index: 80;
  transform: scaleY(0); pointer-events: none;
}
.letterbox--top { top: 0; transform-origin: top; }
.letterbox--bottom { bottom: 0; transform-origin: bottom; }
.letterbox.close { transition: transform 0.42s var(--ease); transform: scaleY(1); }
.letterbox.open { transition: transform 0.5s var(--ease); transform: scaleY(0); }
.transition-title {
  position: fixed; inset: 0; z-index: 81; display: flex; align-items: center; justify-content: center;
  pointer-events: none; font-family: var(--font-display); font-size: clamp(2rem, 7vw, 4.5rem);
  font-weight: 600; color: #BBC2CC; opacity: 0; letter-spacing: 0.02em;
}
.transition-title.show { opacity: 1; transition: opacity 0.3s var(--ease); }
/* Light theme: white wipe panels with black transition text */
[data-theme="light"] .letterbox { background: #ffffff; }
[data-theme="light"] .transition-title { color: #000000; }

/* Per-page entrance (staggered rise) */
.rise-item { opacity: 0; transform: translateY(30px); }
.page.is-active.anim .rise-item { animation: riseItem 0.7s var(--ease) forwards; }
.page.is-active.anim .rise-item:nth-child(2) { animation-delay: 0.09s; }
.page.is-active.anim .rise-item:nth-child(3) { animation-delay: 0.18s; }
.page.is-active.anim .rise-item:nth-child(4) { animation-delay: 0.27s; }
.page.is-active.anim .rise-item:nth-child(5) { animation-delay: 0.36s; }
.page.is-active.anim .rise-item:nth-child(6) { animation-delay: 0.45s; }
@keyframes riseItem { to { opacity: 1; transform: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 0.85rem 1.75rem; border-radius: var(--radius); font-weight: 600; font-size: 0.95rem;
  cursor: pointer; border: none; font-family: inherit;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.btn:hover { transform: translateY(-2px); opacity: 1; }
.btn--primary { background: #4b5563; color: #ffffff; box-shadow: 0 8px 24px rgba(0,0,0,0.28); }
.btn--primary:hover { background: #5b6675; box-shadow: 0 12px 32px rgba(0,0,0,0.34); }
.btn--ghost { border: 1px solid rgba(244,239,230,0.4); color: #f4efe6; background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   HOME — scroll-scrubbed film hero ("The Living Archive")
   ============================================================ */
.hero-scrub { position: relative; height: 680vh; }
.hero-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; background: #050505; }
.hero-poster, .hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; background-size: cover; background-position: center;
}
.hero-video { opacity: 0; transition: opacity 0.6s var(--ease); transform: translateZ(0); will-change: transform; }
.hero-stage.video-ready .hero-video { opacity: 1; }
.hero-stage.video-failed .hero-video { display: none; }

/* Subtle, localized legibility only (bottom band + faint top edge) */
.hero-scrim {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    linear-gradient(180deg, rgba(8,7,5,0.34) 0%, rgba(8,7,5,0) 16%),
    linear-gradient(0deg, rgba(6,5,4,0.62) 0%, rgba(6,5,4,0.14) 30%, rgba(6,5,4,0) 48%);
}
.hero-ring {
  position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px;
  z-index: 5; color: var(--accent); transform: rotate(-90deg); transition: opacity 0.4s var(--ease);
}
.hero-ring circle { transition: stroke-dashoffset 0.15s linear; }
.hero-stage.video-ready .hero-ring, .hero-stage.video-failed .hero-ring { opacity: 0; }

/* Live captions, synced to the five sections */
.hero-captions { position: absolute; inset: 0; z-index: 4; pointer-events: none; text-shadow: var(--tshadow); }
.hero-captions a { pointer-events: auto; }
.js #heroCaptions [data-band] { opacity: 0; will-change: opacity, transform; }

/* Centered on the footage's vertical axis (the drawer / passage / doorway).
   The two eyebrow labels are stacked in one grid cell so they crossfade in
   place; centering lives on the containers so the JS transform (translateY
   reveal) never clobbers it. */
.hero-eyebrow {
  position: absolute; left: 50%; top: 15vh; transform: translateX(-50%); margin: 0;
  display: grid; justify-items: center; text-align: center;
  color: #fbf7ee; font-family: var(--font-mono); font-weight: 500;
  font-size: clamp(0.74rem, 1.4vw, 0.9rem); letter-spacing: 0.16em; text-transform: uppercase;
}
.hero-eyebrow .eb { grid-area: 1 / 1; white-space: nowrap; }

.hero-copy {
  position: absolute; left: 50%; bottom: clamp(3.5rem, 12vh, 8rem); transform: translateX(-50%);
  width: min(900px, 90vw); text-align: center;
}
.hero-headline {
  font-family: var(--font-display); font-size: clamp(1.35rem, 3vw, 2.4rem); line-height: 1.2;
  font-weight: 600; letter-spacing: 0; color: #fbf7ee; margin: 0 0 1.1rem; text-wrap: balance;
}
.hero-headline .hl { display: block; }
.hero-support {
  font-family: var(--font-body); font-size: clamp(1rem, 2vw, 1.3rem); line-height: 1.5;
  color: #e8e2d6; max-width: 44ch; margin: 0 auto 0.9rem;
}
.hero-byline {
  font-family: var(--font-mono); font-size: clamp(0.8rem, 1.5vw, 0.95rem); letter-spacing: 0.14em;
  text-transform: uppercase; color: #fbf7ee; margin: 0;
}
/* Recognition marks under the name (white, subtle) */
.hero-awards {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(1.5rem, 3.5vw, 2.75rem);
  margin-top: clamp(1.25rem, 2.4vh, 1.9rem);
}
.hero-awards img {
  height: clamp(40px, 5.2vh, 58px); width: auto;
  opacity: 0.82; filter: drop-shadow(0 1px 6px rgba(0,0,0,0.55));
}
.hero-awards img.award-academy { height: clamp(64px, 8.4vh, 94px); }  /* icon + wordmark + NOMINEE lockup */

.hero-cue {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: rgba(244,239,230,0.72); font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.18em; text-transform: uppercase; text-shadow: 0 1px 6px rgba(0,0,0,0.8);
  transition: opacity 0.5s var(--ease);
}
.hero-cue__line { width: 1px; height: 38px; background: linear-gradient(var(--accent), transparent); animation: scrollPulse 2s ease-in-out infinite; }
.hero-scrub.scrolled .hero-cue { opacity: 0; }
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; transform-origin: top; }
  50% { transform: scaleY(1); opacity: 1; transform-origin: top; }
}

/* ---------- Section shell (Work / About) ---------- */
.wrap { max-width: 1100px; margin-inline: auto; padding: clamp(4.5rem, 9vw, 7rem) clamp(1.75rem, 5vw, 3rem) 5rem; }
.page__head { margin-bottom: 3rem; }
.page__num { color: var(--accent); font-family: var(--font-mono); font-size: 0.95rem; }
.page__title { font-family: var(--font-display); font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 600; line-height: 1.05; margin-top: 0.5rem; }
.page__lead { color: var(--text-secondary); margin-top: 1rem; max-width: 60ch; font-size: 1.08rem; }
.page__lead em { color: var(--accent); font-style: italic; }

/* ---------- Film page: essay + animated pull-quote ---------- */
.film-essay {
  display: grid; grid-template-columns: 1.35fr 1fr;
  gap: clamp(2.5rem, 6vw, 5.5rem); align-items: start;
  margin-bottom: clamp(3.5rem, 7vw, 6rem);
}
.film-essay__lead {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.55rem, 3vw, 2.2rem); line-height: 1.18;
  color: var(--text-primary); margin-bottom: 1.6rem; text-wrap: balance;
}
.film-essay__body p {
  color: var(--text-secondary); font-size: clamp(1rem, 1.15vw, 1.12rem);
  line-height: 1.75; margin-bottom: 1.15rem; max-width: 64ch;
}
.film-essay__body p:last-child { margin-bottom: 0; }
.film-essay__body em { color: var(--text-primary); font-style: italic; }

.film-quote { position: sticky; top: 118px; align-self: start; }
.film-quote__text {
  position: relative; margin: 0; padding-top: 2.6rem;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.55rem, 2.7vw, 2.4rem); line-height: 1.28;
  color: var(--text-primary);
}
.film-quote__text::before {
  content: "\201C"; position: absolute; top: -0.35em; left: -0.06em;
  font-family: var(--font-display); font-size: 4.2rem; line-height: 1;
  color: var(--accent); opacity: 0.85;
}
.film-quote__text::after {
  content: ""; display: block; width: 3.2rem; height: 2px; margin-top: 1.4rem;
  background: var(--accent); transform-origin: left; transform: scaleX(0);
}
.qw { display: inline-block; margin-right: 0.26em; }
.js .qw { opacity: 0; transform: translateY(0.45em); }
.js .film-quote__text::after { transform: scaleX(0); }
.film-quote.is-inview .qw {
  animation: qwIn 0.55s var(--ease) forwards;
  animation-delay: calc(var(--i) * 0.07s);
}
.film-quote.is-inview .film-quote__text::after {
  animation: qwRule 0.6s var(--ease) 1.25s forwards;
}
@keyframes qwIn { to { opacity: 1; transform: none; } }
@keyframes qwRule { to { transform: scaleX(1); } }

/* ---------- Work cards ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform 0.4s var(--ease), border-color var(--transition); transform-style: preserve-3d;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.card__media { aspect-ratio: 16 / 9; display: flex; align-items: flex-end; padding: 1rem 1.25rem; position: relative; overflow: hidden; }
.card__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.12) 50%, transparent 70%);
  transform: translateX(-100%); transition: transform 0.7s var(--ease);
}
.card:hover .card__media::after { transform: translateX(100%); }
.card__media { text-decoration: none; color: inherit; cursor: pointer; }
.card__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.45); border: 1.5px solid rgba(255,255,255,0.85); color: #fff;
  backdrop-filter: blur(4px); transition: background var(--transition), transform var(--transition);
}
.card:hover .card__play, .card__media:focus-visible .card__play {
  background: var(--accent); color: #0a0908; transform: translate(-50%, -50%) scale(1.08);
}
.card__play svg { margin-left: 3px; }
.card__media--film { background: linear-gradient(135deg, #23262b 0%, var(--accent-2) 100%); }
.card__media--film2 { background: linear-gradient(135deg, #22252a 0%, #565e68 100%); }
.card__kicker {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: rgba(255,255,255,0.92); background: rgba(0,0,0,0.35); padding: 0.25rem 0.6rem;
  border-radius: 6px; backdrop-filter: blur(4px); position: relative; z-index: 1;
}
.card__body { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.card__title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; margin-bottom: 0.6rem; }
.card__desc { color: var(--text-secondary); font-size: 0.98rem; flex-grow: 1; }
.card__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.card__tags li { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); background: var(--accent-muted); padding: 0.25rem 0.7rem; border-radius: 20px; }
.card__link { margin-top: 1.1rem; font-weight: 600; font-size: 0.95rem; }

/* ---------- Press & Recognition (cinematic press kit) ---------- */
.presskit { --on:#f6f1e8; --on-muted:#ddd5c7; --gold:#c9ced6; --glass:rgba(15,12,9,0.5); }

/* Intro */
.presskit .pk-eyebrow { font-family:var(--font-mono); font-size:0.75rem; letter-spacing:0.3em; text-transform:uppercase; color:var(--accent); }
.presskit .pk-title { font-family:var(--font-display); font-weight:600; font-size:clamp(2.4rem,6vw,4.6rem); line-height:1.0; letter-spacing:-0.02em; margin:0.9rem 0 0; text-wrap:balance; color:var(--text-primary); }
.presskit .pk-title em { font-style:italic; color:var(--accent); }
.presskit .pk-lead { color:var(--text-secondary); max-width:56ch; margin:1.4rem 0 0; font-size:1.08rem; }
.presskit .pk-lead em { font-style:italic; color:var(--text-primary); }

/* Featured banner (over a dark film still — uses fixed light tokens) */
.presskit .feature { position:relative; display:flex; align-items:flex-end; margin:clamp(1.75rem,4vw,3rem) 0; border-radius:var(--radius); overflow:hidden; min-height:clamp(340px,50vh,520px); border:1px solid var(--border); color:var(--on); text-decoration:none; }
.presskit .feature__img { position:absolute; inset:0; background-size:cover; background-position:center 35%; transform:scale(1.02); transition:transform 1.2s var(--ease); }
.presskit .feature__img::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg, rgba(10,9,8,0.94) 0%, rgba(10,9,8,0.7) 42%, rgba(10,9,8,0.25) 100%), radial-gradient(140% 120% at 80% 20%, transparent 40%, rgba(10,9,8,0.65) 100%); }
.presskit .feature__grade { position:absolute; inset:0; background:linear-gradient(120deg, rgba(187,194,204,0.14), transparent 55%); mix-blend-mode:soft-light; }
.presskit .feature:hover .feature__img { transform:scale(1.06); }
.presskit .feature__body { position:relative; z-index:2; padding:clamp(1.75rem,4vw,3.25rem); max-width:640px; }
.presskit .laurel { display:inline-flex; align-items:center; gap:0.55rem; font-family:var(--font-mono); font-size:0.72rem; letter-spacing:0.14em; text-transform:uppercase; color:var(--gold); border:1px solid rgba(201,206,214,0.4); border-radius:100px; padding:0.4rem 0.9rem; background:var(--glass); backdrop-filter:blur(6px); }
.presskit .feature__title { font-family:var(--font-display); font-weight:600; font-size:clamp(1.8rem,3.6vw,2.9rem); line-height:1.05; margin:1.1rem 0 0.7rem; text-wrap:balance; color:var(--on); }
.presskit .feature__desc { color:var(--on-muted); margin:0 0 1.4rem; max-width:46ch; }
.presskit .feature__desc em { font-style:italic; color:var(--on); }

/* CTA (over image) */
.presskit .cta { display:inline-flex; align-items:center; gap:0.5rem; font-family:var(--font-mono); font-size:0.82rem; letter-spacing:0.06em; text-transform:uppercase; color:var(--gold); }
.presskit .cta::after { content:"\2192"; transition:transform 0.3s var(--ease); }
.presskit .feature:hover .cta::after, .presskit .tile:hover .cta::after { transform:translateX(6px); }

/* Montage */
.presskit .montage { margin-top:clamp(2rem,5vw,3.5rem); }
.presskit .montage { display:grid; grid-template-columns:repeat(4,1fr); grid-auto-rows:clamp(170px,21vw,250px); gap:14px; }
.presskit .tile { position:relative; overflow:hidden; border-radius:var(--radius); border:1px solid var(--border); display:flex; align-items:flex-end; grid-column:span 2; color:var(--on); text-decoration:none; }
.presskit .tile--feat { grid-column:span 2; grid-row:span 2; }
.presskit .tile--wide { grid-column:span 4; }
.presskit .tile__img { position:absolute; inset:0; background-size:cover; background-position:center; transition:transform 1s var(--ease); }
.presskit .tile__img::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(10,9,8,0.05) 30%, rgba(10,9,8,0.9) 100%); }
.presskit .tile__grade { position:absolute; inset:0; background:linear-gradient(160deg, rgba(187,194,204,0.18), transparent 60%); mix-blend-mode:soft-light; opacity:0; transition:opacity 0.5s var(--ease); }
.presskit .tile:hover .tile__img { transform:scale(1.07); }
.presskit .tile:hover .tile__grade { opacity:1; }
.presskit .tile__body { position:relative; z-index:2; padding:clamp(1.1rem,2vw,1.6rem); width:100%; }
.presskit .tile__outlet { font-family:var(--font-mono); font-size:0.72rem; letter-spacing:0.16em; text-transform:uppercase; color:var(--on); }
.presskit .tile__title { font-family:var(--font-display); font-weight:600; line-height:1.12; margin:0.5rem 0 0.2rem; font-size:clamp(1.05rem,1.5vw,1.35rem); text-wrap:balance; color:var(--on); }
.presskit .tile--feat .tile__title { font-size:clamp(1.4rem,2.2vw,2rem); }
.presskit .tile__year { font-family:var(--font-mono); font-size:0.72rem; color:var(--on-muted); }
.presskit .tile__cta { margin-top:0.9rem; max-height:0; opacity:0; overflow:hidden; transition:max-height 0.45s var(--ease), opacity 0.45s var(--ease); }
.presskit .tile:hover .tile__cta, .presskit .tile:focus-visible .tile__cta { max-height:40px; opacity:1; }
.presskit .play { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); z-index:3; width:66px; height:66px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:rgba(187,194,204,0.18); border:1.5px solid var(--gold); color:var(--gold); backdrop-filter:blur(4px); transition:background 0.4s var(--ease), transform 0.4s var(--ease); }
.presskit .tile:hover .play { background:var(--gold); color:#0a0908; transform:translate(-50%,-50%) scale(1.08); }
.presskit .play svg { margin-left:4px; }

/* Featured on */
.presskit .featured { border-top:1px solid var(--border); margin-top:clamp(2.5rem,6vw,4rem); padding:clamp(3rem,7vw,4.5rem) 0 0; text-align:center; }
.presskit .featured__label { font-family:var(--font-mono); font-size:0.72rem; letter-spacing:0.32em; text-transform:uppercase; color:var(--text-secondary); display:inline-flex; align-items:center; gap:1rem; }
.presskit .featured__label::before, .presskit .featured__label::after { content:""; width:clamp(28px,7vw,72px); height:1px; background:var(--border); }
.presskit .logos { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:clamp(1.4rem,3.5vw,3rem) clamp(1.75rem,4.5vw,3.5rem); margin:clamp(2rem,4vw,3rem) auto 0; max-width:1000px; }
.presskit .logo { color:var(--text-secondary); opacity:0.7; transition:opacity 0.35s var(--ease), color 0.35s var(--ease), transform 0.35s var(--ease); white-space:nowrap; line-height:1; display:inline-flex; align-items:baseline; gap:0.32em; }
.presskit .logo:hover { opacity:1; color:var(--text-primary); transform:translateY(-2px); }
.presskit .logo .pre { font-family:var(--font-body); font-weight:400; font-size:0.62em; letter-spacing:0.02em; opacity:0.8; }
.presskit .logo.forbes { font-family:var(--font-display); font-weight:700; font-size:1.85rem; letter-spacing:-0.01em; }
.presskit .logo.cnn { font-family:var(--font-body); font-weight:800; font-size:1.6rem; letter-spacing:-0.03em; }
.presskit .logo.ted { font-family:var(--font-body); font-weight:800; font-size:1.55rem; letter-spacing:-0.05em; }
.presskit .logo.dawn { font-family:var(--font-display); font-weight:600; font-size:1.6rem; letter-spacing:0.01em; }
.presskit .logo.tribune, .presskit .logo.today, .presskit .logo.nu { font-family:var(--font-display); font-weight:500; font-size:1.3rem; }
.presskit .logo.gulf { font-family:var(--font-display); font-weight:500; font-size:1.4rem; font-style:italic; }
.presskit .logo.daily { font-family:var(--font-display); font-weight:600; font-size:1.3rem; }
.presskit .logo.brand { font-family:var(--font-body); font-weight:700; font-size:1.3rem; letter-spacing:-0.01em; }
/* Real outlet logos: alpha silhouettes masked with the current theme text color */
.presskit .logo--img {
  display:inline-block; vertical-align:middle; background-color:currentColor; color:var(--text-secondary); opacity:0.7;
  -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat; -webkit-mask-position:center; mask-position:center;
  -webkit-mask-size:contain; mask-size:contain;
  transition:opacity 0.35s var(--ease), color 0.35s var(--ease), transform 0.35s var(--ease);
}
.presskit .logo--img:hover { opacity:1; color:var(--text-primary); transform:translateY(-2px); }

/* ---------- Film stills carousel ---------- */
.carousel {
  position: relative; max-width: 1100px; margin: 0 auto 3rem;
  padding-inline: clamp(0.75rem, 3vw, 2.5rem);
}
.carousel__viewport {
  overflow: hidden; border-radius: var(--radius);
  outline: none; touch-action: pan-y;
}
.carousel__viewport:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.carousel__track {
  display: flex; will-change: transform;
  transition: transform 0.6s var(--ease);
}
.carousel.is-dragging .carousel__track { transition: none; }
.carousel__slide { flex: 0 0 100%; aspect-ratio: 16 / 9; }

.frame {
  position: relative; overflow: hidden; border: 1px solid var(--border);
  border-radius: var(--radius); background: #0a0908; cursor: pointer; padding: 0; display: block;
  width: 100%;
}
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease), filter 0.6s var(--ease); filter: saturate(0.92); }
.frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(6,5,4,0.82) 100%); transition: opacity 0.5s var(--ease); }
.carousel__slide.is-active:hover img { transform: scale(1.04); filter: saturate(1.05); }

/* Nav arrows */
.carousel__nav {
  position: absolute; top: calc(50% - 1.4rem); transform: translateY(-50%); z-index: 3;
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  background: rgba(10,9,8,0.55); border: 1px solid rgba(255,255,255,0.18); color: #f4efe6;
  font-size: 1.7rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); transition: background var(--transition), border-color var(--transition), opacity var(--transition);
}
.carousel__nav:hover { background: rgba(10,9,8,0.8); border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent); }
.carousel__nav--prev { left: calc(clamp(0.75rem, 3vw, 2.5rem) + 0.6rem); }
.carousel__nav--next { right: calc(clamp(0.75rem, 3vw, 2.5rem) + 0.6rem); }
[data-theme="light"] .carousel__nav { background: rgba(255,255,255,0.7); color: #211d16; border-color: rgba(0,0,0,0.12); }
[data-theme="light"] .carousel__nav:hover { background: #ffffff; color: var(--accent); }

/* Dots */
.carousel__dots { display: flex; justify-content: center; gap: 0.6rem; margin-top: 1.25rem; }
.carousel__dot {
  width: 9px; height: 9px; border-radius: 50%; padding: 0; cursor: pointer;
  background: color-mix(in srgb, var(--text-secondary) 45%, transparent);
  border: none; transition: background var(--transition), transform var(--transition);
}
.carousel__dot:hover { background: var(--text-secondary); }
.carousel__dot.is-active { background: var(--accent); transform: scale(1.25); }
.frame__cap {
  position: absolute; left: 1rem; bottom: 0.85rem; z-index: 1; color: #f4efe6; font-family: var(--font-mono);
  font-size: 0.78rem; text-shadow: 0 1px 8px rgba(0,0,0,0.9); opacity: 0; transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.frame:hover .frame__cap, .frame:focus-visible .frame__cap,
.carousel__slide.is-active .frame__cap { opacity: 1; transform: none; }
.frame__cap { font-size: 0.9rem; left: 1.25rem; bottom: 1.1rem; }
.frame__no { color: var(--accent); margin-right: 0.5rem; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
  padding: 4vh 4vw; background: rgba(6,5,4,0.94); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__img { max-width: 100%; max-height: 92vh; border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,0.7); transform: scale(0.97); transition: transform 0.3s var(--ease); }
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__close {
  position: absolute; top: 1.5rem; right: 1.75rem; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2); color: #f4efe6; width: 44px; height: 44px; border-radius: 50%;
  font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.lightbox__close:hover { background: rgba(255,255,255,0.16); }

/* ---------- YouTube video lightbox ---------- */
.yt-lightbox {
  position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center;
  padding: 5vh 5vw; background: rgba(6,5,4,0.94); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.yt-lightbox[hidden] { display: none; }
.yt-lightbox.is-open { opacity: 1; }
.yt-frame {
  position: relative; width: min(1100px, 100%); aspect-ratio: 16 / 9; background: #000;
  border-radius: 10px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.7);
  transform: scale(0.97); transition: transform 0.3s var(--ease);
}
.yt-lightbox.is-open .yt-frame { transform: scale(1); }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-close {
  position: absolute; top: 1.5rem; right: 1.75rem; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2); color: #f4efe6; width: 44px; height: 44px; border-radius: 50%;
  font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background var(--transition); z-index: 1;
}
.yt-close:hover { background: rgba(255,255,255,0.16); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 3fr 2fr; gap: 3.5rem; align-items: center; }
.about__lead { font-family: var(--font-display); font-size: clamp(1.35rem, 3vw, 1.85rem); line-height: 1.35; font-weight: 500; margin-bottom: 1.25rem; }
.about__text p:not(.about__lead) { color: var(--text-secondary); font-size: 1.05rem; }
.about__photo img { border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }
.about__subhead {
  font-family: var(--font-display); font-size: clamp(1.4rem, 3.5vw, 2rem); font-weight: 600;
  margin: 4rem 0 2rem;
}

/* Experience timeline */
.timeline { list-style: none; }
.timeline__item {
  display: grid; grid-template-columns: 180px 1fr; gap: 2rem; padding-bottom: 2.5rem;
  border-left: 1px solid var(--border); padding-left: 2rem; margin-left: 0.5rem; position: relative;
}
.timeline__item::before {
  content: ""; position: absolute; left: -6px; top: 0.5rem; width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--canvas), 0 0 12px var(--accent);
}
.timeline__date { color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.85rem; }
.timeline__role { font-size: 1.2rem; font-weight: 600; line-height: 1.35; }
.timeline__company { display: block; color: var(--accent); font-weight: 500; font-size: 1rem; margin-top: 0.15rem; }
.timeline__points { margin-top: 0.6rem; color: var(--text-secondary); }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2.5rem; }
.skills__group h4 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin-bottom: 1rem; color: var(--accent); }
.skills__group ul { list-style: none; }
.skills__group li {
  padding: 0.55rem 0; color: var(--text-secondary); border-bottom: 1px solid var(--border);
  font-size: 0.98rem; transition: color var(--transition), padding-left var(--transition);
}
.skills__group li:hover { color: var(--text-primary); padding-left: 0.4rem; }

/* ---------- Contact ---------- */
.contact {
  min-height: calc(100vh - 70px); display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 6rem 1.75rem 4rem;
}
.contact .page__num { margin-bottom: 0.75rem; }
.contact__title { font-family: var(--font-display); font-size: clamp(2.4rem, 7vw, 4rem); font-weight: 600; line-height: 1.05; }
.contact__blurb { color: var(--text-secondary); font-family: var(--font-display); font-size: clamp(1.1rem, 2.4vw, 1.4rem); max-width: 38ch; margin: 1.4rem auto 2.4rem; line-height: 1.5; }
.social { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.75rem; margin-top: 3rem; }
.social a { color: var(--text-secondary); font-weight: 500; font-size: 0.95rem; }
.social a:hover { color: var(--accent); }
.footer__note { color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.8rem; margin-top: 2.5rem; }
.footer__note em { font-style: italic; }

/* ============================================================
   STATIC-HERO GATE — phones / portrait tablets / short landscape /
   reduced motion get the composed final frame + full copy.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .hero-scrub { height: auto; }
  .hero-stage { position: relative; height: auto; min-height: 100vh; }
  .hero-video, .hero-ring, .hero-cue { display: none; }
  .hero-poster { position: absolute; inset: 0; background-image: url("../assets/hero-living-archive-poster.jpg"); }
  .hero-captions { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 1.1rem; min-height: 100vh; padding: 8rem 6vw 4rem; text-align: center; }
  .hero-eyebrow { display: none; }
  .hero-copy { position: static; width: 100%; max-width: 100%; bottom: auto; left: auto; transform: none; }
  .js #heroCaptions [data-band] { opacity: 1 !important; transform: none !important; }
}
@media (min-width: 721px) and (max-height: 560px) and (pointer: fine) { .hero-cue { display: none; } }

/* Phones keep the live scroll-scrub (served the lighter encode); just fit the type. */
@media (max-width: 720px) {
  .hero-copy { width: 92vw; }
  .hero-awards { gap: clamp(1.1rem, 5vw, 1.75rem); }
}

/* Narrow phones: let the nav wrap so the full name + all links fit without clipping. */
@media (max-width: 560px) {
  .nav { height: auto; flex-wrap: wrap; padding-block: 0.55rem; row-gap: 0.4rem; }
  .brand { order: 1; font-size: 1rem; }
  .nav__theme-toggle { order: 2; }
  .nav__links { order: 3; width: 100%; justify-content: center; gap: 1.25rem; font-size: 0.82rem; }
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .nav__links { gap: 1rem; font-size: 0.82rem; }
  .about { grid-template-columns: 1fr; gap: 2rem; }
  .about__photo { max-width: 280px; margin-inline: auto; order: -1; }
  .timeline__item { grid-template-columns: 1fr; gap: 0.4rem; }
  .carousel__nav { width: 40px; height: 40px; font-size: 1.4rem; }
  .presskit .montage { grid-template-columns: 1fr; grid-auto-rows: clamp(200px, 58vw, 300px); }
  .presskit .tile, .presskit .tile--feat, .presskit .tile--wide { grid-column: span 1; grid-row: span 1; }
  .presskit .tile__cta { max-height: 40px; opacity: 1; }
  .film-essay { grid-template-columns: 1fr; gap: 2.5rem; }
  .film-quote { position: static; padding-top: 0.5rem; border-top: 1px solid var(--border); }
  .film-quote__text { padding-top: 2.4rem; }
}

/* ---------- Reduced motion: show final states, stop drives ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .rise-item { opacity: 1 !important; transform: none !important; }
  .qw { opacity: 1 !important; transform: none !important; }
  .film-quote__text::after { transform: scaleX(1) !important; }
  .grain, .particles { display: none; }
  .frame img { filter: saturate(1); }
}
