/* ==========================================================================
   Dean Cameo — portfolio
   A record of shipped work. Evidence carries the type; the page carries none
   of the atmosphere it used to. Flat ground, no halo, no glow, no belts.
   ========================================================================== */

:root {
  /* light is the default (Dean, 2026-11-16); dark is opt-in via the nav toggle */
  --void:    #f6f5f2;
  --surface: #ffffff;
  --raised:  #eceae4;
  --line:    rgba(0, 0, 0, 0.12);
  --line-2:  rgba(0, 0, 0, 0.26);
  --text:    #14161b;
  --text-2:  #4a505d;
  --text-3:  #5d6473;

  /* per-project light. --accent paints surfaces; --accent-ink is the text-safe
     partner, because the bright values fail contrast as small text. */
  --accent:     #58a6ff;
  --accent-ink: #1d4ed8;

  /* the hero's dot field reads these, so it follows the theme */
  --field-bg: var(--void);
  --field-c1: #4d80ff;
  --field-c2: #997afa;

  --display: 'Bricolage Grotesque', Georgia, serif;
  --font:    'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --shell: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --nav-h: 86px;

  --r: 8px;
  --r-lg: 14px;
  --pill: 999px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t: 0.35s var(--ease);

  --shadow: 0 16px 36px -24px rgba(0, 0, 0, 0.4);
  --shadow-lift: 0 24px 50px -26px rgba(0, 0, 0, 0.45);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --void:    #0b0c10;
  --surface: #121419;
  --raised:  #181b22;
  --line:    rgba(255, 255, 255, 0.10);
  --line-2:  rgba(255, 255, 255, 0.22);
  --text:    #eceef3;
  --text-2:  #aab1bf;
  --text-3:  #8a92a1;
  --accent-ink: #78b6ff;
  --field-c1: #5b8cff;
  --field-c2: #a78bfa;
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.85);
  --shadow-lift: 0 26px 56px -24px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--line-2) transparent;
  accent-color: var(--accent-ink);
}
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 3px solid var(--void); }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

body {
  background: var(--void);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
  caret-color: var(--accent-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; text-underline-offset: 0.22em; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent-ink); color: #fff; }

/* ---------- Type ---------- */
h1, h2 { text-wrap: balance; }
.display {
  font-family: var(--display);
  font-size: clamp(2.6rem, 6.4vw, 5.5rem);   /* caps at 88px, under the 96px ceiling */
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-optical-sizing: auto;
}
h2 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.03em;
}
h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.012em; line-height: 1.35; }
.num { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.035em; }

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }
.band { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.band__head { margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 54ch; }
.band__head p { color: var(--text-2); margin-top: 0.875rem; max-width: 60ch; font-size: 0.9375rem; }

/* ---------- Reveal (visible until JS proves it can animate) ---------- */
.js-rv .rv { clip-path: inset(0 0 100% 0); transform: translateY(14px); opacity: 0; }
.js-rv .rv.in {
  clip-path: inset(0 0 -12% 0); transform: none; opacity: 1;
  transition: clip-path 0.85s var(--ease), transform 0.85s var(--ease), opacity 0.6s var(--ease);
}
.js-rv .rv-1.in { transition-delay: 0.07s; }
.js-rv .rv-2.in { transition-delay: 0.14s; }
.js-rv .rv-3.in { transition-delay: 0.21s; }

/* ---------- Nav: one floating capsule ---------- */
.nav {
  position: fixed; inset: 10px 0 auto 0; z-index: 60;
  display: flex; justify-content: center; padding-inline: var(--gutter);
  pointer-events: none;
}
.nav__in {
  pointer-events: auto;
  width: 100%; max-width: 1160px; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 9px 0 24px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  /* blurred because it rides over the work, not for the look of glass */
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 12px 28px -20px rgba(10, 16, 40, 0.35);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.nav.is-stuck .nav__in { background: color-mix(in srgb, var(--surface) 88%, transparent); border-color: var(--line-2); box-shadow: 0 16px 34px -20px rgba(10, 16, 40, 0.5); }
.nav__mark { display: flex; align-items: center; gap: 0.75rem; font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; font-size: 1.25rem; }
.nav__mark img { width: 26px; height: 26px; transition: transform 0.6s var(--ease); }
.nav__mark:hover img { transform: rotate(90deg); }
.nav__links { position: relative; display: flex; gap: 2px; }
.nav__links a {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; height: 46px; padding-inline: 1.25rem;
  border-radius: var(--pill); font-size: 1.0625rem; font-weight: 500; color: var(--text-2);
  transition: color var(--t);
}
.nav__links a:hover, .nav__links a[aria-current] { color: var(--text); }
.nav__links a[aria-current] { background: var(--raised); }
/* with JS, one highlight slides between the links instead */
.js-nav .nav__links a[aria-current] { background: none; }
.nav__hl {
  position: absolute; top: 0; left: 0; height: 46px; width: var(--w, 0px);
  border-radius: var(--pill); background: var(--raised);
  transform: translateX(var(--x, 0px));
  transition: transform 0.4s var(--ease), width 0.4s var(--ease), opacity 0.25s var(--ease);
}
.nav__tools { display: flex; align-items: center; gap: 0.375rem; }
.icon-btn {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: var(--pill); color: var(--text-2);
  transition: background var(--t), color var(--t);
}
.icon-btn:hover { background: var(--raised); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.5s var(--ease); }
.icon-btn:hover svg { transform: rotate(18deg); }
.icon-moon { display: block; } .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
.nav__cta {
  display: inline-flex; align-items: center; height: 48px; padding-inline: 1.5rem;
  border-radius: var(--pill); background: var(--text); color: var(--void);
  font-size: 0.9375rem; font-weight: 600;
  transition: background var(--t);
}
.nav__cta:hover { background: var(--accent-ink); color: #fff; }
:root[data-theme="dark"] .nav__cta:hover { color: #0b0c10; }
.nav__burger { display: none; }
.nav__mobile { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 46px; padding-inline: 1.5rem;
  border-radius: var(--pill);
  font-size: 0.9375rem; font-weight: 600;
  border: 1px solid transparent;
  transform: translate(var(--mx, 0px), var(--my, 0px));
  transition: background var(--t), border-color var(--t), color var(--t), transform 0.35s var(--ease);
}
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.btn--solid { background: var(--text); color: var(--void); }
.btn--solid:hover { background: var(--text-2); }
.btn--line { border-color: var(--line-2); color: var(--text); }
.btn--line:hover { border-color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }

.hero__sub { font-size: clamp(1rem, 1.35vw, 1.1875rem); color: var(--text-2); max-width: 46ch; line-height: 1.55; margin-bottom: 1.75rem; text-wrap: pretty; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* evidence: four checkable claims at display size, each linking to its case */
.proof { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.proof__i {
  position: relative; display: flex; flex-direction: column; gap: 0.375rem;
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 2vw, 1.75rem) clamp(1.5rem, 3vw, 2.25rem);
  border-left: 1px solid var(--line);
  transition: background var(--t);
}
.proof__i:first-child { border-left: 0; padding-left: 0; }
.proof__n {
  font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums;
  font-size: clamp(2.5rem, 5.6vw, 4.75rem); line-height: 0.95; letter-spacing: -0.04em;
  color: var(--text); transition: color var(--t), transform 0.5s var(--ease);
}
.proof__l { font-size: 0.9375rem; color: var(--text-2); max-width: 18ch; }
/* three plain facts, not links: the figure sits above its label */
.proof--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.proof--3 .proof__n { order: -1; margin: 0; }
.proof--3 .proof__l { max-width: 24ch; text-wrap: pretty; }
.proof__go { position: absolute; top: clamp(1.5rem, 3vw, 2.5rem); right: clamp(1rem, 2vw, 1.75rem); width: 22px; height: 22px; fill: none; stroke: var(--accent-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: translate(-8px, 8px); transition: opacity var(--t), transform 0.5s var(--ease); }
a.proof__i:hover .proof__n, a.proof__i:focus-visible .proof__n { color: var(--accent-ink); transform: translateX(4px); }
a.proof__i:hover .proof__go, a.proof__i:focus-visible .proof__go { opacity: 1; transform: none; }

/* ---------- Work deck ---------- */
/* Per-project light. Each card owns a surface accent and a text-safe ink, and
   the light theme replaces the ink because the bright values fail as text. */
[data-p="1"] { --accent: #22b8e6; --accent-ink: #0e7490; }
[data-p="2"] { --accent: #7c86ff; --accent-ink: #4338ca; }
[data-p="3"] { --accent: #58a6ff; --accent-ink: #1d4ed8; }
[data-p="4"] { --accent: #8f9bff; --accent-ink: #3f51d6; }
[data-p="5"] { --accent: #3b9dff; --accent-ink: #075985; }
:root[data-theme="dark"] [data-p="1"], :root[data-theme="dark"][data-p="1"] { --accent-ink: #4fd8ef; }
:root[data-theme="dark"] [data-p="2"], :root[data-theme="dark"][data-p="2"] { --accent-ink: #959dff; }
:root[data-theme="dark"] [data-p="3"], :root[data-theme="dark"][data-p="3"] { --accent-ink: #78b6ff; }
:root[data-theme="dark"] [data-p="4"], :root[data-theme="dark"][data-p="4"] { --accent-ink: #a3b1ff; }
:root[data-theme="dark"] [data-p="5"], :root[data-theme="dark"][data-p="5"] { --accent-ink: #38bdf8; }

.deck { position: relative; padding-top: clamp(3.5rem, 8vw, 6rem); padding-bottom: 12vh; }

/* Each card is the hero in miniature: copy on the page's own surface, and the
   shipped thing standing on the same field of dots, in that project's blue. */
.card {
  position: sticky;
  top: calc(var(--nav-h) + 1.75rem + var(--i) * 14px);
  margin-bottom: 6vh;
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(0, 1fr);
  min-height: clamp(440px, 64vh, 620px);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform-origin: 50% 0%;
  will-change: transform;
}
/* A card that has been covered sinks into the page. A veil in the page's own
   colour does it; opacity would let the cards underneath read through. */
.card::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: var(--void); opacity: var(--dim, 0);
}
.card__body {
  position: relative; z-index: 1;
  padding: clamp(1.5rem, 3.2vw, 3rem);
  display: flex; flex-direction: column; justify-content: center; gap: 0.75rem;
}
.card__t { font-family: var(--display); font-size: clamp(1.6rem, 2.9vw, 2.5rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.03; text-wrap: balance; }
.card__ctx { font-size: 0.875rem; color: var(--text-3); margin-top: -0.25rem; }
.card__d { color: var(--text-2); font-size: 1rem; line-height: 1.6; max-width: 42ch; text-wrap: pretty; }

/* the outcome and the build time, in the project's ink */
.card__m { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin-top: 0.5rem; }
.card__fig b { display: block; font-family: var(--display); font-size: clamp(1.375rem, 2.1vw, 1.875rem); font-weight: 600; letter-spacing: -0.03em; color: var(--accent-ink); line-height: 1.1; }
.card__fig span { font-size: 0.8125rem; color: var(--text-3); }
.card__cap { font-size: 0.8125rem; color: var(--text-3); border-top: 1px solid var(--line); padding-top: 0.875rem; margin-top: 0.375rem; max-width: 48ch; text-wrap: pretty; }
.card__go {
  align-self: start; margin-top: 0.5rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
  height: 42px; padding-inline: 1.125rem;
  border-radius: var(--pill);
  font-size: 0.875rem; font-weight: 600; color: var(--text);
  border: 1px solid var(--line-2);
  transition: background var(--t), border-color var(--t), color var(--t), gap var(--t);
}
.card__go svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.card:hover .card__go, .card:focus-visible .card__go { background: var(--text); border-color: var(--text); color: var(--surface); gap: 0.75rem; }

/* ---------- The stage: where the shipped thing stands ---------- */
/* A well set into the card, with one plain form behind the work, a different
   one for each project, in two tones of the same colour. The palette is set
   on the deck, so the whole set changes together. */
[data-stage="tint"] .stage { --stage: color-mix(in srgb, var(--accent) 17%, #fff); --shape: color-mix(in srgb, var(--accent) 36%, #fff); }
[data-stage="paper"] .stage { --stage: #ece9e2; --shape: #ddd9cf; }
[data-stage="ink"] .stage { --stage: color-mix(in srgb, var(--accent) 13%, #0f1219); --shape: color-mix(in srgb, var(--accent) 30%, #0f1219); }
:root[data-theme="dark"] [data-stage="tint"] .stage, :root[data-theme="dark"][data-stage="tint"] .stage { --stage: color-mix(in srgb, var(--accent) 16%, #14161c); --shape: color-mix(in srgb, var(--accent) 32%, #14161c); }
:root[data-theme="dark"] [data-stage="paper"] .stage, :root[data-theme="dark"][data-stage="paper"] .stage { --stage: #1b1e25; --shape: #262a33; }
:root[data-theme="dark"] [data-stage="ink"] .stage, :root[data-theme="dark"][data-stage="ink"] .stage { --stage: color-mix(in srgb, var(--accent) 10%, #07080b); --shape: color-mix(in srgb, var(--accent) 24%, #07080b); }

.stage {
  position: relative; overflow: hidden; isolation: isolate;
  container-type: size;
  min-height: 260px;
  margin: 0.625rem; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--stage, var(--raised));
}
.stage::before {
  content: ""; position: absolute; z-index: -1; background: var(--shape);
  transform: scale(calc(0.8 + 0.2 * var(--e, 1))); transition: transform 0.7s var(--ease);
}
/* 1 a disc · 2 an arch, like the lit ones · 3 ripples · 4 the tracker's blocks · 5 a quarter turn */
[data-p="1"] .stage::before { width: 92cqh; aspect-ratio: 1; border-radius: 50%; left: 50%; top: 50%; translate: -46% -50%; }
[data-p="2"] .stage::before { width: 62cqh; height: 92cqh; left: 50%; bottom: 0; translate: -50% 0; border-radius: 999px 999px 0 0; transform-origin: 50% 100%; }
[data-p="3"] .stage::before {
  width: 48cqh; aspect-ratio: 1; border-radius: 50%; left: 42%; top: 58%; translate: -50% -50%;
  box-shadow: 0 0 0 16cqh color-mix(in srgb, var(--shape) 62%, var(--stage)), 0 0 0 33cqh color-mix(in srgb, var(--shape) 30%, var(--stage));
}
[data-p="4"] .stage::before {
  inset: 0; background-color: var(--shape);
  background-image: linear-gradient(90deg, var(--stage) 8px, transparent 8px), linear-gradient(var(--stage) 8px, transparent 8px);
  background-size: 11.5cqh 11.5cqh; background-position: 50% 50%;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0 45cqh, transparent 45.3cqh); mask-image: radial-gradient(circle at 50% 50%, #000 0 45cqh, transparent 45.3cqh);
}
[data-p="5"] .stage::before { width: 104cqh; aspect-ratio: 1; left: 0; bottom: 0; border-radius: 0 100% 0 0; transform-origin: 0 100%; }

/* 1em is one percent of the scene's width, so every device scales as one drawing */
.scene {
  position: relative;
  width: min(96cqw, 125cqh); aspect-ratio: 1.3;
  font-size: min(0.96cqw, 1.25cqh);
}
.dev, .print {
  position: absolute;
  /* --e: how far the card has arrived (scroll). --px/--py: the pointer. */
  transform: translate3d(calc(var(--px, 0) * var(--k, 0) * 1em), calc((1 - var(--e, 1)) * var(--d, 0) * 1em + var(--py, 0) * var(--k, 0) * 0.6em), 0);
  transition: transform 0.6s var(--ease);
}
.dev { display: flex; flex-direction: column; align-items: center; }
.dev__frame {
  width: 100%;
  background: #17191e;
  padding: 0.9em; border-radius: 1.1em;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07) inset, 0 3.4em 3.4em -2.4em rgba(4, 10, 40, 0.6), 0 0.8em 1.4em -0.9em rgba(4, 10, 40, 0.4);
}
.dev__frame img, .dev__frame video { display: block; width: 100%; height: auto; border-radius: 0.35em; background: #fff; object-fit: cover; }

/* stands: a neck and a foot, drawn after the frame */
.dev--stand::before, .dev--stand::after { content: ""; order: 2; flex: none; }
.dev--stand::before { width: 15%; height: 4.6em; background: linear-gradient(90deg, #aab0ba, #e3e6ea 42%, #b4b9c2); }
.dev--stand::after { width: 40%; height: 1.1em; border-radius: 0.5em 0.5em 0.2em 0.2em; background: linear-gradient(#d9dce1, #a9aeb8); box-shadow: 0 1.2em 1.4em -0.8em rgba(14, 20, 44, 0.5); }
.dev--dark::before { width: 12%; height: 3em; background: linear-gradient(90deg, #1b1d22, #33363d 45%, #1d1f24); }
.dev--dark::after { width: 46%; height: 1em; background: linear-gradient(#2e3138, #17191e); }
.dev--tablet .dev__frame { padding: 1.3em; border-radius: 2em; }
.dev--tablet .dev__frame img, .dev--tablet .dev__frame video { border-radius: 0.7em; }
/* the counter tablet sits on a round foot */
.dev--puck::before { width: 9%; height: 3.4em; background: linear-gradient(90deg, #23252b, #3b3e46 45%, #23252b); }
.dev--puck::after { width: 44%; height: 3.2em; border-radius: 50%; margin-top: -1.2em; background: radial-gradient(ellipse at 50% 30%, #3d4048, #1c1e23 70%); box-shadow: 0 1.4em 1.6em -0.9em rgba(14, 20, 44, 0.55); }

/* Work that is an image is shown as what it is: a print on paper. */
.print { background: #fff; padding: 0.75em; border-radius: 0.3em; box-shadow: 0 2.8em 3em -2.2em rgba(4, 10, 40, 0.6), 0 0.6em 1.1em -0.7em rgba(4, 10, 40, 0.42); }
.print img { display: block; width: 100%; height: auto; border-radius: 0.1em; }
/* the lighting montages come on as the card arrives */
.print--lit img { filter: brightness(calc(0.38 + 0.62 * var(--e, 1))) saturate(calc(0.5 + 0.5 * var(--e, 1))); transition: filter 0.7s var(--ease); }
/* one asset, picked up again and again: copies fan out behind the original */
.print--echo {
  transform-origin: 100% 0;
  transform: translate3d(calc(var(--n) * 5.6em * var(--e, 1) + var(--px, 0) * var(--n) * 0.7em), calc(var(--n) * -3.3em * var(--e, 1) + var(--py, 0) * var(--n) * 0.4em), 0) scale(calc(1 - var(--n) * 0.035));
}
.print--echo { opacity: calc(1 - var(--n) * 0.15); box-shadow: 0 1.4em 2em -1.6em rgba(4, 10, 40, 0.5); }

/* ---------- Method: a loop that closes as you read ---------- */
.method__grid { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: clamp(2.5rem, 8vw, 8rem); align-items: start; border-top: 1px solid var(--line); padding-top: clamp(2rem, 5vw, 4rem); }
.loop { position: sticky; top: calc(var(--nav-h) + (100vh - var(--nav-h) - min(400px, 100%)) / 2); aspect-ratio: 1; }
.loop__svg { display: block; width: 100%; height: 100%; overflow: visible; }
.loop__track { fill: none; stroke: var(--line-2); stroke-width: 1.25; stroke-dasharray: 2 7; stroke-linecap: round; }
.loop__arc { fill: none; stroke: var(--accent-ink); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.loop__node circle { fill: var(--void); stroke: var(--line-2); stroke-width: 1.25; transition: fill 0.45s var(--ease), stroke 0.45s var(--ease), r 0.45s var(--ease); }
.loop__node use { color: var(--text-3); transition: color 0.45s var(--ease); }
.loop__node.on circle { fill: var(--accent-ink); stroke: var(--accent-ink); }
.loop__node.on use { color: #fff; }
.loop__node.now circle { r: 37px; }
:root[data-theme="dark"] .loop__node.on use { color: #0b0c10; }
.ico { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.loop__mid { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; pointer-events: none; }
.loop__n { font-family: var(--display); font-weight: 600; font-size: clamp(4rem, 9vw, 6rem); line-height: 0.9; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.loop__w { font-size: 0.9375rem; color: var(--text-2); margin-top: 0.5rem; }
.loop__mid.flip .loop__n, .loop__mid.flip .loop__w { animation: flip-in 0.5s var(--ease); }
@keyframes flip-in { from { opacity: 0; transform: translateY(0.35em); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

.moves { list-style: none; padding: 0; }
.move { min-height: 46vh; display: grid; align-content: center; gap: 0.875rem; padding-block: 1.5rem; }
.move__ico { display: none; width: 30px; height: 30px; color: var(--accent-ink); }
.move h3 { font-family: var(--display); font-size: clamp(1.5rem, 2.7vw, 2.375rem); line-height: 1.05; letter-spacing: -0.03em; transition: color 0.5s var(--ease); }
.move p { font-size: 1.0625rem; line-height: 1.65; max-width: 48ch; text-wrap: pretty; color: var(--text-2); transition: color 0.5s var(--ease); }
.js-loop .move:not(.now) h3 { color: var(--text-3); }
.js-loop .move:not(.now) p { color: var(--text-3); }

/* ---------- Toolkit: tiles that swell toward the pointer, dock-style ---------- */
.kit { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 0.625rem; }
.tool {
  position: relative; z-index: calc(var(--z, 0));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.625rem;
  aspect-ratio: 1; padding: 0.5rem;
  border-radius: var(--r-lg);
  /* its own logo colour comes up as the pointer nears */
  border: 1px solid color-mix(in srgb, var(--c, var(--accent)) calc(var(--s, 0) * 55%), var(--line));
  background: color-mix(in srgb, var(--c, var(--accent)) calc(var(--s, 0) * 13%), var(--surface));
  transform: translateY(calc(var(--s, 0) * -10px)) scale(calc(1 + var(--s, 0) * 0.26));
  box-shadow: 0 calc(var(--s, 0) * 18px) calc(var(--s, 0) * 30px) calc(var(--s, 0) * -14px) rgba(10, 16, 40, 0.35);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease), background-color 0.22s var(--ease);
}
.tool img { width: 40px; height: 40px; object-fit: contain; }
.tool span { font-size: 0.8125rem; color: var(--text-2); white-space: nowrap; }
/* the reveal clips to the box; once in, leave room for a tile to grow past it */
.js-rv .kit.rv.in { clip-path: inset(-25% -6% -25% -6%); }

/* ---------- Contact ---------- */
/* the one inverted surface on the page: an ink band, edge to edge and kept
   low. The ask sits on the left, the ways to answer it on the right. */
.final { margin-top: clamp(3rem, 7vw, 6rem); background: var(--text); color: var(--void); padding-block: clamp(2.5rem, 5vw, 4rem); }
.final__in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 7vw, 7rem); align-items: center; }
.final h2 { max-width: 13ch; font-size: clamp(2.125rem, 4.4vw, 3.5rem); line-height: 1; letter-spacing: -0.035em; }
.final p { color: color-mix(in srgb, var(--void) 74%, var(--text)); max-width: 44ch; font-size: 1.0625rem; text-wrap: pretty; }
.final__cta { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-top: 1.5rem; }
.final .btn--solid { background: var(--void); color: var(--text); }
.final .btn--solid:hover { background: color-mix(in srgb, var(--void) 86%, var(--text)); }
.final .btn--line { border-color: color-mix(in srgb, var(--void) 38%, transparent); color: var(--void); }
.final .btn--line:hover { border-color: var(--void); background: color-mix(in srgb, var(--void) 12%, transparent); }
.final .btn:focus-visible { outline-color: var(--void); }
.final p.final__now { display: inline-flex; align-items: center; gap: 0.625rem; margin-top: 1.5rem; font-size: 0.875rem; }
.final p.final__now[hidden] { display: none; }
.final__now::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; }
.final__now time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--void); }

/* ---------- Footer ---------- */
.foot { padding-top: clamp(2rem, 4vw, 3rem); overflow: hidden; }
.foot__wrap { container-type: inline-size; }
.foot__top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.foot__name { font-family: var(--display); font-size: 1.375rem; font-weight: 600; letter-spacing: -0.025em; }
.foot__h { font-size: 0.8125rem; color: var(--text-3); margin-bottom: 0.75rem; }
.foot__list { list-style: none; padding: 0; display: grid; gap: 0.5rem; justify-items: start; }
.foot__list a { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 1rem; font-weight: 500; color: var(--text); transition: color var(--t), gap var(--t); }
.foot__list a svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: translate(-4px, 4px); transition: opacity var(--t), transform 0.4s var(--ease); }
.foot__list a:hover, .foot__list a:focus-visible { color: var(--accent-ink); }
.foot__list a:hover svg, .foot__list a:focus-visible svg { opacity: 1; transform: none; }
/* the name once more, at the width of the page; letters take ink near the pointer */
.foot__mark {
  font-family: var(--display); font-weight: 600; white-space: nowrap; user-select: none;
  font-size: min(16.6vw, 13.6rem); font-size: 19.4cqw;   /* exactly the width of the column */
  /* it runs off the bottom of the page: a little more than half the letters show */
  line-height: 0.82; height: 0.47em; overflow: hidden; letter-spacing: -0.04em;
  margin: clamp(1.25rem, 3vw, 2.25rem) 0 0 -0.04em;
  color: color-mix(in srgb, var(--text) 9%, var(--void));
}
.foot__mark span { display: inline-block; color: color-mix(in srgb, var(--accent-ink) calc(var(--s, 0) * 100%), color-mix(in srgb, var(--text) 9%, var(--void))); transition: color 0.3s var(--ease); }
.foot__base { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem 2rem; margin-top: clamp(1.5rem, 3vw, 2.25rem); padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--text-3); }
.foot__up { display: inline-flex; align-items: center; gap: 0.375rem; height: 36px; padding-inline: 0.875rem; border-radius: var(--pill); border: 1px solid var(--line); color: var(--text); font-weight: 600; transition: border-color var(--t), background var(--t); }
.foot__up:hover { border-color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }
.foot__up svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Progress ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 70; pointer-events: none; }
.progress__bar { height: 100%; width: 0; background: var(--accent); }

/* ---------- Responsive ---------- */


@media (max-width: 900px) {
  .card { top: calc(var(--nav-h) + 1rem + var(--i) * 10px); grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .stage { order: -1; min-height: 0; height: clamp(210px, 56vw, 380px); margin-bottom: 0; }
  .card__body { justify-content: flex-start; }
  .final__in { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .method__grid { grid-template-columns: minmax(0, 1fr); }
  .loop { display: none; }
  .move { min-height: 0; grid-template-columns: 44px minmax(0, 1fr); column-gap: 1rem; align-items: center; padding-block: 1.25rem; border-bottom: 1px solid var(--line); }
  .move__ico { display: block; }
  .js-loop .move:not(.now) h3 { color: var(--text); }
  .kit { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof__i:nth-child(odd) { border-left: 0; padding-left: 0; }
  .proof__i:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__in { padding-right: 7px; }
  .nav__burger { display: grid; place-content: center; gap: 5px; width: 46px; height: 46px; border-radius: var(--pill); transition: background var(--t); }
  .nav__burger:hover { background: var(--raised); }
  .nav__burger span { display: block; width: 17px; height: 1.6px; border-radius: 2px; background: currentColor; transition: transform 0.35s var(--ease), opacity 0.2s; }
  .nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
  .nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }
  .nav__mobile {
    pointer-events: auto;
    display: grid; position: fixed; inset: 84px var(--gutter) auto var(--gutter); z-index: 59;
    padding: 0.5rem; border-radius: 22px;
    background: var(--surface); border: 1px solid var(--line-2);
    box-shadow: 0 24px 50px -24px rgba(10, 16, 40, 0.5);
    transform: translateY(-10px) scale(0.98); transform-origin: 50% 0; opacity: 0; visibility: hidden;
    transition: transform 0.35s var(--ease), opacity 0.25s var(--ease), visibility 0.35s;
  }
  .nav__mobile.open { transform: none; opacity: 1; visibility: visible; }
  .nav__mobile a { display: flex; align-items: center; height: 52px; padding-inline: 1rem; border-radius: 14px; font-family: var(--display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; }
  .nav__mobile a:hover, .nav__mobile a[aria-current] { background: var(--raised); }
}
/* a stacked card is taller than a short phone screen; let those scroll normally */
@media (max-width: 900px) and (max-height: 740px) {
  .card { position: relative; top: auto; margin-bottom: 1.5rem; }
}
@media (max-width: 560px) {
  .hero__cta .btn { flex: 1 1 100%; }
  .kit { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .final__cta .btn--solid { flex: 1 1 100%; }
  .final__cta .btn--line { flex: 1 1 0; }
  .foot__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot__top > :first-child { grid-column: 1 / -1; }
}

/* ---------- Motion off ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js-rv .rv { clip-path: none; transform: none; opacity: 1; }
  .card { position: static; transform: none !important; opacity: 1 !important; margin-bottom: 1.5rem; }
  .dev, .print, .tool, .btn { transform: none; }
  .print--echo { transform: translate3d(calc(var(--n) * 5.6em), calc(var(--n) * -3.3em), 0) scale(calc(1 - var(--n) * 0.035)); }
  .print--lit img { filter: none; }
}


/* ==========================================================================
   Hero: a plane of fine dots in perspective, rippling to a horizon under a
   centred headline (Dean's pick, "C", 2026-11-16). The canvas lives inside
   the hero, so the field stops where the hero ends.
   ========================================================================== */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.hero {
  position: relative; overflow: hidden;
  min-height: clamp(540px, 76svh, 800px);
  display: grid; place-items: center;
  text-align: center;
  padding-top: var(--nav-h);
  padding-bottom: clamp(3rem, 7vh, 5rem);
  background: var(--void);
}
/* without WebGL or JS, a still frame of the same field */
.hero:not(.has-field) { background: var(--void) url("../images-and-logos/plates/hero-field.webp") center bottom / cover no-repeat; }
:root[data-theme="dark"] .hero:not(.has-field) { background-image: none; }

.hero__field {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.hero__in { position: relative; z-index: 1; display: grid; justify-items: center; }
.hero__h {
  margin-inline: auto; white-space: nowrap;
  font-family: 'Syne', var(--display); font-weight: 700;
  font-size: min(5.75rem, 8.6vw); line-height: 1; letter-spacing: -0.045em;
}
/* the one colour in the headline */
.hero__h .amp { color: var(--accent-ink); }
.hero__in .hero__sub { margin: 1.5rem auto 2rem; max-width: 44ch; text-wrap: balance; }
.hero__in .hero__cta { justify-content: center; }


@media (max-width: 560px) {
  .hero__in .hero__cta .btn { flex: 1 1 100%; }
}


/* ==========================================================================
   Inner pages: Work, About, Contact and the five case studies.
   Same ground, nav, buttons and footer as the homepage; each case takes its
   project's own blue from data-p on <html>, so the progress line, figures,
   quote and links all carry it.
   ========================================================================== */

/* ---------- Page head ---------- */
.ph { padding-top: calc(var(--nav-h) + clamp(3rem, 7vw, 5.5rem)); padding-bottom: clamp(2rem, 4vw, 3rem); }
.ph__back {
  display: inline-flex; align-items: center; gap: 0.5rem; height: 38px; padding-inline: 0.875rem 1rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--pill); border: 1px solid var(--line-2);
  font-size: 0.875rem; font-weight: 600; color: var(--text);
  transition: background var(--t), border-color var(--t), gap var(--t);
}
.ph__back svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ph__back:hover { border-color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); gap: 0.75rem; }
.ph__kind { font-size: 0.9375rem; color: var(--text-3); margin-bottom: 1rem; }
.ph h1 { font-size: clamp(2.4rem, 5.6vw, 4.75rem); max-width: 18ch; }
.ph__sub { margin-top: clamp(1rem, 2vw, 1.5rem); max-width: 54ch; font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); line-height: 1.55; color: var(--text-2); text-wrap: pretty; }

/* ---------- Case: the three facts a recruiter scans for ---------- */
.facts { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) minmax(0, 1fr); border-top: 1px solid var(--line); margin-top: clamp(2rem, 4vw, 3rem); }
.facts > div { padding: 1.25rem clamp(1rem, 2vw, 1.75rem) 0; border-left: 1px solid var(--line); }
.facts > div:first-child { border-left: 0; padding-left: 0; }
.facts dt { font-size: 0.875rem; color: var(--text-3); margin-bottom: 0.375rem; }
.facts dd { font-family: var(--display); font-weight: 600; font-size: clamp(1.1875rem, 1.7vw, 1.5rem); line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
.facts .facts__out dd { color: var(--accent-ink); }

/* the case's own scene from the homepage deck, wide */
.case-stage { margin: clamp(2rem, 4vw, 3rem) 0 0; height: clamp(300px, 46vw, 620px); min-height: 0; border-radius: var(--r-lg); }
[data-stage] .case-stage { margin-inline: 0; }

/* ---------- Case body: an index that follows you, and the reading column ---------- */
.case-grid { display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; padding-top: clamp(3rem, 6vw, 5rem); }
.toc { position: sticky; top: calc(var(--nav-h) + 2.5rem); }
.toc__h { font-size: 0.8125rem; color: var(--text-3); margin-bottom: 0.75rem; }
.toc ol { list-style: none; padding: 0; display: grid; gap: 0.125rem; }
.toc a {
  display: flex; align-items: center; gap: 0.625rem; padding: 0.375rem 0;
  font-size: 0.9375rem; color: var(--text-3); line-height: 1.3;
  transition: color var(--t);
}
.toc a::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); transition: background var(--t), transform 0.4s var(--ease); }
.toc a:hover { color: var(--text); }
.toc a.on { color: var(--text); font-weight: 600; }
.toc a.on::before { background: var(--accent-ink); transform: scale(1.5); }

.prose { min-width: 0; max-width: 880px; }
.prose > section { scroll-margin-top: calc(var(--nav-h) + 1.5rem); }
.prose > section + section { margin-top: clamp(3rem, 6vw, 4.5rem); }
.prose h2 { font-size: clamp(1.625rem, 2.6vw, 2.25rem); margin-bottom: 1.125rem; }
.prose p, .prose li { max-width: 60ch; color: color-mix(in srgb, var(--text) 84%, var(--void)); line-height: 1.7; text-wrap: pretty; }
.prose p + p, .prose p + ul, .prose ul + p, .prose .note + p, .prose p + .tbl, .prose .tbl + p { margin-top: 1rem; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.prose ul li { position: relative; padding-left: 1.5rem; }
.prose ul li::before { content: ""; position: absolute; left: 0.125rem; top: 0.68em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }

.lead { max-width: 54ch !important; font-size: clamp(1.1875rem, 1.75vw, 1.4375rem); line-height: 1.55 !important; color: var(--text) !important; letter-spacing: -0.006em; }
.note { margin-top: 1.25rem; padding: 1.25rem 1.5rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.note p { max-width: 60ch; }

.pull { margin: clamp(2rem, 4vw, 3rem) 0 0; max-width: 30ch; }
.pull p {
  font-family: var(--display); font-weight: 600; color: var(--accent-ink) !important;
  font-size: clamp(1.5rem, 2.7vw, 2.25rem); line-height: 1.12 !important; letter-spacing: -0.025em; text-wrap: balance;
  text-indent: -0.42em;
}
.pull figcaption { margin-top: 0.875rem; font-size: 0.875rem; color: var(--text-3); text-wrap: balance; }

/* options weighed: the one taken is lit in the project's colour */
.tbl { margin-top: 1.25rem; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.tbl table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; }
.tbl th { text-align: left; font-weight: 500; font-size: 0.8125rem; color: var(--text-3); padding: 0.875rem 1.125rem; border-bottom: 1px solid var(--line); }
.tbl td { padding: 1rem 1.125rem; vertical-align: top; color: var(--text-2); border-top: 1px solid var(--line); }
.tbl tr:first-child td { border-top: 0; }
.tbl td:first-child { color: var(--text); font-weight: 600; width: 26%; }
.tbl tr.sel td { background: color-mix(in srgb, var(--accent) 13%, var(--surface)); color: var(--text); }
.tbl tr.sel td:last-child { color: var(--accent-ink); font-weight: 600; }

/* the process, numbered and joined */
.steps { list-style: none; padding: 0; margin-top: 0.5rem; counter-reset: s; }
.steps li { position: relative; display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); column-gap: 1rem; padding-bottom: 1.75rem; counter-increment: s; }
.steps li::before {
  content: counter(s); grid-row: 1 / span 2;
  width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-weight: 600; font-size: 1.0625rem;
  color: var(--accent-ink); background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  position: relative; z-index: 1;
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 1.25rem; top: 2.5rem; bottom: 0; width: 1px; background: var(--line-2); }
.steps h3 { font-size: 1.125rem; letter-spacing: -0.015em; margin-top: 0.45rem; color: var(--text); }
.steps p { margin-top: 0.375rem; }

.fig { margin-top: 1.5rem; }
.fig img { width: 100%; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.fig figcaption { margin-top: 0.75rem; font-size: 0.875rem; color: var(--text-3); max-width: 72ch; text-wrap: pretty; }
.fig--tall { max-width: 420px; }
.fig--lead { margin-top: 0; }

.compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.75rem; margin-top: 0.25rem; }
.compare > div { padding: 1.375rem 1.5rem; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.compare > div:last-child { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); }
.compare h3 { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9375rem; color: var(--text); margin-bottom: 0.5rem; }
.compare h3 svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.compare > div:last-child h3 { color: var(--accent-ink); }

.skills { list-style: none !important; padding: 0; display: flex !important; flex-wrap: wrap; gap: 0.5rem !important; }
.skills li { padding: 0.4rem 0.9rem !important; border-radius: var(--pill); border: 1px solid var(--line-2); font-size: 0.9375rem; color: var(--text) !important; background: var(--surface); }
.skills li::before { display: none; }

/* ---------- Case pager: the next project, in its own colour ---------- */
.pager { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.75rem; margin-top: clamp(3.5rem, 7vw, 6rem); }
.pager a {
  display: grid; gap: 0.375rem; padding: 1.5rem 1.625rem; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--surface);
  transition: border-color var(--t), background var(--t), transform 0.5s var(--ease);
}
.pager a:last-child { text-align: right; justify-items: end; }
.pager span { font-size: 0.875rem; color: var(--text-3); display: inline-flex; align-items: center; gap: 0.5rem; }
.pager span svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pager b { font-family: var(--display); font-weight: 600; font-size: clamp(1.25rem, 2vw, 1.625rem); letter-spacing: -0.025em; line-height: 1.1; transition: color var(--t); }
.pager a:hover, .pager a:focus-visible { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); transform: translateY(-3px); }
.pager a:hover b, .pager a:focus-visible b { color: var(--accent-ink); }

/* ---------- Work index: the five, on the same paper wells ---------- */
.works { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); padding-bottom: clamp(1rem, 3vw, 2rem); }
.work {
  display: flex; flex-direction: column;
  border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color var(--t);
}
.work:first-child, .work:last-child:nth-child(even) { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.work .stage { height: clamp(260px, 30vw, 400px); min-height: 0; }
.work:first-child .stage, .work:last-child:nth-child(even) .stage { height: auto; min-height: clamp(320px, 38vw, 520px); }
.work__body { display: flex; flex-direction: column; gap: 0.625rem; padding: clamp(1.25rem, 2.4vw, 2rem); padding-top: clamp(0.75rem, 1.6vw, 1.25rem); flex: 1; }
.work:first-child .work__body, .work:last-child:nth-child(even) .work__body { justify-content: center; padding-top: clamp(1.25rem, 2.4vw, 2rem); }
.work__t { font-family: var(--display); font-weight: 600; font-size: clamp(1.5rem, 2.4vw, 2.125rem); line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
.work__ctx { font-size: 0.875rem; color: var(--text-3); margin-top: -0.25rem; }
.work__d { color: var(--text-2); font-size: 1rem; max-width: 46ch; text-wrap: pretty; }
.work .card__m { margin-top: 0.25rem; }
.work .card__go { margin-top: auto; }
.work__body > .card__m + .card__go { margin-top: 0.75rem; }
.work:hover, .work:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--line-2); }
.work:hover .card__go, .work:focus-visible .card__go { background: var(--text); border-color: var(--text); color: var(--surface); gap: 0.75rem; }
/* at rest the work waits, slightly unsettled; under the pointer it comes into place, lit */
@media (hover: hover) and (pointer: fine) {
  .work:not(:hover):not(:focus-visible) { --e: 0.45; }
}

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(2rem, 7vw, 7rem); align-items: start; border-top: 1px solid var(--line); padding-top: clamp(2rem, 4vw, 3rem); }
.glance { position: sticky; top: calc(var(--nav-h) + 2.5rem); display: grid; gap: 1.25rem; }
.glance dt { font-size: 0.8125rem; color: var(--text-3); }
.glance dd { margin-top: 0.25rem; font-weight: 500; line-height: 1.45; }
.glance dd a { color: var(--accent-ink); font-weight: 600; display: inline-flex; align-items: center; gap: 0.375rem; transition: gap var(--t); }
.glance dd a:hover { gap: 0.625rem; }
.glance dd a svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.about .prose p + p { margin-top: 1.25rem; }

/* ---------- Contact ---------- */
.now-tlv { display: inline-flex; align-items: center; gap: 0.625rem; margin-top: 1.25rem; font-size: 0.9375rem; color: var(--text-2); }
.now-tlv[hidden] { display: none; }
.now-tlv::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #1f9d55; }
.now-tlv time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }

.reach { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.reach__i {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 1.5rem; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface);
}
.reach__ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 1rem; background: var(--raised); color: var(--text); }
.reach__ico svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.reach__k { font-size: 0.875rem; color: var(--text-3); }
.reach__v { font-family: var(--display); font-weight: 600; font-size: clamp(1.125rem, 1.6vw, 1.3125rem); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.reach__do { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.125rem; }
.reach__do .btn { height: 40px; padding-inline: 1.125rem; font-size: 0.875rem; }

.mail { margin-top: clamp(1rem, 2vw, 1.5rem); display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5rem); padding: clamp(1.5rem, 3.5vw, 3rem); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.mail h2 { font-size: clamp(1.625rem, 2.8vw, 2.25rem); }
.mail__sub { margin-top: 0.75rem; color: var(--text-2); max-width: 34ch; }
.form { display: grid; gap: 1rem; }
.form__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.875rem; font-weight: 600; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  padding: 0.75rem 0.9rem; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--void);
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.field textarea { resize: vertical; min-height: 9rem; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field input:hover, .field textarea:hover { border-color: var(--text-3); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent-ink); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-ink) 22%, transparent); }
.form .btn { justify-self: start; margin-top: 0.25rem; }

/* ---------- Inner pages: responsive ---------- */
@media (max-width: 1000px) {
  .case-grid { grid-template-columns: minmax(0, 1fr); padding-top: clamp(2.5rem, 6vw, 4rem); }
  .toc { display: none; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .glance { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mail { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
}
@media (max-width: 800px) {
  .works { grid-template-columns: minmax(0, 1fr); }
  .work:first-child, .work:last-child:nth-child(even) { display: flex; }
  .work:first-child .stage, .work:last-child:nth-child(even) .stage { min-height: 0; height: clamp(240px, 62vw, 400px); }
  .work:first-child .work__body, .work:last-child:nth-child(even) .work__body { padding-top: clamp(0.75rem, 1.6vw, 1.25rem); }
  .reach { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts > div { border-left: 0; padding: 1rem 0; border-top: 1px solid var(--line); }
  .facts > div:first-child { border-top: 0; }
  .compare, .pager { grid-template-columns: minmax(0, 1fr); }
  .pager a:last-child { text-align: left; justify-items: start; }
  .case-stage { height: clamp(260px, 72vw, 460px); }
}
@media (max-width: 640px) {
  .tbl { border: 0; background: none; border-radius: 0; overflow: visible; }
  .tbl thead { display: none; }
  .tbl table, .tbl tbody, .tbl tr, .tbl td { display: block; width: auto !important; }
  .tbl tr { padding: 1rem 1.125rem; margin-top: 0.625rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
  .tbl tr.sel { background: color-mix(in srgb, var(--accent) 13%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
  .tbl tr.sel td { background: none; }
  .tbl td { padding: 0.25rem 0; border: 0; }
  .tbl td:first-child { font-size: 1.0625rem; padding-bottom: 0.375rem; }
  .tbl td[data-l]:not(:first-child)::before { content: attr(data-l); display: block; font-size: 0.75rem; color: var(--text-3); font-weight: 500; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .glance { grid-template-columns: minmax(0, 1fr); }
  .form .btn { justify-self: stretch; }
}
.prose > .fig--lead + section { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
/* contact has no ink band before the footer, so the form keeps its distance */
.mail { margin-bottom: clamp(3rem, 7vw, 6rem); }
/* about: the record, the same four numbers the homepage opens with */
.about-proof { margin-bottom: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); border-bottom: 0; }
/* the reveal clips to the box; once in, leave the card's shadow and hover lift room */
.js-rv .work.rv.in { clip-path: inset(-12% -8% -16% -8%); }

/* ==========================================================================
   v3 homepage (Dean's brief, 2026-11-19): a builder's portfolio in plain
   facts. Hero, three numbers, selected work, then short labelled rows
   (How I work, About, Tools, Also) and the contact band.
   ========================================================================== */

/* the three numbers: facts, not links */
.proof.proof--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.proof.proof--3 .proof__i { border-top: 0; border-left: 0; padding-left: 0; }
.proof.proof--3 .proof__i + .proof__i { border-left: 1px solid var(--line); padding-left: clamp(1rem, 2vw, 1.75rem); }

/* the outcome line on a card, in the project's ink */
.card__out { font-family: var(--display); font-weight: 600; font-size: clamp(1.125rem, 1.6vw, 1.375rem); letter-spacing: -0.02em; line-height: 1.25; color: var(--accent-ink); text-wrap: balance; }
.card__cap { margin-top: 0.125rem; }
/* a card that is not itself a link: only its own button reacts */
article.card:hover .card__go:not(:hover), article.work:hover .card__go:not(:hover) { background: none; border-color: var(--line-2); color: var(--text); gap: 0.5rem; }
.card__go:hover { background: var(--text); border-color: var(--text); color: var(--surface); }

/* a browser window and a phone, for work that lives on the web */
.dev--browser .dev__frame { padding: 0; overflow: hidden; border-radius: 0.9em; background: #f1efea; }
.dev--browser .dev__frame::before {
  content: ""; display: block; height: 3em;
  background:
    radial-gradient(circle at 2.2em 50%, #cfccc4 0.5em, transparent 0.56em),
    radial-gradient(circle at 3.9em 50%, #cfccc4 0.5em, transparent 0.56em),
    radial-gradient(circle at 5.6em 50%, #cfccc4 0.5em, transparent 0.56em);
}
.dev--browser .dev__frame img { border-radius: 0; }
:root[data-theme="dark"] .dev--browser .dev__frame { background: #24272e; }
:root[data-theme="dark"] .dev--browser .dev__frame::before { background: radial-gradient(circle at 2.2em 50%, #474b54 0.5em, transparent 0.56em), radial-gradient(circle at 3.9em 50%, #474b54 0.5em, transparent 0.56em), radial-gradient(circle at 5.6em 50%, #474b54 0.5em, transparent 0.56em); }
.dev--phone .dev__frame { padding: 0.7em; border-radius: 3.1em; }
.dev--phone .dev__frame img { border-radius: 2.5em; }

/* the extraction tool, drawn: a supplier page in, product content out */
.xt { padding: 1.8em; color: #57565f; }
.xt__bar { display: flex; align-items: center; gap: 0.6em; margin-bottom: 1.6em; }
.xt__bar i { width: 1em; height: 1em; border-radius: 50%; background: #e3e1db; }
.xt__bar span { flex: 1; height: 1.8em; margin-left: 0.8em; border-radius: 1em; background: #f1efea; }
.xt__page { display: grid; grid-template-columns: 15em minmax(0, 1fr); gap: 1.6em; }
.xt__img { aspect-ratio: 1; border-radius: 0.5em; background: #ebe8e1; }
.xt__lines { display: grid; gap: 0.9em; align-content: start; }
.xt__lines b { height: 1.7em; width: 78%; border-radius: 0.3em; background: #d8d5cd; margin-bottom: 0.4em; }
.xt__lines i { height: 0.9em; border-radius: 0.3em; background: #eceae4; }
.xt__lines i.s { width: 58%; }
.xt__lines--wide { margin-top: 1.8em; }
.xt__cap { font-size: 1.55em; font-weight: 600; color: #2a2a31; margin-top: 1.1em; }
.xt--out .xt__cap { margin: 0 0 0.7em; }
.xt__rows > div { display: grid; grid-template-columns: 10em minmax(0, 1fr); gap: 1em; align-items: center; padding-block: 1em; border-top: 1px solid #ecebe6; }
.xt__rows dt { font-size: 1.35em; color: #6c6b72; }
.xt__rows dd { margin: 0; display: grid; gap: 0.6em; }
.xt__rows dd i { display: block; height: 0.9em; border-radius: 0.3em; background: color-mix(in srgb, var(--accent) 42%, #fff); }
.xt__thumbs { grid-template-columns: repeat(3, 5em); }
.xt__thumbs b { aspect-ratio: 1; border-radius: 0.4em; background: color-mix(in srgb, var(--accent) 24%, #fff); }
.xt__arrow {
  position: absolute; overflow: visible;
  fill: none; stroke: var(--accent-ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  transform: translate3d(calc(var(--px, 0) * var(--k, 0) * 1em), calc((1 - var(--e, 1)) * var(--d, 0) * 1em), 0);
  transition: transform 0.6s var(--ease);
}

/* ---------- Contact band: the address itself is the headline link ---------- */
.final__mail {
  display: inline-block; max-width: 100%; overflow-wrap: anywhere;
  font-family: var(--display); font-weight: 600; font-size: clamp(1.375rem, 3vw, 2.25rem); letter-spacing: -0.02em; line-height: 1.2;
  color: var(--void); padding-bottom: 0.08em;
  border-bottom: 2px solid color-mix(in srgb, var(--void) 35%, transparent);
  transition: border-color var(--t);
}
.final__mail:hover, .final__mail:focus-visible { border-color: var(--void); }

/* ---------- OC Pluginz case: outcome figures and a phone figure ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 1.5rem 0; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.stats > div { display: flex; flex-direction: column; gap: 0.375rem; padding: 1.25rem; background: var(--void); }
.stats dd { order: -1; margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 3.4vw, 2.75rem); line-height: 1; letter-spacing: -0.035em; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.stats dt { font-size: 0.875rem; line-height: 1.45; color: var(--text-2); }
.fig--phone { max-width: 300px; }

@media (max-width: 640px) {
  .proof.proof--3 { grid-template-columns: minmax(0, 1fr); }
  .proof.proof--3 .proof__i { flex-direction: row; align-items: baseline; gap: 1rem; padding: 1.125rem 0; }
  .proof.proof--3 .proof__i + .proof__i { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .proof--3 .proof__n { flex: none; min-width: 3.4ch; font-size: 2.5rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- v3.1 polish (2026-11-19) ---------- */
/* section titles end on a point of the page's blue */
.band__head h2::after { content: "."; color: var(--accent); }
/* the unit after a figure takes the colour, the digits stay ink */
.proof__n .u { color: var(--accent); }

/* How I work: one short line per move, so the line itself is the headline */
.move { min-height: 38vh; }
.move h3 { max-width: 20ch; font-size: clamp(1.625rem, 3vw, 2.625rem); text-wrap: balance; }

/* Tools: eleven tiles, one row on a wide screen */
.kit { grid-template-columns: repeat(11, minmax(0, 1fr)); }
.tool img[src$=".svg"] { width: 36px; height: 36px; }
:root[data-theme="dark"] .tool img[src*="github"] { filter: invert(1); }
@media (max-width: 1100px) and (min-width: 901px) { .kit { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* About: one paragraph at reading size */
.about-home__in { max-width: 62ch; }
.about-home__in p { font-size: clamp(1.125rem, 1.7vw, 1.375rem); line-height: 1.6; text-wrap: pretty; }
.about-home__more { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1.25rem; font-weight: 600; color: var(--accent-ink); transition: gap var(--t); }
.about-home__more:hover { gap: 0.75rem; }
.about-home__more svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Also: two smaller pieces, each a print on its own coloured form */
.also { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.also__i { display: grid; gap: 0.5rem; align-content: start; padding: 0.625rem 0.625rem 1.25rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: box-shadow var(--t), border-color var(--t); }
.also__i:hover, .also__i:focus-visible { border-color: var(--line-2); box-shadow: var(--shadow); }
.also__img.stage { height: clamp(200px, 20vw, 280px); min-height: 0; margin: 0 0 0.75rem; }
.also__img img { width: 58%; height: auto; padding: 0.4rem; background: #fff; border-radius: 4px; box-shadow: 0 18px 24px -16px rgba(4, 10, 40, 0.5); transition: transform 0.6s var(--ease); }
.also__i:hover .also__img img { transform: translateY(-6px) rotate(-1deg); }
.also__t { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-inline: 0.875rem; font-family: var(--display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.02em; }
.also__t svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--accent-ink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.4s var(--ease); }
.also__i:hover .also__t svg { transform: translateX(4px); }
.also__d { padding-inline: 0.875rem; color: var(--text-2); font-size: 0.9375rem; max-width: 52ch; text-wrap: pretty; }

@media (max-width: 860px) {
  .nav__in { height: 58px; padding-left: 18px; }
  .nav__mark { font-size: 1.125rem; }
}
@media (max-width: 700px) {
  .also { grid-template-columns: minmax(0, 1fr); }
}
.nav__mark span { white-space: nowrap; }
@media (max-width: 360px) { .nav__mark { font-size: 1rem; gap: 0.5rem; } }
.band__head p { text-wrap: balance; }
