/* ==========================================================================
   Yohan: a filmmaker's diary (shared by every page)
   1 Tokens · 2 Fonts · 3 Base · 4 Film grain · 5 Pen marks · 6 Helpers
   7 Header & nav · 8 Phone menu · 9 Hero & Dhaka sky · 10 Page heads
   11 Sheets & section heads · 12 Frames · 13 Work · 14 About · 15 Tools
   16 Gear · 17 Case studies · 18 Gallery corkboard · 19 Contact & feedback board · 20 Footer
   21 Video pop-up · 22 Responsive · 23 Motion & reveals
   ========================================================================== */

/* 1 · Tokens -------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* A crisp, rich, solid dark body. The only sky is the hero's real one (§9). */
  --bg: #0a0c17;
  --bg-sheet: #11152a;   /* raised paper: sheets, the stuck header, the phone menu */
  --bg-raised: #161b31;  /* the video pop-up */
  --bg-sunken: #06080f;  /* inside the frames */
  --ink: #efe9dc;        /* headings, paper white: 16:1 on --bg */
  --ink-soft: #bfb9ad;   /* body text: 10:1 on --bg */
  --ink-faint: #8f92a6;  /* labels and captions: 6.3:1 on --bg */
  /* Cream paper taped into the diary: prints, index cards, sticky notes, the ticket */
  --paper: #efe9dc;
  --paper-ink: #1b1e2e;   /* text on paper: 13:1 */
  --paper-faint: #555a70; /* small labels on paper: 5.8:1 */
  --line: rgb(239 233 220 / 0.13);
  --line-strong: rgb(239 233 220 / 0.3);

  /* Brand blue, from the Oct-25 draft. --blue fills shapes (paper text on it is
     6.3:1); --pen is the same hue lifted for strokes and text on the dark (5.9:1). */
  --blue: #1e3fd8;
  --on-blue: #efe9dc;
  --pen: #6a84ff;
  --marker-stroke: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 60' preserveAspectRatio='none'%3E%3Cpath fill='%231e3fd8' d='M5 14C62 8 112 13 162 10S252 6 295 9L297 22 294 34 298 49C240 53 190 48 140 51S50 54 3 50L6 38 2 26Z'/%3E%3Cpath fill='none' stroke='%23162fae' stroke-width='4' stroke-linecap='round' opacity='.6' d='M12 44C90 41 200 46 289 42'/%3E%3C/svg%3E");

  /* Hand-cut paper edges: sheets (§11) and the stuck header (§7) */
  --edge-top: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27480%27 height=%2714%27%3E%3Cpath d=%27M0%206L8%202L16%209.4L24%204.3L32%203.7L40%207.8L48%206.3L56%204.6L64%208L72%208L80%206.3L88%207.5L96%207.1L104%208.5L112%203.9L120%205L128%207.7L136%207.6L144%202.4L152%207.5L160%205.7L168%209.4L176%208.5L184%203L192%206.1L200%209.4L208%207.5L216%207.2L224%206.6L232%209.3L240%209.3L248%205L256%204.7L264%208.7L272%204.7L280%203.2L288%204.4L296%205.4L304%204.4L312%209.5L320%206.5L328%207.8L336%209L344%202.5L352%204.2L360%206.5L368%206.1L376%205.4L384%203.5L392%209.3L400%202.4L408%204.9L416%204.8L424%207.3L432%209.4L440%206.1L448%203.3L456%205.2L464%204.3L472%204.9L480%206V14H0Z%27/%3E%3C/svg%3E");
  --edge-bottom: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27480%27 height=%2714%27%3E%3Cpath d=%27M0%208.0L8%2012.0L16%204.6L24%209.7L32%2010.3L40%206.2L48%207.7L56%209.4L64%206.0L72%206.0L80%207.7L88%206.5L96%206.9L104%205.5L112%2010.1L120%209.0L128%206.3L136%206.4L144%2011.6L152%206.5L160%208.3L168%204.6L176%205.5L184%2011.0L192%207.9L200%204.6L208%206.5L216%206.8L224%207.4L232%204.7L240%204.7L248%209.0L256%209.3L264%205.3L272%209.3L280%2010.8L288%209.6L296%208.6L304%209.6L312%204.5L320%207.5L328%206.2L336%205.0L344%2011.5L352%209.8L360%207.5L368%207.9L376%208.6L384%2010.5L392%204.7L400%2011.6L408%209.1L416%209.2L424%206.7L432%204.6L440%207.9L448%2010.7L456%208.8L464%209.7L472%209.1L480%208.0V0H0Z%27/%3E%3C/svg%3E");

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  /* Handwriting, for things written by hand only: pen notes, captions, sticky notes */
  --font-hand: "Annie Use Your Telescope", "Segoe Print", "Bradley Hand", cursive;

  /* Layout */
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1320px;
  --section-space: clamp(80px, 10vw, 144px);
  --header-h: 68px;

  /* Motion: UI moves in 150–300 ms; reveals and pen strokes take a little longer. */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-pen: cubic-bezier(0.65, 0, 0.35, 1);
}

/* 2 · Fonts: self-hosted variable fonts, Latin only (SIL OFL, licences in /fonts) */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* The handwriting accent (15 KB). Not preloaded: it only downloads on pages that
   show handwriting, and the text shows in a fallback until it arrives. */
@font-face {
  font-family: "Annie Use Your Telescope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/annie-use-your-telescope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 3 · Base ------------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-gutter: stable;  /* the page doesn't jump sideways when a lock hides the scrollbar */
  -webkit-text-size-adjust: 100%;
}

/* No page scrolling behind the open phone menu or video pop-up (the wheel used to scroll
   the page away underneath the film) */
html:has(:is(.menu, #player)[open]) { overflow: hidden; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

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

::selection {
  background: var(--blue);
  color: var(--on-blue);
}

/* 4 · Film grain ------------------------------------------------------------- */
/* One even grain over the whole screen, so the hero sky and the solid body share
   the same texture: a tiny SVG noise tile on a fixed layer. It holds still on
   purpose: a jittering grain costs a style update every frame and fights the
   glide of a smooth scroll (measured 2026-11-23). */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.075;
}

/* 5 · Pen marks (drawn by js/marks.js) --------------------------------------- */
/* A key word, circled or underlined in pen. About once per section. */
.mark {
  position: relative;
  isolation: isolate;
  display: inline-block;
  font-style: normal;
  line-height: 1;
  white-space: nowrap;
}

/* A loose doodle that isn't attached to words: arrows, the timeline, and the
   hand-drawn pictures that open each section */
.doodle {
  position: relative;
  display: block;
  --mark-color: var(--ink-faint);
}

/* A hand-drawn picture (data-mark="art") brings its own <svg>; js/marks.js draws
   its strokes in one after another, a little quicker than a single long mark. */
.doodle--art { --draw: 380ms; }
.doodle--art .mark__svg { stroke-width: 2.6px; }

/* Each mark keeps its stroke inside its own layer, so a sheet's paper never covers it */
[data-mark] {
  position: relative;
  isolation: isolate;
}

/* An <svg> doesn't stretch between its inset edges the way a <div> does,
   so every mark gets an explicit position and size. */
.mark__svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  z-index: -1;
  overflow: visible;
  pointer-events: none;
  fill: none;
  stroke: var(--mark-color, var(--pen));
  stroke-width: clamp(2px, 0.045em, 5px);
  stroke-linecap: round;
  stroke-linejoin: round;
}

[data-mark="circle"] > .mark__svg {
  top: -0.16em;
  left: -0.28em;
  width: calc(100% + 0.56em);
  height: calc(100% + 0.3em);
}

[data-mark="underline"] > .mark__svg {
  top: 0.86em;
  left: -0.06em;
  width: calc(100% + 0.12em);
  height: 0.3em;
}

/* Hidden until drawn (only while JS runs): the dash pattern hides the whole path,
   then slides in. */
.js .mark__svg path {
  stroke-dasharray: 1 1.5;
  stroke-dashoffset: 1.01;
}

.is-drawn > .mark__svg path,
a:is(:hover, :focus-visible) [data-mark-on="hover"] > .mark__svg path,
a[aria-current="page"] [data-mark-on="hover"] > .mark__svg path { stroke-dashoffset: 0; }

/* Touch screens have no hover, so text links keep their pen underline drawn */
@media (hover: none) {
  :is(.link-arrow, .contact__link) [data-mark-on="hover"] > .mark__svg path { stroke-dashoffset: 0; }
}

/* 6 · Helpers ----------------------------------------------------------------- */
.container {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.section { padding-block: var(--section-space); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: var(--gutter);
  z-index: 100;
  padding: 10px 14px;
  background: var(--blue);
  color: var(--on-blue);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Small uppercase labels: captions, metadata, the nav */
.label {
  color: var(--ink-faint);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* Timecodes and numbers that shouldn't jiggle */
.tc { font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }

/* Big display type (headlines, section titles) and smaller headings */
.display {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 0.9;
}

.heading {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* A text link that points somewhere: "Let's talk →", "Read the full story →".
   Its words carry a pen underline (data-mark="underline"): drawn in on hover or
   focus on desktop, always there on touch screens (§5). */
.link-arrow {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
/* Without JavaScript there's no pen, so it keeps a plain underline */
html:not(.js) .link-arrow {
  text-decoration: underline 2px var(--pen);
  text-underline-offset: 5px;
}

/* Buttons: a blue marker stroke is the primary call to action */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  min-height: 48px;
  padding: 0 1.25rem;
  border: 0;
  background: none;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.btn--marker {
  padding-inline: 1.5rem;
  color: var(--on-blue);
  background: var(--marker-stroke) center / 100% 100% no-repeat;
  filter: drop-shadow(0 6px 10px rgb(0 0 0 / 0.45));
}
.btn--marker:hover { transform: rotate(-1.5deg) translateY(-2px); }

.btn--line {
  padding-inline: 0.25rem;
  color: var(--ink);
}

.btn--sm {
  min-height: 40px;
  padding-inline: 1rem;
  font-size: 0.9rem;
}

/* The play icon gets a pen circle around it (data-mark="circle") */
.btn__play {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
}
.btn__play::after {
  content: "";
  margin-left: 3px;
  border-block: 6px solid transparent;
  border-left: 9px solid currentColor;
}

/* 6b · Diary kit: things taped into the diary (About, Case studies, Gallery, Home) ---- */
/* A note in blue pen: margin notes and lines quoted from a film */
.pen-note {
  display: block;
  max-width: 30ch;
  color: var(--pen);
  font-family: var(--font-hand);
  font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.65rem);
  font-weight: 400;
  line-height: 1.2;
  rotate: -2deg;
}
a.pen-note { text-decoration: none; }
a.pen-note:is(:hover, :focus-visible) {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* A print taped in: a cream border with a handwritten-style caption under it */
.polaroid {
  position: relative;
  display: block;
  width: 100%;
  padding: 10px 10px 0;
  border: 0;
  background: var(--paper);
  color: var(--paper-ink);
  font: inherit;
  text-align: left;
  box-shadow:
    0 2px 4px rgb(0 0 0 / 0.45),
    0 26px 44px -20px rgb(0 0 0 / 0.85);
}

.polaroid__print {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bg-sunken);
}
.polaroid__print--empty {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  padding: 24px;
  color: var(--ink-faint);
  font-size: 0.85rem;
  text-align: center;
}

.polaroid__caption {
  display: block;
  padding: 10px 4px 14px;
  font-family: var(--font-hand);
  font-size: 1.3rem;
  line-height: 1.2;
}

.polaroid__print--wide { aspect-ratio: 4 / 3; }

/* No caption: the print keeps a polaroid's deeper bottom edge anyway */
.polaroid:not(:has(.polaroid__caption)) { padding-bottom: 28px; }

/* An empty slot waiting for a real photo: a clear label, nothing pretend */
.polaroid__slot {
  display: grid;
  gap: 6px;
  justify-items: center;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}
.polaroid__slot .label { color: var(--ink-faint); }

/* A strip of masking tape holding something down */
.tape {
  position: absolute;
  top: -13px;
  left: 50%;
  z-index: 1;
  width: 92px;
  height: 26px;
  background: rgb(222 210 182 / 0.62);
  translate: -50% 0;
  rotate: -4deg;
  clip-path: polygon(0 8%, 4% 0, 96% 6%, 100% 0, 98% 92%, 100% 100%, 3% 94%, 0 100%);
  pointer-events: none;
}

/* A note stuck on: paper (cream unless --note picks another tint), dark ink, by hand */
.sticky {
  padding: 22px 20px 26px;
  background: var(--note, var(--paper));
  color: var(--paper-ink);
  font-family: var(--font-hand);
  font-size: 1.4rem;
  line-height: 1.2;
  box-shadow:
    0 2px 4px rgb(0 0 0 / 0.4),
    0 22px 36px -18px rgb(0 0 0 / 0.8);
}
.sticky b { font-weight: 400; }

/* An index card: ruled paper for lists written by hand (milestones, quick facts) */
.index-card {
  padding: 20px 22px 24px;
  background: var(--paper);
  color: var(--paper-ink);
  box-shadow:
    0 2px 4px rgb(0 0 0 / 0.4),
    0 22px 36px -18px rgb(0 0 0 / 0.8);
}
/* A year on a handwritten list, in blue pen */
.index-card__year {
  margin-right: 0.25em;
  color: var(--blue);
}

.index-card__title {
  margin-bottom: 0.6rem;
  color: var(--paper-faint);
}
/* Each written line sits on a pale blue rule */
.index-card :is(ul, ol, dl) {
  background: repeating-linear-gradient(#0000 0 calc(1.9rem - 1px), rgb(30 63 216 / 0.24) calc(1.9rem - 1px) 1.9rem);
}
.index-card :is(li, dt, dd) { line-height: 1.9rem; }
.index-card :is(li, dd) {
  font-family: var(--font-hand);
  font-size: 1.3rem;
}

/* 7 · Header & nav (the same on every page) ------------------------------------- */
/* Clear at the top of the page; once you scroll it becomes a strip of paper with a
   hand-cut bottom edge and a crisp shadow (js/header.js adds .is-stuck). */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  isolation: isolate;
}
.site-header::before,
.site-header::after {
  content: "";
  position: absolute;
  inset: 0 0 -12px;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - 13px) no-repeat,
    var(--edge-bottom) bottom left / 480px 14px repeat-x;
  mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - 13px) no-repeat,
    var(--edge-bottom) bottom left / 480px 14px repeat-x;
}
.site-header::before {
  background: rgb(0 0 0 / 0.5);
  translate: 0 7px;
}
.site-header::after { background: var(--bg-sheet); }
.site-header.is-stuck::before,
.site-header.is-stuck::after { opacity: 1; }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}

.site-header__inner > .wordmark { margin-right: auto; }

.wordmark {
  font-size: 1.45rem;
  line-height: 1;
  text-decoration: none;
}
.wordmark__star { color: var(--pen); }

/* The nav links read like an index: spaced capitals; the page you're on is circled in pen */
.site-nav { display: none; }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.6vw, 40px);
}

.site-nav__link {
  display: inline-block;
  padding: 12px 4px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
}

/* Small capitals need a roomier loop so the pen never cuts through the letters */
.site-nav__link [data-mark="circle"] > .mark__svg {
  top: -0.7em;
  left: -0.75em;
  width: calc(100% + 1.35em);
  height: calc(100% + 1.4em);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

/* 8 · Phone menu: a full-screen paper sheet (js/menu.js) --------------------------- */
.menu {
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--bg-sheet);
  color: var(--ink-soft);
}
.menu::backdrop { background: rgb(4 5 11 / 0.6); }

.menu__inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding-bottom: 32px;
}

.menu__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.menu__close {
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.menu__list {
  display: grid;
  gap: 4px;
  margin-top: 5vh;
}

.menu__link {
  display: inline-block;
  padding-block: 6px;
  font-size: clamp(2.6rem, 13vw, 4.5rem);
  text-decoration: none;
}

.menu__foot {
  display: grid;
  justify-items: start;
  gap: 18px;
  margin-top: auto;
  padding-top: 40px;
}

.menu__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

/* 9 · Hero & the Dhaka sky (home page) -------------------------------------------- */
/* The hook leads, with plenty of air above it. The hero slides up under the clear
   header so the sky starts at the very top of the screen. */
.hero {
  --wait: 300ms;   /* the pen starts once the page has settled */
  position: relative;
  isolation: isolate;
  margin-top: calc(-1 * var(--header-h));
  padding-block: calc(var(--header-h) + clamp(56px, 11vw, 160px)) clamp(64px, 8vw, 112px);
}

/* The live Dhaka sky: a WebGL canvas (js/sky.js) painting drifting clouds in the
   light of the moment. It fades into the solid body just above "Selected work",
   inside the shader itself (no CSS mask, so scrolling stays cheap); the grain runs
   over both evenly. Underneath sits a plain CSS sky in the same light: it shows
   until the live one fades in, and stays if WebGL isn't available. */
.sky {
  --sky-top: #05081a;  /* night, also the no-JavaScript sky */
  --sky-low: #141b3c;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: calc(100% + var(--section-space) * 0.6);
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(var(--sky-top), var(--sky-low) 38%, var(--bg));
}
:root[data-sky="day"] .sky { --sky-top: #1632a5; --sky-low: #3d64c6; }
:root[data-sky="golden"] .sky { --sky-top: #2c2a64; --sky-low: #a85c48; }

.sky__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.4s var(--ease-out);
}
.sky__canvas.is-live { opacity: 1; }

/* A soft shade behind the words so they stay readable over bright cloud */
.sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgb(10 12 23 / 0.38), rgb(10 12 23 / 0.12) 62%, rgb(10 12 23 / 0)),
    linear-gradient(rgb(10 12 23 / 0.4), rgb(10 12 23 / 0) 24%);
}

.hero .hero__headline {
  --wait: 950ms;  /* circle "attention" once its line has slid in */
  font-size: clamp(3rem, 9vw, 8.25rem);
}

.hero__grid {
  display: grid;
  gap: clamp(40px, 5vw, 72px);
  margin-top: clamp(32px, 4vw, 56px);
}

.hero__lede {
  max-width: 40ch;
  color: var(--ink);
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.5;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 32px;
}

/* A pen arrow pointing from the buttons to the reel (down on phones) */
.hero__arrow {
  width: 84px;
  height: 46px;
  transform: rotate(80deg);
  --mark-color: var(--ink-soft);
}

/* 10 · Page heads (About, Case studies, Gallery) --------------------------------- */
.page-head {
  padding-block: clamp(40px, 8vw, 120px) clamp(8px, 2vw, 24px);
}

.page-head__title {
  margin-top: 20px;
  font-size: clamp(3.25rem, 11vw, 9rem);
}

.page-head__intro {
  max-width: 46ch;
  margin-top: 28px;
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.5;
}

/* About: the portrait, taped in beside the title (under it on phones) */
.page-head--photo {
  display: grid;
  gap: clamp(48px, 6vw, 64px);
}
.page-head__photo {
  justify-self: center;
  width: min(78%, 300px);
  rotate: 3deg;
}

/* 11 · Sheets & section heads ------------------------------------------------------ */
/* Some sections sit on a raised sheet of paper with hand-cut edges and a crisp
   drop shadow, layered over the solid body. */
.sheet {
  position: relative;
  isolation: isolate;
}
.sheet::before,
.sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  -webkit-mask:
    var(--edge-top) top left / 480px 14px repeat-x,
    linear-gradient(#000 0 0) 0 13px / 100% calc(100% - 26px) no-repeat,
    var(--edge-bottom) bottom left / 480px 14px repeat-x;
  mask:
    var(--edge-top) top left / 480px 14px repeat-x,
    linear-gradient(#000 0 0) 0 13px / 100% calc(100% - 26px) no-repeat,
    var(--edge-bottom) bottom left / 480px 14px repeat-x;
}
.sheet::before {
  background: rgb(0 0 0 / 0.55);
  translate: 0 12px;
}
.sheet::after { background: var(--bg-sheet); }

.section-head {
  display: grid;
  gap: 18px 24px;
  margin-bottom: clamp(40px, 5vw, 72px);
}

.section-head__doodle {
  width: clamp(76px, 7vw, 96px);
  aspect-ratio: 4 / 3;
  --mark-color: var(--pen);
}

.section-head__title { font-size: clamp(2.75rem, 7vw, 6rem); }

.section-head__note { max-width: 36ch; }

/* 12 · Frames: film stills with viewfinder corners, timecode and format ------------- */
/* A frame takes the shape of whatever poster or video is inside it (js/frames.js
   sets --ar). Tall formats are capped by the screen height and narrow instead.
   Each sits slightly raised off the page: a crisp edge, a lit top, a deep shadow. */
.frame__media {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, calc(var(--frame-max-h, 82svh) * var(--ar, 1.7778)));
  aspect-ratio: var(--ar, 16 / 9);
  border: 1px solid var(--line);
  background: var(--bg-sunken);
  box-shadow:
    inset 0 1px 0 rgb(239 233 220 / 0.07),
    0 2px 6px rgb(0 0 0 / 0.45),
    0 28px 56px -20px rgb(0 0 0 / 0.85);
}

.frame__media > :is(img, video) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Viewfinder corners, drawn just outside the frame */
.frame__media::before {
  --c: var(--line-strong);
  content: "";
  position: absolute;
  inset: -9px;
  pointer-events: none;
  background:
    linear-gradient(var(--c) 0 0) top left / 16px 1px,
    linear-gradient(var(--c) 0 0) top left / 1px 16px,
    linear-gradient(var(--c) 0 0) top right / 16px 1px,
    linear-gradient(var(--c) 0 0) top right / 1px 16px,
    linear-gradient(var(--c) 0 0) bottom left / 16px 1px,
    linear-gradient(var(--c) 0 0) bottom left / 1px 16px,
    linear-gradient(var(--c) 0 0) bottom right / 16px 1px,
    linear-gradient(var(--c) 0 0) bottom right / 1px 16px;
  background-repeat: no-repeat;
}

/* Timecode (bottom left) and format, e.g. "2.39:1" (bottom right) */
.frame__tc,
.frame__media[data-format]::after {
  position: absolute;
  bottom: 10px;
  padding: 2px 6px;
  background: rgb(6 8 15 / 0.72);
  color: var(--ink-soft);
  font-size: 0.7rem;
  line-height: 1.4;
}
.frame__tc { left: 10px; }
.frame__media[data-format]::after {
  content: attr(data-format);
  right: 10px;
  letter-spacing: 0.08em;
}

.frame__play {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgb(6 8 15 / 0.55);
}
.frame__play::after {
  content: "";
  margin-left: 5px;
  border-block: 10px solid transparent;
  border-left: 15px solid var(--ink);
}

/* 13 · Work ---------------------------------------------------------------------- */
.work-grid {
  display: grid;
  gap: clamp(56px, 6vw, 96px) clamp(16px, 2.5vw, 40px);
}

.project__play {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: inherit;
  cursor: pointer;
}

/* A restrained lift on hover and keyboard focus */
.project__play:is(:hover, :focus-visible) .frame__media {
  --c: var(--pen);
  transform: translateY(-6px);
  box-shadow:
    inset 0 1px 0 rgb(239 233 220 / 0.09),
    0 4px 10px rgb(0 0 0 / 0.5),
    0 44px 72px -24px rgb(0 0 0 / 0.9);
}

.project__info {
  display: grid;
  gap: 6px;
  margin-top: 34px;  /* room for the frame's drift (§23), so it never touches its title */
}

.project__title { font-size: clamp(1.4rem, 2.3vw, 2.1rem); }

.project__meta { font-size: 0.92rem; }

.project--featured .project__title { font-size: clamp(1.8rem, 3.4vw, 3rem); }

.tag {
  display: inline-block;
  margin-right: 10px;
  padding: 1px 7px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  vertical-align: 2px;
}

/* Margin notes, jotted at a slight angle */
.work__aside {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 32px;
  margin-top: clamp(56px, 7vw, 96px);
  color: var(--ink-faint);
  transform: rotate(-1.5deg);
}

/* 14 · About (the home teaser and the About page) ------------------------------------ */
.teaser {
  display: grid;
  gap: 28px;
  max-width: 980px;
}

/* The story: a diary page, an index card of quick facts beside it, notes in the margin */
.diary {
  display: grid;
  align-items: start;
  gap: clamp(56px, 6vw, 88px);
}

.diary__side {
  display: grid;
  justify-items: center;
}

.diary__facts {
  width: min(100%, 360px);
  rotate: 1.5deg;
}

.facts > div {
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr);
  gap: 0 10px;
}
.facts dt {
  color: var(--paper-faint);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Projects I worked on: the project in type, the role beside it in pen */
.roles {
  display: grid;
  gap: 14px 40px;
  margin-top: 20px;
}
.roles li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
}
.roles__project { font-size: 1.45rem; }
.roles__was {
  color: var(--ink-faint);
  font-family: var(--font-body);
  font-size: 0.6em;
  font-weight: 400;
  letter-spacing: 0;
}
.roles__role {
  color: var(--pen);
  font-family: var(--font-hand);
  font-size: 1.3rem;
}

.diary__page > .doodle { margin-bottom: 18px; }

.diary__text {
  display: grid;
  gap: 1em;
  max-width: 58ch;
  margin-top: 28px;
}

/* A name with its mark: a small round icon (media/icons/, 96 px) sitting on the text,
   then the name in bold. Used for the projects, tools and phones on About. A brand
   without an icon yet shows its initial on a paper disc (.brand__icon--mono). */
.brand,
.story__channel {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.brand__icon {
  display: inline-block;
  width: 1.3em;
  height: 1.3em;
  margin-right: 0.28em;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: -0.3em;
  box-shadow: 0 0 0 1px rgb(239 233 220 / 0.18);
}
/* overflow: hidden puts its baseline at the bottom edge, as an image's is, so it
   lines up with the real icons */
.brand__icon--mono {
  overflow: hidden;
  background: var(--paper);
  color: var(--paper-ink);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3em;
  text-align: center;
}
.brand__icon--mono > span { font-size: 0.66em; }

/* The live age: the date part, then the clock on its own line */
[data-age] dd { white-space: pre-line; }

.diary__aside {
  margin-top: 30px;
  rotate: -3deg;
}

.diary__subhead { margin-top: clamp(48px, 6vw, 72px); }

/* How I got here: dates in pen, a blue ink dot for each step */
.timeline {
  display: grid;
  gap: 18px;
  margin-top: 20px;
  padding-left: 26px;
}
.timeline li {
  position: relative;
  display: grid;
  gap: 2px;
}
.timeline li::before {
  content: "";
  position: absolute;
  top: 0.45em;
  left: -24px;
  width: 9px;
  height: 9px;
  border-radius: 50% 42% 55% 46%;
  background: var(--pen);
}
.timeline__when {
  color: var(--pen);
  font-family: var(--font-display);
  font-weight: 600;
}

.about__lede {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.6vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

/* About, How I work: seven steps, each an index card pinned up with a die-cut
   sticker on its corner. They wrap and centre, so a short last row sits mid-page. */
.notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 52px 32px;
  margin-top: clamp(16px, 3vw, 40px);
  padding-inline: 12px;  /* the stickers overhang the cards' corners */
}

.note__title {
  margin: 0 0 10px;
  font-size: 1.5rem;
}

.notes--cards .note {
  position: relative;
  flex: 0 1 100%;
  padding: 24px 22px 26px;
  background: var(--paper);
  color: var(--paper-ink);
  rotate: var(--tilt, -1.2deg);
  box-shadow:
    0 2px 4px rgb(0 0 0 / 0.4),
    0 22px 36px -18px rgb(0 0 0 / 0.8);
}
.notes--cards .note:nth-child(2n) { --tilt: 1.4deg; }
.notes--cards .note:nth-child(3n) { --tilt: -0.4deg; }
.notes--cards .note__title {
  padding-right: 44px;  /* room for the sticker */
  color: var(--paper-ink);
}

/* The sticker: a round die-cut with a white edge, each in its own tint */
.note__sticker {
  --sticker: #ebdfa5;
  --sticker-ink: var(--paper-ink);
  position: absolute;
  top: -18px;
  right: -12px;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 3px solid #fbf6ea;
  border-radius: 50%;
  background: var(--sticker);
  box-shadow:
    0 2px 0 rgb(0 0 0 / 0.18),
    0 8px 14px -6px rgb(0 0 0 / 0.6);
  rotate: 10deg;
}
.note__sticker svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--sticker-ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.note:nth-child(1) .note__sticker { --sticker: #e6cec5; }
.note:nth-child(2) .note__sticker { rotate: -8deg; }
.note:nth-child(3) .note__sticker { --sticker: #cbd7e6; }
.note:nth-child(4) .note__sticker { --sticker: #cdd9bf; rotate: -6deg; }
.note:nth-child(5) .note__sticker { --sticker: #2b2450; --sticker-ink: #d9d2ff; }
.note:nth-child(6) .note__sticker { --sticker: #f0d9b0; rotate: -10deg; }
.note:nth-child(7) .note__sticker { --sticker: var(--blue); --sticker-ink: var(--paper); }

/* 15 · Tools: an end-credits roll ------------------------------------------------------ */
.credits {
  display: grid;
  gap: 18px;
  max-width: 860px;
  margin-inline: auto;
}

.credits > div {
  display: grid;
  gap: 2px;
  text-align: center;
}

.credits dd { font-size: clamp(1.35rem, 2.4vw, 2rem); }

/* 16 · Gear: dropped loot, each piece levitating over its shadow (PLAN D15) ---------------- */
/* Like an item dropped in a game: it hangs in the air over its shadow, rising and
   settling with some weight and rocking a little, never turning edge-on (a flat cutout
   would go paper-thin). On desktop each piece also leans toward the pointer (js/gear.js).
   The motion lives in §23, so Reduced Motion gets a still, front-facing piece. Cutouts:
   media/gear/, transparent WebP, 320 px tall. */
.loot-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 44px 20px;
}

.loot {
  flex: 0 1 calc(50% - 10px);
  display: grid;
  justify-items: center;
  align-content: start;
  text-align: center;
}

.loot__stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(160px, 19vw, 210px);
}

.loot__float { margin-bottom: 18px; }

/* Leans toward the pointer: js/gear.js sets --lean-x/--lean-y (degrees, ±8) */
.loot__tilt {
  transform: perspective(700px) rotateX(var(--lean-x, 0deg)) rotateY(var(--lean-y, 0deg));
  transition: transform 700ms var(--ease-out);
}

.loot__img {
  display: block;
  width: auto;
  max-width: 11rem;
  height: clamp(104px, 11vw, 140px);
  object-fit: contain;
  /* A hairline of light round the edge and a drop shadow, so dark gear (black stands,
     the camera) separates cleanly from the dark page. Static, so it costs nothing per frame. */
  filter: drop-shadow(0 0 0.6px rgb(239 233 220 / 0.85)) drop-shadow(0 0 2.5px rgb(170 184 240 / 0.3)) drop-shadow(0 18px 14px rgb(0 0 0 / 0.6));
}

/* Its soft shadow on the floor, with a thin pen ring around it like a pick-up marker */
.loot__ground {
  position: absolute;
  bottom: 10px;
  left: 50%;
  width: 7.5rem;
  height: 1.1rem;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / 0.85), rgb(0 0 0 / 0.35) 60%, #0000);
  translate: -50% 0;
}
.loot__ground::after {
  content: "";
  position: absolute;
  inset: -0.35rem -1.1rem;
  border: 1.5px solid var(--pen);
  border-radius: 50%;
  opacity: 0.5;
}

.loot__kind { margin-top: 8px; }
.loot__name {
  margin-top: 4px;
  font-size: 1.2rem;
}


/* 17 · Case studies: a production notebook, one film per entry ---------------------------- */
/* The contact sheet: every film on a strip of negatives, each frame with its own sprocket
   holes (fitted to its width, so the holes run evenly from frame to frame). With motion
   allowed it's one strip that rolls on by itself (js/logo-loop.js) and stops under the
   pointer or keyboard; with Reduced Motion, or without JavaScript, it's cut into short
   strips laid out in rows, so every frame is in view without scrolling. */
.contact-sheet {
  position: relative;
  margin-top: clamp(40px, 5vw, 64px);
  rotate: -0.6deg;
}

.contact-sheet__strip {
  display: flex;
  flex-wrap: wrap;
  row-gap: 12px;
}
.contact-sheet__strip > li {
  --holes: linear-gradient(90deg, #0000 32%, rgb(239 233 220 / 0.45) 32% 68%, #0000 68%);
  padding: 26px 6px;
  background:
    var(--holes) left 0 top 8px / 28px 9px,
    var(--holes) left 0 bottom 8px / 28px 9px,
    #040509;
  background-repeat: round no-repeat;
  box-shadow: 0 22px 36px -24px rgb(0 0 0 / 0.9);
}

@media (prefers-reduced-motion: no-preference) {
  .js .contact-sheet {
    overflow: clip;
    background: #040509;
    box-shadow: 0 26px 44px -26px rgb(0 0 0 / 0.9);
  }
  .js .contact-sheet__strip {
    flex-wrap: nowrap;
    width: max-content;
  }
  .js .contact-sheet__strip > li { box-shadow: none; }
  /* Both ends fade into the dark of the strip */
  .js .contact-sheet::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #040509, #0000 56px calc(100% - 56px), #040509);
    pointer-events: none;
  }
}

.contact-sheet__frame {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  text-decoration: none;
}
.contact-sheet__frame img {
  width: auto;
  max-width: none;
  height: clamp(64px, 7vw, 92px);
}
.contact-sheet__frame .label { color: var(--ink-soft); }
.contact-sheet__frame:is(:hover, :focus-visible) img {
  outline: 2px solid var(--pen);
  outline-offset: 2px;
}

.cases {
  display: grid;
  gap: clamp(88px, 10vw, 144px);
}

.case {
  display: grid;
  align-items: start;
  gap: 32px clamp(32px, 5vw, 72px);
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.case__media {
  display: grid;
  gap: 24px;
}

/* A line from the film, jotted under the frame */
.case__quote {
  justify-self: end;
  text-align: right;
  rotate: -2.5deg;
}
.case:nth-child(2n) .case__quote {
  justify-self: start;
  text-align: left;
  rotate: 2deg;
}

.case__text {
  display: grid;
  justify-items: start;
  gap: 16px;
}

.case__no {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.case__flag {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-transform: none;
  rotate: -5deg;
}

.case__title { font-size: clamp(1.7rem, 3.2vw, 2.75rem); }

.case__notes { max-width: 52ch; }

/* The slate: a clapperboard with the film's details chalked on */
.slate {
  width: 100%;
  max-width: 420px;
  margin-block: 10px 6px;
  border: 1px solid var(--line-strong);
  background: #05060b;
  box-shadow:
    0 2px 4px rgb(0 0 0 / 0.4),
    0 24px 40px -22px rgb(0 0 0 / 0.9);
}

/* The clapper stick, propped open a little */
.slate__sticks {
  display: block;
  height: 20px;
  border: 1px solid var(--line-strong);
  background: repeating-linear-gradient(-55deg, var(--ink) 0 14px, #05060b 14px 28px);
  transform-origin: 0 100%;
  translate: -1px -6px;
  rotate: -3deg;
}

.slate__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.slate__grid > div {
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.slate__grid > div:nth-child(2n) { border-right: 0; }
.slate__grid > div:nth-last-child(-n + 2) { border-bottom: 0; }
.slate dt {
  color: var(--ink-faint);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.slate dd {
  margin-top: 2px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* My Ls: the bounty films that didn't win, on a smaller shelf, three across on desktop */
.shelf {
  display: grid;
  align-items: start;
  gap: clamp(56px, 6vw, 80px) clamp(16px, 2.5vw, 40px);
}
.shelf .project { scroll-margin-top: calc(var(--header-h) + 24px); }
.shelf .project__title { font-size: clamp(1.15rem, 1.6vw, 1.45rem); }

/* 18 · Gallery: a corkboard in a wooden frame, everything pinned on ---------------------- */
/* The frame: four rails of dark wood, the grain running along each one, mitred at the
   corners. The textures are tiny SVG noise tiles, painted once (like the grain, §4). */
.gallery { padding-top: clamp(24px, 3vw, 48px); }

.cork {
  --rail: clamp(12px, 1.6vw, 22px);
  --wood: #5a3920;
  position: relative;
  padding: var(--rail);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='64'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004 .3' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .16 0 0 0 0 .09 0 0 0 0 .04 0 0 0 -2.4 1.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E") 0 0 / 520px 64px,
    var(--wood);
  box-shadow:
    inset 0 1px 0 rgb(255 236 210 / 0.18),
    inset 0 -2px 0 rgb(0 0 0 / 0.4),
    0 3px 6px rgb(0 0 0 / 0.5),
    0 44px 80px -30px rgb(0 0 0 / 0.95);
}
.cork::before,
.cork::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--rail);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='520'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.3 .004' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .16 0 0 0 0 .09 0 0 0 0 .04 0 0 0 -2.4 1.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E") 0 0 / 64px 520px,
    var(--wood);
}
.cork::before {
  left: 0;
  clip-path: polygon(0 0, 100% var(--rail), 100% calc(100% - var(--rail)), 0 100%);
  box-shadow: inset 1px 0 0 rgb(255 236 210 / 0.14);
}
.cork::after {
  right: 0;
  clip-path: polygon(0 var(--rail), 100% 0, 100% 100%, 0 calc(100% - var(--rail)));
  box-shadow: inset -1px 0 0 rgb(0 0 0 / 0.35);
}

/* The cork: speckled, a little darker toward the frame. On phones and tablets the
   pieces line up loosely; on wide screens each sits where --x/--y put it (§22). */
.board {
  position: relative;
  z-index: 0;  /* one layer, so the red string can run over every piece */
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-around;
  gap: 44px 16px;
  padding: 40px 12px 36px;
  background:
    radial-gradient(ellipse at 50% 45%, #0000 55%, rgb(40 22 8 / 0.35)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.45' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .2 0 0 0 0 .1 0 0 0 -4 2.3'/%3E%3C/filter%3E%3Cfilter id='l'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='1' seed='9' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .84 0 0 0 0 .66 0 0 0 0 .44 0 0 0 4 -2.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)'/%3E%3Crect width='100%25' height='100%25' filter='url(%23l)'/%3E%3C/svg%3E") 0 0 / 260px 260px,
    #97704a;
  box-shadow:
    inset 0 3px 8px rgb(0 0 0 / 0.55),
    inset 0 0 0 1px rgb(0 0 0 / 0.35);
}

/* Each piece: a width (--w), an angle (--tilt) and, on desktop, a spot (--x, --y).
   js/scrapbook.js moves it with --dx/--dy. */
.scrap {
  position: relative;
  width: min(100%, calc(var(--w, 16) * 9.5px));
  transform: translate(var(--dx, 0px), var(--dy, 0px)) rotate(var(--tilt, 0deg));
}

/* A push pin through the top of each piece */
.pin {
  position: absolute;
  top: -6px;
  left: var(--pin-x, 50%);  /* a piece can be pinned off-centre */
  z-index: 2;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgb(255 255 255 / 0.65) 0 1.5px, #0000 4px),
    var(--pin, var(--blue));
  box-shadow:
    inset 0 -2px 2px rgb(0 0 0 / 0.35),
    1px 4px 4px rgb(0 0 0 / 0.5);
  translate: -50% 0;
}
.pin--red { --pin: #c23a2c; }
.pin--cream { --pin: #e8dcc0; }
.pin--yellow { --pin: #d9a93a; }

/* Red string from pin to pin (js/scrapbook.js draws it, and keeps it tied on as
   pieces move). An <svg> needs its size spelled out (see §5). */
.board__strings {
  display: none;  /* only on the composed desktop board (§22) */
  position: absolute;
  top: var(--rail);
  left: var(--rail);
  z-index: 1;
  width: calc(100% - 2 * var(--rail));
  max-width: none;
  height: calc(100% - 2 * var(--rail));
  overflow: visible;
  pointer-events: none;
  fill: none;
  stroke: #c23a2c;
  stroke-width: 1.8px;
  stroke-linecap: round;
  filter: drop-shadow(0 3px 2px rgb(0 0 0 / 0.45));
}

/* Notes on the board: the owner's line on yellow, the live Dhaka note on blue */
.board .sticky { --note: #cbd7e6; }
.board .board__line {
  --note: #ebdfa5;
  font-size: clamp(1.8rem, 1.3rem + 1vw, 2.4rem);
  line-height: 1.05;
}

/* "psst: you can move things around", only where you can (desktop) */
.board__hint { display: none; }
@media (hover: hover) and (pointer: fine) {
  .board__hint { display: block; }
}
.board__scrap {
  padding: 14px 16px 16px;
  background: var(--paper);
  color: var(--blue);
  font-family: var(--font-hand);
  font-size: 1.4rem;
  line-height: 1.1;
  box-shadow:
    0 2px 4px rgb(0 0 0 / 0.4),
    0 18px 28px -16px rgb(0 0 0 / 0.8);
}

.board.is-movable .scrap {
  cursor: grab;
  user-select: none;
}
.board.is-movable .scrap.is-held {
  cursor: grabbing;
  scale: 1.04;
}
.board.is-movable .scrap.is-held > :not(.pin) {
  box-shadow:
    0 4px 8px rgb(0 0 0 / 0.45),
    0 44px 64px -22px rgb(0 0 0 / 0.9);
}

/* 19 · Contact ---------------------------------------------------------------------------- */
.contact__title {
  max-width: 19ch;
  margin-top: 22px;
  text-wrap: balance;
  font-size: clamp(2.9rem, 8vw, 7rem);
  line-height: 0.98;
}

.contact__lede {
  max-width: 46ch;
  margin-top: 32px;
}

.contact__links {
  display: grid;
  gap: 28px 40px;
  margin-top: clamp(48px, 6vw, 80px);
}

.contact__link {
  display: grid;
  justify-items: start;
  gap: 6px;
  padding-block: 6px;
  text-decoration: none;
}

.contact__name { font-size: clamp(1.6rem, 3.6vw, 2.9rem); }

.contact__handle { color: var(--ink-soft); }

/* The feedback board, above the footer on Home: visitors' notes, pinned once the
   owner approves them (PLAN D24). It stays hidden until the first note is up. */
.feedback__grid {
  display: grid;
  gap: clamp(48px, 6vw, 80px);
}

.fb-board {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px 26px;
  padding-top: 12px;
}
.fb-board:not(:has(> li)) { display: none; }

/* Each note hangs from its pin (Framer's Pinfold, ported in js/pinboard.js): it swings
   from there (--swing) while dragged, lifts under the pointer and more when picked up,
   and its bottom corners curl up off the board (two shadows tucked under them). */
.fb-note {
  position: relative;
  width: min(100%, 15.5rem);
  transform-origin: 50% 0;
  rotate: calc(var(--tilt, -1.5deg) + var(--swing, 0deg));
  transition: scale 450ms linear(0, 0.1, 0.313, 0.546, 0.746, 0.894, 0.988, 1.038, 1.057, 1.056, 1.046, 1.032, 1.019, 1.009, 1.003, 0.999, 1);
}
.fb-note__paper {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 14px;
  min-height: 11rem;
}
.fb-note__curl {
  position: absolute;
  bottom: 9px;
  width: 46%;
  height: 26%;
  border-radius: 4px;
  box-shadow: 0 15px 13px rgb(0 0 0 / 0.34);
  transition: box-shadow 250ms ease;
}
.fb-note__curl--l { left: 7px; transform: rotate(-3.6deg) skewX(-7deg); }
.fb-note__curl--r { right: 7px; transform: rotate(3.6deg) skewX(7deg); }
@media (hover: hover) and (pointer: fine) {
  .fb-note { cursor: grab; user-select: none; }
  .fb-note:hover { scale: 1.035; }
}
.fb-note.is-held { scale: 1.06; cursor: grabbing; }
.fb-note.is-held .fb-note__curl { box-shadow: 0 27px 23px rgb(0 0 0 / 0.5); }
/* Paper tints and angles take turns, so new notes vary by themselves.
   Ink on every tint is over 10:1. */
.fb-note:nth-child(5n + 1) { --note: #ebdfa5; --tilt: -2deg; }
.fb-note:nth-child(5n + 2) { --note: #cdd9bf; --tilt: 1.5deg; margin-top: 18px; }
.fb-note:nth-child(5n + 3) { --note: #e6cec5; --tilt: -1deg; }
.fb-note:nth-child(5n + 4) { --note: #cbd7e6; --tilt: 2.5deg; margin-top: 10px; }
.fb-note:nth-child(5n + 5) { --tilt: -2.5deg; }

/* The pin holding it up */
.fb-note::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -8px;
  left: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow:
    inset 0 -3px 0 rgb(0 0 0 / 0.3),
    0 3px 4px rgb(0 0 0 / 0.5);
  translate: -50% 0;
}

.fb-note__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.fb-note__by {
  color: var(--paper-faint);
  font-size: 1.15rem;
}
.fb-note__date {
  color: var(--paper-faint);
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

/* Turnstile's box takes no room unless it has to ask for a click */
.fb-form__check:empty { display: none; }

.fb-form {
  display: grid;
  align-content: start;
  gap: 22px;
  max-width: 30rem;
}

.field {
  display: grid;
  gap: 10px;
}
.field__optional {
  letter-spacing: 0;
  text-transform: none;
}

/* You write straight onto a blank sticky note */
.field__note {
  min-height: 11rem;
  padding: 18px 18px 22px;
  border: 0;
  background: var(--paper);
  color: var(--paper-ink);
  font-family: var(--font-hand);
  font-size: 1.4rem;
  line-height: 1.25;
  resize: vertical;
  rotate: -1deg;
  box-shadow:
    0 2px 4px rgb(0 0 0 / 0.4),
    0 22px 36px -18px rgb(0 0 0 / 0.8);
}
.field__note::placeholder {
  color: var(--paper-faint);
  opacity: 1;
}

.field__input {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  background: var(--bg-sunken);
  color: var(--ink);
  font: inherit;
}

.fb-form .btn { justify-self: start; }
.fb-form__status {
  min-height: 1.5em;
  color: var(--ink-soft);
}

/* A field only spam bots fill in: a note that arrives with it filled is dropped */
.fb-form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* 19b · "Worked with": the strip above Home's footer ------------------------------------ */
/* Names of projects worked with, drifting left like end credits (js/logo-loop.js, after
   React Bits' LogoLoop and Framer's LogoBlur): muted and soft at rest (the name and its
   logo blurred together), sharp and in colour under the pointer, faded out at both ends
   (LogoLoop's 12-step smootherstep edge). Without JavaScript, or with Reduced Motion, it's
   a still, centred row. The owner's call (2026-11-27): the one strip of logos on the site. */
.worked {
  padding-block: clamp(8px, 2vw, 24px) clamp(28px, 3vw, 40px);  /* the section above brings its own space */
  text-align: center;
}
.worked__title { margin-bottom: 20px; }

/* Any endless strip (js/logo-loop.js): the list and its copies ride one track */
[data-logo-loop].is-looping {
  overflow: clip;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}
[data-logo-loop][data-dragging] { cursor: grabbing; }
.loop-track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.logo-loop__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 18px 44px;
  padding: 10px var(--gutter);
}
.logo-loop.is-looping {
  -webkit-mask-image: var(--edge);
  mask-image: var(--edge);
  --edge: linear-gradient(to right, rgb(0 0 0 / 0) 0%, rgb(0 0 0 / 0.005) 1%, rgb(0 0 0 / 0.036) 2%, rgb(0 0 0 / 0.104) 3%, rgb(0 0 0 / 0.21) 4%, rgb(0 0 0 / 0.347) 5%, rgb(0 0 0 / 0.5) 6%, rgb(0 0 0 / 0.653) 7%, rgb(0 0 0 / 0.79) 8%, rgb(0 0 0 / 0.896) 9%, rgb(0 0 0 / 0.964) 10%, rgb(0 0 0 / 0.995) 11%, #000 12%, #000 88%, rgb(0 0 0 / 0.995) 89%, rgb(0 0 0 / 0.964) 90%, rgb(0 0 0 / 0.896) 91%, rgb(0 0 0 / 0.79) 92%, rgb(0 0 0 / 0.653) 93%, rgb(0 0 0 / 0.5) 94%, rgb(0 0 0 / 0.347) 95%, rgb(0 0 0 / 0.21) 96%, rgb(0 0 0 / 0.104) 97%, rgb(0 0 0 / 0.036) 98%, rgb(0 0 0 / 0.005) 99%, rgb(0 0 0 / 0) 100%);
}
.logo-loop .loop-track { gap: 44px; }
.is-looping .logo-loop__list {
  flex-wrap: nowrap;
  padding-inline: 0;
  padding-block: 18px;  /* room for a name as it grows (the strip clips at its edges) */
}

/* A name sharpens and takes its colour back under the pointer or keyboard focus, and
   grows a little on a soft spring; it settles back smoothly when left. Every copy in
   the loop answers the pointer; the keyboard visits the first set only. */
.logo-loop__item {
  --grow: scale 340ms var(--ease-out);
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;  /* Medium: the lightest Bricolage cut we load */
  white-space: nowrap;
  opacity: 0.62;  /* still ≥ 6:1 on the page */
  filter: grayscale(1) blur(1px);
  transition: opacity 300ms ease-in-out, filter 300ms ease-in-out, var(--grow);
}
.logo-loop__item img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  pointer-events: none;
}
.logo-loop__item:focus-visible { opacity: 1; filter: none; outline-offset: 8px; }
@media (hover: hover) {
  .logo-loop__item:hover { opacity: 1; filter: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .logo-loop__item:focus-visible {
    --grow: scale 450ms linear(0, 0.1, 0.313, 0.546, 0.746, 0.894, 0.988, 1.038, 1.057, 1.056, 1.046, 1.032, 1.019, 1.009, 1.003, 0.999, 1);
    scale: 1.12;
  }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .logo-loop:not([data-dragging]) .logo-loop__item:hover {
    --grow: scale 450ms linear(0, 0.1, 0.313, 0.546, 0.746, 0.894, 0.988, 1.038, 1.057, 1.056, 1.046, 1.032, 1.019, 1.009, 1.003, 0.999, 1);
    scale: 1.12;
  }
}

/* 20 · Footer: the "Sky-to-Ground" closing shot (PLAN D17) ------------------------------- */
/* The page opens in Dhaka's sky and lands in a meadow in the same light, painted
   live by js/sky.js (js/grass-shader.js, loaded as the footer comes near). Underneath,
   a plain CSS field in the light of <html data-sky> shows first and stays without
   WebGL (night is the default, as in §9). */
.site-footer {
  --g-sky: #121a3a;
  --g-haze: #24305a;
  --g-field: #1b2328;
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: end;
  min-height: clamp(360px, 46vw, 660px);
  padding-bottom: 20px;
  overflow: hidden;
}
:root[data-sky="day"] .site-footer { --g-sky: #1632a5; --g-haze: #96baec; --g-field: #45702c; }
:root[data-sky="golden"] .site-footer { --g-sky: #2c2a64; --g-haze: #fcaa70; --g-field: #6a5422; }

.ground {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(var(--bg) 8%, var(--g-sky) 34%, var(--g-haze) 54%, var(--g-field) 54.5%, #0c120e);
}
.ground__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.4s var(--ease-out);
}
.ground__canvas.is-live { opacity: 1; }
/* A shade at the very bottom keeps the links readable in every light (≥ 4.5:1) */
.ground::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(#0000 70%, rgb(6 8 15 / 0.55));
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  color: var(--ink);  /* full paper white: it sits over the grass (measured ≥ 4.5:1 in every light) */
  font-size: 0.85rem;
}

.site-footer__wrap { font-size: 1.2rem; }

.site-footer a {
  display: inline-block;
  padding-block: 12px;
}

/* 21 · Video pop-up ------------------------------------------------------------------------ */
.player {
  width: min(100% - 2 * var(--gutter), 1080px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line-strong);
  background: var(--bg-raised);
  color: var(--ink-soft);
  box-shadow: 0 40px 90px -30px rgb(0 0 0 / 0.95);
}
.player::backdrop { background: rgb(4 5 11 / 0.88); }

.player__panel { padding: clamp(16px, 2.6vw, 32px); }

.player__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.player__close {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  background: none;
  color: var(--ink);
  cursor: pointer;
}

/* Takes the clicked video's shape (js/player.js), capped so it fits the screen */
.player__screen {
  --frame-max-h: 62dvh;
  margin-inline: auto;
}

/* The YouTube player (or a plain .mp4) sits over the poster, which shows until it's ready */
.player__screen > :is(iframe, video) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.player__screen > video { background: #000; }

.player__details {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.player__title { font-size: clamp(1.6rem, 3vw, 2.5rem); }

/* 22 · Responsive ----------------------------------------------------------------------------- */
@media (max-width: 599px) {
  .hide-sm { display: none; }
  .btn--sm { padding-inline: 0.85rem; }
}

@media (max-width: 899px) {
  /* The words span the full width here, so the readability shade does too */
  .sky::after {
    background: linear-gradient(rgb(10 12 23 / 0.3), rgb(10 12 23 / 0.2) 55%, rgb(10 12 23 / 0.1));
  }
}

@media (min-width: 600px) {
  .notes--cards .note { flex-basis: calc(50% - 16px); }
  .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scrap { width: min(100%, calc(var(--w, 16) * 12px)); }
  .contact__links { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .credits > div {
    grid-template-columns: 1fr 1fr;
    align-items: baseline;
    gap: 40px;
  }
  .credits dt { text-align: right; }
  .credits dd { text-align: left; }
}

@media (min-width: 900px) {
  /* Desktop nav: the index links appear, the Menu button goes */
  .site-nav { display: block; }
  .menu-toggle { display: none; }
  .site-header__inner { gap: clamp(24px, 3vw, 48px); }

  .hero__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
  }
  .hero__arrow { transform: none; }

  .section-head {
    grid-template-columns: minmax(0, 2fr) minmax(0, 6fr) minmax(0, 4fr);
    align-items: center;
  }
  .section-head__note {
    justify-self: end;
    text-align: right;
  }

  /* Editorial, staggered layout for the projects */
  .work-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .work-grid > .project { grid-column: 1 / -1; }
  .work-grid > .project:nth-child(2) { grid-column: 1 / span 7; }
  .work-grid > .project:nth-child(3) { grid-column: 9 / span 4; align-self: end; }
  .work-grid > .project:nth-child(4) { grid-column: 3 / span 8; }
  /* Frames are capped by height, so a 4:3 or taller film narrows instead of towering
     over the rest (never cropped); the lead keeps the most room */
  .work-grid { --frame-max-h: min(54svh, 480px); }
  .project--featured { --frame-max-h: min(64svh, 580px); }

  .diary { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }

  .page-head--photo {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .page-head__photo {
    width: clamp(250px, 23vw, 320px);
    margin-right: clamp(0px, 3vw, 48px);
  }

  /* Case studies alternate sides; the frame always gets the wider column */
  .case { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .case:nth-child(2n) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .case:nth-child(2n) .case__media { order: 2; }

  /* The feedback board beside its form */
  .feedback__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: start;
  }
}

@media (min-width: 1000px) {
  .notes--cards .note { flex-basis: calc(25% - 24px); }
  .loot { flex-basis: calc(25% - 15px); }
  .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  /* The lead film with its title beside it, like a poster and its billing block */
  .project--featured {
    display: grid;
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
    align-items: end;
    gap: clamp(24px, 3vw, 48px);
  }
  .project--featured .project__info { margin-top: 0; padding-bottom: 6px; }
  .project--featured .project__title { font-size: clamp(1.8rem, 2.5vw, 2.6rem); }
}

@media (min-width: 1200px) {
  /* The corkboard keeps one composition and scales with the screen: each piece sits
     at --x/--y and is --w wide, all in hundredths of the board's width (cqw). The red
     string only runs here, where the pieces sit in their places. */
  .board__strings { display: block; }
  .board {
    display: block;
    aspect-ratio: 100 / 94;
    padding: 0;
    container-type: inline-size;
  }
  .scrap {
    position: absolute;
    top: calc(var(--y, 0) * 1cqw);
    left: calc(var(--x, 0) * 1cqw);
    width: calc(var(--w, 16) * 1cqw);
  }
  /* Captions shrink a little with the board, so they wrap the same way at every width */
  .board .polaroid__caption { font-size: clamp(1.1rem, 1.6cqw, 1.3rem); }
}

/* 23 · Motion & reveals: only when the visitor hasn't asked for less ---------------------- */
/* Each headline word sits in a mask (.word) and slides up out of it (js/reveal.js).
   The mask reaches a little past the word, so tall letters aren't clipped. */
.word { display: inline-block; }
.word__inner { display: inline-block; }
.nobr { white-space: nowrap; }

@keyframes reveal-failsafe { to { visibility: visible; opacity: 1; translate: none; } }

@media (prefers-reduced-motion: no-preference) {
  /* Links within a page glide there (the mouse wheel glides too: js/smooth-scroll.js) */
  html { scroll-behavior: smooth; }

  /* Pen strokes draw in one after another (js/marks.js sets --delay) */
  .mark__svg path {
    transition: stroke-dashoffset var(--draw, 750ms) var(--ease-pen)
      calc(var(--wait, 0ms) + var(--delay, 0ms) + var(--i, 0) * var(--draw, 750ms) * 0.9);
  }
  [data-mark-on="hover"] { --draw: 260ms; }
  [data-reveal="lines"] { --wait: 650ms; }

  .btn--marker { transition: transform 180ms var(--ease-out); }

  /* Moving between pages: the next page slides up from the bottom over the last one, like
     a fresh sheet laid on the desk, while the header stays put (cross-document view
     transitions; browsers without them simply load the page). */
  .site-header { view-transition-name: site-header; }
  ::view-transition-old(root) { animation: page-under 650ms cubic-bezier(0.22, 1, 0.36, 1) both; }
  ::view-transition-new(root) { animation: page-up 650ms cubic-bezier(0.22, 1, 0.36, 1) both; }

  /* Feedback notes drop onto the board one after another once it's in view (js/feedback.js), on Pinfold's spring */
  .fb-board:not(.is-in) .fb-note { opacity: 0; }
  .fb-board.is-in .fb-note { animation: note-drop 700ms linear(0, 0.081, 0.263, 0.477, 0.677, 0.839, 0.957, 1.03, 1.068, 1.08, 1.075, 1.061, 1.044, 1.028, 1.014, 1.004, 0.998, 0.995, 0.994, 0.994, 0.995, 0.996, 0.998, 0.999, 1) backwards; animation-delay: calc(var(--i, 0) * 70ms); }

  /* "Worked with": the names roll up out of a blur, rippling left to right (LogoBlur) */
  .logo-loop.is-looping:not(.is-shown) .logo-loop__item > * { opacity: 0; }
  .logo-loop.is-shown .logo-loop__item > * {
    animation: logo-in 500ms ease-in-out backwards;
    animation-delay: calc(min(var(--n, 0), 8) * 150ms);
  }

  /* Gear levitates like dropped loot: a slow, weighty rise and settle, the shadow
     shrinking and fading as the piece lifts, and a gentle rock (at most 9° either way,
     never edge-on). Pieces keep their own timing (--i and three tempos), so they never
     bob together. Composited properties only: no layout work. */
  .loot { --float: 3.4s; --rock: 6.3s; }
  .loot:nth-child(3n + 2) { --float: 3.9s; --rock: 7.2s; }
  .loot:nth-child(3n + 3) { --float: 3s; --rock: 5.6s; }
  .loot__float { animation: loot-float var(--float) cubic-bezier(0.37, 0, 0.63, 1) infinite alternate; }
  .loot__ground { animation: loot-shadow var(--float) cubic-bezier(0.37, 0, 0.63, 1) infinite alternate; }
  .loot__rock { animation: loot-rock var(--rock) ease-in-out infinite alternate; }
  .loot :is(.loot__float, .loot__ground) { animation-delay: calc(var(--i, 0) * -0.83s); }
  .loot .loot__rock { animation-delay: calc(var(--i, 0) * -1.9s); }

  /* Gallery: a piece lifts a little as it's picked up off the cork */
  .board.is-movable .scrap { transition: scale 160ms var(--ease-out); }
  .site-header::before,
  .site-header::after { transition: opacity 220ms var(--ease-out); }

  /* The phone menu slides down like a sheet being pulled over the page */
  .menu {
    transition:
      translate 420ms var(--ease-out),
      overlay 420ms allow-discrete,
      display 420ms allow-discrete;
  }
  .menu:not([open]) { translate: 0 -100%; }
  @starting-style {
    .menu[open] { translate: 0 -100%; }
  }
  .menu[open] .menu__list li {
    animation: menu-item 520ms var(--ease-out) both;
    animation-delay: calc(140ms + var(--i, 0) * 60ms);
  }

  /* Reveals. Targets stay hidden only while JS runs (the "js" class is set in the
     <head>); if the script never arrives they show up after 2.5 s anyway. Hidden means
     transparent, never visibility: hidden, so what's waiting to be revealed can still be
     reached with the Tab key (focusing it scrolls it into view, which reveals it) and
     read by screen readers, which skip anything visibility: hidden. Headlines are hidden
     by their word masks once the script has split them. */
  .js:not(.reveal-ready) [data-reveal] { animation: reveal-failsafe 0s 2.5s both; }
  .js:not(.reveal-ready) [data-reveal="lines"]:not(.is-in) { opacity: 0; }  /* until its words are masked */

  .js [data-reveal="lines"] .word { clip-path: inset(-0.3em -0.12em -0.22em -0.12em); }
  .js [data-reveal="lines"] .word__inner {
    transition: translate 850ms var(--ease-out) calc(var(--reveal-delay, 0ms) + var(--line, 0) * 90ms);
  }
  .js [data-reveal="lines"]:not(.is-in) .word__inner { translate: 0 135%; }

  .js [data-reveal="rise"] {
    transition:
      opacity 900ms var(--ease-out) var(--reveal-delay, 0ms),
      translate 900ms var(--ease-out) var(--reveal-delay, 0ms);
  }
  /* From 5%, not 0: a fade from exactly 0 runs off the main thread, so the browser only
     counts the block as painted once the fade ends (it held LCP back ~1 s on phones) */
  .js [data-reveal="rise"]:not(.is-in) {
    opacity: 0.05;
    translate: 0 2.25rem;
  }

  /* A card holding a film comes in quicker than text, so the film is never kept waiting */
  .js [data-reveal="rise"]:has(.frame__media) { transition-duration: 420ms; }
  .js [data-reveal="rise"]:has(.frame__media):not(.is-in) { translate: 0 1rem; }

  /* Frames settle from slightly smaller as they arrive, and lift on hover */
  .frame__media {
    transition:
      transform 240ms var(--ease-out),
      box-shadow 240ms var(--ease-out),
      scale 420ms var(--ease-out) var(--reveal-delay, 0ms);
  }
  .js [data-reveal]:not(.is-in) .frame__media { scale: 0.97; }

  /* ...and each film develops as it arrives, all at once in about 0.4 s: the picture
     racks into focus and brightens while the viewfinder corners close in, and the play
     button, timecode and format come up just behind. The picture itself is there from
     the first frame (never a black frame: no wipe, and posters decode before they're
     drawn, decoding="sync"); it has been loading since it was a screen away (js/reveal.js). */
  .reveal-ready [data-reveal] .frame__media > img {
    transition: filter 420ms var(--ease-out) var(--reveal-delay, 0ms);
  }
  .reveal-ready [data-reveal]:not(.is-in) .frame__media > img {
    filter: blur(10px) brightness(0.75);
  }
  .reveal-ready [data-reveal] .frame__media::before {
    transition:
      opacity 300ms var(--ease-out) calc(var(--reveal-delay, 0ms) + 60ms),
      scale 340ms var(--ease-out) calc(var(--reveal-delay, 0ms) + 60ms);
  }
  .reveal-ready [data-reveal]:not(.is-in) .frame__media::before { opacity: 0; scale: 1.035; }  /* stays on-screen beside a full-width phone frame */
  .reveal-ready [data-reveal] .frame__media > :is(.frame__play, .frame__tc),
  .reveal-ready [data-reveal] .frame__media[data-format]::after {
    transition:
      opacity 280ms var(--ease-out) calc(var(--reveal-delay, 0ms) + 120ms),
      translate 280ms var(--ease-out) calc(var(--reveal-delay, 0ms) + 120ms);
  }
  .reveal-ready [data-reveal]:not(.is-in) .frame__media > :is(.frame__play, .frame__tc),
  .reveal-ready [data-reveal]:not(.is-in) .frame__media[data-format]::after {
    opacity: 0;
    translate: 0 6px;
  }

  /* The hero film develops the moment the page first paints, in CSS alone: it's the
     largest thing on the first screen, so it never waits for a script (LCP). It starts
     already visible (just soft and dim), so it counts as painted from the first frame. */
  .hero__reel { animation: reel-in 520ms var(--ease-out) both; }
  .hero__reel .frame__media > img { animation: develop 520ms var(--ease-out) both; }

  /* One subtle parallax layer: frames drift against their captions while scrolling.
     The whole frame moves, so the work itself is never cropped. */
  @supports (animation-timeline: view()) {
    :is(.project, .case, .hero__reel) .frame__media {
      animation: frame-drift linear both;
      animation-timeline: view();
      animation-range: cover;
    }
  }
}

@keyframes reel-in { from { scale: 0.97; opacity: 0.6; } }
@keyframes develop { from { filter: blur(10px) brightness(0.75); } }

@keyframes menu-item {
  from { opacity: 0; translate: 0 28px; }
}

@keyframes frame-drift {
  from { translate: 0 26px; }
  to   { translate: 0 -26px; }
}

@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
@keyframes page-up { from { translate: 0 100vh; } }
@keyframes page-under { to { scale: 0.94; opacity: 0.5; } }
@keyframes note-drop { from { opacity: 0; scale: 1.16; } }
@keyframes logo-in { from { opacity: 0; translate: 0 60%; filter: blur(8px); } }
@keyframes loot-float {
  from { translate: 0 5px; }
  to   { translate: 0 -14px; }
}
@keyframes loot-rock {
  from { transform: perspective(600px) rotateY(-9deg) rotateX(3deg) rotate(-2deg); }
  to   { transform: perspective(600px) rotateY(9deg) rotateX(-2deg) rotate(1.5deg); }
}
@keyframes loot-shadow {
  from { scale: 1; opacity: 1; }
  to   { scale: 0.7; opacity: 0.45; }
}

/* 24 · Not found (404.html) ----------------------------------------------------------------- */
.not-found__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 36px;
  margin-top: 28px;
}
