/* ==========================================================================
   Aziz Souai — Portfolio  ·  poster direction: ink, signal yellow, cream
   ========================================================================== */

:root {
  --ink: #0c0c0b;
  --ink-2: #151513;
  --ink-3: #1e1d1a;
  --paper: #efe7d6;
  --cream: #ece3cf;
  --signal: #ffd60a;
  --signal-deep: #f2c200;
  --red: #ff3b2f;
  --muted: #8f897e;
  --faint: #5a5650;
  --line: rgba(239, 231, 214, 0.13);
  --line-2: rgba(239, 231, 214, 0.26);
  --line-ink: rgba(12, 12, 11, 0.16);
  --line-ink-2: rgba(12, 12, 11, 0.32);
  --live: #49d17d;

  --display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --marker: 'Permanent Marker', 'Anton', cursive;

  --gutter: clamp(16px, 2.8vw, 44px);
  --section: clamp(104px, 12vw, 200px);
  --nav-h: 72px;
  --max: 1720px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.18, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); color: var(--paper); -webkit-text-size-adjust: 100%; scrollbar-color: #3a3833 var(--ink); scrollbar-width: thin; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
html.is-locked { overflow: hidden; }
body {
  margin: 0; background: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.55; font-weight: 400;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
body.is-loading { overflow: hidden; }
::selection { background: var(--signal); color: var(--ink); }
[hidden] { display: none !important; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { font-weight: 400; margin: 0; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; border-radius: 2px; }
[data-theme='light'] :focus-visible { outline-color: var(--ink); }

.display {
  font-family: var(--display); font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.004em; line-height: 0.9;
}
.mono { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.4; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.hl { color: var(--signal); }
.hl--ink { color: var(--ink); background: linear-gradient(transparent 58%, var(--paper) 58%, var(--paper) 90%, transparent 90%); padding: 0 0.06em; }

.skip { position: fixed; left: 12px; top: -80px; z-index: 300; background: var(--signal); color: var(--ink); padding: 10px 16px; border-radius: 4px; }
.skip:focus { top: 12px; }

.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 26px; color: var(--muted); }
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; opacity: 0.7; }
[data-theme='light'] .eyebrow { color: rgba(12, 12, 11, 0.62); }

.section-title { font-family: var(--display); font-size: clamp(3.6rem, 11vw, 12rem); line-height: 0.86; letter-spacing: 0.005em; text-transform: uppercase; }
.section-note { max-width: 36ch; margin: 24px 0 0; color: var(--muted); font-size: 1.02rem; }
.section-note a { color: var(--paper); border-bottom: 1px solid var(--line-2); }
.section-head {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  align-items: end; margin-bottom: clamp(56px, 8vw, 120px);
}
.section-head .eyebrow { grid-column: 1 / -1; }
.section-head .section-title { grid-column: 1 / span 8; }
.section-head .section-note { grid-column: 9 / -1; justify-self: end; margin: 0; }
.section-head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; flex-wrap: wrap; }

/* ---------- Reveal system ---------- */
html.js [data-reveal] { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
html.js [data-reveal].is-in { opacity: 1; transform: none; }
html.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.04em 0.04em 0.06em 0; margin: -0.04em -0.04em -0.06em 0; }
html.js [data-split] .w__i { display: inline-block; transform: translate3d(0, 105%, 0); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
html.js [data-split].is-in .w__i { transform: none; }

/* ---------- Intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 120;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: var(--gutter);
  background: var(--ink); color: var(--paper);
}
html.no-js .intro { display: none; }
.intro__row { display: flex; justify-content: space-between; color: var(--muted); position: relative; z-index: 1; }
.intro__count { color: var(--paper); font-variant-numeric: tabular-nums; }
.intro__name {
  position: relative; z-index: 1; align-self: center; justify-self: center;
  display: flex; align-items: center; justify-content: center; gap: 0.12em;
  font-size: clamp(3.4rem, 13vw, 13rem); line-height: 0.9; white-space: nowrap; color: var(--paper);
}
.intro__word { display: block; animation: introIn 0.7s var(--ease) both; }
@keyframes introIn { from { opacity: 0; transform: translate3d(0, 0.12em, 0); } to { opacity: 1; transform: none; } }
/* the window that opens between the words; its size stays under the WCAG "large flash"
   area on purpose, so the rapid cuts are safe for photosensitive viewers */
.intro__slot {
  position: relative; flex: none; display: block;
  width: 0; height: 0.74em; overflow: hidden; background: #151513;
  transition: width 0.75s var(--ease-io);
}
.intro.is-open .intro__slot { width: 1.2em; }
.intro__slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.intro__hud {
  position: absolute; left: 0; right: 0; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center;
  padding: 5px 7px; font-size: 0.55rem; color: var(--paper); letter-spacing: 0.06em; line-height: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}
.intro__wipe { position: absolute; inset: 0; z-index: 2; background: var(--signal); transform: translate3d(0, 101%, 0); }
body.is-wiping .intro__wipe { transform: none; transition: transform 0.75s var(--ease-io); }
body.is-ready .intro { opacity: 0; visibility: hidden; transition: opacity 0.35s linear 0.05s, visibility 0s linear 0.45s; }

/* ---------- Grain ---------- */
.grain {
  position: fixed; inset: -60%; z-index: 90; pointer-events: none; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate3d(0, 0, 0); } 20% { transform: translate3d(-4%, 3%, 0); } 40% { transform: translate3d(3%, -5%, 0); }
  60% { transform: translate3d(6%, 2%, 0); } 80% { transform: translate3d(-3%, 5%, 0); } 100% { transform: translate3d(2%, -2%, 0); }
}

/* ---------- Cursor ---------- */
.cursor { position: fixed; top: 0; left: 0; z-index: 140; pointer-events: none; display: none; --cc: var(--paper); --cb: var(--signal); --ct: var(--ink); }
.cursor.is-light { --cc: var(--ink); --cb: var(--ink); --ct: var(--signal); }
html.has-cursor .cursor { display: block; }
html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }
.cursor__dot, .cursor__ring { position: absolute; top: 0; left: 0; opacity: 0; transition: opacity 0.3s; will-change: transform; }
.cursor.is-on .cursor__dot, .cursor.is-on .cursor__ring { opacity: 1; }
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--cc); }
.cursor__ring {
  display: grid; place-items: center; width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border: 1px solid var(--cc); border-radius: 50%; opacity: 0.6;
  transition: opacity 0.3s, width 0.5s var(--ease), height 0.5s var(--ease), margin 0.5s var(--ease), background-color 0.35s, border-color 0.35s;
}
.cursor__label { font: 500 0.66rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ct); opacity: 0; transition: opacity 0.25s; }
.cursor.is-link .cursor__ring { width: 56px; height: 56px; margin: -28px 0 0 -28px; opacity: 1; }
.cursor.is-view .cursor__ring { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: var(--cb); border-color: var(--cb); opacity: 1; }
.cursor.is-view .cursor__label { opacity: 1; }
.cursor.is-view .cursor__dot { opacity: 0; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: var(--nav-h);
  display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); padding: 0 var(--gutter);
  color: var(--paper);
  transition: transform 0.7s var(--ease), background-color 0.4s, color 0.4s, opacity 0.8s var(--ease) 0.3s;
}
.nav.is-light { color: var(--ink); }
.nav.is-solid { background: rgba(12, 12, 11, 0.72); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
.nav.is-light.is-solid { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.nav.is-hidden { transform: translate3d(0, -100%, 0); }
html.js body.is-loading .nav { opacity: 0; }
.nav__brand { margin-right: auto; font-size: 1.5rem; white-space: nowrap; }
.nav__links { display: flex; gap: clamp(18px, 2.2vw, 32px); }
.nav__links a, .nav__cta { position: relative; }
.nav__links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -5px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 0.55s var(--ease);
}
.nav__links a:hover::after, .nav__links a.is-current::after { transform: scaleX(1); transform-origin: left; }
.nav__meta { display: flex; align-items: center; gap: 10px; white-space: nowrap; opacity: 0.85; }
.nav__cta {
  display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px;
  background: var(--signal); color: var(--ink);
  transition: background-color 0.35s, color 0.35s, transform 0.6s var(--ease);
}
.nav.is-light .nav__cta { background: var(--ink); color: var(--signal); }
.nav__cta:hover { background: var(--paper); color: var(--ink); }
.nav__menu { display: none; padding: 12px 0; }

.pulse { position: relative; flex: none; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--live); vertical-align: middle; }
.pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--live); animation: pulse 2.2s var(--ease) infinite; }
.pulse--ink { background: var(--ink); }
.pulse--ink::after { background: var(--ink); }
@keyframes pulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(3.2); opacity: 0; } }

/* ---------- Mobile menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--nav-h) + 20px) var(--gutter) 32px; background: var(--signal); color: var(--ink);
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path 0.85s var(--ease-io), visibility 0s linear 0.85s;
}
.menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 0.85s var(--ease-io), visibility 0s; }
html.menu-open .nav { color: var(--ink); background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.menu__links { display: flex; flex-direction: column; }
.menu__links a {
  display: flex; align-items: baseline; gap: 14px; padding: 6px 0 8px; border-bottom: 1px solid var(--line-ink-2);
  font-size: clamp(3.4rem, 17vw, 6rem); line-height: 1;
  transform: translate3d(0, 30px, 0); opacity: 0; transition: transform 0.9s var(--ease), opacity 0.9s var(--ease);
}
.menu.is-open .menu__links a { transform: none; opacity: 1; }
.menu.is-open .menu__links a:nth-child(2) { transition-delay: 0.05s; }
.menu.is-open .menu__links a:nth-child(3) { transition-delay: 0.1s; }
.menu.is-open .menu__links a:nth-child(4) { transition-delay: 0.15s; }
.menu__foot { display: flex; gap: 28px; }

/* ---------- Timeline ---------- */
.timeline {
  position: fixed; right: 18px; top: 50%; z-index: 40; height: min(46vh, 420px);
  transform: translate3d(0, -50%, 0); display: none; opacity: 0; pointer-events: none;
  color: var(--muted); transition: opacity 0.6s var(--ease), color 0.4s;
}
html.js .timeline { display: block; }
.timeline.is-on { opacity: 1; pointer-events: auto; }
.timeline.is-light { color: rgba(12, 12, 11, 0.6); }
.timeline__rail { position: absolute; top: 0; bottom: 0; right: 4px; width: 1px; background: currentColor; opacity: 0.35; }
.timeline__head { position: absolute; left: -3px; top: 0; width: 7px; height: 7px; margin-top: -3px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(255, 214, 10, 0.2); }
.timeline.is-light .timeline__head { background: var(--ink); box-shadow: 0 0 0 4px rgba(12, 12, 11, 0.12); }
.timeline__marks { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.timeline__marks li { position: absolute; right: 0; transform: translateY(-50%); }
.timeline__marks a { display: flex; align-items: center; gap: 10px; flex-direction: row-reverse; padding: 6px 0; }
.timeline__marks a::before { content: ''; width: 9px; height: 1px; background: currentColor; }
.timeline__marks a span {
  opacity: 0; transform: translate3d(6px, 0, 0); transition: opacity 0.35s var(--ease), transform 0.45s var(--ease);
  white-space: nowrap; padding: 4px 8px; border-radius: 4px; background: var(--ink); color: var(--paper);
}
.timeline:hover .timeline__marks a span, .timeline__marks a:focus-visible span { opacity: 1; transform: none; }
.timeline__marks a.is-current { color: var(--signal); }
.timeline.is-light .timeline__marks a.is-current { color: var(--ink); }
.timeline__tc { position: absolute; top: calc(100% + 16px); right: 0; writing-mode: vertical-rl; transform: rotate(180deg); font-variant-numeric: tabular-nums; font-size: 0.62rem; }

/* ---------- Scene: hero poster + wall ---------- */
.scene { position: relative; height: 360vh; background: var(--ink); }
.scene__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

.hero {
  position: absolute; inset: 0; z-index: 2;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: calc(var(--nav-h) + 6px) var(--gutter) var(--gutter);
  background: var(--signal); color: var(--ink);
}
.hero__meta { display: flex; justify-content: space-between; gap: 20px; position: relative; z-index: 3; }
/* the name is the masthead: one line across the whole width, never covered.
   3D mode: name at the top, the camera floats below it. Photo mode: the camera hangs above, name below. */
.hero { --fs: clamp(4rem, min(19.4vw, 31vh), 34rem); }
.hero__name {
  position: relative; z-index: 1; align-self: start; margin-top: clamp(12px, 3.5vh, 44px);
  display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 0.2em;
  font-size: var(--fs); line-height: 0.82; letter-spacing: -0.008em;
  white-space: nowrap;
}
html[data-hero='photo'] .hero__name { align-self: end; margin: 0 0 clamp(10px, 2.5vh, 32px); }
.hero__line { display: block; overflow: hidden; padding: 0.02em 0; will-change: transform; }
.hero__line > span { display: block; }
html.js .hero__line > span { transform: translate3d(0, 104%, 0); transition: transform 1.3s var(--ease); }
html.js .hero__line--b > span { transition-delay: 0.09s; }
body.is-ready .hero__line > span { transform: none; }

.hero__frame {
  position: absolute; z-index: 2; margin: 0;
  left: 50%; top: 66%;
  width: clamp(260px, 31vw, 600px); aspect-ratio: 16 / 10;
  transform: translate3d(-50%, -50%, 0) rotate(-4deg);
  transform-origin: 50% 50%;
  background: var(--ink); overflow: hidden;
  box-shadow: 14px 14px 0 var(--ink);
  will-change: transform;
}
html.js .hero__frame { opacity: 0; }
body.is-ready .hero__frame { opacity: 1; transition: opacity 0.6s var(--ease) 0.35s; }
.hero__frame img { width: 100%; height: 100%; object-fit: cover; }
.hero__rec {
  position: absolute; left: 0; right: 0; top: 0; display: flex; gap: 14px; align-items: center;
  padding: 10px 12px; color: var(--signal);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}
.hero__rec [data-timecode] { font-variant-numeric: tabular-nums; color: var(--paper); }
.hero__rec-title { margin-left: auto; color: var(--paper); }
.rec { display: inline-flex; align-items: center; gap: 7px; }
.rec i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: blink 1.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
/* 3D camera + the lens window */
.hero__camera { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hero__camera canvas { display: block; width: 100%; height: 100%; }
.scene.has-camera .hero__frame { display: none; }
.hero__meta-mid { display: inline-flex; align-items: center; }
.hero__meta-mid [data-timecode] { font-variant-numeric: tabular-nums; }
.lens {
  position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden;
  opacity: 0; clip-path: circle(0px at 50% 50%); background: #000;
  will-change: clip-path, opacity;
}
.lens img { width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1 + var(--sheen, 1) * 0.14)); }
.lens::before, .lens::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: var(--sheen, 1); }
.lens::before { background: radial-gradient(circle var(--lr, 0px) at var(--lx, 50%) var(--ly, 50%), rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0.7) 100%); }
.lens::after {
  mix-blend-mode: screen;
  background: conic-gradient(from 200deg at var(--lx, 50%) var(--ly, 50%), rgba(110, 70, 255, 0), rgba(110, 70, 255, 0.22), rgba(40, 255, 200, 0.12), rgba(255, 180, 60, 0.16), rgba(110, 70, 255, 0));
}
.scene:not(.has-camera):not(.is-photo) .lens, .scene.is-static .lens, .scene.is-wall .lens { visibility: hidden; }

/* photo hero: the hand lowers the camera in front of the middle of the masthead.
   The photo is 0.633 wide : 1 tall and the camera sits ~80% down it, so `top` lines the camera up with the name. */
html[data-hero='photo'] .hero__camera, html[data-hero='photo'] .hero__frame,
html[data-hero='photo'] .hero__meta-mid { display: none; }
/* the photo is placed by main.js (it stops just above the name); these are only the defaults */
.hero__photo {
  --pw: clamp(220px, 24vw, 520px);
  position: absolute; z-index: 2; margin: 0;
  left: 50%; width: var(--pw);
  top: calc(100% - 140px - var(--fs) * 0.82 - var(--pw) / 0.633);
  transform: translate3d(-47%, 0, 0);
  will-change: transform;
}
.hero__photo img { display: block; width: 100%; height: auto; filter: drop-shadow(18px 22px 18px rgba(12, 12, 11, 0.28)); }
html.js .hero__photo > img { transform: translate3d(0, -30%, 0); opacity: 0; transition: transform 1.4s var(--ease) 0.1s, opacity 0.7s var(--ease) 0.1s; }
body.is-ready .hero__photo > img { transform: none; opacity: 1; }
@media (max-width: 900px) {
  .hero__photo { --pw: 52vw; }
}

.hero__foot { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.hero__lede { margin: 0; max-width: 40ch; font-size: 1.02rem; line-height: 1.45; font-weight: 450; }
.hero__scroll { display: inline-flex; gap: 8px; }
.hero__scroll span { display: inline-block; animation: nudge 2.4s var(--ease) infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
html.js .hero__meta, html.js .hero__foot { opacity: 0; transition: opacity 0.9s var(--ease) 0.55s; }
body.is-ready .hero__meta, body.is-ready .hero__foot { opacity: 1; }

.wall {
  position: absolute; inset: 0; z-index: 1;
  display: grid; grid-template-rows: 1fr auto; align-items: center;
  padding: calc(var(--nav-h) + 4px) var(--gutter) clamp(20px, 3vh, 36px);
  background: var(--ink);
  visibility: hidden;
}
.scene.is-wall .wall { visibility: visible; z-index: 3; }
.scene.is-wall .hero { visibility: hidden; }
.wall__stage { perspective: 1500px; perspective-origin: 50% 50%; }
/* curved WebGL wall (assets/js/wall3d.js); the DOM grid stays for keyboard + screen readers */
.wall__gl { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; }
.wall__stage, .wall__caption { position: relative; z-index: 2; }
.scene.has-glwall .wall__stage { pointer-events: none; }
.scene.has-glwall .wall__grid { opacity: 0; }
.scene.has-glwall .wall__grid:focus-within { opacity: 1; pointer-events: auto; }
.scene.has-glwall .tile { pointer-events: none; }
.wall__hover {
  position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none;
  display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 6px;
  background: var(--signal); color: var(--ink); opacity: 0; transition: opacity 0.25s var(--ease);
}
.wall__hover.is-on { opacity: 1; }
.wall__hover .mono { font-size: 0.6rem; }
.wall__hover .display { font-size: 1.5rem; }
html.has-cursor .wall__gl { cursor: none !important; }
.wall__grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(6px, 0.7vw, 12px);
  width: min(100%, calc((100vh - var(--nav-h) - 120px) * 1.6 / 3 * 5)); margin-inline: auto;
  transform-style: preserve-3d; transform-origin: 50% 50%; will-change: transform;
}
.tile { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink-3); transform-style: preserve-3d; will-change: transform; }
.tile__media { position: absolute; inset: 0; }
.tile__media img, .tile__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile__media img { transition: transform 1s var(--ease), filter 0.5s; }
.tile__label {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; flex-direction: column; gap: 4px; padding: 26px 12px 10px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0));
  opacity: 0; transform: translate3d(0, 8px, 0); transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}
.tile__title { font-size: clamp(1rem, 1.5vw, 1.6rem); color: var(--paper); }
.tile__disc { color: var(--signal); font-size: 0.6rem; }
.tile__badge { position: absolute; right: 8px; top: 8px; z-index: 2; padding: 4px 7px; border-radius: 3px; background: var(--signal); color: var(--ink); font-size: 0.58rem; }
.tile:hover .tile__label, .tile:focus-visible .tile__label { opacity: 1; transform: none; }
.tile:hover .tile__media img { transform: scale(1.06); }
.scene:not(.is-grid) .tile__label, .scene:not(.is-grid) .tile__badge { opacity: 0 !important; }
.wall__caption { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; opacity: 0; transition: opacity 0.5s var(--ease); }
.wall__caption .display { font-size: clamp(2rem, 4vw, 4rem); color: var(--signal); }
.wall__caption .mono { color: var(--muted); }
.scene.is-grid .wall__caption { opacity: 1; }
.preview-vid { opacity: 0; transition: opacity 0.45s var(--ease); }
.preview-vid.is-on { opacity: 1; }

/* static fallback: phones, reduced motion */
.scene.is-static { height: auto; }
.scene.is-static .scene__sticky { position: relative; height: auto; overflow: visible; }
.scene.is-static .hero { position: relative; min-height: 100svh; }
.scene.is-static .hero__frame { transform: translate3d(-50%, -50%, 0) rotate(-4deg) !important; }
.scene.is-static .wall { position: relative; visibility: visible; padding-block: var(--section) 40px; }
.scene.is-static .wall__grid { transform: none !important; width: 100%; }
.scene.is-static .tile { transform: none !important; }
.scene.is-static .wall__caption { opacity: 1; margin-top: 28px; }
.scene.is-static .tile__label, .scene.is-static .tile__badge { opacity: 1 !important; transform: none; }

/* ---------- Showreel ---------- */
.reel { background: var(--ink); }
.reel__head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 22px; color: var(--muted); }
.reel__label { font-size: clamp(3rem, 8vw, 8rem); color: var(--signal); }
.reel__frame { position: relative; aspect-ratio: 2.39 / 1; background: #000; overflow: hidden; }
.reel__media { position: absolute; inset: 0; }
.reel__media > img, .reel__media > video { width: 100%; height: 100%; object-fit: cover; }
.reel__play {
  position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(60% 70% at 50% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5));
  color: var(--paper);
}
.reel__play .display { font-size: clamp(2rem, 5vw, 5rem); }
.reel__play-dot { width: clamp(64px, 6vw, 96px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--signal); color: var(--ink); transition: transform 0.6s var(--ease); }
.reel__play-dot svg { width: 42%; }
.reel__play:hover .reel__play-dot { transform: scale(1.1); }
.reel.is-playing .reel__play { display: none; }

/* ---------- Selected work: chapters ---------- */
.chapters { display: flex; flex-direction: column; gap: clamp(110px, 14vw, 220px); }
.chapter {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 26px;
  align-items: center;
}
.chapter__head { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.chapter__no { color: var(--muted); }
.chapter__cat { font-size: clamp(1.8rem, 3.4vw, 3.4rem); color: var(--signal); }
.chapter__year { margin-left: auto; color: var(--muted); }
.chapter__media {
  grid-column: 1 / span 7; justify-self: start; position: relative; display: block; width: 100%;
  max-width: calc(var(--native, 1600) * 1px / 1.55);
  aspect-ratio: var(--ar, 16 / 10); overflow: hidden; background: var(--ink-3);
}
.chapter[data-side='right'] .chapter__media { grid-column: 6 / -1; justify-self: end; grid-row: 2; }
.chapter[data-side='right'] .chapter__body { grid-column: 1 / span 5; grid-row: 2; }
.chapter__px { position: absolute; left: 0; right: 0; top: -6%; bottom: -6%; will-change: transform; }
.chapter__px img, .chapter__media .preview-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chapter__media .preview-vid { z-index: 1; }
html.js .chapter__media { clip-path: inset(0 0 100% 0); transition: clip-path 1.4s var(--ease-io); }
html.js .chapter.is-in .chapter__media { clip-path: inset(0 0 0 0); }
.chapter__media img { transform: scale(1.001); transition: transform 1.6s var(--ease); }
.chapter__media:hover img { transform: scale(1.045); }
.chapter__tag {
  position: absolute; left: 14px; top: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 11px; border-radius: 999px; background: var(--signal); color: var(--ink);
}
.chapter__tag svg { width: 10px; }
.chapter__body { grid-column: 8 / -1; }
.chapter__title { font-size: clamp(3.2rem, 7.4vw, 8.6rem); line-height: 0.86; margin-bottom: 22px; transition: color 0.3s; }
.chapter:hover .chapter__title { color: var(--signal); }
.chapter__desc { max-width: 40ch; margin: 0 0 26px; color: rgba(239, 231, 214, 0.72); }
.chapter__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 30px; color: var(--muted); }

/* glitch on hover (cheap RGB split) */
.glitch:hover, .chapter:hover .chapter__title { animation: rgb 0.5s steps(2) 1; }
@keyframes rgb {
  0% { text-shadow: -3px 0 var(--red), 3px 0 #2de2e6; }
  50% { text-shadow: 3px 0 var(--red), -3px 0 #2de2e6; }
  100% { text-shadow: none; }
}

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 14px; height: 56px; padding: 0 24px;
  border: 1.5px solid currentColor; border-radius: 999px; font-size: 0.98rem; font-weight: 500; white-space: nowrap;
  transition: background-color 0.35s, color 0.35s, border-color 0.35s, transform 0.6s var(--ease);
}
.btn__arrow { display: inline-block; transition: transform 0.55s var(--ease); }
.btn:hover .btn__arrow { transform: translate3d(3px, -3px, 0); }
.btn:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--solid { background: var(--signal); color: var(--ink); border-color: var(--signal); }
.btn--solid:hover { background: var(--paper); border-color: var(--paper); }
[data-theme='light'] .btn:hover { background: var(--ink); color: var(--signal); border-color: var(--ink); }
[data-theme='light'] .btn--solid { background: var(--ink); color: var(--signal); border-color: var(--ink); }
[data-theme='light'] .btn--solid:hover { background: var(--red); color: var(--ink); border-color: var(--red); }
.btn svg { width: 12px; }

/* ---------- Index ---------- */
.index { background: var(--ink); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter {
  display: inline-flex; align-items: center; gap: 4px; height: 42px; padding: 0 18px;
  border: 1px solid var(--line-2); border-radius: 999px; font-size: 0.92rem; color: var(--muted);
  transition: background-color 0.35s, color 0.35s, border-color 0.35s;
}
.filter sup { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.06em; position: relative; top: -0.5em; vertical-align: baseline; }
.filter:hover { color: var(--paper); border-color: var(--paper); }
.filter.is-active { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.index__labels, .row { display: grid; grid-template-columns: 64px minmax(0, 2.6fr) minmax(0, 1.3fr) minmax(0, 0.7fr) 64px 32px; gap: 20px; align-items: center; }
.index__labels { padding-bottom: 14px; border-bottom: 1px solid var(--line-2); color: var(--faint); }
.index__list { list-style: none; margin: 0; padding: 0; }
.index__list li { border-bottom: 1px solid var(--line); }
.row { position: relative; padding: 20px 0; transition: opacity 0.45s var(--ease); }
.index__list:hover .row { opacity: 0.3; }
.index__list:hover .row:hover, .index__list .row:focus-visible { opacity: 1; }
.row__no { color: var(--faint); font-variant-numeric: tabular-nums; }
.row__title { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.8rem, 3.4vw, 3.4rem); line-height: 1; transition: transform 0.7s var(--ease), color 0.3s; }
.row:hover .row__title { transform: translate3d(16px, 0, 0); color: var(--signal); }
.row__disc { color: var(--muted); }
.row__medium, .row__year { color: var(--muted); }
.row__medium.is-play { color: var(--signal); }
.row__arrow { justify-self: end; font-size: 1.2rem; transition: transform 0.6s var(--ease), color 0.3s; }
.row:hover .row__arrow { transform: rotate(45deg); color: var(--signal); }
.index__preview { position: fixed; top: 0; left: 0; z-index: 30; width: clamp(220px, 19vw, 320px); aspect-ratio: 4 / 5; pointer-events: none; opacity: 0; transition: opacity 0.4s var(--ease); will-change: transform; }
.index__preview.is-on { opacity: 1; }
.index__preview img { width: 100%; height: 100%; object-fit: cover; transform: scale(0.86); transition: transform 0.6s var(--ease); box-shadow: 10px 10px 0 var(--signal); }
.index__preview.is-on img { transform: scale(1); }

/* ---------- Band ---------- */
.band { padding-block: clamp(44px, 6vw, 90px); border-block: 1px solid var(--line); overflow: hidden; background: var(--ink); }
.band__label { margin: 0 auto 24px; color: var(--muted); }
.band__track { display: flex; width: max-content; animation: marquee var(--band-s, 60s) linear infinite; }
.band:hover .band__track { animation-play-state: paused; }
.band__group { display: flex; align-items: center; gap: clamp(24px, 3.4vw, 56px); padding-right: clamp(24px, 3.4vw, 56px); }
.band__item { font-size: clamp(2.6rem, 6vw, 6.2rem); line-height: 1; white-space: nowrap; color: var(--paper); }
.band__item.is-alt { color: transparent; -webkit-text-stroke: 1.5px var(--signal); }
.band__sep { flex: none; width: 12px; height: 12px; background: var(--signal); transform: rotate(45deg); }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }

/* ---------- About (yellow) ---------- */
.about { background: var(--signal); color: var(--ink); }
.about__top { display: flex; align-items: flex-end; gap: clamp(24px, 4vw, 64px); margin-bottom: clamp(56px, 7vw, 110px); }
.about__portrait { margin: 0; flex: none; width: clamp(200px, 24vw, 360px); aspect-ratio: 4 / 5; overflow: hidden; background: var(--ink); box-shadow: 12px 12px 0 var(--ink); }
.about__portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.08); }
.about__title { font-size: clamp(3.6rem, 11.5vw, 13rem); line-height: 0.84; }
.about__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 64px; }
.about__bio { grid-column: 1 / span 5; align-self: start; position: sticky; top: calc(var(--nav-h) + 40px); }
.about__bio .lead { margin: 0 0 22px; font-size: clamp(1.3rem, 1.9vw, 1.75rem); line-height: 1.32; font-weight: 500; }
.about__bio p { max-width: 48ch; color: rgba(12, 12, 11, 0.78); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 36px 0 0; }
.facts > div { padding-top: 14px; border-top: 1.5px solid var(--ink); }
.facts dt { margin-bottom: 8px; color: rgba(12, 12, 11, 0.65); }
.facts dd { margin: 0; font-size: clamp(1.4rem, 2vw, 2rem); }
.services { grid-column: 7 / -1; list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.service { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 16px; padding: 26px 0; border-bottom: 1.5px solid var(--ink); }
.service__no { padding-top: 0.8em; color: rgba(12, 12, 11, 0.6); }
.service__title { font-size: clamp(2.4rem, 4.4vw, 4.6rem); transition: transform 0.7s var(--ease); }
.service:hover .service__title { transform: translate3d(12px, 0, 0); }
.service__desc { grid-column: 2; margin: 10px 0 0; max-width: 44ch; color: rgba(12, 12, 11, 0.75); }
.process { margin-top: clamp(96px, 11vw, 170px); }
.process__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.process__steps li { padding-top: 22px; border-top: 1.5px solid var(--ink); }
.process__steps .mono { font-weight: 500; }
.process__steps h4 { margin: 16px 0 10px; font-size: clamp(2.2rem, 3.4vw, 3.4rem); }
.process__steps p { margin: 0; max-width: 30ch; font-size: 0.98rem; color: rgba(12, 12, 11, 0.75); }
.experience { margin-top: clamp(96px, 11vw, 170px); }
.experience__list { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.experience__list li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 20px; align-items: baseline; padding: 22px 0; border-bottom: 1.5px solid var(--ink); }
.experience__list .display { font-size: clamp(2rem, 3.4vw, 3.4rem); }
.experience__list .mono { color: rgba(12, 12, 11, 0.65); }

/* ---------- Contact (cream) ---------- */
.contact { background: var(--cream); color: var(--ink); }
.contact__title { font-size: clamp(3.8rem, 12.6vw, 14.5rem); line-height: 0.84; margin-bottom: clamp(48px, 6vw, 90px); }
.contact__title .hl { color: var(--ink); background: linear-gradient(transparent 55%, var(--signal) 55%, var(--signal) 92%, transparent 92%); padding: 0 0.05em; }
.contact__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 540px); gap: clamp(48px, 7vw, 140px); align-items: start; }
.contact__lede { max-width: 40ch; margin: 0 0 32px; font-size: clamp(1.1rem, 1.5vw, 1.35rem); line-height: 1.45; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.contact__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gutter); margin: clamp(56px, 6vw, 96px) 0 0; }
.contact__grid > div { padding: 20px 0; border-top: 1.5px solid var(--ink); }
.contact__grid > div:last-child { grid-column: 1 / -1; }
.contact__grid dt { margin-bottom: 10px; color: rgba(12, 12, 11, 0.6); }
.contact__grid dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 1.15rem; font-weight: 500; }
.contact__grid dd a { padding-bottom: 2px; border-bottom: 1.5px solid var(--ink); }
.contact__grid dd a:hover { color: var(--red); border-color: var(--red); }

/* Clapperboard slate */
.slate-wrap { position: relative; padding-top: 8px; }
.slate {
  --chalk: #f3ecdf; position: relative; display: block; width: 100%; text-align: left; color: var(--chalk);
  transform: rotate(-2.4deg); transition: transform 0.9s var(--ease);
  filter: drop-shadow(14px 14px 0 rgba(12, 12, 11, 0.9));
}
.slate:hover, .slate:focus-visible { transform: rotate(-0.6deg) translate3d(0, -4px, 0); }
.slate__clapper { position: relative; display: block; height: 58px; }
.slate__stick { position: absolute; left: 0; right: 0; height: 30px; border-radius: 5px; background: repeating-linear-gradient(115deg, var(--chalk) 0 26px, #0c0b0a 26px 52px); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6); }
.slate__stick--base { bottom: 0; border-radius: 3px 3px 0 0; background: repeating-linear-gradient(65deg, var(--signal) 0 26px, #0c0b0a 26px 52px); }
.slate__stick--top { bottom: 30px; transform-origin: 8px 100%; transform: rotate(-5deg); transition: transform 0.6s var(--ease); }
.slate:hover .slate__stick--top, .slate:focus-visible .slate__stick--top { transform: rotate(-17deg); }
.slate.is-clap .slate__stick--top { animation: clap 0.42s cubic-bezier(0.5, 0, 0.75, 0) both; }
.slate.is-clap .slate__board { animation: clapShake 0.42s linear both; }
@keyframes clap { 0% { transform: rotate(-24deg); } 62% { transform: rotate(0deg); } 74% { transform: rotate(-2.4deg); } 100% { transform: rotate(0deg); } }
@keyframes clapShake { 0%, 60% { transform: none; } 66% { transform: translate3d(0, 2px, 0); } 80% { transform: translate3d(0, -1px, 0); } 100% { transform: none; } }
.slate__board { display: block; padding: 6px 0 0; border-radius: 0 0 10px 10px; background: radial-gradient(120% 80% at 30% 20%, rgba(255, 255, 255, 0.05), transparent 60%), #141311; border: 1.5px solid rgba(243, 236, 223, 0.5); border-top: 0; }
.slate__row, .slate__cell { display: flex; flex-direction: column; gap: 6px; padding: 14px 20px 16px; }
.slate__row { border-top: 1.5px solid rgba(243, 236, 223, 0.38); }
.slate__row--prod { border-top: 0; }
.slate__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1.5px solid rgba(243, 236, 223, 0.38); }
.slate__cell + .slate__cell { border-left: 1.5px solid rgba(243, 236, 223, 0.38); }
.slate__row--split { flex-direction: row; justify-content: space-between; gap: 20px; }
.slate__row--split > span { display: flex; flex-direction: column; gap: 6px; }
.slate__k { font-size: 0.6rem; color: rgba(243, 236, 223, 0.55); }
.slate__v { font-family: var(--marker); font-size: clamp(1.4rem, 2.1vw, 2rem); line-height: 1.05; letter-spacing: 0.01em; }
.slate__row--prod .slate__v { font-size: clamp(1.8rem, 2.8vw, 2.7rem); }
.slate__v[data-take] { color: var(--signal); }
.slate-hint { margin: 26px 0 0; color: rgba(12, 12, 11, 0.6); text-align: right; }

/* ---------- Footer ---------- */
.footer { padding-bottom: 28px; overflow: hidden; background: var(--ink); }
.footer__mark { margin: clamp(20px, 4vw, 60px) 0 clamp(18px, 2vw, 32px); text-align: center; white-space: nowrap; font-size: 22vw; line-height: 0.82; color: transparent; -webkit-text-stroke: 1.5px var(--signal); }
.footer__row { display: flex; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; color: var(--muted); }
.footer__mid { color: var(--paper); }
.footer__row a:hover { color: var(--signal); }

/* ---------- Viewer / screening room ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 130;
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 27vw, 440px);
  background: #050505; overscroll-behavior: contain;
  opacity: 0; visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0s linear 0.5s, grid-template-columns 0.7s var(--ease-io);
}
.viewer.is-open { opacity: 1; visibility: visible; transition: opacity 0.5s var(--ease), visibility 0s, grid-template-columns 0.7s var(--ease-io); }
.viewer.is-theater { grid-template-columns: minmax(0, 1fr) 0px; }
.viewer.is-theater .viewer__info { opacity: 0; pointer-events: none; }
.viewer__stage { position: relative; min-height: 0; background: #000; }
.viewer__media { position: absolute; inset: clamp(16px, 3vw, 48px); }
.viewer.is-theater .viewer__media, .viewer__stage:fullscreen .viewer__media { inset: 0; }
.viewer__media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transform: scale(0.985); transition: opacity 0.7s var(--ease), transform 1s var(--ease); }
.viewer__media > img.is-loaded { opacity: 1; transform: none; }
.viewer__info { display: flex; flex-direction: column; padding: 24px clamp(20px, 2.4vw, 38px); border-left: 1px solid var(--line); background: var(--ink); overflow-y: auto; overscroll-behavior: contain; transition: opacity 0.4s; }
.viewer__top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.viewer__close { display: inline-flex; gap: 10px; align-items: center; padding: 8px 0; color: var(--paper); }
.viewer__close:hover { color: var(--signal); }
.viewer__body { margin-top: auto; padding-block: 36px; }
.viewer__cat { font-size: 1.4rem; color: var(--signal); margin: 0 0 12px; }
.viewer__title { margin: 0 0 18px; font-size: clamp(2.8rem, 4.2vw, 4.6rem); line-height: 0.88; }
.viewer__desc { margin: 0 0 28px; color: rgba(239, 231, 214, 0.7); }
.viewer__meta { margin: 0 0 28px; border-top: 1px solid var(--line); }
.viewer__meta > div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.viewer__meta dt { color: var(--muted); }
.viewer__meta dd { margin: 0; text-align: right; }
.viewer__body .btn { width: 100%; justify-content: space-between; }
.viewer__body .btn.is-secondary { background: transparent; color: var(--paper); border-color: var(--line-2); }
.viewer__body .btn.is-secondary:hover { background: var(--paper); color: var(--ink); }
.viewer__nav { display: flex; justify-content: space-between; padding-top: 18px; border-top: 1px solid var(--line); }
.viewer__nav button { font: inherit; letter-spacing: inherit; text-transform: inherit; padding: 8px 0; transition: color 0.3s; }
.viewer__nav button:hover { color: var(--signal); }

/* shared-element flight into the viewer */
.flip { position: fixed; z-index: 135; overflow: hidden; pointer-events: none; background: #000; will-change: left, top, width, height; }
.flip img { position: absolute; max-width: none; object-fit: cover; }

/* ---------- Video player ---------- */
.player { position: absolute; inset: 0; background: #000; overflow: hidden; color: var(--paper); outline: none; }
.player:focus-visible { box-shadow: inset 0 0 0 2px var(--signal); }
.player__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player--embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__shade { position: absolute; inset: auto 0 0 0; height: 34%; pointer-events: none; background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0)); transition: opacity 0.5s var(--ease); }
.player__big {
  position: absolute; left: 50%; top: 50%; z-index: 3; width: clamp(68px, 7vw, 104px); aspect-ratio: 1;
  transform: translate(-50%, -50%); display: grid; place-items: center; border-radius: 50%;
  background: var(--signal); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  transition: transform 0.5s var(--ease), opacity 0.35s;
}
.player__big svg { width: 38%; margin-left: 6%; }
.player__big:hover { transform: translate(-50%, -50%) scale(1.08); }
.player.is-playing .player__big { opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(0.8); }
.player__spinner { position: absolute; left: 50%; top: 50%; z-index: 3; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 2px solid rgba(239, 231, 214, 0.25); border-top-color: var(--signal); opacity: 0; animation: spin 0.8s linear infinite; pointer-events: none; transition: opacity 0.3s; }
.player.is-waiting.is-playing .player__spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.player__bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; align-items: center; gap: clamp(10px, 1.4vw, 18px);
  padding: 14px clamp(12px, 2vw, 24px) clamp(12px, 1.8vw, 20px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.player.is-idle { cursor: none; }
.player.is-idle .player__bar, .player.is-idle .player__shade { opacity: 0; transform: translate3d(0, 8px, 0); }
.player.is-idle .player__shade { transform: none; }
.player__btn { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--paper); transition: background-color 0.3s, color 0.3s; }
.player__btn:hover { background: rgba(239, 231, 214, 0.12); color: var(--signal); }
.player__btn svg { width: 20px; height: 20px; }
.player__time { flex: none; font-variant-numeric: tabular-nums; color: rgba(239, 231, 214, 0.85); min-width: 9.5em; }
.player__scrub { position: relative; flex: 1; height: 26px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.player__track { position: relative; width: 100%; height: 3px; background: rgba(239, 231, 214, 0.22); border-radius: 2px; transition: height 0.2s; }
.player__scrub:hover .player__track, .player.is-scrubbing .player__track { height: 5px; }
.player__buf, .player__fill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); border-radius: inherit; }
.player__buf { background: rgba(239, 231, 214, 0.32); }
.player__fill { background: var(--signal); }
.player__knob { position: absolute; top: 50%; left: 0; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: var(--signal); transform: scale(0); transition: transform 0.2s var(--ease); }
.player__scrub:hover .player__knob, .player.is-scrubbing .player__knob { transform: scale(1); }
.player__tip { position: absolute; bottom: 100%; left: 0; transform: translateX(-50%); padding: 4px 7px; border-radius: 3px; background: var(--signal); color: var(--ink); opacity: 0; pointer-events: none; transition: opacity 0.2s; font-variant-numeric: tabular-nums; }
.player__scrub:hover .player__tip { opacity: 1; }
.player__title { position: absolute; left: clamp(14px, 2vw, 26px); top: clamp(14px, 2vw, 22px); z-index: 4; display: flex; flex-direction: column; gap: 4px; transition: opacity 0.45s; }
.player__title .display { font-size: clamp(1.4rem, 2.4vw, 2.4rem); }
.player__title .mono { color: var(--signal); }
.player.is-idle .player__title { opacity: 0; }
.viewer:not(.is-theater) .viewer__stage:not(:fullscreen) .player__title { display: none; }
.player__end {
  position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap;
  background: rgba(5, 5, 5, 0.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.player__replay { height: 52px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--line-2); }
.player__replay:hover { border-color: var(--paper); }
.player__next { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 22px; border-radius: 14px; background: var(--signal); color: var(--ink); text-align: left; }
.player__next .display { font-size: clamp(1.4rem, 2.4vw, 2.2rem); }
.player__next:hover { background: var(--paper); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav__meta { display: none; }
  .index__labels, .row { grid-template-columns: 48px minmax(0, 2.4fr) minmax(0, 1.3fr) 64px 56px 28px; }
}
@media (max-width: 900px) {
  :root { --nav-h: 62px; }
  .nav__links, .nav__cta { display: none; }
  .nav__menu { display: block; }
  .nav__brand { font-size: 1.35rem; }
  .timeline { display: none !important; }

  .hero { padding-top: calc(var(--nav-h) + 4px); }
  .hero__meta-mid { display: none; }
  .hero__meta { font-size: 0.62rem; }
  .hero { --fs: 19.4vw; }
  .hero__frame { top: 58%; width: 78vw; box-shadow: 9px 9px 0 var(--ink); }
  .hero__foot { flex-direction: column; align-items: flex-start; }
  .hero__scroll { display: none; }
  .wall__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wall__caption { flex-direction: column; gap: 8px; }
  .tile__disc { display: none; }
  .tile__label { padding: 18px 7px 6px; }
  .tile__title { font-size: 0.82rem; line-height: 1; }
  .tile__badge { right: 4px; top: 4px; padding: 2px 4px; font-size: 0.5rem; }

  .section-head { display: block; }
  .section-head .section-note { margin-top: 22px; }
  .chapter { row-gap: 22px; }
  .chapter__media, .chapter[data-side='right'] .chapter__media { grid-column: 1 / -1; grid-row: auto; justify-self: start; }
  .chapter__body, .chapter[data-side='right'] .chapter__body { grid-column: 1 / -1; grid-row: auto; }
  .chapter__head { flex-wrap: wrap; }

  .index__labels { display: none; }
  .row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 6px 14px; padding: 18px 0; }
  .row__disc { grid-column: 2; grid-row: 2; font-size: 0.9rem; }
  .row__medium { display: none; }
  .row__year { grid-column: 3; grid-row: 1; }
  .row__arrow { display: none; }
  .index__list:hover .row { opacity: 1; }
  .row:hover .row__title { transform: none; }

  .about__top { flex-direction: column; align-items: flex-start; }
  .about__bio, .services { grid-column: 1 / -1; }
  .about__bio { position: static; }
  .process__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
  .experience__list li { grid-template-columns: 1fr auto; }
  .experience__list li > span:nth-child(2) { grid-column: 1; grid-row: 2; }
  .experience__list li .mono { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; }

  .contact__layout { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .slate { transform: rotate(-1.2deg); }
  .slate__row, .slate__cell { padding: 12px 14px 13px; }
  .slate-hint { text-align: left; }
  .btn { height: 52px; padding: 0 20px; }

  .viewer { grid-template-columns: 1fr; grid-template-rows: 56vh auto; grid-template-rows: 56svh auto; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
  .viewer.is-theater { grid-template-columns: 1fr; }
  .viewer__media { inset: 14px; top: calc(14px + 52px); }
  .viewer__info { border-left: 0; border-top: 1px solid var(--line); overflow: visible; padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
  .viewer__close { position: fixed; top: 12px; right: 12px; z-index: 6; padding: 10px 16px; border-radius: 999px; background: rgba(10, 9, 8, 0.72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--line-2); }
  .viewer__body { padding-block: 24px; }
  .player__time { min-width: 0; font-size: 0.62rem; }
  [data-p-theater] { display: none !important; }
}
@media (max-width: 560px) {
  .process__steps { grid-template-columns: 1fr; }
  .contact__actions .btn { width: 100%; justify-content: space-between; }
  .footer__row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .facts { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 901px) { .menu { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
  .grain { display: none; }
  .band__track { animation: none; flex-wrap: wrap; width: auto; }
  .band__group[aria-hidden='true'] { display: none; }
  .band__group { flex-wrap: wrap; padding-inline: var(--gutter); row-gap: 12px; }
}

/* ==========================================================================
   Phone design (no 3D): stacked masthead + viewfinder slideshow, swipeable
   work cards, full-bleed chapters. Everything here only applies ≤ 900px.
   ========================================================================== */
.mhero { display: none; }
.for-touch { display: none; }
@media (hover: none), (max-width: 900px) { .for-mouse { display: none; } .for-touch { display: inline; } }

@media (max-width: 900px) {
  /* hero: name on top, the viewfinder fills the space between it and the lede */
  .hero__camera, .hero__photo, .hero__frame, .lens { display: none !important; }
  .scene.is-static .hero {
    height: 100svh; min-height: 600px;
    grid-template-rows: auto auto minmax(0, 1fr) auto; row-gap: 14px;
    padding: calc(var(--nav-h) + 2px) var(--gutter) calc(18px + env(safe-area-inset-bottom));
  }
  .hero__meta { font-size: 0.6rem; }
  .hero__meta-mid { display: none !important; }
  .hero .hero__name, html[data-hero='photo'] .hero__name {
    flex-direction: column; align-items: flex-start; gap: 0;
    font-size: 33.5vw; line-height: 0.8; margin: 4px 0 0; align-self: start;
  }
  .hero__name .hero__line { padding: 0; }

  .mhero {
    display: block; position: relative; margin: 0; min-height: 0;
    overflow: hidden; background: var(--ink); border-radius: 3px;
    box-shadow: 8px 8px 0 var(--ink);
  }
  html.js .mhero { opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity 0.9s var(--ease) 0.25s, transform 1.1s var(--ease) 0.25s; }
  body.is-ready .mhero { opacity: 1; transform: none; }
  .mhero__slides, .mhero__slides img { position: absolute; inset: 0; width: 100%; height: 100%; }
  .mhero__slides img { object-fit: cover; opacity: 0; transition: opacity 1.1s var(--ease-io); }
  .mhero__slides img.is-on { opacity: 1; z-index: 1; animation: mheroZoom 6s linear both; }
  @keyframes mheroZoom { from { transform: scale(1.1); } to { transform: scale(1); } }
  .mhero::after {
    content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 64%, rgba(0, 0, 0, 0.62) 100%);
  }
  .mhero__hud, .mhero__cap { position: absolute; left: 12px; right: 12px; z-index: 3; display: flex; justify-content: space-between; align-items: center; color: var(--paper); font-size: 0.62rem; }
  .mhero__hud { top: 11px; }
  .mhero__hud [data-timecode] { font-variant-numeric: tabular-nums; }
  .mhero__cap { bottom: 22px; }
  .mhero__cap [data-mhero-title] { color: var(--signal); }
  .mhero__bars { position: absolute; left: 12px; right: 12px; bottom: 11px; z-index: 3; display: flex; gap: 5px; }
  .mhero__bars i { flex: 1; height: 2px; background: rgba(239, 231, 214, 0.3); overflow: hidden; position: relative; }
  .mhero__bars i::after { content: ''; position: absolute; inset: 0; background: var(--paper); transform: scaleX(0); transform-origin: left; }
  .mhero__bars i.is-done::after { transform: scaleX(1); }
  .mhero__bars i.is-on::after { animation: fillbar 4.2s linear forwards; }
  .hero__foot { gap: 10px; }
  .hero__lede { font-size: 0.95rem; max-width: 34ch; }

  /* all work: a swipeable row of big cards instead of a tiny grid */
  .scene.is-static .wall { padding: 72px 0 36px; grid-template-rows: auto auto; grid-template-columns: minmax(0, 1fr); row-gap: 22px; }
  /* keep the row screen-wide so the cards scroll inside it instead of widening the page */
  .scene.is-static .wall__stage { perspective: none; min-width: 0; width: 100%; overflow: hidden; }
  .scene.is-static .wall__grid {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78vw;
    gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    padding: 0 var(--gutter) 6px; width: 100% !important;
    scrollbar-width: none; transform-style: flat;
  }
  .scene.is-static .wall__grid::-webkit-scrollbar { display: none; }
  .scene.is-static .tile { aspect-ratio: 4 / 5; scroll-snap-align: start; border-radius: 3px; }
  .scene.is-static .tile__label { padding: 60px 14px 14px; background: linear-gradient(0deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0)); }
  .scene.is-static .tile__disc { display: block; font-size: 0.62rem; }
  .scene.is-static .tile__title { font-size: 1.9rem; line-height: 0.95; }
  .scene.is-static .tile__badge { right: 10px; top: 10px; padding: 4px 7px; font-size: 0.58rem; }
  .scene.is-static .wall__caption { order: -1; padding-inline: var(--gutter); margin: 0; flex-direction: row; justify-content: space-between; align-items: baseline; }
  .scene.is-static .wall__caption .display { font-size: 2.6rem; }
  .scene.is-static .wall__caption .mono { font-size: 0.6rem; text-align: right; }

  /* selected work: each image runs edge to edge */
  .chapter__media, .chapter[data-side='right'] .chapter__media {
    margin-inline: calc(-1 * var(--gutter)); width: calc(100% + 2 * var(--gutter)); max-width: none !important;
  }
  .chapter__head { border-bottom: 0; padding-bottom: 0; gap: 10px 14px; }
  .chapter__cat { font-size: 2rem; }
  .chapter__title { font-size: 17vw; margin-bottom: 16px; }
  .chapter__body .btn { width: 100%; justify-content: space-between; }
  .chapters { gap: 96px; }
}

/* phone intro: AZIZ above, SOUAI below; they part vertically and the frames play between them.
   The window stays under the WCAG large-flash area. */
@media (max-width: 600px) {
  .intro__name { flex-direction: column; gap: 0.05em; font-size: 26vw; }
  .intro__slot { width: min(2.2em, 300px); height: 0; transition: height 0.75s var(--ease-io); }
  .intro.is-open .intro__slot { width: min(2.2em, 300px); height: min(1.3em, 180px); }
}
