/* ==========================================================
   Md. Yeasin Arafat portfolio
   Palette comes from annotation tools: each "class" has a color.
   amber = detection box, cyan = segmentation mask / verified, flag = error
   ========================================================== */

@font-face { font-family: "Space Grotesk"; src: url("../fonts/space-grotesk-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Hind Siliguri"; src: url("../fonts/hind-siliguri-bengali-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Hind Siliguri"; src: url("../fonts/hind-siliguri-bengali-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --night: #0B0E1F;
  --deep: #141938;
  --deeper: #080A17;
  --bone: #ECE9F5;
  --mist: #A3A8C7;
  --line: rgba(236, 233, 245, 0.14);
  --amber: #FFB020;
  --cyan: #37E2D5;
  --flag: #FF5C7A;

  --f-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --f-bangla: "Hind Siliguri", "Noto Sans Bengali", "Vrinda", sans-serif;

  --pad: clamp(20px, 5vw, 72px);
  --max: 1320px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --lb: clamp(22px, 7vh, 70px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font-family: var(--f-display);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: var(--amber); color: var(--night); }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  background: var(--amber); color: var(--night); padding: 10px 16px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 16px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: clamp(96px, 16vh, 180px) 0; }

.h2 {
  font-size: clamp(2.3rem, 5.4vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 700;
  max-width: 16ch;
}
.section__intro { color: var(--mist); max-width: 52ch; margin-top: 20px; font-size: 1.1rem; }

/* word split wrappers */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.split .w > span { display: inline-block; will-change: transform; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  background: var(--amber); color: var(--night);
  font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 2px solid var(--amber);
  border-radius: 2px;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  position: relative;
}
.btn:hover { background: var(--bone); border-color: var(--bone); }
.btn--ghost { background: transparent; color: var(--bone); border-color: var(--line); }
.btn--ghost:hover { background: transparent; border-color: var(--amber); color: var(--amber); }
.btn--small { min-height: 40px; padding: 0 16px; font-size: 0.92rem; }

/* CV choice: "Download CV" and "View CV" open a small menu, short or detailed (js/lightbox.js) */
.cvpick { position: relative; display: flex; }
.cvpick.is-open { z-index: 5; }
.has-cvpick-open { position: relative; z-index: 6; }
.cvpick.is-open > .btn--ghost { border-color: var(--amber); color: var(--amber); }
.cvpick__menu {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 5;
  display: grid; gap: 4px; min-width: max(100%, 210px); padding: 6px;
  background: var(--deeper); border: 1px solid var(--line); border-radius: 2px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.75);
}
.cvpick__menu[hidden] { display: none; }
.cvpick__menu.is-right { left: auto; right: 0; }
.cvpick__menu.is-up { top: auto; bottom: calc(100% + 8px); }
.cvpick__opt {
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
  padding: 11px 12px; color: var(--bone); text-decoration: none;
  border: 1px solid transparent; border-radius: 2px;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.cvpick__opt b { font-weight: 700; font-size: 0.98rem; }
.cvpick__opt span { font-family: var(--f-mono); font-size: 0.74rem; color: var(--mist); white-space: nowrap; }
.cvpick__opt:hover, .cvpick__opt:focus-visible { border-color: var(--amber); color: var(--amber); background: rgba(255, 176, 32, 0.06); }
.motion .cvpick__menu:not([hidden]) { animation: cvpick-in 0.24s var(--ease); }
.motion .cvpick__menu.is-up:not([hidden]) { animation-name: cvpick-up; }
@keyframes cvpick-in { from { opacity: 0; transform: translateY(-6px); } }
@keyframes cvpick-up { from { opacity: 0; transform: translateY(6px); } }

.link {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--cyan); text-decoration: none; font-weight: 500;
  padding: 10px 0; min-height: 44px;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 8px) / 0% 1.5px no-repeat;
  transition: background-size 0.35s var(--ease);
}
.link:hover { background-size: 100% 1.5px; }

.stack { font-family: var(--f-mono); font-size: 0.82rem; color: var(--mist); line-height: 1.7; }

/* ---------- Boot sequence ---------- */
.boot { position: fixed; inset: 0; z-index: 120; display: none; }
.js .boot { display: block; animation: bootFailsafe 0.01s 7s forwards; }
@keyframes bootFailsafe { to { visibility: hidden; opacity: 0; pointer-events: none; } }
.boot__panel { position: absolute; left: 0; right: 0; height: 50.5%; background: var(--deeper); will-change: transform; backface-visibility: hidden; }
.boot__panel--top { top: 0; }
.boot__panel--bottom { bottom: 0; }
.boot__inner {
  position: absolute; inset: 0; display: grid; place-content: center;
  font-family: var(--f-mono); font-size: 0.95rem; color: var(--mist);
  width: min(420px, 86vw); margin: auto;
}
.boot__title { color: var(--bone); margin-bottom: 18px; }
.boot__lines li { display: flex; align-items: baseline; gap: 8px; opacity: 0; }
.boot__lines i { flex: 1; border-bottom: 1px dotted rgba(163,168,199,.45); transform: translateY(-4px); }
.boot__lines b { font-weight: 500; color: var(--cyan); }
.boot__lines b.warn { color: var(--amber); }
.boot__bar { height: 3px; background: var(--line); margin-top: 22px; overflow: hidden; }
.boot__bar span { display: block; height: 100%; width: 100%; background: var(--amber); transform-origin: left; transform: scaleX(0); }
.boot__count { margin-top: 10px; color: var(--bone); font-size: 2.6rem; font-family: var(--f-display); font-weight: 700; letter-spacing: -0.02em; }
.boot__skip { margin-top: 26px; font-size: 0.78rem; opacity: 0.7; }
/* sound hook: shown only while the browser still holds the sound back (js/sound.js) */
.boot__sound {
  display: none; position: relative; overflow: hidden; align-items: center; gap: 14px; margin-top: 24px;
  padding: 12px 18px 12px 14px; border: 1px solid rgba(255, 176, 32, 0.6); border-radius: 12px;
  background: linear-gradient(90deg, rgba(255, 176, 32, 0.14), rgba(255, 176, 32, 0.04));
  animation: bs-in 0.6s var(--ease) 0.2s both, bs-glow 1.6s ease-in-out 0.8s infinite;
}
.snd-locked .boot__sound, .snd-unlocked .boot__sound { display: flex; }
.boot__sound::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 35%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent); transform: translateX(0) skewX(-20deg);
  animation: bs-shine 2.2s ease-in-out 0.9s infinite;
}
.boot__eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 22px; flex: none; }
.boot__eq i { width: 3px; height: 4px; border-radius: 2px; background: var(--amber); animation: bs-eq 0.8s ease-in-out infinite; }
.boot__eq i:nth-child(2) { animation-delay: 0.15s; animation-duration: 0.65s; }
.boot__eq i:nth-child(3) { animation-delay: 0.3s; animation-duration: 0.9s; }
.boot__eq i:nth-child(4) { animation-delay: 0.05s; animation-duration: 0.7s; }
.boot__eq i:nth-child(5) { animation-delay: 0.22s; animation-duration: 0.85s; }
.boot__soundtext { display: grid; gap: 3px; line-height: 1.25; }
.boot__soundtext span { color: var(--bone); font-size: 0.82rem; }
.boot__soundtext b { color: var(--amber); font-weight: 500; font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase; animation: bs-blink 1.6s steps(1) 0.8s infinite; }
.boot__soundon { display: none; color: var(--cyan); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
/* clicked: the bars jump, the line turns cyan and says so */
.snd-unlocked .boot__sound { border-color: rgba(55, 226, 213, 0.7); background: rgba(55, 226, 213, 0.1); animation: none; }
.snd-unlocked .boot__soundtext { display: none; }
.snd-unlocked .boot__soundon { display: inline; }
.snd-unlocked .boot__eq i { background: var(--cyan); animation-duration: 0.35s; }
@keyframes bs-in { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
@keyframes bs-glow { 50% { box-shadow: 0 0 0 4px rgba(255, 176, 32, 0.12), 0 0 34px -6px rgba(255, 176, 32, 0.7); } }
/* moved with transform (no layout each frame): 170% of the box = 485.7143% of its own 35% width */
@keyframes bs-shine { 0%, 40% { transform: translateX(0) skewX(-20deg); } 100% { transform: translateX(485.7143%) skewX(-20deg); } }
@keyframes bs-eq { 0%, 100% { height: 4px; } 50% { height: 22px; } }
@keyframes bs-blink { 50% { opacity: 0.55; } }

/* ---------- Scene cut overlay ---------- */
.cut {
  position: fixed; inset: 0; z-index: 110; pointer-events: none;
  background: var(--deeper);
  display: grid; place-content: center; text-align: center;
  clip-path: inset(100% 0 0 0);
}
.cut__scan { position: absolute; left: 0; right: 0; height: 2px; background: var(--amber); top: 0; box-shadow: 0 0 24px var(--amber); }
.cut__small { font-family: var(--f-mono); color: var(--mist); font-size: 0.9rem; }
.cut__title { font-size: clamp(3rem, 10vw, 9rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }

/* ---------- Letterbox ---------- */
.lb { display: none; }
.motion .lb { display: block; }
.motion .lb { position: fixed; left: 0; right: 0; height: var(--lb); background: #000; z-index: 60; pointer-events: none; transform-origin: top; }
.lb--top { top: 0; }
.lb--bottom { bottom: 0; transform-origin: bottom; }

/* ---------- Grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); } 40% { transform: translate(4%, -7%); }
  60% { transform: translate(-3%, 8%); } 80% { transform: translate(7%, 2%); } 100% { transform: translate(0, 0); }
}

/* ---------- Detector cursor ---------- */
.reticle, .dbox { display: none; }
.has-detector, .has-detector a, .has-detector button { cursor: none; }
.has-detector .reticle {
  display: block; position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
}
.reticle::before, .reticle::after { content: ""; position: absolute; background: var(--amber); }
.reticle::before { left: 50%; top: 0; bottom: 0; width: 1.5px; transform: translateX(-50%); clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%, 0 65%, 100% 65%, 100% 100%, 0 100%); }
.reticle::after { top: 50%; left: 0; right: 0; height: 1.5px; transform: translateY(-50%); clip-path: polygon(0 0, 35% 0, 35% 100%, 0 100%, 0 0, 65% 0, 100% 0, 100% 100%, 65% 100%); }
.reticle span { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; background: var(--amber); border-radius: 50%; }
.has-detector .dbox {
  display: block; position: fixed; left: 0; top: 0; z-index: 149; pointer-events: none;
  border: 1.5px solid var(--amber); opacity: 0; width: 0; height: 0;
}
.dbox__tag {
  position: absolute; left: -1.5px; bottom: 100%;
  background: var(--amber); color: var(--night);
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; line-height: 1;
  padding: 4px 6px; white-space: nowrap;
}

/* ---------- Nav & HUD ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: calc(var(--lb) + 4px); padding: 0 var(--pad);
}
.nav__logo { display: inline-flex; align-items: center; gap: 12px; color: var(--bone); text-decoration: none; min-height: 44px; }
.nav__avatar { position: relative; flex: none; width: 40px; height: 40px; }
.nav__avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--night), 0 0 0 3.5px var(--amber); }
/* status badge: same cyan dot as "Open to AI and software roles" in the hero */
.nav__avatar i { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 2px var(--night); }
.nav__name { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; white-space: nowrap; transition: color 0.2s; }
.nav__logo:hover .nav__name { color: var(--amber); }
.nav__links { display: flex; gap: clamp(8px, 2.4vw, 32px); }
.nav__links a { display: inline-block; padding: 10px 4px; text-decoration: none; color: var(--bone); font-weight: 500; font-size: 0.98rem; }
.nav__links a:hover { color: var(--amber); }
.nav__toggle {
  display: none; position: relative; z-index: 2; flex: none;
  width: 42px; height: 42px; padding: 0; border: 1px solid var(--line);
  background: rgba(8, 10, 23, 0.6); cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav__toggle span { display: block; width: 18px; height: 1.5px; background: var(--bone); transition: transform 0.35s var(--ease), opacity 0.2s; }
.nav-open .nav__toggle { border-color: var(--amber); }
.nav-open .nav__toggle span { background: var(--amber); }
.nav-open .nav__toggle span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-open .nav__toggle span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* Touch devices get the detection box without the cursor: it locks onto
   whatever is crossing the middle of the screen as you scroll. */
.has-scanner .dbox {
  display: block; position: fixed; left: 0; top: 0; z-index: 149; pointer-events: none;
  border: 1.5px solid var(--amber); opacity: 0; width: 0; height: 0;
}

.nav.is-solid { background: rgba(11, 14, 31, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); height: 64px; transition: height .3s; }

.hud {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; pointer-events: none;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 var(--pad); height: calc(var(--lb) + 4px);
  font-family: var(--f-mono); font-size: 0.8rem; color: var(--mist);
  background: linear-gradient(to top, rgba(8, 10, 23, 0.94) 35%, rgba(8, 10, 23, 0));
}
.hud p { display: flex; align-items: center; gap: 10px; }
.hud__rec { width: 8px; height: 8px; border-radius: 50%; background: var(--flag); animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.15; } }
.hud__scene { color: var(--bone); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--lb) + 40px) var(--pad) calc(var(--lb) + 40px);
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 78% 40%, rgba(55, 226, 213, 0.08), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 12.5vh,
    var(--night);
}
.hero__bangla {
  position: absolute; right: -2vw; bottom: 4vh; z-index: 0;
  font-family: var(--f-bangla); font-weight: 700; line-height: 1;
  font-size: clamp(9rem, 30vw, 30rem);
  color: transparent; -webkit-text-stroke: 1.5px rgba(236, 233, 245, 0.09);
  pointer-events: none; user-select: none; white-space: nowrap;
}
.hero__grid {
  position: relative; z-index: 1; width: 100%; max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr); gap: clamp(32px, 5vw, 80px); align-items: center;
}
.hero__name {
  font-size: clamp(3.6rem, 12.5vw, 12rem);
  line-height: 0.86; letter-spacing: -0.055em; font-weight: 700;
  margin-left: -0.05em;
}
.hero__line { display: block; white-space: nowrap; }
.hero__line + .hero__line { color: transparent; -webkit-text-stroke: 2px var(--bone); }
.hero__role { margin-top: 32px; font-size: clamp(1.15rem, 1.8vw, 1.45rem); font-weight: 500; max-width: 34ch; }
.hero__lede { margin-top: 14px; color: var(--mist); max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* shutter slices (adapted from 21st.dev "Hero Shutter Text") */
.ch { position: relative; display: inline-block; }
.ch__main { display: inline-block; }
.ch__slice { position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; color: var(--amber); -webkit-text-stroke: 0; }
.ch__slice--1 { clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%); }
.ch__slice--2 { clip-path: polygon(0 35%, 100% 35%, 100% 65%, 0 65%); color: var(--cyan); }
.ch__slice--3 { clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%); }

.hero__shot { position: relative; }
.viewfinder { position: relative; padding: 18px; }
.vf { position: absolute; width: 28px; height: 28px; border: 0 solid var(--bone); }
.vf--tl { left: 0; top: 0; border-left-width: 2px; border-top-width: 2px; }
.vf--tr { right: 0; top: 0; border-right-width: 2px; border-top-width: 2px; }
.vf--bl { left: 0; bottom: 0; border-left-width: 2px; border-bottom-width: 2px; }
.vf--br { right: 0; bottom: 0; border-right-width: 2px; border-bottom-width: 2px; }
.lock {
  position: absolute; left: 27%; top: 19%; width: 45%; height: 72%;
  border: 2px solid var(--amber); z-index: 2; pointer-events: none;
}
.lock__tag {
  position: absolute; left: -2px; bottom: 100%;
  background: var(--amber); color: var(--night); font-family: var(--f-mono); font-size: 12px; font-weight: 500;
  padding: 4px 7px; white-space: nowrap;
}
.hero__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 14px; font-size: 0.92rem; color: var(--mist); }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--bone); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(55, 226, 213, 0.18); }
.hero__scroll {
  position: absolute; left: 50%; bottom: calc(var(--lb) + 14px); transform: translateX(-50%);
  font-family: var(--f-mono); font-size: 0.78rem; color: var(--mist); z-index: 1;
}

/* ---------- Frames & placeholders ---------- */
.frame {
  position: relative; overflow: hidden; background: var(--deep);
  aspect-ratio: 16 / 10;
}
.frame--portrait { aspect-ratio: 4 / 5; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame.no-pic {
  background:
    linear-gradient(rgba(236,233,245,.06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(236,233,245,.06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(160deg, var(--deep), var(--deeper));
}
.frame.no-pic::before {
  content: attr(data-glyph);
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--f-display), var(--f-bangla); font-weight: 700; letter-spacing: -0.04em;
  font-size: clamp(3rem, 9vw, 7rem); color: transparent; -webkit-text-stroke: 1.5px rgba(255, 176, 32, 0.55);
}
.show-pic-hints .frame.no-pic::after {
  content: "add " attr(data-file);
  position: absolute; left: 12px; top: 10px;
  font-family: var(--f-mono); font-size: 12px; color: var(--amber);
}
.show-pic-hints .frame--portrait.no-pic::after { top: auto; bottom: 10px; }


/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.about__text p + p { margin-top: 20px; }
.about__text { color: var(--mist); max-width: 60ch; }
.about__text p:first-child { color: var(--bone); font-size: 1.2rem; }
.about__edu { border-left: 2px solid var(--cyan); padding-left: 16px; color: var(--bone); }

.readout__title { margin-top: clamp(72px, 12vh, 128px); font-size: 1rem; font-weight: 500; color: var(--mist); }
.readout {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 18px; border-top: 1px solid var(--line);
}
.readout__item { padding: 26px 20px 8px 0; border-right: 1px solid var(--line); }
.readout__item + .readout__item { padding-left: 20px; }
.readout__item:last-child { border-right: 0; }
.readout__val { font-size: clamp(1.9rem, 3vw, 2.8rem); font-weight: 700; letter-spacing: -0.03em; color: var(--amber); line-height: 1.1; white-space: nowrap; }
.readout__val s { color: var(--mist); font-size: 0.55em; font-weight: 500; text-decoration-thickness: 2px; }
.readout__label { margin-top: 10px; font-size: 0.9rem; color: var(--mist); line-height: 1.5; }

/* ---------- Case files ---------- */
.work .wrap:first-child, .pubs .wrap:first-child, .bts .wrap:first-child { margin-bottom: clamp(56px, 9vh, 96px); }
.case {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px);
  align-items: center;
}
.case + .case { margin-top: clamp(96px, 16vh, 180px); }
.case--flip .case__visual { order: 2; }
.case__visual { position: relative; }
.case__visual .frame { border: 1px solid var(--line); }
.mask-sweep {
  position: absolute; inset: 0; background: var(--cyan); mix-blend-mode: normal;
  transform: scaleX(0); transform-origin: left; pointer-events: none; opacity: 0.85;
}
.case__lock {
  position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h);
  border: 2px solid var(--amber); background: rgba(255, 176, 32, 0.08); pointer-events: none;
}
.case__lock span {
  position: absolute; left: -2px; bottom: 100%; background: var(--amber); color: var(--night);
  font-family: var(--f-mono); font-size: 12px; font-weight: 500; padding: 3px 6px; white-space: nowrap;
}
.verdicts { position: absolute; left: 16px; bottom: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.v { font-family: var(--f-mono); font-size: 12px; font-weight: 500; padding: 5px 8px; color: var(--night); }
.v--ok { background: var(--cyan); }
.v--weak { background: var(--amber); }
.v--bad { background: var(--flag); }

.case__kind { font-size: 0.92rem; color: var(--mist); }
.case__title { margin: 12px 0 20px; font-size: clamp(1.8rem, 3.2vw, 2.8rem); line-height: 1.08; letter-spacing: -0.025em; font-weight: 700; max-width: 18ch; }
.case__body > p.fade { color: var(--mist); max-width: 56ch; }
.case__body > p.fade + p.fade { margin-top: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; margin: 28px 0 18px; border-top: 1px solid var(--line); }
.stats > div { padding: 14px 16px 12px 0; }
.stats dt { font-size: 0.82rem; color: var(--mist); }
.stats dd { font-size: 1.25rem; font-weight: 700; color: var(--bone); margin-top: 2px; }
.stats small { display: block; font-size: 0.78rem; font-weight: 400; color: var(--mist); }
.case .stack { margin-bottom: 6px; }
.case__links { display: flex; flex-wrap: wrap; column-gap: 28px; }

/* Published paper: cyan rule = "verified" in the annotation palette */
.paper { margin: 4px 0 22px; padding: 14px 0 14px 18px; border-left: 2px solid var(--cyan); max-width: 56ch; }
.paper__venue { font-size: 0.86rem; color: var(--cyan); }
.paper__title { margin-top: 6px; font-size: 1.02rem; font-weight: 500; line-height: 1.45; color: var(--bone); }
.paper__authors { margin-top: 6px; font-size: 0.9rem; color: var(--mist); }
.paper__authors strong { color: var(--bone); font-weight: 500; }
.paper__status { margin-top: 4px; font-size: 0.86rem; color: var(--mist); }

/* ---------- Reel: one wide board per category, stacked down the page,
   each with its own film strip of project cards that moves sideways ---------- */
.reel { padding: clamp(96px, 16vh, 180px) 0 clamp(80px, 12vh, 140px); background: var(--deeper); overflow: hidden; }
.reel__head { margin-bottom: 48px; }
.reel__groups { display: grid; gap: clamp(72px, 12vh, 128px); }
.genre { display: grid; gap: 22px; }
.reel__viewport { position: relative; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.reel__viewport .shot { scroll-snap-align: center; }
@media (min-width: 901px) { .motion .reel__viewport { overflow: visible; scroll-snap-type: none; } }
.reel__track {
  --sprocket: repeating-linear-gradient(90deg, transparent 0 14px, rgba(236,233,245,.16) 14px 30px, transparent 30px 44px);
  position: relative; display: flex; gap: 28px; width: max-content; margin: 0 auto;
  padding: 44px var(--pad);
  background: #05060F;
}
.reel__track::before, .reel__track::after {
  content: ""; position: absolute; left: 0; right: 0; height: 12px; background: var(--sprocket);
}
.reel__track::before { top: 16px; }
.reel__track::after { bottom: 16px; }
/* desktop: the strip drifts sideways, so the film band runs on past both ends of the cards */
@media (min-width: 901px) {
  .motion .reel__track { border-image: linear-gradient(#05060F, #05060F) fill 0 / 0 / 0 100vw; }
  .motion .reel__track::before, .motion .reel__track::after { left: -100vw; right: -100vw; }
}
/* Swipe hint + horizontal progress: the phone's stand-in for the
   drifting film strips that desktop gets. */
.reel__hint { display: none; align-items: center; gap: 10px; margin: 0; padding: 0 var(--pad);
  font-family: var(--f-mono); font-size: 0.78rem; color: var(--mist); transition: opacity 0.5s; }
.reel__hint i { display: block; width: 44px; height: 1px; background: linear-gradient(90deg, var(--amber), transparent); animation: swipe-hint 1.8s var(--ease) infinite; }
.reel__hint.is-done { opacity: 0; }
@keyframes swipe-hint { 0%, 100% { transform: translateX(0); opacity: 0.4; } 50% { transform: translateX(10px); opacity: 1; } }
.reel__progress { display: none; height: 2px; margin: -8px var(--pad) 0; background: var(--line); }
.reel__progress span { display: block; height: 100%; width: 0; background: var(--amber); }
@media (max-width: 900px) {
  .reel__hint { display: flex; }
  .reel__progress { display: block; }
}
@media (prefers-reduced-motion: reduce) { .reel__hint i { animation: none; } }

.shot {
  width: min(78vw, 470px); flex: none;
  background: var(--night); border: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.shot .frame { aspect-ratio: 16 / 10; }
.shot__body { padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.shot__body > p:not(.stack):not(.shot__year) { color: var(--mist); font-size: 0.98rem; }
.shot__year { font-family: var(--f-mono); font-size: 0.8rem; color: var(--amber); }
.shot__title { font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.02em; }
.shot .link { margin-top: auto; }

/* ---------- Reel chapters: a wide title board for each project category ---------- */
.chapter {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr);
  background: var(--night); border: 1px solid rgba(255, 176, 32, 0.32);
}
.chapter__art {
  position: relative; min-height: 230px; overflow: hidden;
  background: radial-gradient(70% 70% at 50% 45%, rgba(55, 226, 213, 0.07), transparent 70%), #070914;
  border-right: 1px solid var(--line);
}
.chapter__art svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.chapter__body { padding: clamp(20px, 3vw, 36px); display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.chapter__no {
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber);
}
.chapter__no span { color: var(--mist); letter-spacing: 0.02em; }
.chapter__title { font-size: clamp(1.45rem, 2.4vw, 2.2rem); line-height: 1.1; letter-spacing: -0.02em; }
.chapter__line { color: var(--mist); font-size: 0.98rem; max-width: 52ch; }
.chapter__list {
  list-style: none; margin: 6px 0 0; padding: 12px 0 0; border-top: 1px dashed var(--line);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 24px;
  font-family: var(--f-mono); font-size: 0.8rem; color: var(--bone);
}
@media (max-width: 760px) {
  .chapter { grid-template-columns: 1fr; }
  .chapter__art { min-height: 0; height: 150px; border-right: 0; border-bottom: 1px solid var(--line); }
}
.chapter__list li::before { content: "\25B8"; margin-right: 8px; color: var(--cyan); }
.chapter__list a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.chapter__list span { color: var(--mist); }
.chapter__art text { font-family: var(--f-mono); }
.chapter__art [class] { transform-box: fill-box; }

/* 01 vision: a viewfinder scans a picture and boxes what it finds */
.ch-vision .px rect { fill: rgba(236, 233, 245, 0.04); stroke: rgba(236, 233, 245, 0.22); }
.ch-vision .px path { fill: none; stroke: rgba(236, 233, 245, 0.1); }
.ch-vision .cell { fill: rgba(55, 226, 213, 0.32); }
.ch-vision .c2 { fill: rgba(255, 92, 122, 0.3); }
.ch-vision .corner { fill: none; stroke: var(--bone); stroke-width: 2; }
.ch-vision .scan { fill: var(--cyan); transform: translateY(100px); animation: ch-scan 3.6s linear infinite; }
.ch-vision .box { fill: none; stroke: var(--amber); stroke-width: 2; transform-origin: center; }
.ch-vision .b1, .ch-vision .t1 { animation: ch-find1 3.6s infinite; }
.ch-vision .b2, .ch-vision .t2 { animation: ch-find2 3.6s infinite; }
.ch-vision .tag { font-size: 10px; fill: var(--amber); }
@keyframes ch-scan { 0% { transform: translateY(40px); opacity: 0; } 6% { opacity: 1; } 70% { transform: translateY(160px); opacity: 1; } 76%, 100% { transform: translateY(160px); opacity: 0; } }
@keyframes ch-find1 { 0%, 36% { opacity: 0; transform: scale(1.18); } 41% { opacity: 1; transform: scale(1); } 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ch-find2 { 0%, 54% { opacity: 0; transform: scale(1.18); } 59% { opacity: 1; transform: scale(1); } 92% { opacity: 1; } 100% { opacity: 0; } }

/* 02 language: a passage is pulled from the document, the answer gets a check mark */
.ch-lang .page { fill: rgba(236, 233, 245, 0.05); stroke: rgba(236, 233, 245, 0.25); }
.ch-lang .lines rect { fill: rgba(236, 233, 245, 0.26); }
.ch-lang .hit { fill: rgba(255, 176, 32, 0.25); stroke: var(--amber); transform: translateY(103px); animation: ch-hit 3.6s infinite; }
.ch-lang .flow circle { fill: var(--amber); animation: ch-flow 3.6s infinite; }
.ch-lang .flow circle:nth-child(2) { animation-delay: 0.12s; }
.ch-lang .flow circle:nth-child(3) { animation-delay: 0.24s; }
.ch-lang .bubble { fill: rgba(55, 226, 213, 0.07); stroke: var(--cyan); }
.ch-lang .ans { fill: rgba(236, 233, 245, 0.6); transform-origin: left center; animation: ch-type 3.6s infinite; }
.ch-lang .a2 { animation-name: ch-type2; }
.ch-lang .a3 { animation-name: ch-type3; }
.ch-lang .ok { fill: none; stroke: var(--cyan); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 32; animation: ch-ok 3.6s infinite; }
.ch-lang .tag { font-size: 10px; fill: var(--cyan); animation: ch-tag 3.6s infinite; }
@keyframes ch-hit { 0% { transform: translateY(47px); } 10% { transform: translateY(61px); } 20% { transform: translateY(75px); } 32%, 100% { transform: translateY(103px); } }
@keyframes ch-flow { 0%, 34% { opacity: 0; } 40%, 50% { opacity: 1; } 56%, 100% { opacity: 0; } }
@keyframes ch-type { 0%, 52% { transform: scaleX(0); } 60%, 94% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes ch-type2 { 0%, 58% { transform: scaleX(0); } 66%, 94% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes ch-type3 { 0%, 64% { transform: scaleX(0); } 72%, 94% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes ch-ok { 0%, 72% { stroke-dashoffset: 32; } 80%, 94% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 32; } }
@keyframes ch-tag { 0%, 76% { opacity: 0; } 82%, 94% { opacity: 1; } 100% { opacity: 0; } }

/* 03 full stack: a request runs from the interface to the server and the database, and back */
.ch-stack .wire { fill: none; stroke: rgba(236, 233, 245, 0.25); stroke-width: 2; stroke-dasharray: 4 4; }
.ch-stack .node rect, .ch-stack .node path, .ch-stack .node ellipse { fill: rgba(236, 233, 245, 0.05); stroke: rgba(236, 233, 245, 0.55); stroke-width: 1.5; }
.ch-stack .node circle { fill: rgba(236, 233, 245, 0.55); }
.ch-stack .node .fill { fill: rgba(236, 233, 245, 0.28); stroke: none; }
.ch-stack .mono { font-size: 12px; fill: var(--amber); text-anchor: middle; }
.ch-stack .label { font-size: 10px; fill: var(--mist); text-anchor: middle; }
.ch-stack .req { fill: var(--cyan); transform: translateX(150px); animation: ch-req 2.8s ease-in-out infinite; }
.ch-stack .res { fill: var(--amber); transform: translateX(150px); animation: ch-res 2.8s ease-in-out infinite; }
@keyframes ch-req { 0% { transform: translateX(84px); opacity: 0; } 5% { opacity: 1; } 45% { transform: translateX(222px); opacity: 1; } 50%, 100% { transform: translateX(222px); opacity: 0; } }
@keyframes ch-res { 0%, 50% { transform: translateX(216px); opacity: 0; } 55% { opacity: 1; } 95% { transform: translateX(80px); opacity: 1; } 100% { transform: translateX(80px); opacity: 0; } }

/* 04 agents: plan, act, check, in a loop */
.ch-agent .term { fill: rgba(5, 6, 15, 0.9); stroke: rgba(236, 233, 245, 0.3); }
.ch-agent .bar { stroke: rgba(236, 233, 245, 0.2); }
.ch-agent .dot { fill: rgba(236, 233, 245, 0.35); }
.ch-agent .cmd { font-size: 13px; fill: var(--bone); }
.ch-agent .pass { font-size: 13px; fill: var(--cyan); }
.ch-agent .l1 { animation: ch-l1 4s infinite; }
.ch-agent .l2 { animation: ch-l2 4s infinite; }
.ch-agent .l3 { animation: ch-l3 4s infinite; }
.ch-agent .pass { animation: ch-l4 4s infinite; }
.ch-agent .caret { fill: var(--amber); animation: ch-blink 0.8s steps(2) infinite; }
.ch-agent .loop { fill: none; stroke: var(--amber); stroke-width: 3; stroke-linecap: round; transform-origin: 50% 50%; animation: ch-spin 2.4s linear infinite; }
@keyframes ch-l1 { 0%, 4% { opacity: 0; } 8%, 94% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ch-l2 { 0%, 24% { opacity: 0; } 28%, 94% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ch-l3 { 0%, 44% { opacity: 0; } 48%, 94% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ch-l4 { 0%, 64% { opacity: 0; } 68%, 94% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ch-blink { 50% { opacity: 0; } }
@keyframes ch-spin { to { transform: rotate(360deg); } }

/* 05 embedded: signals run along the traces of a microcontroller, an LED blinks */
.ch-chip .trace { fill: none; stroke: rgba(55, 226, 213, 0.22); stroke-width: 2; }
.ch-chip .pulse { fill: none; stroke: var(--cyan); stroke-width: 2.5; stroke-dasharray: 10 150; animation: ch-pulse 1.8s linear infinite; }
.ch-chip .pins path { stroke: rgba(236, 233, 245, 0.55); stroke-width: 2; }
.ch-chip .ic { fill: #10131f; stroke: rgba(236, 233, 245, 0.6); stroke-width: 1.5; }
.ch-chip .mono { font-size: 11px; fill: var(--bone); text-anchor: middle; }
.ch-chip .led { fill: var(--amber); animation: ch-led 1.2s steps(2) infinite; }
.ch-chip .wave { fill: none; stroke: rgba(255, 176, 32, 0.7); stroke-width: 2; stroke-dasharray: 3 3; animation: ch-wave 1s linear infinite; }
@keyframes ch-pulse { from { stroke-dashoffset: 160; } to { stroke-dashoffset: 0; } }
@keyframes ch-led { 50% { fill: #3a2a0a; } }
@keyframes ch-wave { to { stroke-dashoffset: -12; } }

@media (prefers-reduced-motion: reduce) { .chapter__art * { animation: none !important; } .ch-stack .req, .ch-stack .res { opacity: 0; } }
.no-motion .chapter__art * { animation: none !important; }
.no-motion .ch-stack .req, .no-motion .ch-stack .res { opacity: 0; }

/* ---------- Loadout ---------- */
.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-top: 56px; border-top: 1px solid var(--line); }
.slot { padding: 28px 28px 28px 0; border-bottom: 1px solid var(--line); }
.slot:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--line); }
.slot--wide { grid-column: 1 / -1; padding-left: 0 !important; border-left: 0 !important; }
.slot--wide ~ .slot:nth-child(even) { padding-left: 0; border-left: 0; }
.slot--wide ~ .slot:nth-child(odd) { padding-left: 28px; border-left: 1px solid var(--line); }
.slot__name { font-size: 1.35rem; margin-bottom: 8px; color: var(--amber); }
.slot p { color: var(--mist); max-width: 62ch; }

/* ---------- Path timeline ---------- */
.timeline { position: relative; margin-top: 64px; padding-left: 0; }
.timeline::before { content: ""; position: absolute; left: 8.5rem; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.timeline__fill { position: absolute; left: 8.5rem; top: 6px; bottom: 6px; width: 2px; margin-left: -0.5px; background: var(--amber); transform-origin: top; transform: scaleY(0); }
.tl { position: relative; display: grid; grid-template-columns: 8.5rem 1fr; gap: 0; padding: 0 0 44px; }
.tl::after { content: ""; position: absolute; left: 8.5rem; top: 9px; width: 11px; height: 11px; margin-left: -5.5px; background: var(--night); border: 2px solid var(--amber); }
.tl__when { font-family: var(--f-mono); font-size: 0.9rem; color: var(--amber); padding-top: 3px; }
.tl > div { padding-left: 36px; }
.tl h3 { font-size: 1.3rem; line-height: 1.3; }
.tl p { color: var(--mist); }
.tl--next::after, .tl.on::after { background: var(--amber); }

/* ---------- Credits & contact ---------- */
.credits { position: relative; padding-bottom: calc(var(--lb) + 24px); }
.credits__window { position: relative; display: grid; place-items: center; padding: clamp(96px, 16vh, 160px) 0 40px; }
.motion .credits__window {
  height: 100svh; overflow: hidden; padding: 0;
  -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
          mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
}
.credits__roll { text-align: center; width: min(760px, 90vw); }
.credits__lead { font-size: clamp(2.6rem, 7vw, 5.5rem); font-weight: 700; letter-spacing: -0.04em; margin-bottom: 56px; }
.credits__list > div { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 10px 0; text-align: left; }
.credits__list dt { text-align: right; color: var(--mist); }
.credits__list dd { color: var(--bone); font-weight: 500; }

.contact { padding-top: clamp(40px, 8vh, 80px); padding-bottom: clamp(80px, 14vh, 140px); }
.contact .h2 { max-width: 20ch; }
.contact__mail {
  display: inline-block; margin-top: 36px;
  font-size: clamp(1.4rem, 4.2vw, 3.4rem); font-weight: 700; letter-spacing: -0.03em;
  color: var(--amber); text-decoration: none; word-break: break-all;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0% 3px no-repeat;
  transition: background-size 0.45s var(--ease);
}
.contact__mail:hover { background-size: 100% 3px; }
.contact__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
/* ---------- Audience reviews (js/reviews.js) ---------- */
.reviews { padding-top: clamp(8px, 2vh, 24px); padding-bottom: clamp(16px, 3vh, 32px); }
.rv {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(30px, 5vw, 56px) clamp(18px, 4vw, 48px);
  border: 1px solid rgba(55, 226, 213, 0.2); border-radius: 20px;
  background: linear-gradient(160deg, #11152f 0%, #0B0E1F 60%, #080A17 100%);
  box-shadow: 0 40px 90px -50px rgba(255, 176, 32, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.rv > :not(.rv__glow) { position: relative; z-index: 1; }
.rv__glow {
  position: absolute; inset: -30%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(30% 26% at 78% 24%, rgba(255, 176, 32, 0.12), transparent 70%),
    radial-gradient(28% 24% at 20% 76%, rgba(55, 226, 213, 0.12), transparent 70%);
  animation: aura-drift 18s ease-in-out infinite alternate-reverse;
}
.rv__head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 18px 32px; }
.rv__title { font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.1; letter-spacing: -0.02em; margin-top: 10px; }
.rv__score { display: inline-flex; align-items: center; gap: 14px; padding: 10px 18px 10px 20px; border: 1px solid rgba(255, 176, 32, 0.3); border-radius: 999px; background: rgba(255, 176, 32, 0.05); }
.rv__avg { font-size: 2rem; font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--bone); font-variant-numeric: tabular-nums; }
.rv__scoremeta { display: grid; gap: 4px; font-family: var(--f-mono); font-size: 0.74rem; color: var(--mist); }
.rv__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 32px); margin-top: 30px; align-items: start; }

/* stars: drawn with a clip path, lit ones are amber */
.stars { display: inline-flex; gap: 3px; }
.stars i {
  display: block; width: 14px; height: 14px; background: rgba(236, 233, 245, 0.18);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.stars i.is-on { background: var(--amber); }
.stars--sm i { width: 12px; height: 12px; }

/* the wall of reviews */
.rv__list { display: grid; gap: 14px; }
.rv__card {
  position: relative; overflow: hidden; padding: 20px 22px 18px;
  border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(180deg, rgba(236, 233, 245, 0.05), rgba(236, 233, 245, 0.012));
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.rv__card::before {
  content: "\201C"; position: absolute; right: 16px; top: -14px; font-size: 5.5rem; line-height: 1;
  font-family: Georgia, serif; color: rgba(255, 176, 32, 0.14); pointer-events: none;
}
.rv__card:hover { border-color: rgba(255, 176, 32, 0.4); transform: translateY(-2px); }
.rv__cardtop { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rv__rel { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); padding: 4px 9px; border: 1px solid rgba(55, 226, 213, 0.35); border-radius: 999px; }
.rv__text { margin: 12px 0 0; font-size: 1.02rem; line-height: 1.6; color: var(--bone); white-space: pre-line; overflow-wrap: anywhere; }
.rv__by { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 0.9rem; }
.rv__by b { font-weight: 600; color: var(--bone); }
.rv__sep { color: rgba(236, 233, 245, 0.3); }
.rv__mail { font-family: var(--f-mono); font-size: 0.8rem; color: var(--mist); overflow-wrap: anywhere; }
.rv__when { margin-top: 4px; font-family: var(--f-mono); font-size: 0.72rem; color: rgba(163, 168, 199, 0.7); }
.rv__empty { padding: 26px 22px; border: 1px dashed var(--line); border-radius: 14px; font-family: var(--f-mono); font-size: 0.88rem; color: var(--mist); }
.rv__empty[hidden] { display: none; }
.rv__more { margin-top: 14px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--bone); font: 500 0.82rem var(--f-mono); cursor: pointer; transition: border-color 0.2s, color 0.2s; }
.rv__more:hover { border-color: var(--amber); color: var(--amber); }

/* entrance: cards slide up one after another, then their stars light one by one */
.motion .reviews:not(.is-in) .rv__card { opacity: 0; }
.motion .reviews.is-in .rv__card { animation: rv-card 0.7s var(--ease) both; animation-delay: calc(var(--k, 0) * 110ms); }
@keyframes rv-card { from { opacity: 0; transform: translateY(26px) scale(0.98); } }
.motion .reviews.is-in .rv__card .stars i.is-on { animation: rv-star 0.5s var(--ease) both; animation-delay: calc(var(--k, 0) * 110ms + 300ms + var(--i, 0) * 80ms); }
@keyframes rv-star { from { transform: scale(0) rotate(-60deg); background: rgba(236, 233, 245, 0.18); } 60% { transform: scale(1.35) rotate(8deg); } }
.motion .reviews.is-in .rv__score { animation: rv-card 0.7s var(--ease) both; }

/* the form */
.rv__form {
  position: relative; padding: clamp(18px, 2.4vw, 26px); border: 1px solid rgba(255, 176, 32, 0.22); border-radius: 16px;
  background: linear-gradient(180deg, rgba(8, 10, 23, 0.7), rgba(8, 10, 23, 0.45));
}
.rv__formtitle { font-size: 1.15rem; font-weight: 600; margin-bottom: 16px; }
.rv__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rv__field { position: relative; display: grid; gap: 6px; }
.rv__field > span, .rv__set legend { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mist); }
.rv__field input, .rv__field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(8, 10, 23, 0.65); color: var(--bone); font: inherit; font-size: 0.98rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.rv__field textarea { resize: vertical; min-height: 104px; line-height: 1.5; }
.rv__field input:focus, .rv__field textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255, 176, 32, 0.16); }
.rv__field--full { margin-top: 16px; }
.rv__len { position: absolute; right: 10px; bottom: 8px; font-style: normal; font-family: var(--f-mono); font-size: 0.68rem; color: rgba(163, 168, 199, 0.6); pointer-events: none; }
.rv__note { margin-top: 8px; font-family: var(--f-mono); font-size: 0.72rem; color: rgba(163, 168, 199, 0.8); }
.rv__set { margin: 16px 0 0; padding: 0; border: 0; min-width: 0; }
.rv__set legend { padding: 0; margin-bottom: 8px; }
.rv__stars { display: flex; align-items: center; gap: 2px; }
.rv__stars button {
  position: relative; width: 38px; height: 38px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 8px;
  transition: transform 0.25s var(--ease);
}
.rv__stars button::before {
  content: ""; position: absolute; inset: 5px; background: rgba(236, 233, 245, 0.16);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  transition: background 0.2s;
}
.rv__stars button:hover { transform: scale(1.15); }
.rv__stars button.is-lit::before { background: var(--amber); }
.rv__stars button:focus-visible, .rv__chips button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.rv__stars.is-pop button.is-lit { animation: rv-pick 0.45s var(--ease) both; }
.rv__stars.is-pop button:nth-child(2) { animation-delay: 0.04s; }
.rv__stars.is-pop button:nth-child(3) { animation-delay: 0.08s; }
.rv__stars.is-pop button:nth-child(4) { animation-delay: 0.12s; }
.rv__stars.is-pop button:nth-child(5) { animation-delay: 0.16s; }
@keyframes rv-pick { 50% { transform: scale(1.3) rotate(-8deg); } }
.rv__starword { margin-left: 10px; font-family: var(--f-mono); font-size: 0.8rem; color: var(--amber); }
.rv__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rv__chips button {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(8, 10, 23, 0.5);
  color: var(--bone); font: 500 0.88rem var(--f-display); cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.25s var(--ease);
}
.rv__chips button:hover { border-color: var(--amber); }
.rv__chips button[aria-checked="true"] { background: var(--amber); border-color: var(--amber); color: var(--night); transform: translateY(-1px); }
.rv__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rv__msg { min-height: 1.4em; margin-top: 12px; font-family: var(--f-mono); font-size: 0.8rem; color: var(--mist); }
.rv__msg.is-bad { color: var(--flag); }
.rv__send { width: 100%; margin-top: 6px; position: relative; overflow: hidden; }
.rv__send.is-busy { pointer-events: none; opacity: 0.8; }
.rv__send.is-busy::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent); animation: rv-busy 0.9s linear infinite;
}
@keyframes rv-busy { to { left: 120%; } }
/* sent: the form steps back and a check draws itself */
.rv__done {
  position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 24px;
  text-align: center; border-radius: 16px; background: #0A0D1D;
  animation: rv-fade 0.35s ease both;
}
@keyframes rv-fade { from { opacity: 0; } }
.rv__form.is-done > :not(.rv__done) { visibility: hidden; }
.rv__done[hidden] { display: none; }
.rv__done svg { width: 64px; height: 64px; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.rv__done circle { stroke: rgba(55, 226, 213, 0.5); stroke-dasharray: 145; stroke-dashoffset: 145; animation: rv-draw 0.8s var(--ease) forwards; }
.rv__done path { stroke: var(--cyan); stroke-dasharray: 40; stroke-dashoffset: 40; animation: rv-draw 0.5s var(--ease) 0.55s forwards; }
@keyframes rv-draw { to { stroke-dashoffset: 0; } }
.rv__donetitle { font-size: 1.3rem; font-weight: 600; margin-top: 6px; animation: rv-card 0.6s var(--ease) 0.4s both; }
.rv__donetext { max-width: 28ch; color: var(--mist); font-size: 0.95rem; animation: rv-card 0.6s var(--ease) 0.55s both; }
.has-detector .rv__form input, .has-detector .rv__form textarea { cursor: text; }
/* pinned reviews: their own column beside the wall */
.rv__grid.has-pins { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.has-pins .rv__row { grid-template-columns: 1fr; }
.rv__pins[hidden] { display: none; }
.rv__pinshead {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber);
}
.rv__wallhead { display: none; color: var(--mist); }
.has-pins .rv__wallhead { display: flex; }
.rv__pinshead svg { width: 16px; height: 16px; fill: var(--amber); transform: rotate(-12deg); }
.rv__card--pin {
  border-color: rgba(255, 176, 32, 0.45);
  background: linear-gradient(180deg, rgba(255, 176, 32, 0.09), rgba(255, 176, 32, 0.02));
  box-shadow: 0 18px 40px -28px rgba(255, 176, 32, 0.6);
}
.rv__card--pin::before { color: rgba(255, 176, 32, 0.24); }
.rv__card--pin .rv__rel { color: var(--amber); border-color: rgba(255, 176, 32, 0.5); }
.motion .reviews.is-in .rv__card--pin { animation: rv-pin 0.8s var(--ease) both; animation-delay: calc(var(--k, 0) * 140ms); }
@keyframes rv-pin { from { opacity: 0; transform: translateY(-18px) rotate(-1.5deg) scale(0.97); } 60% { transform: translateY(2px) rotate(0.4deg); } }
@media (max-width: 1200px) {
  .rv__grid.has-pins { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rv__grid.has-pins .rv__form { grid-column: 1 / -1; }
  .has-pins .rv__row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) { .rv__grid, .rv__grid.has-pins { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .rv__row, .has-pins .rv__row { grid-template-columns: 1fr; } .rv__stars button { width: 40px; height: 40px; } }
@media (prefers-reduced-motion: reduce) {
  .rv__glow, .rv__card, .rv__card .stars i, .rv__stars button, .rv__done *, .rv__send::after { animation: none !important; transition: none !important; }
  .rv__done circle, .rv__done path { stroke-dashoffset: 0; }
}

/* ---------- Box office: views, people watching now, views graph (js/stats.js) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.boxoffice { padding-top: clamp(24px, 5vh, 56px); padding-bottom: clamp(64px, 10vh, 110px); }
/* the board: a lit panel with film running along its top and bottom edge */
.bo {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(46px, 6vw, 70px) clamp(18px, 4vw, 48px);
  border: 1px solid rgba(255, 176, 32, 0.22); border-radius: 20px;
  background:
    linear-gradient(rgba(236, 233, 245, 0.03) 1px, transparent 1px) 0 0 / 100% 28px,
    linear-gradient(90deg, rgba(236, 233, 245, 0.03) 1px, transparent 1px) 0 0 / 28px 100%,
    linear-gradient(160deg, #11152f 0%, #0B0E1F 55%, #080A17 100%);
  box-shadow: 0 40px 90px -50px rgba(55, 226, 213, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.bo > :not(.bo__perf):not(.bo__aura) { position: relative; z-index: 1; }
.bo__perf {
  position: absolute; left: 0; right: 0; top: 0; height: 24px; z-index: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='36' height='24'><rect x='10' y='8' width='16' height='8' rx='2.5' fill='%23ECE9F5' fill-opacity='.16'/></svg>") 0 0 / 36px 24px repeat-x;
  border-bottom: 1px solid rgba(236, 233, 245, 0.07);
  animation: perf-run 2.4s linear infinite;
}
.bo__perf--bottom { top: auto; bottom: 0; border-bottom: 0; border-top: 1px solid rgba(236, 233, 245, 0.07); animation-direction: reverse; }
@keyframes perf-run { to { background-position: 36px 0; } }
/* slow coloured light drifting behind the board, like a projector beam */
.bo__aura {
  position: absolute; inset: -30%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(32% 28% at 24% 30%, rgba(55, 226, 213, 0.15), transparent 70%),
    radial-gradient(30% 26% at 76% 68%, rgba(255, 176, 32, 0.12), transparent 70%);
  animation: aura-drift 16s ease-in-out infinite alternate;
}
@keyframes aura-drift { from { transform: translate3d(-4%, -3%, 0) rotate(0deg); } to { transform: translate3d(5%, 3%, 0) rotate(9deg); } }

.boxoffice__head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 18px 32px; }
.boxoffice__title { font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.1; letter-spacing: -0.02em; margin-top: 10px; }

/* live: a recording light, the number, and one lit seat per person watching */
.bo__live {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
  padding: 10px 18px; border: 1px solid rgba(255, 92, 122, 0.35); border-radius: 999px;
  background: rgba(255, 92, 122, 0.06); font-family: var(--f-mono); font-size: 0.84rem; color: var(--mist);
  animation: live-glow 2.4s ease-in-out infinite;
}
@keyframes live-glow { 50% { box-shadow: 0 0 26px -6px rgba(255, 92, 122, 0.55); } }
.bo__rec { display: inline-flex; align-items: center; gap: 9px; color: var(--flag); font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.72rem; }
.bo__rec i { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--flag); box-shadow: 0 0 10px var(--flag); }
.bo__rec i::before, .bo__rec i::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid var(--flag); animation: live-ping 1.8s var(--ease) infinite; }
.bo__rec i::after { animation-delay: 0.9s; }
@keyframes live-ping { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(1.9); opacity: 0; } }
.bo__livenum { display: inline-flex; align-items: center; gap: 0.5em; }
.bo__livenum b { color: var(--bone); font-weight: 500; }
.bo__seats { display: inline-flex; align-items: flex-end; gap: 4px; min-height: 12px; }
.bo__seats i {
  width: 10px; height: 12px; border-radius: 4px 4px 2px 2px; background: var(--amber);
  box-shadow: 0 0 8px rgba(255, 176, 32, 0.55);
  animation: seat-in 0.55s var(--ease) both, seat-breathe 2.6s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 240ms);
}
.bo__seats i.is-more { width: auto; height: auto; background: none; box-shadow: none; color: var(--amber); font-style: normal; font-size: 0.72rem; animation: none; }
@keyframes seat-in { from { transform: translateY(8px) scale(0.4); opacity: 0; } }
@keyframes seat-breathe { 50% { opacity: 0.55; box-shadow: 0 0 2px rgba(255, 176, 32, 0.2); } }

/* tiles */
.boxoffice__tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 30px; }
.tile {
  position: relative; overflow: hidden; padding: 22px 24px 20px;
  border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(180deg, rgba(236, 233, 245, 0.045), rgba(236, 233, 245, 0.01));
}
.tile::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -45%; width: 40%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  transform: translateX(0) skewX(-18deg); animation: tile-sweep 8s ease-in-out infinite;
}
.tile + .tile::before { animation-delay: 4s; }
/* moved with transform (no layout each frame): 425% of its own 40% width = the old left -45% to 125% */
@keyframes tile-sweep { 0%, 72% { transform: translateX(0) skewX(-18deg); } 100% { transform: translateX(425%) skewX(-18deg); } }
.tile__value { font-size: clamp(2.4rem, 5.4vw, 3.8rem); line-height: 1; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tile__label { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-family: var(--f-mono); font-size: 0.78rem; color: var(--mist); }
.tile__label::before { content: ""; width: 14px; height: 2px; background: var(--amber); }
.tile + .tile .tile__label::before { background: var(--cyan); }

/* odometer: each digit is a column of 0-9 that rolls to its value */
.odo { display: inline-flex; align-items: flex-start; position: relative; }
.odo__d { display: inline-block; height: 1em; line-height: 1; overflow: hidden; }
.odo__s { display: block; transition: transform 1.2s cubic-bezier(0.2, 0.9, 0.25, 1); transition-delay: var(--dl, 0ms); will-change: transform; }
.odo__s span { display: block; height: 1em; line-height: 1; text-align: center; }
.odo__p { display: inline-block; line-height: 1; }
.odo--sm .odo__d, .odo--sm .odo__s span { height: 1.15em; line-height: 1.15; }
.odo__plus {
  position: absolute; left: 100%; top: 0.35em; margin-left: 0.2em; font-size: 0.32em; font-weight: 500;
  color: var(--cyan); font-family: var(--f-mono); letter-spacing: 0; pointer-events: none;
  animation: plus-up 1.6s var(--ease) forwards;
}
@keyframes plus-up { from { transform: translateY(0.9em); opacity: 0; } 25% { opacity: 1; } to { transform: translateY(-0.6em); opacity: 0; } }

/* chart header and the range switch with a sliding light */
.boxoffice__chart { margin-top: 30px; }
.boxoffice__bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 14px; }
.boxoffice__chartname { font-family: var(--f-mono); font-size: 0.82rem; color: var(--mist); }
.seg { position: relative; display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(236, 233, 245, 0.03); }
.seg button {
  position: relative; z-index: 1; min-height: 34px; padding: 0 16px; border: 0; border-radius: 999px;
  background: transparent; color: var(--mist); font: 500 0.88rem var(--f-display); cursor: pointer; transition: color 0.3s;
}
.seg button:hover { color: var(--bone); }
.seg button[aria-selected="true"] { color: var(--night); }
.seg:not(.has-thumb) button[aria-selected="true"] { background: var(--amber); }
.seg__thumb {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: var(--x, 3px); width: var(--w, 0px); border-radius: 999px;
  background: var(--amber); box-shadow: 0 0 20px -4px rgba(255, 176, 32, 0.75);
  transition: left 0.5s var(--ease), width 0.5s var(--ease);
}

/* the graph */
.vchart { position: relative; margin: 0; }
.vchart__plot { width: 100%; min-height: 200px; }
.vchart__plot svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.vchart__grid { stroke: rgba(236, 233, 245, 0.08); stroke-width: 1; }
.vchart__base { stroke: rgba(236, 233, 245, 0.24); stroke-width: 1; }
.vchart__tick { font-family: var(--f-mono); font-size: 10px; fill: var(--mist); pointer-events: none; }
.vchart__val { font-family: var(--f-mono); font-size: 11px; fill: var(--bone); pointer-events: none; }
.vchart__bar { fill: url(#vbarFill); transform-box: fill-box; transform-origin: 50% 100%; transition: opacity 0.2s; }
.vchart__bar.is-now { fill: var(--amber); filter: drop-shadow(0 0 6px rgba(255, 176, 32, 0.6)); animation: now-glow 2.4s ease-in-out infinite; }
@keyframes now-glow { 0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 176, 32, 0.45)); } 50% { filter: drop-shadow(0 0 12px rgba(255, 176, 32, 0.85)); } }
.vchart__fx { pointer-events: none; }
.vchart__now { fill: var(--cyan); transform-box: fill-box; transform-origin: center; }
.vchart__ring { fill: none; stroke: var(--cyan); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; opacity: 0; animation: now-ring 1.8s var(--ease) var(--d, 0s) infinite; }
@keyframes now-ring { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(2.6); opacity: 0; } }
/* sparks drifting up from today's dot: it's live */
.vchart__ember { fill: var(--amber); opacity: 0; animation: ember 2.7s ease-out var(--d, 0s) infinite; }
@keyframes ember {
  0% { opacity: 0; transform: translate(0, 0) scale(1); }
  15% { opacity: 0.95; }
  100% { opacity: 0; transform: translate(var(--dx, 0px), -30px) scale(0.35); }
}
.vchart__scan { fill: url(#vscanFill); pointer-events: none; animation: scan-x 6.5s linear infinite; }
.vchart__scan--sheen { fill: url(#vsheenFill); }
.vchart__sheen { pointer-events: none; mix-blend-mode: screen; transition: opacity 0.2s; }
@keyframes scan-x { from { transform: translateX(0); } to { transform: translateX(var(--run, 600px)); } }
.vchart__cap { fill: #FFF4D6; opacity: 0; filter: drop-shadow(0 0 5px rgba(255, 176, 32, 0.95)); animation: cap-flash 0.75s ease-out var(--d, 0s) both; }
@keyframes cap-flash { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }
.vchart__hit { fill: transparent; cursor: crosshair; }
.has-detector .vchart__hit { cursor: none; }
.is-hovering .vchart__bar { opacity: 0.35; }
.is-hovering .vchart__bar.is-on { opacity: 1; }
.is-hovering .vchart__sheen { opacity: 0; }

/* entrance: the grid draws itself, bars spring up one by one, labels rise in, today's dot pops on */
.is-enter .vchart__grid, .is-enter .vchart__base { stroke-dasharray: 1; stroke-dashoffset: 1; animation: grid-draw 0.8s var(--ease) var(--d, 0s) forwards; }
@keyframes grid-draw { to { stroke-dashoffset: 0; } }
.is-enter .vchart__tick--y { animation: tick-in 0.5s var(--ease) var(--d, 0s) both; }
@keyframes tick-in { from { opacity: 0; transform: translateX(-6px); } }
.is-enter .vchart__tick--x { animation: tick-up 0.5s var(--ease) var(--d, 0s) both; }
@keyframes tick-up { from { opacity: 0; transform: translateY(6px); } }
.is-enter .vchart__val { animation: tick-up 0.45s var(--ease) var(--d, 0s) both; }
.is-enter .vchart__bar { animation: bar-spring 0.9s var(--d, 0s) both; }
.is-enter .vchart__bar.is-now { animation: bar-spring 0.9s var(--d, 0s) both, now-glow 2.4s ease-in-out infinite; }
@keyframes bar-spring {
  0% { transform: scaleY(0); animation-timing-function: cubic-bezier(0.2, 0.75, 0.3, 1); }
  58% { transform: scaleY(1.08); animation-timing-function: ease-in-out; }
  80% { transform: scaleY(0.98); animation-timing-function: ease-in-out; }
  100% { transform: scaleY(1); }
}
.is-enter .vchart__now { animation: now-pop 0.55s var(--d, 0s) both; }
@keyframes now-pop {
  0% { transform: scale(0); animation-timing-function: cubic-bezier(0.2, 0.75, 0.3, 1); }
  60% { transform: scale(1.6); }
  100% { transform: scale(1); }
}
/* new numbers while you watch: changed bars grow or shrink from their old height */
.vchart__bar.is-morph { animation: bar-morph 0.8s var(--ease) both; }
.vchart__bar.is-morph.is-now { animation: bar-morph 0.8s var(--ease) both, now-glow 2.4s ease-in-out infinite; }
@keyframes bar-morph { from { transform: scaleY(var(--from, 0)); } to { transform: scaleY(1); } }
/* before it comes into view: flat bars, no grid yet */
.is-pre .vchart__bar { animation: none; transform: scaleY(0); }
.is-pre .vchart__grid, .is-pre .vchart__base { stroke-dasharray: 1; stroke-dashoffset: 1; }
.is-pre .vchart__tick, .is-pre .vchart__val, .is-pre .vchart__now, .is-pre .vchart__ring,
.is-pre .vchart__scan, .is-pre .vchart__sheen { opacity: 0; animation: none; }
/* switching range: the old bars drop and the labels fade */
.is-leaving .vchart__bar, .is-leaving .vchart__bar.is-now, .is-leaving .vchart__bar.is-morph.is-now { animation: bar-drop 0.22s cubic-bezier(0.55, 0, 0.9, 0.4) both; }
@keyframes bar-drop { from { transform: scaleY(1); } to { transform: scaleY(0); } }
.is-leaving .vchart__tick--x, .is-leaving .vchart__val, .is-leaving .vchart__fx, .is-leaving .vchart__sheen { opacity: 0; transition: opacity 0.15s; }
.vchart__tip {
  position: absolute; z-index: 2; transform: translate(-50%, -100%); pointer-events: none;
  display: grid; gap: 2px; padding: 8px 10px; white-space: nowrap; border-radius: 8px;
  background: var(--deep); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-family: var(--f-mono); font-size: 0.74rem; color: var(--mist);
}
.vchart__tip b { color: var(--bone); font-weight: 500; font-size: 0.86rem; }
.hud__live { display: inline-flex; align-items: center; gap: 6px; padding-left: 10px; border-left: 1px solid var(--line); }
.hud__live b { color: var(--bone); font-weight: 500; }
@media (max-width: 600px) {
  .bo { border-radius: 16px; }
  .boxoffice__tiles { gap: 10px; }
  .tile { padding: 18px 14px 16px; }
  .seg button { padding: 0 12px; }
}
@media (max-width: 400px) { .boxoffice__tiles { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .hud__live { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .bo__perf, .bo__aura, .bo__live, .bo__rec i::before, .bo__rec i::after, .bo__seats i, .tile::before,
  .vchart__ring, .vchart__scan, .vchart__bar, .vchart__bar.is-now, .vchart__ember, .vchart__cap, .odo__plus { animation: none; }
  .tile::before, .vchart__scan, .vchart__ring, .vchart__ember, .vchart__cap, .vchart__sheen { display: none; }
  .odo__s, .seg__thumb { transition: none; }
}

/* ---------- Sound switch: a small icon in the navbar, left of Contact (js/sound.js) ---------- */
.nav.has-snd > nav { margin-inline: auto; }
.snd {
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; margin-right: -6px;
  border: 1px solid var(--line); border-radius: 2px; background: rgba(8, 10, 23, 0.6);
  color: var(--mist); cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}
.snd:hover, .snd:focus-visible { color: var(--bone); border-color: var(--amber); }
.snd.is-on { color: var(--amber); border-color: rgba(255, 176, 32, 0.4); }
.snd__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; }
.snd__bars i { width: 2px; height: 2px; border-radius: 1px; background: currentColor; opacity: 0.7; }
.snd.is-on .snd__bars i { opacity: 1; animation: snd-eq 0.9s ease-in-out infinite; }
.snd.is-on .snd__bars i:nth-child(2) { animation-delay: 0.18s; animation-duration: 0.7s; }
.snd.is-on .snd__bars i:nth-child(3) { animation-delay: 0.36s; animation-duration: 1.1s; }
.snd.is-on .snd__bars i:nth-child(4) { animation-delay: 0.08s; animation-duration: 0.8s; }
@keyframes snd-eq { 0%, 100% { height: 3px; } 50% { height: 13px; } }
/* muted: the bars lie flat and a line crosses them */
.snd::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 1.5px; margin: -0.75px 0 0 -10px;
  background: currentColor; transform: rotate(-45deg); transition: transform 0.3s var(--ease), opacity 0.2s;
}
.snd.is-on::before { opacity: 0; transform: rotate(-45deg) scaleX(0); }
/* sound is on but the browser is still waiting for a first click or tap */
.snd.is-on.is-waiting { animation: snd-call 2.2s ease-in-out 2.4s 5; }
@keyframes snd-call { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 176, 32, 0); } 50% { box-shadow: 0 0 0 5px rgba(255, 176, 32, 0.18); } }
/* a small label under it on hover */
@media (hover: hover) {
  .snd::after {
    content: "Sound off"; position: absolute; top: calc(100% + 10px); left: 50%; transform: translate(-50%, -4px);
    padding: 5px 8px; border: 1px solid var(--line); background: rgba(8, 10, 23, 0.94);
    color: var(--bone); font: 500 0.64rem var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s var(--ease);
  }
  .snd.is-on::after { content: "Sound on"; }
  .snd:hover::after, .snd:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
}
/* no navbar to sit in: a corner button */
.snd--float { position: fixed; right: 16px; bottom: calc(var(--lb) + 12px); z-index: 73; margin: 0; }
@media (max-width: 460px) { .snd { width: 34px; height: 34px; margin-right: -2px; } }
@media print { .snd { display: none !important; } }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 28px; padding-bottom: 28px; color: var(--mist); font-size: 0.9rem;
  background: linear-gradient(var(--line), var(--line)) var(--pad) 0 / calc(100% - 2 * var(--pad)) 1px no-repeat; }
.foot a { color: var(--mist); text-decoration: none; padding: 6px 0; }
.foot a:hover { color: var(--amber); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .readout { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .readout__item:nth-child(3) { border-right: 0; }
  .readout__item:nth-child(4) { padding-left: 0; }
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__shot { max-width: 420px; }
  .about__grid, .case { grid-template-columns: 1fr; }
  .case--flip .case__visual { order: 0; }

  /* Mobile menu: the links become a panel that shutters down from the bar,
     so the scene-cut transitions stay reachable on a phone. */
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: fixed; left: 0; right: 0; top: 0; z-index: -1;
    flex-direction: column; gap: 0;
    padding: calc(var(--lb) + 26px) var(--pad) 22px;
    background: rgba(8, 10, 23, 0.97);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    clip-path: inset(0 0 100% 0); visibility: hidden; pointer-events: none;
    transition: clip-path 0.5s var(--ease), visibility 0s linear 0.5s;
  }
  .nav__links li { width: 100%; }
  .nav__links a {
    display: block; width: 100%; padding: 14px 0;
    font-family: var(--f-display); font-size: 1.3rem; font-weight: 500;
    border-bottom: 1px solid var(--line);
  }
  .nav__links li:last-child a { border-bottom: 0; }
  .nav-open .nav__links {
    clip-path: inset(0 0 0 0); visibility: visible; pointer-events: auto;
    transition: clip-path 0.5s var(--ease), visibility 0s;
  }
  .nav-open .nav { background: rgba(11, 14, 31, 0.92); }
}
@media (max-width: 700px) {
  body { font-size: 17px; }
  .hero__name { font-size: 19vw; }
  .readout { grid-template-columns: 1fr 1fr; }
  .readout__item, .readout__item + .readout__item { padding: 22px 12px 10px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .slots { grid-template-columns: 1fr; }
  .slot, .slot:nth-child(even), .slot--wide ~ .slot:nth-child(odd) { padding-left: 0; border-left: 0; padding-right: 0; }
  .timeline::before, .timeline__fill, .tl::after { left: 5.2rem; }
  .tl { grid-template-columns: 5.2rem 1fr; }
  .tl > div { padding-left: 24px; }
  .credits__list > div { grid-template-columns: 1fr; gap: 0; text-align: center; padding: 12px 0; }
  .credits__list dt { text-align: center; font-size: 0.9rem; }
  .hud__scene { font-size: 0.74rem; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero__scroll { display: none; }
}
@media (max-width: 460px) {
  .nav { gap: 10px; }
  .nav__name { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .grain, .hud__rec { animation: none; }
  .boot { display: none !important; }
  * { scroll-behavior: auto !important; }
}


/* ---------- Publication ---------- */
.frame--doc { aspect-ratio: 1080 / 755; background: #FBF8F3; }
.frame--doc img { object-fit: contain; }
.doc-open {
  display: block; width: 100%; height: 100%; padding: 0; margin: 0; border: 0;
  background: none; cursor: zoom-in;
}
.doc-open:focus-visible { outline-offset: -4px; }
.doc-hint { margin-top: 10px; font-size: 0.82rem; color: var(--mist); }
button.link { border: 0; background-color: transparent; font: inherit; font-weight: 500; cursor: pointer; }

.lightbox {
  width: fit-content; max-width: 94vw; max-height: none; padding: 52px 0 0; border: 0;
  background: transparent; overflow: visible;
}
.lightbox::backdrop { background: rgba(8, 10, 23, 0.9); }
.lightbox img { width: auto; height: auto; max-width: min(1200px, 94vw); max-height: 82vh; border: 1px solid var(--line); cursor: zoom-out; }
.lightbox__close {
  position: absolute; right: 0; top: 0; min-height: 40px; padding: 0 14px;
  background: transparent; color: var(--bone); border: 1px solid var(--line);
  font: 500 0.92rem var(--f-display); cursor: pointer;
}
.lightbox__close:hover { border-color: var(--amber); color: var(--amber); }
.lightbox[open] { animation: lightbox-in 0.45s var(--ease); }
.lightbox[open]::backdrop { animation: lightbox-fade 0.3s ease; }
@keyframes lightbox-in { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes lightbox-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .lightbox[open], .lightbox[open]::backdrop { animation: none; }
}
/* the detector cursor sits under the dialog's top layer, so dialogs get the normal cursor back */
.has-detector .lightbox { cursor: default; }
.has-detector .lightbox a, .has-detector .lightbox button { cursor: pointer; }
.has-detector .lightbox img { cursor: zoom-out; }

/* CV viewer */
.lightbox--cv { width: min(980px, 94vw); }
.cvview {
  display: block; width: 100%; height: calc(100vh - 120px); height: calc(100dvh - 120px);
  border: 1px solid var(--line); background: #FBF8F3;
}
.lightbox__actions { position: absolute; left: 0; top: 0; display: flex; gap: 8px; }
.lightbox__act {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  color: var(--bone); border: 1px solid var(--line); text-decoration: none;
  font: 500 0.92rem var(--f-display);
}
.lightbox__act:hover { border-color: var(--amber); color: var(--amber); }


/* ---------- Behind the scenes ---------- */
.event { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.event__text { position: sticky; top: calc(var(--lb) + 90px); }
.event__text p.fade { color: var(--mist); max-width: 46ch; }
.event__text p.fade + p.fade { margin-top: 14px; }
/* column widths follow each photo's aspect ratio so the second row lines up */
.event__photos { display: grid; grid-template-columns: 1.415fr 0.75fr; gap: 28px 16px; align-items: start; }
.ph--wide { grid-column: 1 / -1; }
.ph__frame { border: 1px solid var(--line); }
.ph__open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.ph__open:focus-visible { outline-offset: -4px; }
.ph__open img { transition: transform 0.6s var(--ease); }
.ph__open:hover img { transform: scale(1.03); }
.ph figcaption { margin-top: 10px; font-size: 0.88rem; color: var(--mist); line-height: 1.5; max-width: 60ch; }
.scenes { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: clamp(28px, 5vw, 72px); align-items: start; margin-top: clamp(72px, 12vh, 128px); }
.scenes__title { font-size: 1.3rem; line-height: 1.3; }
.scenes__text p { margin-top: 8px; color: var(--mist); max-width: 40ch; }
.scenes__photos { display: grid; grid-template-columns: 1.444fr 0.667fr; gap: 16px; align-items: start; }

.lightbox--gallery { padding-top: 52px; }
.lightbox__fig img { display: block; width: auto; height: auto; max-width: min(1200px, 94vw); max-height: 76vh; margin: 0 auto; border: 1px solid var(--line); cursor: zoom-out; }
.lightbox__fig figcaption { margin: 12px auto 0; max-width: 70ch; text-align: center; font-size: 0.92rem; color: var(--mist); }
.lightbox__nav {
  position: absolute; top: 0; min-height: 40px; padding: 0 14px;
  background: transparent; color: var(--bone); border: 1px solid var(--line);
  font: 500 0.92rem var(--f-display); cursor: pointer;
}
.lightbox__nav--prev { left: 0; }
.lightbox__nav--next { left: 78px; }
.lightbox__nav:hover { border-color: var(--amber); color: var(--amber); }

@media (max-width: 900px) {
  .event, .scenes { grid-template-columns: 1fr; }
  .event__text { position: static; }
}
@media (max-width: 700px) {
  .event__photos, .scenes__photos, .scenes__photos--gym, .scenes__photos--pair { grid-template-columns: 1fr; }
  .ph--wide { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .ph__open img { transition: none; }
  .ph__open:hover img { transform: none; }
}
.case__lock--end span { left: auto; right: -2px; }

/* Hobby rows: column widths follow the media's aspect ratios */
.scenes__photos--gym { grid-template-columns: 0.991fr 0.5625fr; }
.scenes__photos--pair { grid-template-columns: 1fr 1fr; }

/* Autoplaying clip with an ambient glow sampled from the video */
.ph--video { position: relative; isolation: isolate; }
.vid__glow {
  position: absolute; left: -6%; top: -4%; width: 112%; height: 92%;
  z-index: -1; filter: blur(38px) saturate(1.4); opacity: 0.55; pointer-events: none;
}
.vid { background: var(--deeper); }
.vid__el { display: block; width: 100%; height: 100%; object-fit: cover; }
.rec {
  position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 7px; background: rgba(8, 10, 23, 0.72); color: var(--bone);
  font-family: var(--f-mono); font-size: 12px; font-weight: 500; text-transform: lowercase;
}
.rec i { width: 7px; height: 7px; border-radius: 50%; background: var(--flag); animation: rec-blink 1.2s steps(2, jump-none) infinite; }
.vid.is-paused .rec i { animation: none; opacity: 0.4; }
@keyframes rec-blink { 50% { opacity: 0.2; } }
@media (prefers-reduced-motion: reduce) {
  .rec i { animation: none; }
  .vid__glow { display: none; }
}

/* ---------- Plain section labels (help recruiters and search engines scan the page) ---------- */
.eyebrow {
  font-family: var(--f-mono); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 14px;
}
.contact .eyebrow { margin-bottom: 18px; }

/* ---------- Two links in one reel card (code + live demo) ---------- */
.shot__links { margin-top: auto; display: flex; flex-wrap: wrap; column-gap: 24px; }
.shot__links .link { margin-top: 0; }

/* ---------- Inline links in small print (DOI) ---------- */
.paper__status a, .tl a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }

/* ==========================================================
   Particle world: WebGL canvas behind the page (js/particles.js)
   ========================================================== */
.pworld {
  position: fixed; left: 0; top: 0; z-index: 0; pointer-events: none;
  width: 100vw; height: 100vh; height: 100lvh;
  opacity: 0; transition: opacity 1.6s var(--ease);
}
.pworld.is-on { opacity: 1; }
.has-world main { position: relative; z-index: 1; }
/* sections that painted a solid fill let the dots through */
.has-world .hero {
  background:
    radial-gradient(60% 50% at 78% 40%, rgba(55, 226, 213, 0.06), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 12.5vh;
}
.has-world .reel { background: rgba(8, 10, 23, 0.7); }

/* detector-style tags pinned to points in the 3D scene */
.pworld-labels { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.pworld-tag {
  position: absolute; left: 0; top: 0; margin: -11px 0 0 14px;
  font-family: var(--f-mono); font-size: 11px; line-height: 1; white-space: nowrap;
  padding: 5px 7px; background: var(--amber); color: var(--night);
  opacity: 0; transition: opacity 0.35s;
}
.pworld-tag::before {
  content: ""; position: absolute; left: -14px; top: 50%; width: 10px; height: 1px; background: inherit;
}
.pworld-tag.is-on { opacity: 1; }
.pworld-tag--cyan { background: var(--cyan); }
.pworld-tag--flag { background: var(--flag); color: #fff; }
.pworld-tag--bone { background: var(--bone); }

/* ---------- Skills: data to screen loop + stage for the 3D full stack ---------- */
.loadout__head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px); align-items: center;
}
.loadout__lede { color: var(--mist); max-width: 52ch; margin-top: 14px; }
.stack-stage {
  position: relative; min-height: clamp(340px, 40vw, 540px);
  display: grid; place-items: center; perspective: 900px;
}
.stack-fallback { position: relative; width: 62%; aspect-ratio: 1; transform: rotateX(58deg) rotateZ(-38deg); transform-style: preserve-3d; transition: opacity 0.8s; }
.stack-fallback i { position: absolute; inset: 16%; border: 1.5px solid var(--cyan); border-radius: 6px; }
.stack-fallback i:nth-child(1) { transform: translateZ(80px); }
.stack-fallback i:nth-child(2) { border-color: var(--amber); }
.stack-fallback i:nth-child(3) { transform: translateZ(-80px); border-color: var(--mist); border-radius: 50%; }
.has-world .stack-fallback { opacity: 0; }

.loop { position: relative; width: min(100%, 380px); aspect-ratio: 1; margin: 36px 0 0; }
.loop__svg { position: absolute; left: 16%; top: 16%; width: 68%; height: 68%; overflow: visible; }
.loop__track { fill: none; stroke: rgba(236, 233, 245, 0.22); stroke-width: 1; stroke-dasharray: 2 4; }
.loop__trail { fill: none; stroke: var(--amber); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 16 84; stroke-dashoffset: 16; opacity: 0.7; transform: rotate(-90deg); transform-box: view-box; transform-origin: 100px 100px; }
.loop__spin { transform-box: view-box; transform-origin: 100px 100px; animation: loop-spin 8s linear infinite; }
.loop__dot { fill: var(--amber); filter: drop-shadow(0 0 6px var(--amber)); }
@keyframes loop-spin { to { transform: rotate(360deg); } }
.loop__node {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center;
  padding: 7px 11px; border: 1px solid var(--line); background: rgba(11, 14, 31, 0.88);
  font-family: var(--f-mono); white-space: nowrap;
  animation: loop-node 8s linear infinite;
}
.loop__node b { color: var(--bone); font-weight: 500; font-size: 0.84rem; }
.loop__node i { font-style: normal; color: var(--mist); font-size: 0.68rem; }
.loop__node--n { left: 50%; top: 16%; }
.loop__node--e { left: 84%; top: 50%; animation-delay: -6s; }
.loop__node--s { left: 50%; top: 84%; animation-delay: -4s; }
.loop__node--w { left: 16%; top: 50%; animation-delay: -2s; }
@keyframes loop-node {
  0%, 9% { border-color: var(--amber); box-shadow: 0 0 22px rgba(255, 176, 32, 0.28); }
  16%, 93% { border-color: var(--line); box-shadow: none; }
  100% { border-color: var(--amber); box-shadow: 0 0 22px rgba(255, 176, 32, 0.28); }
}
.loop__center {
  position: absolute; left: 30%; right: 30%; top: 30%; bottom: 30%;
  display: grid; place-content: center; text-align: center;
  font-size: 0.92rem; line-height: 1.3; color: var(--bone);
}
.loop__center span { display: block; margin-bottom: 6px; font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
@media (max-width: 900px) {
  .loadout__head { grid-template-columns: 1fr; }
  .stack-stage { min-height: 320px; }
  .loop { margin: 32px auto 0; }
  .loop__node { padding: 6px 8px; }
  .loop__node b { font-size: 0.78rem; }
  .loop__node i { font-size: 0.62rem; }
  .loop__center { font-size: 0.82rem; }
}
@media (prefers-reduced-motion: reduce) {
  .loop__spin, .loop__node { animation: none; }
}

/* ---------- Project holograms: a picture dims while its 3D model builds inside the frame ---------- */
.has-world .reel, .has-world .reel__track, .has-world .shot { background: transparent; }
.has-world .reel__track { border-image: none; }
.has-world .shot__body { background: var(--night); }
.frame img { transition: opacity 0.6s var(--ease), filter 0.6s var(--ease); }
.frame { transition: background-color 0.6s var(--ease); }
.frame.is-holo { background-color: transparent; }
.frame.is-holo img { opacity: 0.07; filter: blur(6px) saturate(0.5); }
.frame.is-holo .case__lock, .frame.is-holo .verdicts, .frame.is-holo .mask-sweep { visibility: hidden; }
.holo-chip {
  position: absolute; right: 10px; top: 10px; z-index: 4;
  font-family: var(--f-mono); font-size: 11px; line-height: 1; letter-spacing: 0.04em;
  padding: 7px 9px; min-height: 28px; color: var(--bone); cursor: pointer;
  background: rgba(8, 10, 23, 0.78); border: 1px solid var(--line);
  opacity: 0; pointer-events: none; transition: opacity 0.3s, border-color 0.2s, color 0.2s;
}
.holo-chip:hover, .holo-chip:focus-visible { border-color: var(--amber); color: var(--amber); }
.frame.holo-near .holo-chip, .holo-chip:focus-visible { opacity: 1; pointer-events: auto; }

/* ---------- 3D avatar (js/avatar.js) ---------- */
/* a strip along the bottom of the screen that he walks along; it clips him when he runs
   in from the edge, so nothing ever pokes past the screen (phones would zoom out) */
.ya-stage {
  --ya-w: 170px;
  position: fixed; left: 0; right: 0; bottom: calc(var(--lb) - 4px); z-index: 72;
  height: calc(var(--ya-w) / 0.82); overflow: hidden; pointer-events: none;
}
.ya-avatar {
  position: absolute; left: 0; bottom: 0; width: var(--ya-w); height: calc(var(--ya-w) / 0.82);
  pointer-events: none; opacity: 0; transition: opacity 0.5s var(--ease), visibility 0.5s;
  will-change: transform;
}
.ya-avatar.is-on { opacity: 1; }
.ya-avatar.is-on.is-resting { opacity: 0.45; transition-duration: 0.9s; }
.ya-avatar.is-on.is-hidden { opacity: 0; visibility: hidden; }
.ya-avatar__cv { display: block; width: 100%; height: 100%; }
.ya-avatar__tag {
  position: absolute; left: 50%; top: 2%; transform: translateX(-50%); padding: 3px 6px; white-space: nowrap;
  font: 500 10px/1 var(--f-mono); letter-spacing: 0.04em; color: var(--cyan);
  border: 1px solid rgba(55, 226, 213, 0.6); background: rgba(8, 10, 23, 0.6);
  opacity: 0; transition: opacity 0.3s;
}
.ya-avatar:hover .ya-avatar__tag, .ya-avatar.is-talking .ya-avatar__tag { opacity: 1; }
/* speech looks like a film subtitle with an amber edge, on the side facing the page */
.ya-avatar__say {
  position: absolute; top: 10%; width: max-content; max-width: min(250px, 58vw);
  padding: 9px 12px; color: var(--bone);
  font: 500 0.84rem/1.4 var(--f-display);
  background: rgba(8, 10, 23, 0.92); border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  opacity: 0; transform: translateY(8px) scale(0.96);
  transition: opacity 0.25s, transform 0.4s var(--ease);
}
.ya-avatar.is-right .ya-avatar__say { right: 68%; border-right: 2px solid var(--amber); transform-origin: right bottom; }
.ya-avatar.is-left .ya-avatar__say { left: 68%; border-left: 2px solid var(--amber); transform-origin: left bottom; }
.ya-avatar__say::after { content: ""; position: absolute; top: 14px; border: 6px solid transparent; }
.ya-avatar.is-right .ya-avatar__say::after { right: -8px; border-left-color: var(--amber); border-right: 0; }
.ya-avatar.is-left .ya-avatar__say::after { left: -8px; border-right-color: var(--amber); border-left: 0; }
.ya-avatar.is-talking .ya-avatar__say { opacity: 1; transform: none; }
.ya-avatar__hit {
  position: absolute; left: 28%; right: 28%; top: 12%; bottom: 2%;
  padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto;
}
.ya-avatar__close {
  position: absolute; right: 6%; top: 6%; width: 26px; height: 26px; padding: 0;
  display: grid; place-items: center; border-radius: 50%;
  font: 400 16px/1 var(--f-mono); color: var(--mist);
  background: rgba(8, 10, 23, 0.75); border: 1px solid var(--line);
  cursor: pointer; pointer-events: auto; opacity: 0; transition: opacity 0.2s, color 0.2s, border-color 0.2s;
}
.ya-avatar.is-left .ya-avatar__close { right: auto; left: 6%; }
.ya-avatar:hover .ya-avatar__close, .ya-avatar__close:focus-visible { opacity: 1; }
.ya-avatar__close:hover, .ya-avatar__close:focus-visible { color: var(--amber); border-color: var(--amber); }
.ya-avatar.is-running .ya-avatar__say, .ya-avatar.is-running .ya-avatar__tag, .ya-avatar.is-running .ya-avatar__close { opacity: 0; }
.ya-avatar.is-running .ya-avatar__hit, .ya-avatar.is-resting .ya-avatar__hit,
.ya-avatar.is-hidden .ya-avatar__hit, .ya-avatar.is-hidden .ya-avatar__close { pointer-events: none; }
.ya-avatar-pill {
  position: fixed; right: 14px; bottom: calc(var(--lb) + 10px); z-index: 72;
  display: none; align-items: center; gap: 8px; padding: 7px 12px 7px 10px;
  font: 500 0.75rem/1 var(--f-mono); color: var(--bone); letter-spacing: 0.03em;
  background: rgba(8, 10, 23, 0.85); border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
}
.ya-avatar-pill span { width: 8px; height: 8px; border-radius: 2px; background: var(--amber); }
.ya-avatar-pill.is-on { display: inline-flex; }
.ya-avatar-pill:hover, .ya-avatar-pill:focus-visible { border-color: var(--amber); }
.has-detector .ya-avatar__hit, .has-detector .ya-avatar__close, .has-detector .ya-avatar-pill { cursor: pointer; }
@media (hover: none) { .ya-avatar__close { opacity: 0.8; } }
@media (max-width: 900px) { .ya-stage { --ya-w: 148px; } }
@media (max-width: 600px) {
  .ya-stage { --ya-w: 118px; }
  .ya-avatar__say { max-width: 60vw; font-size: 0.76rem; padding: 7px 10px; top: 4%; }
  .ya-avatar.is-right .ya-avatar__say { right: 64%; }
  .ya-avatar.is-left .ya-avatar__say { left: 64%; }
  .ya-avatar__tag { display: none; }
  .ya-avatar__close { width: 24px; height: 24px; font-size: 15px; }
}
@media print { .ya-stage, .ya-avatar-pill { display: none !important; } }

/* ---------- Endless loops rest while their block is far off screen (js/main.js) ---------- */
/* Paused only while out of sight, so nothing looks different: each loop carries on from the same spot. */
.loops-off.chapter__art *, .loops-off.reel__hint i, .loops-off .rv__glow,
.loops-off .bo__perf, .loops-off .bo__aura, .loops-off .bo__live, .loops-off .bo__rec i::before, .loops-off .bo__rec i::after,
.loops-off .tile::before, .loops-off .vchart__ring, .loops-off .vchart__ember { animation-play-state: paused !important; }
.loops-off .bo__seats i { animation-play-state: running, paused !important; }
