/* Charan Mulagala, portfolio: shared styles */
/* Anton and Work Sans, served from this site (SIL Open Font License, see fonts/OFL.txt) */
@font-face { font-family: 'Anton'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/anton-latin.woff2) format('woff2'); }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 300 600; font-display: swap; src: url(fonts/work-sans-latin.woff2) format('woff2'); }

:root {
  --bg: #0e0e0e;
  --surface: #1a1a1a;
  --ink: #f0f0f0;
  --muted: #a4a4a4;
  --accent: #ff3838;
  --accent-ink: #0e0e0e;
  --paper: #ececec;
  --paper-2: #dddddd;
  --paper-ink: #0e0e0e;
  --paper-muted: #545454;
  --paper-accent: #c81e1e;

  --font-display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --font-text: 'Work Sans', system-ui, sans-serif;

  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 0.95rem + 1.1vw, 1.875rem);
  --step-head: clamp(2.5rem, 0.8rem + 5.2vw, 6rem);
  --step-display: clamp(3.5rem, 0.5rem + 11vw, 15rem);

  --margin: clamp(1rem, 2.2vw, 2rem);
  --gutter: clamp(0.75rem, 1.4vw, 1.5rem);
  --section: clamp(7.5rem, 12vw, 13rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
}

/* ── reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
h1, h2, h3, p, figure, ul, ol, dl, dd, table { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, video, svg, canvas { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:target { scroll-margin-top: 4rem; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-weight: 400; text-wrap: balance; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: var(--margin); top: 12px; z-index: 60; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; font-weight: 600; text-decoration: none; transform: translateY(-160%); transition: transform var(--t-ui) var(--ease-out); }
.skip:focus { transform: none; }

/* ── controls ── */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 1.5rem; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: var(--step-body); text-decoration: none; white-space: nowrap; border: 0; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease; }
.button:active { transform: scale(0.97); }
.button[disabled] { cursor: progress; }
.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.22em; text-decoration-thickness: 0.07em; transition: text-decoration-color var(--t-hover) ease, color var(--t-hover) ease; }
.link-plain { text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 0.07em; transition: color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--ink); color: var(--bg); }
  .link:hover { text-decoration-color: currentColor; }
  .link-plain:hover { color: var(--accent); }
}

/* ── header ── */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 40; transition: color var(--t-ui) ease, transform 420ms var(--ease-out); display: flex; justify-content: space-between; align-items: center; padding: 18px var(--margin); color: var(--header-ink, var(--ink)); font-size: var(--step-small); font-weight: 600; pointer-events: none; }
.bar.is-away { transform: translateY(-110%); }
.bar:focus-within { transform: none; }
.bar a, .bar button { pointer-events: auto; }
.wordmark { position: relative; display: inline-block; text-decoration: none; }
.wordmark__text { display: inline-block; transition: opacity 260ms ease, transform 420ms var(--ease-out); }
.wordmark__sig { position: absolute; left: -2px; top: 50%; height: 2.6em; width: auto; aspect-ratio: 10 / 3; translate: 0 -54%; fill: currentColor; overflow: visible; clip-path: inset(0 100% 0 0); transition: clip-path 160ms ease; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .wordmark:is(:hover, :focus-visible) .wordmark__text { opacity: 0; transform: translateY(-40%); }
  .wordmark:is(:hover, :focus-visible) .wordmark__sig { clip-path: inset(-20% -12% -20% -2%); transition: clip-path 700ms cubic-bezier(0.5, 0.1, 0.4, 1) 80ms; }
}
.menu-toggle { position: relative; min-height: 44px; padding: 0 2px; font-weight: 600; }
/* the menu button: three bars draw a menu as you point at it, and fold into a cross while it is open */
[data-ui].fx-menu { right: calc(100% + 10px); top: 50%; width: 18px; height: 12px; margin-top: -6px; }
[data-ui].fx-menu i { position: absolute; right: 0; top: 0; width: 100%; height: 2px; background: var(--accent); transform-origin: right center; scale: 0 1; transition: scale 240ms var(--ease-out), top 300ms var(--ease-out), rotate 300ms var(--ease-out), width 240ms var(--ease-out); }
[data-ui].fx-menu i:nth-child(2) { top: 5px; width: 70%; }
[data-ui].fx-menu i:nth-child(3) { top: 10px; width: 85%; }
.menu-toggle:is(:hover, :focus-visible) [data-ui].fx-menu i { scale: 1 1; }
.menu-toggle:is(:hover, :focus-visible) [data-ui].fx-menu i:nth-child(2) { transition-delay: 60ms; }
.menu-toggle:is(:hover, :focus-visible) [data-ui].fx-menu i:nth-child(3) { transition-delay: 120ms; }
.menu-open [data-ui].fx-menu { transition: rotate 360ms var(--ease-out); }
.menu-open [data-ui].fx-menu i { scale: 1 1; top: 5px; width: 100%; transform-origin: center; }
.menu-open [data-ui].fx-menu i:nth-child(1) { rotate: 45deg; }
.menu-open [data-ui].fx-menu i:nth-child(2) { scale: 0 1; }
.menu-open [data-ui].fx-menu i:nth-child(3) { rotate: -45deg; }
.menu-open .menu-toggle:is(:hover, :focus-visible) [data-ui].fx-menu { rotate: 90deg; }
@media (prefers-reduced-motion: reduce) { [data-ui].fx-menu, [data-ui].fx-menu i { transition: none; } }
.menu-open .bar { color: var(--paper-ink); }

.menu { position: fixed; inset: 0; z-index: 35; display: grid; grid-template-rows: 1fr auto; padding: 96px var(--margin) 28px; background: var(--paper); color: var(--paper-ink); visibility: hidden; clip-path: inset(0 0 100% 0); transition: clip-path 640ms var(--ease-in-out), visibility 0s linear 640ms; }
.menu.is-open { visibility: visible; clip-path: inset(0); transition: clip-path 640ms var(--ease-in-out), visibility 0s; }
.menu__links { align-self: end; }
.menu__links a { display: block; width: fit-content; font-family: var(--font-display); font-size: var(--step-head); line-height: 0.98; text-transform: uppercase; text-decoration: none; transition: color var(--t-hover) ease, transform 600ms var(--ease-out); }
.menu__more { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 40px; font-weight: 600; font-size: var(--step-small); }
/* pointing at a chapter dims the others and shows its picture, in colour, on the right */
/* each word is set letter by letter (site.js), so its letters can move on their own */
.menu__links a { position: relative; transition: color 260ms ease, opacity 320ms ease; clip-path: inset(-45% -24% 0 -6%); }
.menu__links .ch { display: inline-block; vertical-align: top; }
.menu__links .ch i { display: block; position: relative; font-style: normal; }
.menu[data-peek] .menu__links a:not(.is-peek) { opacity: 0.26; }
.menu__cloud { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
  .menu__cloud { display: block; position: absolute; top: 72px; right: 0; width: 60%; height: calc(100% - 72px); pointer-events: none; opacity: 0; transition: opacity 500ms ease; }
  .menu.is-open .menu__cloud { opacity: 1; transition-delay: 380ms; }
}
@media (prefers-reduced-motion: no-preference) {
  /* opening: a red line runs down with the curtain, then the letters rise out of their lines */
  .menu::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); opacity: 0; pointer-events: none; }
  .menu.is-open::after { animation: menu-scan 640ms var(--ease-in-out) both; }
  .menu__links .ch { translate: 0 108%; transition: translate 760ms var(--ease-out); }
  .menu.is-open .menu__links .ch { translate: 0 0; transition-delay: calc(var(--i) * 70ms + var(--c) * 24ms + 220ms); }
  .menu__more > * { opacity: 0; translate: 0 12px; transition: opacity 400ms ease, translate 600ms var(--ease-out); }
  .menu.is-open .menu__more > * { opacity: 1; translate: 0 0; transition-delay: 640ms; }
  .menu.is-open .menu__more > :nth-child(2) { transition-delay: 690ms; }
  .menu.is-open .menu__more > :nth-child(3) { transition-delay: 740ms; }
  .menu.is-open .menu__more > :nth-child(4) { transition-delay: 790ms; }
  .menu.is-open .menu__more > :nth-child(5) { transition-delay: 840ms; }
}
@keyframes menu-scan { 0% { opacity: 1; transform: translateY(0); } 92% { opacity: 1; transform: translateY(calc(100svh - 3px)); } 100% { opacity: 0; transform: translateY(calc(100svh - 3px)); } }
/* pointing at a chapter: its letters roll over, one after another, like a departures board, and come up red */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .menu__links .ch { overflow: hidden; }
  .menu__links .ch i { transition: transform 460ms var(--ease-out); transition-delay: calc(var(--c) * 40ms); }
  .menu__links .ch i::after { content: attr(data-ch); position: absolute; left: 0; top: 100%; color: var(--paper-accent); }
  .menu__links a:is(:hover, :focus-visible) .ch i { transform: translateY(-100%); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: reduce) {
  .menu__links a:is(:hover, :focus-visible) { color: var(--paper-accent); }
}

/* ── hero: the name holds while the portrait resolves ── */
.hero { position: relative; height: 260svh; }
.hero__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.hero__name { position: absolute; z-index: 3; left: 0; right: 0; top: clamp(84px, 12svh, 120px); font-family: var(--font-display); font-size: var(--step-display); line-height: 0.86; letter-spacing: -0.01em; text-transform: uppercase; text-align: center; white-space: nowrap; }
.hero__name .line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.hero__name .line > span { display: block; }
.hero__name .w { display: inline; }
.hero__portrait { position: absolute; z-index: 1; top: 90px; left: 50%; height: min(calc(100svh - 90px), 69vw); aspect-ratio: 2 / 3; transform: translateX(-50%); background: var(--surface); overflow: hidden; }
.hero__portrait img, .hero__portrait canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.hero__portrait canvas { opacity: 0; }
.hero__portrait.is-live img { opacity: 0; }
.hero__portrait.is-live canvas { opacity: 1; }
.hero__seen { position: absolute; z-index: 3; right: var(--margin); top: 50%; max-width: 24ch; font-size: var(--step-small); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.hero__intro { position: absolute; z-index: 3; left: var(--margin); bottom: 32px; max-width: 27ch; font-size: var(--step-body); font-weight: 600; line-height: 1.4; }
/* how sharp the picture is: four segments under "Seen at", one for each resolution, and a hint to scroll */
.hero__res { position: absolute; z-index: 3; right: var(--margin); top: calc(50% + 32px); display: flex; gap: 4px; width: 208px; }
.hero__res span { position: relative; flex: 1; height: 4px; overflow: hidden; background: #2c2c2c; }
.hero__res span::after { content: ''; position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(var(--f, 0)); }
.hero__hint { position: absolute; z-index: 3; right: var(--margin); top: calc(50% + 48px); font-size: var(--step-small); color: var(--muted); transition: opacity 400ms ease; }
.hero.is-moved .hero__hint { opacity: 0; }
/* the detector's log, written out as the picture sharpens */
.hero__log { position: absolute; z-index: 3; left: var(--margin); top: 40%; display: grid; gap: 8px; font-size: var(--step-small); font-variant-numeric: tabular-nums; color: var(--muted); }
.hero__log li:last-child { color: var(--ink); font-weight: 600; }
.hero__log li:last-child::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 10px; background: var(--accent); }
/* the time where I am */
/* what I am open to, read like a detection: the box keeps finding a new answer; it leads to the contact form */
.hero__now { position: absolute; z-index: 3; right: var(--margin); bottom: 32px; display: flex; flex-direction: column; align-items: flex-end; text-decoration: none; color: var(--ink); }
.hero__where { font-size: var(--step-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.hero__time { color: var(--ink); font-weight: 600; }
.hero__time b { font-weight: inherit; }
[data-ui].hero__open { position: relative; margin-top: 38px; padding: 12px 14px 8px; border: 2px solid var(--accent); }
[data-ui] .hero__tagline { position: absolute; left: -2px; bottom: 100%; display: flex; align-items: center; gap: 7px; padding: 6px 9px 5px; background: var(--accent); color: var(--accent-ink); font-style: normal; font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap; }
[data-ui] .hero__tagline::before { content: ''; width: 7px; height: 7px; background: var(--accent-ink); }
.hero__word { position: relative; display: block; height: 1em; overflow: hidden; font-family: var(--font-display); font-size: clamp(2.25rem, 1rem + 2.4vw, 3.75rem); line-height: 1; text-transform: uppercase; white-space: nowrap; transition: width 560ms var(--ease-out); }
.hero__word > span { position: absolute; left: 0; top: 0; width: max-content; }
.hero__word b { display: inline-block; font-weight: inherit; }
.hero__word b::before { content: attr(data-ch); }
.hero__hello { margin-top: 10px; font-size: var(--step-small); font-weight: 600; color: var(--muted); transition: color var(--t-hover) ease; }
.hero__hello::after { content: '→'; display: inline-block; margin-left: 6px; transition: transform 260ms var(--ease-out); }
.hero__now:is(:hover, :focus-visible) .hero__hello { color: var(--ink); }
.hero__now:is(:hover, :focus-visible) .hero__hello::after { transform: translateX(5px); }
@media (prefers-reduced-motion: no-preference) {
  .hero__time b, [data-ui] .hero__tagline::before { animation: blink 1s steps(1, end) infinite; }
  .hero__word .is-now b { animation: roll-in 560ms var(--ease-out) calc(var(--c) * 32ms) both; }
  .hero__word .is-out b { animation: roll-out 460ms var(--ease-in-out) calc(var(--c) * 32ms) both; }
}
.hero__word .is-out { visibility: hidden; }
@media (prefers-reduced-motion: no-preference) { .hero__word .is-out { visibility: visible; } }
@keyframes blink { 50% { opacity: 0.2; } }
@keyframes roll-in { from { transform: translateY(105%); } }
@keyframes roll-out { to { transform: translateY(-105%); } }
/* the boxes come apart once the parts of me are found */
.hero__portrait .hero__dust { z-index: 3; opacity: 1; image-rendering: auto; pointer-events: none; }
.hero__portrait.is-released .det, .hero__portrait.is-released .det__tag { opacity: 0; transition: opacity 120ms ease, transform 700ms var(--ease-in-out); }
[data-ui].is-sharp.is-released .feat { opacity: 0; transition: opacity 120ms ease; }
/* the parts of me the detector finds, once the picture is sharp */
[data-ui] .feat { position: absolute; z-index: 2; left: calc(var(--x) * 100%); top: calc(var(--y) * 100%); width: calc(var(--w) * 100%); height: calc(var(--h) * 100%); border: 2px solid var(--accent); opacity: 0; clip-path: inset(0 100% 0 0); transition: opacity 200ms ease, clip-path 0s linear 200ms; }
[data-ui] .feat i { position: absolute; left: -2px; bottom: 100%; background: var(--accent); color: var(--accent-ink); font-style: normal; font-weight: 600; font-size: 12px; line-height: 1; padding: 4px 6px; white-space: nowrap; }
[data-ui] .feat--under i { bottom: auto; top: 100%; }
[data-ui] .feat--side i { left: 100%; bottom: -2px; }
[data-ui].is-sharp .feat { opacity: 1; clip-path: inset(-24px -80px -24px -6px); transition: opacity 120ms ease calc(var(--i) * 180ms + 250ms), clip-path 520ms var(--ease-out) calc(var(--i) * 180ms + 250ms); }
/* first, the portrait forms out of points */
.hero__portrait .hero__cloud { z-index: 2; opacity: 1; image-rendering: auto; transition: opacity 400ms ease; }
.hero__portrait .hero__cloud.is-gone { opacity: 0; }
.hero__portrait.is-forming { background: transparent; }
.hero__portrait.is-forming > img, .hero__portrait.is-forming > canvas:not(.hero__cloud), .hero__portrait.is-forming .det, .hero__portrait.is-forming .det__tag { opacity: 0; }
.hero__portrait .det, .hero__portrait > canvas:not(.hero__cloud) { transition: opacity 400ms ease; }
.hero__portrait .det__tag { transition: opacity 400ms ease, transform 700ms var(--ease-in-out); }

/* detection overlay: the boxes the projects draw (data-ui keeps their own strokes) */
[data-ui] .det { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
[data-ui] .det__rect { fill: none; stroke: var(--accent); stroke-width: 3; vector-effect: non-scaling-stroke; transform-box: view-box; transform-origin: 0 0; transition: transform 700ms var(--ease-in-out); }
[data-ui] .det__tag { position: absolute; left: 24%; top: 71%; transform: translateY(-100%); background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px; line-height: 1; padding: 6px 8px; white-space: nowrap; font-variant-numeric: tabular-nums; transition: transform 700ms var(--ease-in-out); }
.js [data-ui] .det__tag { left: 0; top: 0; }
[data-ui] .hero__scan { position: absolute; inset: 0; z-index: 2; border-bottom: 2px solid var(--accent); pointer-events: none; opacity: 0; }

/* ── work: full plates, one row at the midline ── */
.panel { position: relative; height: 100svh; overflow: hidden; container-type: size; background: var(--surface); }
.panel__media { position: absolute; inset: 0; overflow: hidden; }
.plate { --pw: max(100cqw, calc(100cqh * var(--r))); --ph: max(100cqh, calc(100cqw / var(--r))); position: absolute; width: var(--pw); height: var(--ph); left: calc((100cqw - var(--pw)) / 2); top: calc((100cqh - var(--ph)) * var(--ay, 0.5)); transform: scale(1.3); transform-origin: var(--fx) var(--fy); }
.plate--whole { transform: none; }
.plate img, .plate video { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(0.78) contrast(1.06); }
.boxes { position: absolute; inset: 0; pointer-events: none; }
/* a detection box: the frame, its label, and inside it the picture as it really is, in colour */
[data-ui].box { --d: calc(var(--i, 0) * 140ms + 250ms); position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h); }
[data-ui].box::after { content: ''; position: absolute; inset: 0; border: 2px solid var(--accent); }
[data-ui].box i { position: absolute; z-index: 1; left: 0; bottom: 100%; background: var(--accent); color: var(--accent-ink); font-style: normal; font-weight: 600; font-size: 13px; line-height: 1; padding: 4px 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
[data-ui].box.is-under i { bottom: auto; top: 0; }
.box__see { position: absolute; inset: 0; overflow: hidden; }
.plate .box__see img { position: absolute; max-width: none; object-fit: fill; filter: none; }
.box__see canvas { width: 100%; height: 100%; }
[data-ui] .box__k { position: absolute; width: 16px; height: 16px; border: 0 solid var(--accent); opacity: 0; }
[data-ui] .box__k:nth-of-type(1) { left: -5px; top: -5px; border-width: 3px 0 0 3px; --kx: -22px; --ky: -22px; }
[data-ui] .box__k:nth-of-type(2) { right: -5px; top: -5px; border-width: 3px 3px 0 0; --kx: 22px; --ky: -22px; }
[data-ui] .box__k:nth-of-type(3) { left: -5px; bottom: -5px; border-width: 0 0 3px 3px; --kx: -22px; --ky: 22px; }
[data-ui] .box__k:nth-of-type(4) { right: -5px; bottom: -5px; border-width: 0 3px 3px 0; --kx: 22px; --ky: 22px; }
.panel__row { position: absolute; left: 0; right: 0; top: calc(50% - 45px); height: 90px; display: grid; grid-template-columns: calc(10% - var(--margin)) 1fr auto; align-items: center; padding-inline: var(--margin); background: rgba(10, 10, 9, 0.58); }
.panel__year, .panel__fact { font-size: var(--step-small); font-weight: 600; font-variant-numeric: tabular-nums; }
.panel__title { justify-self: start; font-family: var(--font-display); font-size: var(--step-lead); line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; }
.panel__media { transition: transform 1100ms var(--ease-out); }
.panel__body { position: absolute; left: var(--margin); bottom: clamp(20px, 4svh, 40px); max-width: 48ch; padding: 20px 24px 22px; background: rgba(10, 10, 9, 0.66); }
.panel__body p + p { margin-top: 12px; }
.panel__links { display: flex; flex-wrap: wrap; gap: 6px 24px; font-weight: 600; }

/* ── demo: one frame, three distances ── */
.show { position: relative; height: 300svh; }
.show__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.show__title { font-family: var(--font-display); font-size: var(--step-head); line-height: 0.9; text-transform: uppercase; }
.show__a, .show__b { position: absolute; z-index: 3; left: 0; right: 0; text-align: center; }
.show__a { bottom: calc(50% + min(18.75vw, 34svh) + 12px); }
.show__b { top: calc(50% + min(18.75vw, 34svh) - 0.3em); }
.show__frame { position: absolute; z-index: 1; left: 50%; top: 50%; width: min(30vw, 54.4svh); aspect-ratio: 4 / 5; transform: translate(-50%, -50%); overflow: hidden; background: var(--surface); }
.show__plate { position: absolute; inset: 0; transform-origin: 0 0; transition: transform 700ms var(--ease-in-out); }
.show__plate img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(0.78) contrast(1.06); }
[data-ui] .hand { position: absolute; inset: 0; width: 100%; height: 100%; }
[data-ui] .hand line { stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
[data-ui] .hand circle { fill: var(--accent); }
.show__video, .show__canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.show__video { filter: grayscale(1) contrast(1.05); background: var(--surface); }
[data-ui] .show__tag { position: absolute; left: 0; top: 0; z-index: 2; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px; line-height: 1; padding: 7px 9px; }
.show__note { position: absolute; z-index: 3; left: calc(50% + min(15vw, 27.2svh) + 2.5vw); top: calc(50% - min(18.75vw, 34svh)); width: min(30ch, 25vw); transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-out); }
.show__note p { font-size: var(--step-body); }
.show__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 22px; font-weight: 600; }
.show__status { margin-top: 14px; min-height: 3em; font-size: var(--step-small); color: var(--muted); }
.gestures { position: absolute; z-index: 3; right: calc(50% + min(15vw, 27.2svh) + 2.5vw); top: calc(50% - min(18.75vw, 34svh)); width: min(30ch, 25vw); border-collapse: collapse; font-size: var(--step-small); transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-out); }
.gestures caption { text-align: left; font-weight: 600; padding-bottom: 10px; }
.gestures th, .gestures td { text-align: left; vertical-align: top; padding: 10px 0; border-top: 1px solid #3a3a37; }
.gestures th { font-weight: 400; color: var(--muted); padding-right: 16px; width: 52%; }
.show__marks { position: absolute; inset: 0; pointer-events: none; }
.show__marks span { position: absolute; left: 0; right: 0; height: 100svh; }
.show__marks span:nth-child(1) { top: 0; }
.show__marks span:nth-child(2) { top: 100svh; }
.show__marks span:nth-child(3) { top: 200svh; }
.hand-pointer { position: fixed; left: 0; top: 0; z-index: 70; width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 3px solid var(--accent); border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity var(--t-ui) ease, background-color 120ms ease; }
.hand-on .hand-pointer.is-found { opacity: 1; }
.hand-pointer.is-pinch { background: var(--accent); }
.hand-ripple { position: fixed; left: 0; top: 0; z-index: 70; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: var(--accent); pointer-events: none; animation: ripple 600ms var(--ease-out) forwards; }
@keyframes ripple { from { opacity: 0.7; scale: 0.5; } to { opacity: 0; scale: 2.2; } }
.hand-pointer.is-scroll { border-style: dashed; }
@media (prefers-reduced-motion: no-preference) and (min-width: 1025px) {
  .js .show:not(.is-live):not([data-stage="2"]):not([data-stage="3"]) .show__b { opacity: 0; transform: translateY(24px); }
  .js .show:not(.is-live):not([data-stage="3"]) .show__note, .js .show:not(.is-live):not([data-stage="3"]) .gestures { opacity: 0; transform: translateY(24px); }
  .js .show__note:focus-within { opacity: 1 !important; transform: none !important; }
  .show__b { transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-out); }
}

/* ── experience: the names as one wall of type, read one at a time by a detection box ── */
.exp { background: var(--paper); color: var(--paper-ink); padding: 64px var(--margin) var(--section); }
.exp__window, .exp__count, .exp__ticks { display: none; }
.exp__title { font-family: var(--font-display); font-size: var(--step-head); line-height: 0.92; text-transform: uppercase; }
.exp__list { display: grid; gap: 64px; margin-top: 48px; }
.exp__head { position: relative; display: block; width: fit-content; max-width: 100%; margin-top: 26px; padding: 12px 14px 8px; }
.exp__org { font-family: var(--font-display); font-size: clamp(2.75rem, 1rem + 9vw, 5rem); line-height: 0.95; text-transform: uppercase; }
[data-ui].exp__frame { position: absolute; inset: 0; border: 3px solid var(--accent); pointer-events: none; }
[data-ui].exp__frame i, [data-ui] .exp__kind { position: absolute; left: -3px; bottom: 100%; background: var(--accent); color: var(--accent-ink); font-style: normal; font-weight: 600; font-size: 14px; line-height: 1; padding: 6px 8px 5px; white-space: nowrap; }
.exp__role { margin-top: 14px; font-size: var(--step-lead); line-height: 1.25; }
.exp__meta { margin-top: 6px; font-size: var(--step-small); font-weight: 600; color: var(--paper-muted); font-variant-numeric: tabular-nums; }
.exp__detail { margin-top: 14px; max-width: 34em; }
.exp__links { margin-top: 12px; font-size: var(--step-small); font-weight: 600; }
.exp__out { margin-top: 16px; font-family: var(--font-display); font-size: clamp(2.5rem, 1.2rem + 6vw, 4rem); line-height: 0.95; text-transform: uppercase; color: var(--paper-accent); }
@media (prefers-reduced-motion: no-preference) {
  .js .exp__item [data-ui].exp__frame { clip-path: inset(0 100% 0 0); transition: clip-path 700ms var(--ease-in-out) 120ms; }
  .js .exp__item.is-in [data-ui].exp__frame { clip-path: inset(-40px -4px -4px -4px); }
}
@media (min-width: 768px) and (min-height: 560px) {
  .exp { padding: 0; }
  .exp__run { height: 560svh; }
  .exp__stage { position: sticky; top: 0; height: 100svh; display: grid; grid-template-rows: minmax(0, 1fr) auto; padding-top: 60px; overflow: hidden; }
  .exp__window { display: block; position: relative; overflow: hidden; pointer-events: none; }
  .exp__layer { position: absolute; inset: 0; }
  .exp__wall { position: relative; padding-inline: var(--margin); font-family: var(--font-display); font-size: 100px; line-height: 0.84; text-transform: uppercase; white-space: nowrap; will-change: transform; }
  .exp__wall span { display: block; width: fit-content; padding-block: 0.09em 0.07em; margin-bottom: 0.2em; }
  .exp__wall span::before { content: attr(data-name); }
  .exp__layer--ghost .exp__wall { color: transparent; -webkit-text-stroke: 1.5px #a2a2a2; }
  .exp__layer--lit .exp__wall { color: var(--paper-ink); }
  [data-ui].exp__box { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
  [data-ui].exp__box::after { content: ''; position: absolute; inset: 0; border: 3px solid var(--accent); }
  [data-ui] .exp__kind { left: 0; font-size: 15px; padding: 7px 10px 6px; }
  .exp__band { display: grid; grid-template-columns: minmax(0, 22%) minmax(0, 1fr); column-gap: var(--gutter); align-items: end; padding: 24px var(--margin) clamp(24px, 4svh, 40px); }
  .exp__title { font-family: var(--font-text); font-size: var(--step-lead); line-height: 1.2; text-transform: none; color: var(--paper-accent); }
  .exp__count { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; font-family: var(--font-display); line-height: 0.9; font-variant-numeric: tabular-nums; }
  .exp__now { font-size: clamp(2.75rem, 0.5rem + 4.4vw, 5.5rem); }
  .exp__of { font-family: var(--font-text); font-size: var(--step-small); font-weight: 600; color: var(--paper-muted); }
  .exp__ticks { display: flex; gap: 8px; margin-top: 14px; }
  .exp__ticks button { width: 26px; height: 26px; padding: 0; position: relative; }
  .exp__ticks button::before { content: ''; position: absolute; inset: 8px; background: #b9b9b9; transition: background-color 200ms ease, inset 260ms var(--ease-out); }
  .exp__ticks button:hover::before { background: var(--paper-ink); }
  .exp__ticks button.is-on::before { inset: 4px; background: var(--accent); }
  .exp__list { display: grid; gap: 0; margin: 0; }
  .exp__item { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--gutter); align-items: end; visibility: hidden; }
  .exp__item.is-on { visibility: visible; }
  /* the wall shows the name; the heading stays for screen readers */
  .exp__head { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .exp__role { margin-top: 0; }
  .exp__detail { max-width: 40em; }
  .exp__body { grid-column: 1; grid-row: 1; }
  .exp__out { grid-column: 2; grid-row: 1; margin: 0; font-size: clamp(2.75rem, 0.5rem + 4.4vw, 5.5rem); text-align: right; white-space: nowrap; }
}
@media (min-width: 768px) and (max-width: 1024px) and (min-height: 560px) {
  .exp__band { grid-template-columns: minmax(0, 30%) minmax(0, 1fr); }
  .exp__item { grid-template-columns: minmax(0, 1fr); }
  .exp__body, .exp__out { grid-column: 1; grid-row: auto; }
  .exp__out { margin-bottom: 12px; text-align: left; }
}
@media (min-width: 768px) and (min-height: 560px) and (prefers-reduced-motion: no-preference) {
  .exp__item.is-on :is(.exp__body > *, .exp__out) { opacity: 0; transform: translateY(20px); animation: rise 640ms var(--ease-out) calc(var(--k, 0) * 70ms) forwards; }
  .exp__body > :nth-child(2) { --k: 1; }
  .exp__body > :nth-child(3) { --k: 2; }
  .exp__body > :nth-child(4) { --k: 3; }
  .exp__out { --k: 1; }
  .exp__now.is-flip { animation: count-in 420ms var(--ease-out); }
  .exp__box.is-locking .box__k { animation: lock 900ms both; }
}
@keyframes count-in { from { transform: translateY(40%); opacity: 0; } }

/* ── about: a sentence the detector reads, the toolkit as a map, and the smaller things, each shown working ── */
.about { padding: var(--section) var(--margin) 0; }
.about__title { font-family: var(--font-display); font-size: var(--step-head); line-height: 0.9; text-transform: uppercase; }
.about__text { max-width: 31em; margin-top: 44px; font-size: var(--step-lead); line-height: 1.95; }
/* each kind of messy input is a detection box that leads to its project */
.spot { position: relative; white-space: nowrap; color: var(--ink); text-decoration: none; transition: color var(--t-hover) ease; }
.spot::before { content: ''; position: absolute; inset: -2px -6px -1px; border: 2px solid var(--accent); pointer-events: none; }
.spot::after { content: attr(data-label); position: absolute; left: -6px; bottom: calc(100% + 1px); padding: 3px 6px 2px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; pointer-events: none; }
.spot:is(:hover, :focus-visible) { color: var(--accent); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px var(--gutter); margin-top: 64px; font-size: var(--step-small); }
.facts dt { color: var(--muted); }
.facts dd { margin-top: 4px; color: var(--ink); font-size: var(--step-body); font-weight: 600; }
.about__head { font-family: var(--font-display); font-size: var(--step-head); line-height: 0.9; text-transform: uppercase; }
/* the toolkit as a map */
.kit { margin-top: 150px; }
.kit__hint { margin-top: 12px; color: var(--muted); }
.kit__map { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: clamp(80px, 12vw, 220px); align-items: center; margin-top: 44px; }
.kit__tools { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; }
.kit__tools button { padding: 10px 14px 9px; background: var(--surface); color: var(--ink); font-size: var(--step-small); font-weight: 600; transition: background-color 200ms ease, color 200ms ease, opacity 200ms ease; }
.kit__tools button i { margin-left: 8px; font-style: normal; font-size: 12px; color: var(--muted); }
.kit__map.is-active .kit__tools button { color: #5c5c5c; }
.kit__map.is-active .kit__tools button.is-on { background: var(--accent); color: var(--accent-ink); }
.kit__tools button.is-on i { color: var(--accent-ink); }
.kit__work { position: relative; z-index: 1; display: grid; justify-items: start; gap: 2px; }
.kit__work li { position: relative; font-family: var(--font-display); font-size: clamp(2rem, 1rem + 2.3vw, 3.5rem); line-height: 1.04; text-transform: uppercase; color: transparent; -webkit-text-stroke: 1.2px #5c5c5c; cursor: default; transition: color 220ms ease, -webkit-text-stroke-color 220ms ease; }
.kit__work li span::before { content: attr(data-name); }
.kit__work li.is-on { color: var(--ink); -webkit-text-stroke-color: transparent; }
.kit__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.kit__lines path { fill: none; stroke: var(--accent); stroke-width: 2; }
@media (prefers-reduced-motion: no-preference) {
  .kit__lines path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: pen 520ms var(--ease-out) forwards; }
  .js .spot::before { clip-path: inset(0 100% 0 0); transition: clip-path 620ms var(--ease-in-out) calc(var(--i) * 380ms + 400ms); }
  .js .spot::after { opacity: 0; transition: opacity 200ms ease calc(var(--i) * 380ms + 900ms); }
  .js .about__text.is-in .spot::before { clip-path: inset(-30px -10px -10px -10px); }
  .js .about__text.is-in .spot::after { opacity: 1; }
}
/* the smaller things, each in a stage that shows it working */
.built { margin-top: 150px; }
.built__grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 56px 20px; margin-top: 44px; }
.tile { grid-column: span 2; }
.tile--points { grid-column: span 4; }
[data-ui].tile__stage { position: relative; height: 300px; overflow: hidden; background: var(--surface); }
.tile--points [data-ui].tile__stage, .tile--voice [data-ui].tile__stage { height: 360px; }
[data-ui].tile__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
[data-ui].tile__stage img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(0.8); }
[data-ui] .tile__tag { position: absolute; left: 12px; top: 12px; padding: 4px 6px 3px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 600; line-height: 1; }
.tile__title { margin-top: 18px; font-family: var(--font-display); font-size: var(--step-lead); line-height: 1; text-transform: uppercase; }
.tile__title a { color: inherit; text-decoration: none; }
.tile__text { margin-top: 10px; max-width: 34em; }
.tile__year { color: var(--muted); font-variant-numeric: tabular-nums; }
.built__more { margin-top: 56px; display: flex; gap: 14px; align-items: baseline; font-weight: 600; }
.built__more span { color: var(--muted); font-weight: 400; }
/* the voice assistant: a waveform that talks */
.wave { position: absolute; left: 24px; right: 24px; top: 38%; height: 120px; margin-top: -60px; display: flex; align-items: center; gap: 4px; }
.wave i { flex: 1; height: 100%; background: var(--ink); transform: scaleY(var(--a, 0.06)); transition: transform 90ms linear; }
.wave i:nth-child(4n) { background: var(--accent); }
[data-ui] .tile__say { position: absolute; left: 24px; bottom: 24px; padding: 12px 18px; background: var(--accent); color: var(--accent-ink); font-weight: 600; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
[data-ui] .tile__say:hover { background: var(--ink); }
[data-ui] .tile__said { position: absolute; left: 24px; right: 24px; bottom: 82px; font-size: var(--step-small); line-height: 1.4; color: var(--ink); }
/* the caption, written word by word over the picture */
[data-ui] .tile__caption { position: absolute; left: 12px; right: 12px; bottom: 12px; min-height: 2.8em; padding: 9px 12px; background: rgba(14, 14, 14, 0.82); color: var(--ink); font-size: var(--step-small); font-weight: 600; line-height: 1.35; }
[data-ui] .tile__caption::before { content: 'caption · example'; display: block; margin-bottom: 4px; color: var(--accent); font-size: 12px; }
/* the search results, scraped one after another */
.serp { position: absolute; inset: 0; padding: 18px; font-size: 13px; line-height: 1.3; }
.serp__q { min-height: 36px; padding: 9px 12px; background: var(--paper); color: var(--paper-ink); font-weight: 600; font-size: 14px; }
.serp__q::after { content: ''; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -0.15em; background: var(--accent); }
.serp__results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin-top: 10px; }
.serp__results li { position: relative; padding: 5px 8px; line-height: 1.25; }
.serp__results li::after { content: ''; position: absolute; inset: 0; border: 2px solid var(--accent); opacity: 0; transition: opacity 160ms ease; }
.serp__results li.is-took::after { opacity: 1; }
.serp__results b { display: block; color: var(--ink); font-size: 14px; }
.serp__results em { display: block; font-style: normal; color: var(--accent); }
.serp__results span { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.serp__count { position: absolute; left: 18px; bottom: 14px; color: var(--ink); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .serp__results li { animation: card-in 380ms var(--ease-out) both; }
  .wave.is-talking i { transition-duration: 60ms; }
}

/* ── contact: a card over Spiti Valley ── */
.contact { position: relative; height: max(100svh, 800px); margin-top: var(--section); overflow: hidden; background: var(--surface); }
.contact__media { position: absolute; inset: 0; overflow: hidden; container-type: size; }
.card { position: relative; z-index: 2; width: min(410px, calc(100% - 2 * var(--margin))); margin: 64px 64px 0 auto; padding: 30px 30px 0; background: var(--paper); color: var(--paper-ink); }
/* the section's title stands over the mountains, in the type of the others */
.contact__title { position: absolute; z-index: 2; left: var(--margin); top: 40%; max-width: calc(100% - 410px - 64px - 3 * var(--margin)); font-family: var(--font-display); font-size: clamp(3.5rem, 1rem + 7vw, 8.5rem); line-height: 0.88; text-transform: uppercase; color: var(--ink); }
/* a message, once sent, flies off as a paper plane */
.contact__flight { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; pointer-events: none; }
/* the card is an airmail letter: a striped edge, a stamp that is postmarked when it goes, and a letter you fill in */
.card__air { position: absolute; left: 0; top: 0; width: 100%; height: 8px; fill: var(--accent); }
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.card__to { font-size: var(--step-small); line-height: 1.6; }
.card__to span { display: inline-block; min-width: 2.2em; color: var(--paper-muted); }
.stamp { position: relative; flex: none; width: 64px; height: 76px; margin: -6px -4px 0 0; transform: rotate(3deg); }
.stamp__face { display: block; width: 100%; height: 100%; overflow: visible; }
.stamp__edge { fill: var(--paper-2); }
.stamp__holes circle { fill: var(--paper); }
.stamp__frame { fill: none; stroke: var(--paper-ink); stroke-width: 1; }
.stamp__plane { fill: var(--paper); stroke: var(--paper-ink); stroke-width: 1.2; stroke-linejoin: round; }
.stamp__fold { stroke: var(--accent); stroke-width: 2; }
.stamp__face text { font: 700 7px/1 var(--font-text); letter-spacing: 0.12em; text-anchor: middle; fill: var(--paper-ink); }
/* the postmark lands on the stamp when the letter is sent */
.stamp__mark { position: absolute; right: 16px; top: 22px; width: 128px; max-width: none; height: 68px; overflow: visible; fill: none; stroke: var(--paper-ink); stroke-width: 1.6; opacity: 0; transform: rotate(-14deg) scale(1.5); transform-origin: 94px 34px; pointer-events: none; }
.stamp__mark text { font: 700 7.5px/1 var(--font-text); letter-spacing: 0.1em; fill: var(--paper-ink); stroke: none; }
.stamp__mark .stamp__where { font-size: 12px; letter-spacing: 0.14em; }
.card.is-sent .stamp__mark { opacity: 0.85; transform: rotate(-14deg) scale(1); transition: opacity 120ms ease, transform 260ms cubic-bezier(.3, 1.6, .5, 1); }
.card__addr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.card__addr a { font-weight: 600; }
.card__copy { min-height: 32px; font-size: var(--step-small); font-weight: 600; color: var(--paper-muted); text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 0.07em; transition: color var(--t-hover) ease; }
.card__else { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 6px; font-weight: 600; }
/* the letter: a sentence with blanks in it */
.cform { display: grid; gap: 10px; margin-top: 26px; line-height: 2; }
.cform__line { line-height: 2.5; }
.cform__hi { font-weight: 600; }
.slot { position: relative; display: inline-block; vertical-align: baseline; }
.slot__in { width: 9ch; min-width: 0; padding: 0 2px; background: transparent; color: var(--paper-ink); border: 0; border-bottom: 1.5px solid var(--paper-ink); border-radius: 0; font: inherit; font-weight: 600; line-height: 1.5; }
.slot__in::placeholder { color: var(--paper-muted); font-weight: 400; opacity: 1; }
.slot__in:focus-visible { outline: none; border-bottom-color: var(--accent); }
.slot--msg { display: block; }
.slot--msg .slot__in { display: block; width: 100%; min-height: 6em; padding: 0; resize: vertical; border: 0; font-weight: 400; line-height: 2em; background-image: linear-gradient(transparent calc(2em - 1px), var(--paper-2) calc(2em - 1px)); background-size: 100% 2em; background-attachment: local; } /* taste-skill-ignore: ruled lines of the letter paper */
.slot--msg .slot__in:focus-visible { box-shadow: inset 2px 0 0 var(--accent); } /* taste-skill-ignore: a caret mark for focus */
.cform__line .slot[data-tag="name"] .slot__in { max-width: 14ch; }
/* the reply address sits on its own line, clear of the words above it */
.slot--to { display: block; width: fit-content; max-width: 100%; margin-top: 16px; line-height: 1.8; }
.slot--to .slot__in { width: 18ch; max-width: 100%; }
/* a blank filled in well is read by the detector: a red box locks on and names it */
.slot::before, .slot::after { content: ''; position: absolute; inset: -3px -6px; border: 1.5px solid var(--accent); opacity: 0; transform: scale(1.12); transition: opacity 160ms ease, transform 280ms var(--ease-out); pointer-events: none; }
.slot::after { content: attr(data-tag); inset: auto auto calc(100% + 1px) -6px; border: 0; padding: 0 5px; background: var(--accent); color: var(--paper-ink); font-size: 10px; font-weight: 700; line-height: 15px; letter-spacing: 0.02em; white-space: nowrap; transform: translateY(4px); }
.slot.is-ok::before, .slot.is-ok::after { opacity: 1; transform: none; }
.slot--msg::before { inset: -4px -8px; }
.slot--msg::after { left: -8px; bottom: calc(100% + 4px); }
.topics { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 6px; padding: 0; border: 0; line-height: 1.4; }
.topics label { position: relative; cursor: pointer; }
.topics input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.topics span { display: inline-block; padding: 5px 10px; border: 1.5px solid var(--paper-2); font-size: var(--step-small); font-weight: 600; transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease; }
.topics input:checked + span { border-color: var(--accent); background: var(--accent); }
.topics input:focus-visible + span { outline: 2px solid var(--paper-ink); outline-offset: 2px; }
.cform__status { min-height: 1.5em; font-size: var(--step-small); font-weight: 600; line-height: 1.5; }
.cform__status.is-err { color: var(--paper-accent); }
.cform__send { width: calc(100% + 60px); margin: 8px -30px 0; min-height: 56px; }
.cform__send .busy { display: none; }
.cform__send.is-busy .idle { display: none; }
.cform__send.is-busy .busy { display: inline; }
@media (hover: hover) and (pointer: fine) {
  .card .button:hover { background: var(--paper-ink); color: var(--paper); }
  .card__copy:hover { color: var(--paper-ink); }
  .topics span:hover { border-color: var(--paper-ink); }
}

/* ── links: each kind of destination answers in its own way ── */
.fx-host { position: relative; }
[data-ui].fx { position: absolute; pointer-events: none; color: var(--accent); }
[data-ui].fx svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.fx-host--gh:is(:hover, :focus-visible), .fx-host--dl:is(:hover, :focus-visible) { text-decoration-color: transparent; }
/* GitHub: the underline becomes a strip of contribution squares */
[data-ui].fx-gh { left: 0; top: calc(100% + 1px); display: flex; gap: 2px; }
[data-ui].fx-gh i { width: 7px; height: 7px; background: var(--accent); opacity: 0; transform: scale(0.4); transition: opacity 140ms ease, transform 220ms var(--ease-out); }
.fx-host:is(:hover, :focus-visible) [data-ui].fx-gh i { opacity: var(--a); transform: none; transition-delay: calc(var(--n) * 28ms); }
/* a live demo: a recording light */
[data-ui].fx-live { left: -15px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--accent); opacity: 0; transform: scale(0.6); transition: opacity 160ms ease, transform 240ms var(--ease-out); }
.fx-host:is(:hover, :focus-visible) [data-ui].fx-live { opacity: 1; transform: none; }
/* a download: the underline fills like a progress bar */
[data-ui].fx-dl { left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
/* email: a paper plane leaves from the end of the address */
[data-ui].fx-mail { right: -21px; top: -5px; width: 15px; height: 15px; opacity: 0; }
/* LinkedIn: a request sent, then accepted */
[data-ui].fx-in { left: -21px; top: 50%; width: 14px; height: 14px; margin-top: -7px; }
[data-ui].fx-in .p { opacity: 0; transform-box: fill-box; transform-origin: center; }
[data-ui].fx-in .c { stroke-dasharray: 1; stroke-dashoffset: 1; }
/* résumé: a page slides up from behind the word */
[data-ui].fx-cv { right: -19px; top: -3px; width: 13px; height: 17px; opacity: 0; transform: translateY(9px) rotate(0deg); transition: opacity 160ms ease, transform 380ms cubic-bezier(0.3, 1.5, 0.5, 1); }
[data-ui].fx-cv .s { fill: var(--ink); stroke: var(--bg); }
:is(.card, .menu) [data-ui].fx-cv .s { fill: var(--paper); stroke: var(--paper-ink); }
.fx-host:is(:hover, :focus-visible) [data-ui].fx-cv { opacity: 1; transform: translateY(-3px) rotate(-12deg); }
/* a case study: the arrow, and the project's picture leans in */
[data-ui].fx-case { right: -18px; top: 50%; width: 12px; height: 9px; margin-top: -4px; opacity: 0; transform: translateX(-8px); transition: opacity 160ms ease, transform 320ms var(--ease-out); }
.fx-host:is(:hover, :focus-visible) [data-ui].fx-case { opacity: 1; transform: none; }
.panel:has(.fx-host--case:is(:hover, :focus-visible)) .panel__media { transform: scale(1.045); }
/* the side projects, each in its own manner */
a.fx-host--cloak { transition: color 600ms var(--ease-soft); -webkit-text-stroke: 0.7px transparent; }
a.fx-host--cloak:is(:hover, :focus-visible) { color: transparent; -webkit-text-stroke-color: var(--muted); }
a.fx-host--points { text-decoration: underline dotted transparent; text-decoration-thickness: 0.2em; text-underline-offset: 0.3em; transition: letter-spacing 420ms var(--ease-out), text-decoration-color 200ms ease; }
a.fx-host--points:is(:hover, :focus-visible) { letter-spacing: 0.1em; text-decoration-color: var(--accent); }
a.fx-host--search::after { content: ''; display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -0.17em; background: var(--accent); opacity: 0; }
[data-ui].fx-voice { right: -22px; top: 50%; height: 14px; margin-top: -7px; display: flex; align-items: center; gap: 2px; }
[data-ui].fx-voice i { width: 2px; height: 14px; background: var(--accent); transform: scaleY(0.15); opacity: 0; transition: opacity 160ms ease; }
.fx-swap { position: relative; display: inline-block; }
.fx-swap > span { display: inline-block; transition: opacity 200ms ease, transform 360ms var(--ease-out); }
.fx-swap::after { content: attr(data-alt); position: absolute; right: 0; top: 0; white-space: nowrap; font-style: italic; color: var(--ink); opacity: 0; transform: translateY(60%); transition: opacity 200ms ease, transform 360ms var(--ease-out); }
li:has(> .fx-host--caption:is(:hover, :focus-visible)) .fx-swap > span { opacity: 0; transform: translateY(-60%); }
li:has(> .fx-host--caption:is(:hover, :focus-visible)) .fx-swap::after { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .fx-host:is(:hover, :focus-visible) [data-ui].fx-live { animation: rec 1100ms steps(1) 300ms infinite; }
  .fx-host:is(:hover, :focus-visible) [data-ui].fx-dl { animation: fill-up 1500ms linear forwards; }
  .fx-host:is(:hover, :focus-visible) [data-ui].fx-mail { animation: fly 1100ms var(--ease-out) both; }
  .fx-host:is(:hover, :focus-visible) [data-ui].fx-in .p { animation: req 900ms var(--ease-out) both; }
  .fx-host:is(:hover, :focus-visible) [data-ui].fx-in .c { animation: draw 380ms var(--ease-out) 520ms both; }
  .fx-host--search:is(:hover, :focus-visible)::after { animation: rec 1000ms steps(1) infinite; }
  .fx-host:is(:hover, :focus-visible) [data-ui].fx-voice i { opacity: 1; animation: talk 520ms var(--ease-in-out) infinite alternate; }
  .fx-host:is(:hover, :focus-visible) [data-ui].fx-voice i:nth-child(2) { animation-duration: 380ms; animation-delay: -120ms; }
  .fx-host:is(:hover, :focus-visible) [data-ui].fx-voice i:nth-child(3) { animation-duration: 610ms; animation-delay: -300ms; }
  .fx-host:is(:hover, :focus-visible) [data-ui].fx-voice i:nth-child(4) { animation-duration: 450ms; animation-delay: -60ms; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-host:is(:hover, :focus-visible) [data-ui].fx-dl { transform: none; }
  .fx-host:is(:hover, :focus-visible) [data-ui].fx-in .c { stroke-dashoffset: 0; }
  .fx-host--search:is(:hover, :focus-visible)::after { opacity: 1; }
  .fx-host:is(:hover, :focus-visible) [data-ui].fx-voice i { opacity: 1; transform: scaleY(0.6); }
}
@keyframes rec { 0% { opacity: 1; } 50% { opacity: 0.15; } }
@keyframes fill-up { 0% { transform: scaleX(0); } 22% { transform: scaleX(0.3); } 34% { transform: scaleX(0.33); } 58% { transform: scaleX(0.74); } 70% { transform: scaleX(0.77); } 100% { transform: scaleX(1); } }
@keyframes fly { 0% { opacity: 0; transform: translate(-12px, 7px) scale(0.7); } 22% { opacity: 1; transform: none; } 55% { opacity: 1; transform: translate(12px, -10px) rotate(-6deg); } 100% { opacity: 0; transform: translate(34px, -30px) rotate(-12deg) scale(0.85); } }
@keyframes req { 0% { opacity: 0; transform: rotate(-90deg) scale(0.5); } 30% { opacity: 1; transform: none; } 55% { opacity: 1; transform: rotate(45deg) scale(0.85); } 72%, 100% { opacity: 0; transform: rotate(90deg) scale(0.4); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes talk { from { transform: scaleY(0.15); } to { transform: scaleY(1); } }

/* ── keyboard shortcuts ── */
.keys { width: min(440px, calc(100% - 2 * var(--margin))); max-height: none; padding: 0; border: 0; background: var(--paper); color: var(--paper-ink); }
.keys::backdrop { background: rgba(10, 10, 9, 0.72); }
.keys__card { padding: 30px 30px 0; }
.keys__title { font-family: var(--font-text); font-weight: 300; font-size: var(--step-lead); line-height: 1.15; }
.keys__list { display: grid; gap: 12px; margin-top: 22px; }
.keys__list div { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 16px; }
.keys__list dd { font-size: var(--step-body); }
kbd { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; background: var(--paper-ink); color: var(--paper); font-family: var(--font-text); font-size: 15px; font-weight: 600; line-height: 1; }
.keys__close { width: calc(100% + 60px); margin: 26px -30px 0; min-height: 52px; background: var(--paper-ink); color: var(--paper); font-weight: 600; transition: background-color var(--t-hover) ease; }
.keys__close:focus-visible { outline-offset: -6px; }
.foot__keys { margin-right: 28px; font-size: var(--step-small); font-weight: 600; color: var(--muted); transition: color var(--t-hover) ease; }
.foot__keys kbd { min-width: 24px; height: 24px; margin-right: 6px; background: var(--surface); color: var(--ink); font-size: 13px; }
@media (hover: hover) and (pointer: fine) {
  .keys__close:hover { background: var(--accent); color: var(--accent-ink); }
  .foot__keys:hover { color: var(--ink); }
}
@media (prefers-reduced-motion: no-preference) {
  .keys[open] { animation: rise 420ms var(--ease-out); }
}

/* ── page to page (Chrome and Safari): the picture and title travel into the case study ── */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.bar { view-transition-name: bar; }
/* named only while a transition runs: a named element paints in its own layer, over its neighbours */
.vt-arrive .case-plate { view-transition-name: case-plate; }
.vt-arrive .case-hero__title { view-transition-name: case-title; }
::view-transition-group(*) { animation-duration: 760ms; animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1); }
::view-transition-old(root) { animation: vt-leave 360ms var(--ease-soft) both; }
::view-transition-new(root) { animation: vt-arrive 560ms var(--ease-out) 200ms both; }
::view-transition-old(case-plate), ::view-transition-new(case-plate) { height: 100%; object-fit: cover; }
@keyframes vt-leave { to { opacity: 0; } }
@keyframes vt-arrive { from { opacity: 0; transform: translateY(28px); } }
.vt-arrive .case-hero__title[data-reveal] { opacity: 1; transform: none; transition: none; }

/* ── footer ── */
.foot { padding: 30svh var(--margin) 30px; font-size: var(--step-small); }
/* the end: the signature, and a box that rewinds the page */
.foot__end { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 56px; }
.foot__end .sig { margin-bottom: 0; }
[data-ui].foot__top { position: relative; flex: none; padding: 14px 18px 12px; border: 2px solid var(--accent); font-size: var(--step-body); font-weight: 600; color: var(--ink); }
[data-ui].foot__top i { position: absolute; left: -2px; bottom: 100%; padding: 5px 8px 4px; background: var(--accent); color: var(--accent-ink); font-style: normal; font-size: 13px; line-height: 1; }
[data-ui].foot__top::after { content: '↑'; display: inline-block; margin-left: 10px; transition: transform 260ms var(--ease-out); }
[data-ui].foot__top:is(:hover, :focus-visible)::after { transform: translateY(-4px); }
.foot__facts { margin-bottom: 14px; color: var(--muted); }
.foot__date { color: var(--ink); }
/* the picture credits, folded away until asked for */
.credits { max-width: 68ch; margin-bottom: 40px; color: var(--muted); }
.credits summary { width: fit-content; font-weight: 600; color: var(--muted); cursor: pointer; list-style: none; transition: color var(--t-hover) ease; }
.credits summary::-webkit-details-marker { display: none; }
.credits summary::after { content: '+'; margin-left: 8px; }
.credits[open] summary::after { content: '−'; }
.credits summary:hover { color: var(--ink); }
.credits p { margin-top: 12px; }
.credits a { color: var(--ink); }
.foot__line { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 16px; }
.foot__line > span:first-child { color: var(--muted); }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: 600; }
.foot__line > span:last-child { justify-self: end; color: var(--muted); }

/* ── motion ── */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__name .line > span { transform: translateY(105%); animation: line-up 1000ms var(--ease-out) forwards; animation-delay: calc(var(--i) * 110ms + 150ms); }
  .js [data-rise] { opacity: 0; transform: translateY(18px); animation: rise var(--t-reveal) var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 600ms); }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 75ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  /* boxes lock on: four corners close in, the frame shuts, the label is written, the colour comes back */
  .js :is(.panel, .contact, .case-fig, .read) [data-ui].box::after { opacity: 0; transition: opacity 180ms ease calc(var(--d) + 470ms); }
  .js :is(.panel, .contact, .case-fig, .read) [data-ui].box i { clip-path: inset(0 100% 0 0); transition: clip-path 380ms var(--ease-out) calc(var(--d) + 560ms); }
  .js :is(.panel, .contact, .case-fig, .read) .box__see { opacity: 0; transition: opacity 900ms var(--ease-soft) calc(var(--d) + 520ms); }
  .js :is(.panel, .contact, .case-fig).is-in [data-ui].box::after, .js :is(.panel, .contact, .case-fig).is-in .box__see,
  .js .read [data-ui].box.is-in::after, .js .read [data-ui].box.is-in .box__see { opacity: 1; }
  .js :is(.panel, .contact, .case-fig).is-in [data-ui].box i, .js .read [data-ui].box.is-in i { clip-path: inset(0); }
  .js :is(.panel, .contact, .case-fig).is-in [data-ui] .box__k, .js .read [data-ui].box.is-in .box__k { animation: lock 980ms var(--d) both; }
  .js .read [data-ui].box { --d: 0ms; }
  .js .panel .panel__row > * { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease-out), transform 800ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms + 100ms); }
  .js .panel.is-in .panel__row > * { opacity: 1; transform: none; }
  .js [data-ui].is-formed .hero__scan { animation: scan 1600ms var(--ease-in-out) 150ms both; }
  .js .hero__log li { animation: type 520ms steps(18, end) calc(var(--n) * 180ms + 250ms) both; }
  @supports (animation-timeline: view()) {
    .plate { animation: plate-settle linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; }
    @keyframes plate-settle { from { transform: scale(1.42); } to { transform: scale(1.3); } }
    .plate--whole { animation-name: plate-settle-whole; }
    /* the mountains drift a little slower than the page, so the card seems to stand in front of them */
    .contact .plate { animation: contact-drift linear both; animation-timeline: view(); animation-range: cover; }
    @keyframes contact-drift { from { transform: translateY(-5%) scale(1.14); } to { transform: translateY(5%) scale(1.14); } }
    @keyframes plate-settle-whole { from { transform: scale(1.1); } to { transform: none; } }
  }
}
@keyframes lock {
  0% { opacity: 0; transform: translate(var(--kx), var(--ky)); animation-timing-function: cubic-bezier(0.2, 1.25, 0.45, 1); }
  18% { opacity: 1; }
  52% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}
@keyframes line-up { to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 -2% 0 0); } }
@keyframes scan { 0% { opacity: 1; transform: translateY(-100%); } 88% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  [data-ui] .det__rect, [data-ui] .det__tag, .show__plate, .panel__media { transition: none; }
}

/* ── phone and tablet ── */
@media (max-width: 1024px) {
  .show { height: auto; padding-block: 64px 24px; }
  .show__stage { position: relative; height: auto; display: grid; justify-items: center; row-gap: 0; overflow: visible; padding-inline: var(--margin); }
  .show__title { display: contents; }
  .show__a, .show__b { position: relative; inset: auto; }
  .show__a { order: 1; margin-bottom: 12px; }
  .show__frame { order: 2; position: relative; left: auto; top: auto; transform: none; width: min(72vw, 480px); }
  .show__b { order: 3; margin-top: -0.3em; }
  .show__note { order: 4; position: static; width: 100%; margin-top: 28px; }
  .gestures { order: 5; position: static; width: 100%; margin-top: 28px; }
  .show__marks { display: none; }
  .show__note, .gestures { max-width: 560px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kit__map { grid-template-columns: 1fr; row-gap: 48px; }
  .built__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile, .tile--points { grid-column: span 1; }
  .tile--points { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .hero { height: 240svh; }
  .hero__name { top: 68px; font-size: 19.5vw; white-space: normal; }
  .hero__name .w { display: block; }
  .hero__portrait { top: calc(68px + 15vw); height: auto; width: 80vw; }
  .hero__seen { top: calc(68px + 15vw + 120vw + 10px); left: 10vw; right: auto; width: auto; text-align: left; }
  .hero__intro { bottom: 20px; max-width: none; right: var(--margin); }
  .hero__log, .hero__hint { display: none; }
  .hero__res { top: calc(68px + 15vw + 120vw + 38px); left: 10vw; right: auto; width: 160px; }
  .hero__now { top: calc(68px + 15vw + 120vw + 50px); bottom: auto; left: 10vw; right: auto; align-items: flex-start; }
  [data-ui].hero__open { margin-top: 30px; padding: 8px 10px 5px; }
  .hero__word { font-size: 1.6rem; }
  .hero__hello { display: none; }

  .panel { position: relative; height: auto; container-type: normal; background: var(--bg); }
  .panel__media { position: relative; height: 72svh; container-type: size; }
  .panel__row { position: relative; top: auto; height: 84px; margin-top: -84px; grid-template-columns: 1fr auto; grid-template-areas: "title title" "year fact"; row-gap: 4px; align-content: center; }
  .panel__title { grid-area: title; }
  .panel__year { grid-area: year; }
  .panel__fact { grid-area: fact; }
  .panel__body { position: static; max-width: none; padding: 20px var(--margin) 56px; background: none; }



  .kit, .built { margin-top: 110px; }
  .built__grid { grid-template-columns: 1fr; }
  .tile, .tile--points { grid-column: auto; }
  .tile--points [data-ui].tile__stage, .tile--voice [data-ui].tile__stage { height: 300px; }

  .contact { height: auto; padding-bottom: 8px; }
  .contact__media { position: relative; height: 72svh; }
  .card { width: auto; margin: -96px var(--margin) 0; }
  .contact__title { top: 26svh; }

  .foot { padding-top: 20svh; padding-bottom: 24px; }
  .foot__line { grid-template-columns: 1fr; gap: 8px; }
  .foot__end { flex-direction: column; align-items: flex-start; gap: 40px; }
  .contact__title { max-width: none; font-size: 17vw; }
  .foot__line > span:last-child { justify-self: start; }
}

/* ── signature: the outlines are revealed by three pen strokes in a mask ── */
.sig { display: block; width: min(560px, 74vw); height: auto; margin-bottom: 56px; color: var(--ink); overflow: visible; }
.sig__ink { fill: currentColor; }
.sig__pen { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; }
.sig__pen--1, .sig__pen--2 { stroke-width: 440; }
.sig__pen--3 { stroke-width: 90; }
@media (prefers-reduced-motion: no-preference) {
  .js .sig .sig__pen { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .js .sig.is-in .sig__pen--1 { animation: pen 900ms cubic-bezier(0.5, 0.1, 0.4, 1) 200ms forwards; }
  .js .sig.is-in .sig__pen--2 { animation: pen 1500ms cubic-bezier(0.5, 0.1, 0.4, 1) 1250ms forwards; }
  .js .sig.is-in .sig__pen--3 { animation: pen 700ms cubic-bezier(0.6, 0, 0.3, 1) 2850ms forwards; }
}
@keyframes pen { to { stroke-dashoffset: 0; } }

/* ── first visit: "loading the model", then the box hands over to the hero ── */
.intro { display: none; position: fixed; inset: 0; z-index: 90; background: var(--bg); transition: opacity 460ms var(--ease-out); }
.intro-on .intro, .intro.is-out { display: block; }
.intro-on .intro { animation: intro-safety 0s linear 6s forwards; }
.intro.is-out { opacity: 0; pointer-events: none; }
@keyframes intro-safety { to { opacity: 0; visibility: hidden; } }
[data-ui].intro__box { position: absolute; left: 50%; top: 50%; width: 0; height: 0; border: 3px solid var(--accent); opacity: 0; transform: scale(0.14); transition: transform 1000ms var(--ease-in-out), opacity 240ms ease; }
.intro.is-growing [data-ui].intro__box { opacity: 1; transform: none; }
[data-ui] .intro__label { position: absolute; left: 0; bottom: 0; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px; line-height: 1; padding: 6px 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.intro-on .hero, .intro-on .hero * { animation-play-state: paused !important; }

/* ── case studies ── */
.case-hero { padding: clamp(120px, 20svh, 210px) var(--margin) 56px; }
.case-hero__title { width: fit-content; font-family: var(--font-display); font-size: var(--step-display); line-height: 0.86; letter-spacing: -0.01em; text-transform: uppercase; }
.case-hero__lede { max-width: 30em; margin-top: 32px; font-size: var(--step-lead); line-height: 1.3; }
.case-facts { display: flex; flex-wrap: wrap; gap: 18px 56px; margin-top: 44px; font-size: var(--step-small); }
.case-facts dt { color: var(--muted); }
.case-facts dd { font-weight: 600; }
.case-facts a { font-weight: 600; }
.case-plate { position: relative; height: 82svh; overflow: hidden; container-type: size; background: var(--surface); }
.case-sec { display: grid; grid-template-columns: 34% minmax(0, 1fr); column-gap: var(--gutter); padding: var(--section) var(--margin) 0; }
.case-sec__head { font-family: var(--font-text); font-size: var(--step-lead); font-weight: 600; line-height: 1.2; }
.case-sec__body { min-width: 0; max-width: 46em; }
.case-sec__body > p + p, .case-sec__body > p + .case-list, .case-sec__body > * + .case-note { margin-top: 16px; }
.case-figure { display: block; font-family: var(--font-display); font-size: var(--step-display); line-height: 0.86; letter-spacing: -0.01em; color: var(--accent); }
.case-figure + p { margin-top: 24px; font-size: var(--step-lead); line-height: 1.3; }
.steps { display: grid; row-gap: 26px; }
.steps li { display: grid; grid-template-columns: minmax(7rem, 22%) 1fr; column-gap: var(--gutter); }
.steps b { font-family: var(--font-display); font-weight: 400; font-size: var(--step-lead); line-height: 1.1; text-transform: uppercase; letter-spacing: 0.02em; }
.case-list { padding-left: 1.1em; }
.case-list li + li { margin-top: 8px; }
.case-note { color: var(--muted); font-size: var(--step-small); }
.case-table { width: 100%; border-collapse: collapse; font-size: var(--step-small); font-variant-numeric: tabular-nums; }
.case-table caption { text-align: left; color: var(--muted); padding-bottom: 12px; caption-side: top; }
.case-table th, .case-table td { text-align: left; padding: 11px 14px 11px 0; border-top: 1px solid #333; vertical-align: top; }
.case-table thead th { color: var(--muted); font-weight: 400; border-top: 0; }
.case-table td.best { color: var(--accent); font-weight: 600; }
.case-wide { overflow-x: auto; }
.case-sec pre { margin: 0; padding: 20px 22px; background: var(--surface); overflow-x: auto; font-size: var(--step-small); line-height: 1.6; }
.case-sec code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; }
.case-next { display: block; margin-top: var(--section); padding: 72px var(--margin) 80px; background: var(--surface); text-decoration: none; }
.case-next__label { display: block; font-size: var(--step-small); font-weight: 600; color: var(--muted); }
.case-next__title { display: block; width: fit-content; margin-top: 18px; font-family: var(--font-display); font-size: var(--step-head); line-height: 0.9; text-transform: uppercase; transition: color var(--t-hover) ease, transform 600ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .case-next:hover .case-next__title { color: var(--accent); transform: translateX(12px); } }

/* autoportal's own menu, as it appears in the menu bar */
[data-ui].tray { width: min(300px, 100%); padding: 6px; border: 1px solid #3a3a3a; border-radius: 10px; background: #232323; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5); font-size: 14px; line-height: 1.2; }
[data-ui] .tray__status { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px; color: #bdbdbd; border-bottom: 1px solid #3a3a3a; margin-bottom: 6px; }
[data-ui] .tray__dot { width: 9px; height: 9px; border-radius: 50%; background: #34c759; }
[data-ui] .tray li { padding: 7px 10px; border-radius: 6px; }
[data-ui] .tray li.is-hot { background: #3b6ee8; color: #fff; }
[data-ui] .tray li.is-sep { height: 1px; padding: 0; margin: 6px 4px; background: #3a3a3a; }
.case-split { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: start; }

@media (max-width: 1024px) {
  .case-sec { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
  .case-split { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .steps li { grid-template-columns: 1fr; row-gap: 6px; }
  .case-plate { height: 64svh; }
  .case-plate .panel__media { position: absolute; inset: 0; height: auto; }
  .case-facts { gap: 14px 32px; }
}

/* pairs of pictures inside a case study */
.case-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); padding: var(--section) var(--margin) 0; }
.case-fig { margin: 0; }
.case-fig__frame { position: relative; aspect-ratio: 4 / 3; overflow: hidden; container-type: size; background: var(--surface); }
.case-fig figcaption { max-width: 52ch; margin-top: 12px; font-size: var(--step-small); color: var(--muted); }
[data-ui].box.is-below i { bottom: auto; top: 100%; }
.case-sec__body > p { max-width: 38em; }
.case-next__title + .case-next__label { margin-top: 14px; }
@media (max-width: 760px) { .case-pair { grid-template-columns: 1fr; row-gap: 40px; } }
[data-ui].tray ul { margin: 0; padding: 0; list-style: none; }
.case-figure + p + .case-split, .case-figure + p + p { margin-top: 24px; }
.case-list { padding-left: 0; }

/* ── résumé: one sheet of paper on the dark page; printed, it stands alone ── */
.cv { padding: clamp(108px, 16svh, 160px) var(--margin) 0; }
.cv__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; max-width: 920px; margin: 0 auto 52px; }
.cv__note { font-size: var(--step-small); color: var(--muted); }
.sheet { position: relative; max-width: 920px; margin: 0 auto; padding: clamp(26px, 5.5vw, 68px); background: var(--paper); color: var(--paper-ink); font-size: 16px; line-height: 1.45; }
[data-ui].sheet__tag { position: absolute; left: 0; bottom: 100%; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 13px; line-height: 1; padding: 5px 7px; }
.sheet__name { font-family: var(--font-display); font-weight: 400; font-size: 4.25em; line-height: 0.9; text-transform: uppercase; }
.sheet__role { margin-top: 0.9em; font-weight: 600; }
.sheet__contact { display: flex; flex-wrap: wrap; gap: 0.2em 1.4em; margin-top: 0.4em; }
.sheet a { color: inherit; text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 0.07em; }
.sheet__more a { margin-left: 0.3em; font-weight: 600; }
.sheet__sec { display: grid; grid-template-columns: 21% minmax(0, 1fr); column-gap: var(--gutter); margin-top: 2.2em; }
.sheet__h { font-family: var(--font-text); font-size: 1em; font-weight: 600; line-height: 1.45; color: var(--paper-accent); }
.sheet__body { display: grid; gap: 0.95em; }
.sheet__when { float: right; margin-left: 1em; color: var(--paper-muted); font-variant-numeric: tabular-nums; }
.sheet__skills { display: grid; gap: 0.35em; }
.sheet__skills div { display: grid; grid-template-columns: 9em minmax(0, 1fr); column-gap: 1em; }
.sheet__skills dt { font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .sheet a:hover { color: var(--paper-accent); } }
@media (max-width: 760px) {
  .sheet { font-size: 15px; }
  .sheet__name { font-size: 3em; }
  .sheet__sec { grid-template-columns: minmax(0, 1fr); row-gap: 0.5em; }
  .sheet__when { float: none; display: block; margin: 0; }
  .sheet__skills div { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  @page { size: A4; margin: 12mm 14mm; }
  html, body { background: #fff; }
  .bar, .menu, .skip, .foot, .cv__actions, .keys, .sheet__tag { display: none !important; }
  .cv { padding: 0; }
  .sheet { max-width: none; margin: 0; padding: 0; background: none; font-size: 9.3pt; line-height: 1.36; }
  .sheet__name { font-size: 3.1em; }
  /* a printed A4 page is narrower than the phone breakpoint, so the two columns are set again here */
  .sheet__sec { grid-template-columns: 17% minmax(0, 1fr); row-gap: 0; margin-top: 1.25em; break-inside: avoid; }
  .sheet__when { float: right; display: inline; margin-left: 1em; }
  .sheet__skills div { grid-template-columns: 8.5em minmax(0, 1fr); }
  .sheet__body { gap: 0.55em; }
  .sheet a { text-decoration-thickness: 0.05em; }
}

/* ── 404: the detector searches the page, and finds nothing ── */
.lost { min-height: 100svh; display: grid; align-content: center; justify-items: center; padding: 120px var(--margin) 64px; text-align: center; }
.lost__stage { position: relative; margin-bottom: 56px; }
.lost__num { display: block; font-family: var(--font-display); font-size: var(--step-display); line-height: 0.86; color: var(--muted); }
[data-ui].lost__box { position: absolute; inset: -16px -22px; border: 2px solid var(--accent); }
[data-ui].lost__box i { position: absolute; left: -2px; bottom: 100%; background: var(--accent); color: var(--accent-ink); font-style: normal; font-weight: 600; font-size: 14px; line-height: 1; padding: 6px 8px; white-space: nowrap; }
[data-ui].lost__box .lost__seek { display: none; }
.lost__title { font-family: var(--font-display); font-size: var(--step-head); line-height: 0.92; text-transform: uppercase; }
.lost__text { max-width: 34em; margin-top: 22px; }
.lost__path { font-weight: 600; overflow-wrap: anywhere; }
.lost__links { display: grid; justify-items: center; gap: 26px; margin-top: 34px; }
.lost__links p { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 30px; font-weight: 600; }
.foot--short { padding-top: 12svh; }
@media (prefers-reduced-motion: no-preference) {
  .js [data-ui].lost__box { animation: roam 3400ms var(--ease-in-out) 300ms both; }
  .js [data-ui].lost__box .lost__seek { display: block; animation: vanish 0s linear 3500ms forwards; }
  .js [data-ui].lost__box .lost__found { visibility: hidden; animation: appear 0s linear 3500ms forwards; }
}
@keyframes roam {
  0% { opacity: 0; transform: translate(-34vw, -16svh) scale(0.42); }
  8% { opacity: 1; }
  30% { transform: translate(27vw, 12svh) scale(0.55); }
  56% { transform: translate(-17vw, 20svh) scale(0.38); }
  80% { transform: translate(3vw, -3svh) scale(1.06); }
  100% { opacity: 1; transform: none; }
}
@keyframes vanish { to { visibility: hidden; } }
@keyframes appear { to { visibility: visible; } }

@keyframes card-in { from { opacity: 0; transform: translateY(14px); } }

/* ── signing in the air (Gesture Cursor demo) ── */
.show__ink { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.button--ink { background: var(--ink); color: var(--bg); }
.show__sign { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; font-weight: 600; }
.show__sign button[disabled] { opacity: 0.45; cursor: default; }
@media (hover: hover) and (pointer: fine) { .button--ink:hover { background: var(--accent); color: var(--accent-ink); } }

/* ── case studies: the live parts, each on its own band ── */
.case-demo { margin-top: var(--section); padding: 64px var(--margin) 72px; background: var(--surface); }
.case-demo__head { display: grid; grid-template-columns: 34% minmax(0, 1fr); column-gap: var(--gutter); margin-bottom: 40px; }
.case-demo__lede { max-width: 34em; font-size: var(--step-lead); line-height: 1.3; }
.case-demo__note { margin-top: 18px; }
@media (max-width: 1024px) { .case-demo__head { grid-template-columns: minmax(0, 1fr); row-gap: 16px; } }

/* MedLens reads one strip */
.read { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.read__photo { position: relative; aspect-ratio: 16 / 9; overflow: hidden; container-type: size; background: var(--bg); }
.read__scan { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.read__scan::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); }
.read__steps { display: flex; gap: 8px; font-size: var(--step-small); font-weight: 600; }
.read__steps li { padding: 6px 12px; background: var(--bg); color: var(--muted); }
.read__steps li.is-on { background: var(--accent); color: var(--accent-ink); }
.read__raw { display: grid; gap: 2px; min-height: 8.6em; margin-top: 22px; font-size: var(--step-small); color: var(--muted); }
.read__raw mark { background: none; color: var(--accent); font-weight: 600; }
.read__fields { display: grid; gap: 8px; margin-top: 20px; }
.read__fields div { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 12px; }
.read__fields dt { color: var(--muted); }
.read__fields dd { font-weight: 600; }
.read__next { margin-top: 20px; font-size: var(--step-small); color: var(--muted); }
.read__again { margin-top: 18px; font-weight: 600; }
.read__again[disabled] { opacity: 0.4; cursor: default; }
@media (prefers-reduced-motion: no-preference) {
  .js .read__fields div dd, .js .read__next { opacity: 0; transform: translateY(8px); transition: opacity 300ms ease, transform 420ms var(--ease-out); }
  .js .read__fields div.is-in dd, .js .read__next.is-in { opacity: 1; transform: none; }
  .read__scan.is-on { animation: scan-read 1500ms var(--ease-in-out) both; }
}
@keyframes scan-read { 0% { opacity: 1; transform: translateY(0); } 90% { opacity: 1; transform: translateY(calc(100% - 3px)); } 100% { opacity: 0; transform: translateY(calc(100% - 3px)); } }
@media (max-width: 1024px) { .read { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

/* SV-RAG: scrub the gallop */
.scrub { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px 40px; align-items: start; }
[data-ui].scrub__view { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg); cursor: ew-resize; touch-action: pan-y; }
.scrub__view img, .scrub__view canvas { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter 200ms ease, opacity 200ms ease; }
.scrub:not(.is-kept) .scrub__view canvas { opacity: 0.55; }
[data-ui].scrub__view::after { content: ''; position: absolute; inset: 0; border: 3px solid var(--accent); opacity: 0; transition: opacity 160ms ease; }
.scrub.is-kept [data-ui].scrub__view::after { opacity: 1; }
[data-ui] .scrub__tag { position: absolute; left: 0; top: 0; z-index: 1; padding: 6px 8px; background: var(--muted); color: var(--bg); font-size: 14px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.scrub.is-kept [data-ui] .scrub__tag { background: var(--accent); color: var(--accent-ink); }
.scrub__read { min-height: 4.5em; font-size: var(--step-body); }
.scrub__k { display: grid; grid-template-columns: 1fr auto; align-items: baseline; row-gap: 10px; margin-top: 26px; font-weight: 600; }
.scrub__k output { font-family: var(--font-display); font-size: var(--step-lead); font-weight: 400; color: var(--accent); }
.scrub__k input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.scrub__side .case-note { margin-top: 22px; }
.scrub__strip { position: relative; grid-column: 1 / -1; }
.scrub__thumbs { display: grid; grid-template-columns: repeat(31, minmax(0, 1fr)); gap: 3px; }
.scrub__thumbs span { position: relative; aspect-ratio: 3 / 2; background-image: url(gallop-frames.webp); background-size: 400% 300%; filter: grayscale(1); opacity: 0.4; transition: opacity 160ms ease; }
.scrub__thumbs span.is-kept { opacity: 1; }
.scrub__thumbs span.is-kept { outline: 2px solid var(--accent); outline-offset: -2px; }
.scrub__thumbs span.is-here { opacity: 1; transform: translateY(-5px); }
.scrub__range { position: absolute; inset: -6px 0; width: 100%; height: calc(100% + 12px); margin: 0; opacity: 0; cursor: ew-resize; }
.scrub__strip:has(.scrub__range:focus-visible) { outline: 2px solid var(--accent); outline-offset: 6px; }
@media (max-width: 1024px) { .scrub { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .scrub__thumbs { gap: 1px; } }

/* autoportal wakes up */
.wake { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 40px; align-items: start; }
[data-ui].wake__screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #2a2c30 url(wallpaper-spiti.webp) center / cover no-repeat; transition: background-color 500ms ease; }
[data-ui].wake__screen::before { content: ''; position: absolute; inset: 0; background: rgba(5, 5, 5, 0.42); transition: background-color 600ms ease; }
[data-ui] .wake__bar { position: relative; display: flex; justify-content: flex-end; align-items: center; gap: 14px; height: 30px; padding: 0 14px; background: rgba(20, 20, 22, 0.72); color: #e8e8e8; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; transition: opacity 400ms ease; }
[data-ui] .wake__wifi svg { display: block; width: 18px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
[data-ui] .wake__icon { width: 15px; height: 15px; border: 2px solid currentColor; border-radius: 4px; position: relative; }
[data-ui] .wake__icon::after { content: ''; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: #34c759; }
[data-ui].wake__menu { position: absolute; right: 54px; top: 34px; transition: opacity 300ms ease, transform 400ms var(--ease-out); }
[data-ui] .wake__sleep { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; color: #6a6a6a; font-size: var(--step-small); font-weight: 600; opacity: 0; transition: opacity 300ms ease; }
[data-ui].wake__screen[data-state="asleep"]::before { background: #050505; }
[data-ui].wake__screen[data-state="asleep"] .wake__bar, [data-ui].wake__screen[data-state="asleep"] .wake__menu { opacity: 0; transform: translateY(-6px); }
[data-ui].wake__screen[data-state="asleep"] .wake__sleep { opacity: 1; }
[data-ui].wake__screen[data-state="woke"] .tray__dot, [data-ui].wake__screen[data-state="woke"] .wake__icon::after { background: #8e8e93; }
[data-ui].wake__screen[data-state="signing"] .tray__dot, [data-ui].wake__screen[data-state="signing"] .wake__icon::after { background: #ff9f0a; }
.wake__log { display: grid; gap: 12px; min-height: 9.5em; padding-left: 0; list-style: none; font-size: var(--step-small); }
.wake__log b { display: block; color: var(--muted); font-variant-numeric: tabular-nums; }
.wake__again { margin-top: 20px; font-weight: 600; }
.wake__again[disabled] { opacity: 0.4; cursor: default; }
.wake__side .case-note { margin-top: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .wake__log li { animation: card-in 420ms var(--ease-out) both; }
  [data-ui].wake__screen[data-state="signing"] .tray__dot { animation: rec 700ms steps(1) infinite; }
}
@media (max-width: 1024px) { .wake { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
@media (max-width: 760px) {
  [data-ui].wake__screen { aspect-ratio: 1 / 1; }
  [data-ui].wake__menu { right: 10px; transform-origin: top right; scale: 0.84; }
  .read [data-ui].box i { display: none; }
  .scrub__range { inset: -18px 0; height: calc(100% + 36px); }
}
