/* ==========================================================================
   Sherif Beily: personal site
   Plain CSS. No frameworks. All fonts stored locally in /assets/fonts.
   ========================================================================== */

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('fonts/plus-jakarta-sans.woff2') format('woff2');
  font-weight: 200 800; font-display: swap;
  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: 'Plus Jakarta Sans';
  src: url('fonts/plus-jakarta-sans-ext.woff2') format('woff2');
  font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+A720-A7FF;
}
@font-face { font-family: 'Bebas Neue'; src: url('fonts/bebas-neue.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('fonts/jetbrains-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('fonts/jetbrains-mono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }

/* Living accent: a registered colour property, so the browser can blend smoothly between hues */
@property --accent { syntax: '<color>'; inherits: true; initial-value: #ff5000; }

:root {
  --accent: #ff3d8b;
  --accent-ink: color-mix(in oklab, var(--accent) 74%, #000); /* deeper, for light backgrounds */
  --accent-2: #ff3d7f;   /* fallback; replaced below by the accent turned 50° back around the wheel */
  /* the accent cycles through the palette above, driven from main.js (cheaper than animating it here) */
  --bg: #0d0d10;          /* one continuous deep-space background for the whole page */
  --bg-2: #18191d;        /* matches the portrait's shirt */
  --bg-3: #1f2025;
  --text: #ecebe6;
  --soft: #b9b7b0;
  --muted: #7d7b76;
  --line: rgba(236, 235, 230, 0.12);

  --sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --display: 'Bebas Neue', 'Arial Narrow', Impact, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: clamp(20px, 4.5vw, 64px);
  --max: 1440px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@supports (color: oklch(from red l c h)) {
  :root { --accent-2: oklch(from var(--accent) calc(l + 0.03) c calc(h - 50)); }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 18px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--accent); color: #111; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* Film grain over everything: one static SVG, no animation, no cost while scrolling */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Mono labels: "01 — Biography" */
.label { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; gap: 14px; align-items: center; }
.label b { color: var(--accent); font-weight: 400; }
.display { font-family: var(--display); font-weight: 400; letter-spacing: .005em; line-height: .86; text-transform: uppercase; }
/* The lens (his VOID reference and notes). A headline seen through a shallow depth of field: sharp through the
   middle; toward the outer letters the real, hard letter edge stays but a fog drifts over it, and at the very outer
   edge the letter dissolves into that fog and into particles that drift outward. Four copies of the text: the sharp
   letter and three depths of fog. Their masks are smooth curves (built in main.js 10, in em from the text's edge, so
   no visible creases) and they are ADDED together (plus-lighter), so the light is conserved where the letter
   dissolves. --z shrinks the zone for short words like "35%". The particles are a small canvas per headline that
   only runs while the headline is on screen. The real text keeps the layout and is what screen readers read. */
.display { position: relative; width: fit-content; justify-self: start; --z: 1; }
.display.dof-on { color: transparent; isolation: isolate; }
.display.dof-on > i { background: none; }
.dof-l { position: absolute; left: -.3em; right: -.3em; top: -.3em; bottom: -.3em; padding: .3em; color: var(--text);
  white-space: nowrap; pointer-events: none; user-select: none; will-change: transform; mix-blend-mode: plus-lighter;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
.dof-f0 { -webkit-mask-image: var(--dof-m0); mask-image: var(--dof-m0); }
.dof-f1 { -webkit-mask-image: var(--dof-m1); mask-image: var(--dof-m1); filter: blur(calc(var(--z) * .016em)); }
.dof-f2 { -webkit-mask-image: var(--dof-m2); mask-image: var(--dof-m2); filter: blur(calc(var(--z) * .036em)); }
.dof-f3 { -webkit-mask-image: var(--dof-m3); mask-image: var(--dof-m3); filter: blur(calc(var(--z) * .072em)); }
.dof-p { position: absolute; left: -2.2em; top: -.9em; width: calc(100% + 4.4em); height: calc(100% + 1.8em); pointer-events: none; }   /* normal blend: dust over a letter is white on white, so it only shows once it has left the letter */

/* ---------- Header ---------- */
.hdr { position: fixed; inset: 0 0 auto; z-index: 60; padding-block: 22px 26px; color: var(--text); transition: color .45s ease; }
/* Glass behind the bar: blur + tint that both fade to nothing downward, so there is no edge */
.hdr::before, .progress::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  -webkit-backdrop-filter: blur(16px) saturate(1.25); backdrop-filter: blur(16px) saturate(1.25);
  transition: background .5s ease;
}
.hdr::before {
  bottom: -40px;
  background: linear-gradient(to bottom, rgba(13,13,16,.78) 0%, rgba(13,13,16,.5) 45%, rgba(13,13,16,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 100%); mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 100%);
}
.hdr.light { color: #141416; }
.hdr.light::before { background: linear-gradient(to bottom, rgba(235,233,227,.85) 0%, rgba(235,233,227,.55) 45%, rgba(235,233,227,0) 100%); }
.hdr .row { display: flex; align-items: center; justify-content: space-between; }
.ticks { display: flex; align-items: flex-end; gap: 10px; height: 16px; list-style: none; margin: 0; padding: 0; }
.ticks a { display: block; width: 1.5px; height: 8px; background: currentColor; opacity: .5; transition: height .4s var(--ease), opacity .4s; }
.ticks a.on { height: 16px; opacity: 1; }
.hdr nav { display: flex; gap: clamp(16px, 2.4vw, 32px); font-size: 14px; }
.hdr nav a { text-decoration: none; opacity: .75; transition: opacity .2s; }
.hdr nav a:hover, .hdr nav a.on { opacity: 1; }

/* Scroll progress line along the bottom (like a film timeline) */
.progress { position: fixed; inset: auto 0 0; height: 72px; z-index: 60; pointer-events: none; }
.progress::before {
  background: linear-gradient(to top, rgba(13,13,16,.6) 0%, rgba(13,13,16,.3) 45%, rgba(13,13,16,0) 100%);
  -webkit-mask-image: linear-gradient(to top, #000 0%, #000 30%, transparent 100%); mask-image: linear-gradient(to top, #000 0%, #000 30%, transparent 100%);
}
.progress.light::before { background: linear-gradient(to top, rgba(235,233,227,.7) 0%, rgba(235,233,227,.35) 45%, rgba(235,233,227,0) 100%); }
/* the line itself: no track, feathered ends, a soft glow in the living accent */
.progress i {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 24px; height: 1.5px; border-radius: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 10%, var(--accent) 100%);
  box-shadow: 0 0 10px color-mix(in oklab, var(--accent) 70%, transparent), 0 0 24px color-mix(in oklab, var(--accent) 35%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 80%, transparent); mask-image: linear-gradient(90deg, #000 80%, transparent);
  transform-origin: left; transform: scaleX(0);
}

/* ---------- 00 Hero: pinned; scroll morphs signature into portrait ---------- */
.hero { position: relative; height: 280vh; --m: 0; }
.hero-pin { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%); mask-image: linear-gradient(to bottom, #000 72%, transparent 100%); }
.hero-pin::before { content: ''; position: absolute; inset: -25%; pointer-events: none; opacity: calc(.35 + var(--m) * .65); will-change: transform, opacity;
  transform: translate3d(calc(var(--m) * 24vw), calc(var(--m) * 14vh), 0);
  background: radial-gradient(42vw 42vw at 50% 43.3%, color-mix(in oklab, var(--accent) 24%, transparent), transparent 70%); }
.hero-a, .hero-b { position: absolute; inset: 0; z-index: 2; pointer-events: none; display: grid; }
.hero-a { align-content: end; padding-bottom: 56px; opacity: calc(1 - var(--m) * 2.6); transform: translateY(calc(var(--m) * -60px)); }
.hero-meta { display: flex; justify-content: space-between; align-items: end; gap: 24px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); padding-bottom: 14px; }
.hero-meta .clock { color: var(--text); }
.name { font-size: 19vw; white-space: nowrap; width: max-content; margin-left: -.02em; color: var(--text); }
.name span { display: inline-block; }
.name .ch { display: inline-block; transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; animation-delay: calc(var(--i) * 45ms + 200ms); }
.name .ch.sp { width: .22em; }
.name > span:not(.dof-l), .name .dof-l > span { overflow: hidden; padding-bottom: .02em; }
@keyframes rise { to { transform: none; } }
.hero-b { align-content: center; opacity: clamp(0, calc((var(--m) - .55) * 3), 1); }
.hero-b-copy { width: min(46%, 640px); display: grid; gap: 28px; transform: translateY(calc((1 - var(--m)) * 40px)); }
.headline { font-size: clamp(34px, 4vw, 62px); line-height: 1.08; letter-spacing: -0.035em; font-weight: 600; text-wrap: balance; }
.headline em { font-style: normal; color: var(--accent); }
.sub { color: var(--soft); font-size: clamp(16px, 1.25vw, 19px); max-width: 40ch; }
.cue { position: absolute; z-index: 2; left: 50%; bottom: 40px; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); opacity: calc(1 - var(--m) * 6); }
.cue i { width: 1px; height: 36px; background: linear-gradient(var(--muted), transparent); animation: cue 2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.hero-a .hero-meta, .hero-a .name { pointer-events: none; }

/* ---------- 01 Point of view: a short film in space ----------
   Pinned for six screens of scrolling; each beat = one sentence (subtitle) + one scene (canvas). */
.view { position: relative; height: 650vh; }   /* six beats; the two 'three worlds' beats are short (main.js BEATW) */
.view-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; }
/* nebula: two soft clouds, one in the living accent, one cool, drifting very slowly */
.view-pin::before { content: ''; position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 35% at 30% 40%, color-mix(in oklab, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(35% 30% at 72% 62%, rgba(80, 110, 190, .13), transparent 70%),
    radial-gradient(60% 50% at 50% 50%, rgba(255,255,255,.025), transparent 70%);
  animation: nebula 40s ease-in-out infinite alternate; }
@keyframes nebula { to { transform: translate3d(3%, -2%, 0) scale(1.08) rotate(4deg); } }
#story { position: absolute; inset: 0; width: 100%; height: 100%; }
.view-top { position: absolute; inset: 96px 0 auto; z-index: 2; display: flex; justify-content: space-between; align-items: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- The story text: subtitles to the film ----------
   The film is the hero, centred and filling the screen; the sentences sit below it as centred subtitles.
   Key phrases are coded by meaning and connected to the visual by fine lines (drawn in the canvas). */
.subs { position: absolute; inset: 0; z-index: 2; pointer-events: none; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding: 0 var(--gutter) clamp(40px, 6vh, 64px); text-align: center; }
.subs::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, rgba(13,13,16,.88), rgba(13,13,16,.45) 18%, transparent 34%); }
.caps { display: grid; width: min(82vw, 980px); }
.cap { grid-area: 1 / 1; align-self: end; margin: 0; font-size: clamp(24px, 2.35vw, 40px); line-height: 1.1; letter-spacing: -0.038em; font-weight: 600; color: #f3f1eb; text-wrap: balance;
  opacity: 0; transform: translateY(26px); filter: blur(8px); transition: opacity .6s ease, transform .9s var(--ease), filter .7s ease; }
.cap.on { opacity: 1; transform: none; filter: none; }
.cap.past { transform: translateY(-26px); }
/* each word rises out of its own mask */
.cap .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .03em .12em; margin: 0 -.03em -.12em; }
.cap .w > i { display: inline-block; font-style: normal; transform: translateY(110%); transition: transform .8s var(--ease); }
.cap .w.on > i { transform: none; }

/* key phrases */
.k { font-weight: inherit; position: relative; transition: color .35s ease, text-shadow .35s ease, opacity .6s ease; }
.k-acc { color: var(--accent); text-shadow: 0 0 34px color-mix(in oklab, var(--accent) 45%, transparent); }
.k[data-g] { pointer-events: auto; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .16em; text-decoration-color: color-mix(in oklab, currentColor 35%, transparent); }
.k[data-g="0"] { color: #ff7ad9; } .k[data-g="1"] { color: #5ee7ff; } .k[data-g="2"] { color: #8f93ff; }
.k[data-g].hot { text-decoration-color: currentColor; text-shadow: 0 0 26px currentColor; }
/* "design problem": struck through once read, it isn't the problem */
.k-not::after { content: ''; position: absolute; left: -2%; right: -2%; top: 50%; height: .075em; border-radius: 1em; background: var(--accent);
  box-shadow: 0 0 14px var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease) .35s; }
.cap.done .k-not::after { transform: scaleX(1); }
.cap.done .k-not { opacity: .42; transition-delay: .35s; }
/* "different people / different times": underlined as they land */
.k-hl { background: linear-gradient(var(--accent), var(--accent)) left 96% / 0 .07em no-repeat; transition: background-size .9s var(--ease) .25s; }
.cap.done .k-hl { background-size: 100% .07em; }
/* "become.": a slow light passes through the word */
.k-glow .w > i { background: linear-gradient(100deg, var(--accent) 0%, var(--accent) 40%, #fff 50%, var(--accent) 60%, var(--accent) 100%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 3.6s ease-in-out infinite; }
@keyframes sheen { 0% { background-position: 100% 0; } 60%, 100% { background-position: -50% 0; } }

/* beat rail: six thin bars, click to jump */
.rail { display: flex; gap: 6px; margin-top: clamp(20px, 3vh, 32px); pointer-events: auto; justify-content: center; }
@media (min-width: 901px) {   /* the beat rail lives inside the signal panel, top right */
  .rail { position: absolute; top: 252px; right: clamp(20px, 4.5vw, 64px); width: 300px; margin: 0; gap: 6px; justify-content: space-between; }
  .rail button { flex: 1; width: auto; }
}
.rail button { position: relative; width: 38px; height: 16px; padding: 0; background: none; border: 0; cursor: pointer; }
.rail button::before, .rail button::after { content: ''; position: absolute; left: 0; top: 7px; height: 2px; border-radius: 2px; }
.rail button::before { right: 0; background: rgba(243,241,235,.16); }
.rail button::after { width: calc(var(--f, 0) * 100%); background: var(--accent); box-shadow: 0 0 10px color-mix(in oklab, var(--accent) 70%, transparent); }

.still .cap, .still .cap .w > i, .still .k-not::after, .still .k-hl { transition: none; }
.still .k-glow .w > i { animation: none; }
@media (prefers-reduced-motion: reduce) { .cap, .cap .w > i, .k-not::after, .k-hl { transition: none; } .k-glow .w > i { animation: none; } }

@media (max-width: 900px) {
  .subs { justify-content: flex-end; align-items: flex-start; text-align: left; padding: 0 var(--gutter) 84px; }
  .rail { justify-content: flex-start; }
  .subs::before { background: linear-gradient(to top, rgba(13,13,16,.92), rgba(13,13,16,.6) 40%, transparent 70%); }
  .caps { width: 100%; }
  .cap { font-size: clamp(25px, 6.6vw, 36px); }
}

/* ---------- 02 Evidence ---------- */
.evidence { padding-block: clamp(96px, 12vw, 180px); }
.ev-title { margin: 28px 0 clamp(48px, 6vw, 96px); max-width: 14ch; }
.ev-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.ev-list li { display: grid; gap: 18px; align-content: start; padding: clamp(32px, 4vw, 56px) clamp(0px, 3vw, 48px) clamp(32px, 4vw, 56px) 0; border-bottom: 1px solid var(--line); }
.ev-list li:nth-child(even) { padding-left: clamp(24px, 3vw, 48px); border-left: 1px solid var(--line); }
.ev-num { font-size: clamp(96px, 13vw, 210px); color: var(--text); }
.ev-num i { font-style: normal; background: linear-gradient(95deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dots { display: block; width: 168px; height: 168px; margin: 0 0 6px -8px; }   /* the geometry leads; the figure and the words follow */
.ev-list h3 { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 400; margin-bottom: 8px; }
.ev-list p { color: var(--soft); max-width: 34ch; font-size: 17.5px; }

/* ---------- Custom cursor (mouse and trackpad only) ----------
   A triangle that springs after the pointer, turns to face its direction of travel and stretches with speed.
   Over links and buttons it grows and rounds into a circle (same 24 points, so it morphs smoothly).
   Inverts against whatever is underneath (mix-blend-mode: difference). */
.cur { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 200; pointer-events: none; mix-blend-mode: difference;
  transform: translate3d(-100px, -100px, 0); will-change: transform; display: none; transition: opacity .18s ease; }
.cur-shape { position: absolute; left: 0; top: 0; width: 20px; height: 20px; margin: -10px 0 0 -10px; background: #fff;
  clip-path: polygon(0.0% 0.0%, 12.5% 6.2%, 25.0% 12.5%, 37.5% 18.8%, 50.0% 25.0%, 62.5% 31.2%, 75.0% 37.5%, 87.5% 43.8%, 100.0% 50.0%, 87.5% 56.2%, 75.0% 62.5%, 62.5% 68.8%, 50.0% 75.0%, 37.5% 81.2%, 25.0% 87.5%, 12.5% 93.8%, 0.0% 100.0%, 0.0% 87.5%, 0.0% 75.0%, 0.0% 62.5%, 0.0% 50.0%, 0.0% 37.5%, 0.0% 25.0%, 0.0% 12.5%);
  transition: width .32s cubic-bezier(.34,1.56,.64,1), height .32s cubic-bezier(.34,1.56,.64,1), margin .32s cubic-bezier(.34,1.56,.64,1), clip-path .28s cubic-bezier(.22,1,.36,1);
  will-change: transform; }
.cur.hover .cur-shape, .cur.magnet .cur-shape { width: 46px; height: 46px; margin: -23px 0 0 -23px; clip-path: polygon(14.6% 14.6%, 25.0% 6.7%, 37.1% 1.7%, 50.0% 0.0%, 62.9% 1.7%, 75.0% 6.7%, 85.4% 14.6%, 93.3% 25.0%, 98.3% 37.1%, 100.0% 50.0%, 98.3% 62.9%, 93.3% 75.0%, 85.4% 85.4%, 75.0% 93.3%, 62.9% 98.3%, 50.0% 100.0%, 37.1% 98.3%, 25.0% 93.3%, 14.6% 85.4%, 6.7% 75.0%, 1.7% 62.9%, 0.0% 50.0%, 1.7% 37.1%, 6.7% 25.0%); }
.cur.gone { opacity: 0; }
/* small pill that rides beside the cursor in the opening scene */
.cur-tip { position: fixed; left: 0; top: 0; z-index: 199; pointer-events: none; display: none; white-space: nowrap;
  font-size: 12px; font-weight: 600; letter-spacing: -0.01em; color: #111; background: #f3f1eb; padding: 7px 12px; border-radius: 999px;
  transform: translate3d(-200px, -200px, 0); transition: opacity .35s ease; }
.cur-tip.off { opacity: 0; }
[data-magnet] { transition: transform .45s cubic-bezier(.34,1.56,.64,1); }
@media (hover: hover) and (pointer: fine) {
  .has-cursor .cur, .has-cursor .cur-tip { display: block; }
  .has-cursor, .has-cursor * { cursor: none !important; }
  .has-cursor input, .has-cursor textarea { cursor: text !important; }
}
@media (prefers-reduced-motion: reduce) { .cur-shape { transition: none; } }

/* ---------- 02 Biography (chapters) ---------- */
.bio { padding-block: clamp(96px, 12vw, 180px); }
.bio-top { display: flex; justify-content: space-between; align-items: start; gap: 32px; flex-wrap: wrap; margin-bottom: clamp(48px, 7vw, 100px); }
.facts { margin: 0; display: flex; flex-wrap: wrap; gap: 16px 40px; }
.facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-size: 15px; color: var(--soft); }
.bio-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 6vw, 112px); }
.year-wrap { position: sticky; top: 12vh; align-self: start; height: max-content; }
.year { font-size: clamp(96px, 12.5vw, 200px); color: var(--text); display: block; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.year.swap { opacity: 0; transform: translateY(12px); }
.year-note { margin-top: 18px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.chapters { list-style: none; margin: 0; padding: 0; }
.chapter { padding-block: clamp(40px, 8vh, 96px); border-top: 1px solid var(--line); display: grid; gap: 18px; opacity: .35; transition: opacity .6s var(--ease); }
.chapter:last-child { border-bottom: 1px solid var(--line); }
.chapter.on { opacity: 1; }
.chapter .when { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.chapter p { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.6; color: var(--soft); max-width: 36em; text-wrap: pretty; }
.chapter p + p { margin-top: 4px; }
.chapter p strong { color: var(--text); font-weight: 500; }

/* Life photos: a pile of prints beside the year (desktop); inline in each chapter (mobile) */
.stack { position: relative; margin-top: 36px; width: min(100%, 300px); aspect-ratio: 4 / 5; }
.stack:empty { display: none; }
.stack figure, .memory { margin: 0; background: #f2f0ea; padding: 10px 10px 0; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); }
.stack figure { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto; opacity: 0;
  transform: translate3d(0, 70px, 0) rotate(calc(var(--r) * 2.5)) scale(.94); transition: opacity .7s var(--ease), transform .9s var(--ease); }
.stack figure.shown { opacity: 1; transform: rotate(var(--r)); }
.stack img, .memory img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(.15) contrast(1.03); }
.stack figcaption, .memory figcaption { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #55534e; padding: 10px 2px 12px; }
.memory { width: min(100%, 320px); transform: rotate(-1.5deg); margin-top: 8px; }
.memory img { aspect-ratio: 4 / 5; height: auto; }
@media (min-width: 901px) { .js .chapter .memory { display: none; } }

/* biography life-line */
.chapters { position: relative; padding-left: 34px; --lp: 0; }
.chapters::before, .chapters::after { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; }
.chapters::before { background: var(--line); }
.chapters::after { background: linear-gradient(var(--accent), var(--accent-2)); transform: scaleY(var(--lp)); transform-origin: top; transition: transform .8s var(--ease); box-shadow: 0 0 10px color-mix(in oklab, var(--accent) 60%, transparent); }
.chapter { position: relative; }
.chapter::before { content: ''; position: absolute; left: -34px; top: clamp(40px, 8vh, 96px); width: 9px; height: 9px; border-radius: 50%; z-index: 1;
  background: var(--bg); border: 1px solid rgba(236,235,230,.35); transition: background .4s, border-color .4s, box-shadow .4s; }
.chapter.on::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in oklab, var(--accent) 18%, transparent), 0 0 16px var(--accent); }

/* ---------- 04 How I work: five roles as editorial rows, each with a live glyph ---------- */
.hiw { padding-block: clamp(96px, 12vw, 180px); }
.hiw-head { display: grid; gap: 26px; margin-bottom: clamp(48px, 6vw, 96px); max-width: 980px; }
.hiw-intro { color: var(--soft); font-size: clamp(17px, 1.4vw, 20px); max-width: 52ch; }
.roles { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.role { display: grid; grid-template-columns: 190px minmax(0, 1fr) minmax(220px, 340px); gap: clamp(24px, 4vw, 64px); align-items: center;
  padding-block: clamp(28px, 3.4vw, 44px); border-bottom: 1px solid var(--line); position: relative; }
.role::after { content: ''; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: transform .9s var(--ease); }
.role:hover::after { transform: scaleX(1); }
.role-meta { display: grid; gap: 8px; align-self: start; padding-top: 6px; }
.role-meta span { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.role-meta span:first-child { color: var(--accent); }
.role-meta span:first-child::after { content: ' //'; color: var(--muted); }
.role-text { display: grid; gap: 12px; }
.role-text h3 { font-size: clamp(26px, 2.6vw, 40px); font-weight: 400; letter-spacing: -0.035em; line-height: 1.1; transition: transform .6s var(--ease); }
.role:hover .role-text h3 { transform: translateX(6px); }
.role-text p { color: var(--soft); font-size: 17px; max-width: 46ch; }
.glyph { display: block; width: 100%; height: 170px; }
.disciplines { margin-top: 48px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); line-height: 2.2; }
.disciplines span { color: var(--accent); margin-inline: 12px; }

/* ---------- 04 Organisations: quiet moving strip ---------- */
.orgs { padding-block: clamp(64px, 8vw, 112px); overflow: hidden; }
.orgs .label { justify-content: center; margin-bottom: 40px; }
.marquee { display: flex; width: max-content; animation: slide 60s linear infinite; }
.marquee:hover { animation-play-state: paused; }
.marquee ul { display: flex; list-style: none; margin: 0; padding: 0; }
.marquee li { font-family: var(--display); font-size: clamp(30px, 3.4vw, 48px); letter-spacing: .02em; color: #3d3d42; padding-inline: clamp(24px, 3vw, 48px); white-space: nowrap; transition: color .3s; }
.marquee li:hover { color: var(--accent); }
.fade { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- 05 Contact ---------- */
.contact { padding-block: clamp(96px, 12vw, 180px) clamp(64px, 8vw, 120px); }
.contact h2 { font-size: clamp(64px, 11vw, 180px); margin: 28px 0 clamp(40px, 5vw, 72px); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 6vw, 112px); }
.contact-grid .intro { color: var(--soft); max-width: 30ch; font-size: 19px; }
.contact-grid .ln { display: inline-block; margin-top: 20px; color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 6px; }
.form { display: grid; gap: 20px; }
.hp { position: absolute; left: -9999px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field.full { grid-column: 1 / -1; }
.field input, .field textarea {
  font: inherit; font-family: var(--sans); font-size: 17px; letter-spacing: 0; text-transform: none; color: var(--text);
  background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 10px 0; width: 100%;
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.field textarea { resize: vertical; min-height: 120px; }
.btn {
  justify-self: start; display: inline-flex; align-items: center; gap: 12px; padding: 14px 24px; border-radius: 999px;
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer;
  background: var(--text); color: var(--bg); border: 0; transition: background-color .2s, transform .2s;
}
.btn:hover { background: var(--accent); transform: translateY(-1px); }
.form-status { font-size: 15px; }
.form-status.ok { color: #7dd88f; }
.form-status.err { color: #ff8a52; }

/* ---------- Footer ---------- */
.ftr { padding-block: 40px 64px; }
.ftr .row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ftr a { text-decoration: none; color: var(--soft); }
.ftr a:hover { color: var(--text); }
.sig {
  display: inline-block; width: 120px; aspect-ratio: 420 / 150; background: var(--accent);
  -webkit-mask: url('img/signature.png') center / contain no-repeat; mask: url('img/signature.png') center / contain no-repeat;
}

/* ---------- Simple pages (thanks, 404) ---------- */
.center-page { display: grid; gap: 28px; min-height: 100vh; align-content: center; }
.center-page h1 { font-size: clamp(64px, 12vw, 180px); }
.center-page a { color: var(--soft); }

/* ---------- Reveal (only when JavaScript runs) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  :root { animation: none; }
  .name .ch { animation: none; transform: none; }
  .cue i { animation: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .marquee { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee ul[aria-hidden] { display: none; }
  .marquee ul { flex-wrap: wrap; justify-content: center; }
  .chapter { opacity: 1; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .bio-grid, .contact-grid { grid-template-columns: 1fr; }
  .role { grid-template-columns: 1fr; gap: 16px; }
  .role-meta { grid-auto-flow: column; justify-content: start; gap: 14px; }
  .glyph { height: 150px; order: 3; }
  .hero-b { align-content: end; padding-bottom: 72px; }
  .hero-b-copy { width: 100%; gap: 18px; }
  .ev-list { grid-template-columns: 1fr; }
  .ev-list li:nth-child(even) { padding-left: 0; border-left: 0; }
  .hdr::before { bottom: -12px; }
  .year-wrap { position: sticky; top: 0; z-index: 2; background: var(--bg); padding-block: 78px 12px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); border-bottom: 1px solid var(--line); }
  .year { font-size: 84px; }
  .stack { display: none; }
  .hero-pin::before { background: radial-gradient(80vw 80vw at 50% 30%, color-mix(in oklab, var(--accent) 24%, transparent), transparent 70%); }
  .year-note { margin-top: 4px; }
  .chapter { opacity: 1; padding-block: 36px; }
}
@media (max-width: 600px) {
  .cue { display: none; }
  .hdr nav { gap: 16px; font-size: 13px; }
  .ticks { display: none; }
  .hero-meta { flex-direction: column; align-items: start; gap: 6px; }
  .fields { grid-template-columns: 1fr; }
}

/* Touch screens: no cursor hint */
@media (hover: none) { .hint { display: none; } }

/* Motion-free mode (reduced-motion setting or ?still) */
.still .name .ch { animation: none; transform: none; }
.still [data-reveal] { opacity: 1; transform: none; transition: none; }
.still .marquee { animation: none; }
.still { animation: none; }
.still .stack figure { transition: none; }


/* ==========================================================================
   Design language v2 (from the references): Swiss editorial metadata, hairline structure,
   two-hue light, precise dots. Shared by every section.
   ========================================================================== */

/* metadata labels read "01 // POINT OF VIEW" */
.label b::after { content: ' //'; color: var(--muted); }

/* two-hue light on emphasis */
.grad { background: linear-gradient(95deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.headline em { background: linear-gradient(95deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.k-acc { text-shadow: none; }
.k-acc .w > i { background: linear-gradient(95deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px color-mix(in oklab, var(--accent) 45%, transparent)); }

/* outlined pill tags with a lit dot */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pill { display: inline-flex; align-items: center; gap: 9px; padding: 7px 13px 7px 11px; border: 1px solid rgba(236,235,230,.2); border-radius: 999px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); background: rgba(255,255,255,.02); }
.pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.pill:nth-child(2n)::before { background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }

/* vertical side metadata */
.side-label { position: absolute; z-index: 3; writing-mode: vertical-rl; font-family: var(--mono); font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); pointer-events: none; white-space: nowrap; }
.side-label i { font-style: normal; color: var(--accent); margin-block: 10px; }
.side-label.l { left: 22px; bottom: 120px; transform: rotate(180deg); }
.side-label.r { right: 22px; bottom: 120px; }

/* faint structural grid with registration marks, faded at the edges */
.gridded { position: relative; isolation: isolate; }
.gridded::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cpath d='M0 -6V6M-6 0H6' stroke='%23ecebe6' stroke-opacity='.35' stroke-width='1' transform='translate(160 160)'/%3E%3C/svg%3E"),
    linear-gradient(rgba(236,235,230,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(236,235,230,.04) 1px, transparent 1px);
  background-size: 320px 320px, 80px 80px, 80px 80px; background-position: -160px -160px, 0 0, 0 0;
  -webkit-mask-image: radial-gradient(75% 65% at 50% 45%, #000 20%, transparent 80%); mask-image: radial-gradient(75% 65% at 50% 45%, #000 20%, transparent 80%); }

/* large light statements (Swiss), with a bold two-hue word */
.statement-xl { font-size: clamp(40px, 5.4vw, 88px); font-weight: 300; letter-spacing: -0.05em; line-height: 1.02; text-wrap: balance; }
.statement-xl b { font-weight: 600; }

@media (max-width: 900px) { .side-label { display: none; } }
.k-acc.k-glow .w > i { background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 38%, #fff 50%, var(--accent-2) 62%, var(--accent) 100%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; animation: sheen 3.6s ease-in-out infinite; }
.hero-b .pills { margin-top: 4px; }

/* ---------- Footer links ---------- */
.ftr-links { display: inline-flex; gap: 28px; }

/* ---------- Privacy prompt: one quiet card, in the site's own voice ---------- */
.consent { position: fixed; left: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); z-index: 120; width: min(380px, calc(100vw - 32px));
  padding: 18px 20px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(18, 18, 22, .82);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); color: var(--soft);
  font-size: 13.5px; line-height: 1.55; opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.consent.in { opacity: 1; transform: none; }
.consent p { margin: 0 0 14px; }
.consent a { color: var(--text); }
.consent-row { display: flex; gap: 10px; }
.consent button { font: inherit; font-size: 12.5px; letter-spacing: .02em; border-radius: 999px; padding: 8px 16px; cursor: pointer; border: 1px solid var(--line); background: transparent; color: var(--soft); }
.consent .consent-yes { background: var(--text); color: #111; border-color: var(--text); font-weight: 600; }
.consent button:hover { border-color: var(--soft); }
@media (prefers-reduced-motion: reduce) { .consent { transition: none; } }
