/* roberthaverly: the site's stylesheet. Tokens first (from the Figma file
   aWpJIrYC0ljjWPTGkBD4cg), then each component and page. The font face is
   declared in each page's head. */

/* The colour tokens are registered as colours, so the browser resolves
   light-dark() and color-mix() in them to a plain colour: themes.js reads
   --color-background that way for Safari's and Chrome's address-bar tint
   (the theme-color meta), which cannot take an expression. */
@property --color-background {
  syntax: '<color>';
  inherits: true;
  initial-value: #ffffff;
}

@property --color-text {
  syntax: '<color>';
  inherits: true;
  initial-value: #131313;
}

@property --color-muted {
  syntax: '<color>';
  inherits: true;
  initial-value: #666666;
}

@property --color-rule {
  syntax: '<color>';
  inherits: true;
  initial-value: #e0e0e0;
}

/* Tokens from the Figma file "Untitled" (aWpJIrYC0ljjWPTGkBD4cg): color
   variables, space/* variables, and the Portfolio/* text styles. */
:root {
  color-scheme: light dark;

  /* The two system themes, chosen by the scheme; the theme slider's stops
     (below the tokens) replace these four and set the scheme themselves. */
  --color-background: light-dark(#ffffff, #0e0e0e);
  --color-text: light-dark(#131313, #f0f0f0);
  --color-muted: light-dark(#666666, #a3a3a3);
  --color-rule: light-dark(#e0e0e0, #383838);

  --space-4: 4px;
  --space-8: 8px;
  --space-16: 16px;
  --space-24: 24px;
  --space-40: 40px;
  --space-48: 48px;
  --space-64: 64px;
  --space-80: 80px;

  --font-sans: 'Inter Variable', Inter, system-ui, -apple-system, sans-serif;
  /* Code only: a repository's files, where columns have to line up. */
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Portfolio/Display */
  --display-size: 40px;
  --display-leading: 48px;
  --display-tracking: -1.6px;
  /* Portfolio/Title */
  --title-size: 24px;
  --title-leading: 32px;
  --title-tracking: -0.6px;
  /* Portfolio/Body */
  --body-size: 16px;
  --body-leading: 26px;
  --body-tracking: -0.2px;
  /* Portfolio/Link: body size and tracking, tighter leading, medium weight. */
  --link-size: var(--body-size);
  --link-leading: 24px;
  --link-weight: 500;
  --link-tracking: var(--body-tracking);
  /* Portfolio/Caption: 13 in Figma, 14 on the site, since the muted small
     text (dates, descriptors, details) read tight at 13. */
  --caption-size: 14px;
  --caption-leading: 20px;
  --caption-tracking: 0;
  --weight-regular: 400;
  /* Home/Eyebrow: the caption in capitals, tracked open. */
  --eyebrow-tracking: 0.8px;
  /* Home/Hero: the display size and leading, semibold, tracked tighter. */
  --weight-semibold: 600;
  --hero-tracking: -2px;

  /* Hairlines: rules between rows, the edge of a control. */
  --hairline: 1px;
  --rule: var(--hairline) solid var(--color-rule);

  /* Moodboard board: wider than the text column, laid out as a loose scatter.
     Tiles vary between roughly a third and the full column width, so the board
     reads as a scatter rather than a grid, with generous air between them.
     Below 900px there is no room to scatter: even, narrow columns. */
  --board-width: 1400px;
  --board-column: 400px;
  --board-column-narrow: 150px;
  --board-gap: 72px;
  --board-rhythm: 112px;
  --tile-hover-scale: 1.12;
  /* On an even board (the Playground) the pointed-at tile grows further and
     the others step back to this opacity. */
  --tile-hover-scale-even: 1.35;
  --tile-dim-opacity: 0.6;

  /* Snaps: index thumbnails are cropped to one shape and take half the
     column; album details put their labels in a fixed column, narrower in
     the index rows. */
  --snap-cover-ratio: 3 / 2;
  --snap-thumb-width: 348px;
  --snap-meta-label-width: 96px;
  --radius-pill: 999px;
  --filter-pad-inline: var(--space-16);
  --filter-pad-block: var(--space-8);
  /* Pill buttons (the home page's actions): the control height, the
     filter's padding, link type. */
  --button-pad-inline: var(--space-16);
  --button-pad-block: var(--space-8);
  --detail-label-width: 120px;

  /* Motion. Hover is a small, user-triggered state change, so it gets a short
     ease-out rather than a spring. */
  --duration-fast: 160ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  /* User-triggered moves that should carry some life (the Snaps filter's
     pill): a damped spring, ratio 0.72, sampled to linear(). It overshoots
     by about 4% and settles within its duration. */
  --duration-spring: 520ms;
  --ease-spring: linear(0, 0.039, 0.133, 0.257, 0.391, 0.523, 0.642, 0.746, 0.832, 0.9, 0.951, 0.988, 1.013, 1.028, 1.036, 1.038, 1.037, 1.034, 1.029, 1.024, 1.019, 1.014, 1.01, 1.007, 1.004, 1.002, 1);
  /* Lightbox zoom on touch screens, after the Photos app. Settling after a
     gesture (bounce back, momentum into place, double-tap zoom) is a spring
     that starts at the finger's speed: response is how long it takes,
     damping how much it overshoots (1 = none). Flicks travel as far as a
     scroll view's normal deceleration would carry them. */
  --zoom-spring-response: 0.42;
  --zoom-spring-damping: 0.88;
  --zoom-deceleration: 0.998;
  --zoom-double-tap-scale: 2.5;
  --zoom-min-max-scale: 3;
  /* Closing it, as Photos does: let go of a pinch below this scale, or a
     drag from fit size that has gone this share of the screen's height or
     is moving this fast (px per ms), and the photo flies back to its tile. */
  --zoom-dismiss-scale: 0.8;
  --zoom-dismiss-distance: 0.15;
  --zoom-dismiss-velocity: 0.5;
  /* How a drag feels past an edge (Apple's rubber-band constant), and at fit
     size: the photo shrinks by this share over a screen's height of travel,
     and the background has faded out this far across it. Two taps within
     this window are a double tap. */
  --zoom-rubber: 0.55;
  --zoom-drag-shrink: 0.3;
  --zoom-fade-distance: 0.6;
  --zoom-double-tap: 300ms;
  /* Turning to the next or previous photo in the lightbox. A vertical drag
     let go past this share of the screen's height, or moving this fast (px
     per ms), turns the page: the same measures as closing. A wheel or
     trackpad turns one photo per scroll: a movement of at least this many
     px starts it, and the next waits until the wheel has rested this long. */
  --page-distance: var(--zoom-dismiss-distance);
  --page-flick-velocity: var(--zoom-dismiss-velocity);
  --page-wheel-threshold: 12;
  --page-wheel-rest: 150ms;

  /* How long a control keeps its confirmation (the email's Copy reading
     "Copied") before it goes back. */
  --duration-confirm: 2000ms;

  /* The home page's section links, pointed at with a mouse: a small fan of
     the section's newest things appears by the pointer and trails it on a
     spring (response in seconds, damping 1 = no overshoot), offset from the
     pointer so it never sits under it. The cards are --peek-size square and
     fan out by --peek-tilt and --peek-spread each; the other rows step back
     to --peek-dim-opacity. */
  --peek-size: 128px;
  --peek-radius: var(--space-8);
  --peek-tilt: 7deg;
  --peek-spread: 56px;
  --peek-offset: 28px;
  --peek-hidden-scale: 0.8;
  --peek-spring-response: 0.32;
  --peek-spring-damping: 0.78;
  --peek-dim-opacity: 0.35;
  --peek-mark-size: 56px;
  --peek-tile-background: #000000;
  --peek-tile-mark: #ffffff;

  /* Showing and hiding the lightbox controls on a tap: system motion. */
  --duration-controls: 200ms;

  /* Rows leaving or reflowing when the filter changes: system motion, so an
     ease rather than a spring. */
  --duration-reflow: 360ms;

  /* The theme slider: a track the shell's width high in the page's top
     padding, set apart from the header so it reads as a tool rather than
     part of it, a round thumb, and a dot at each stop. Choosing a stop fades
     every colour on the page over --duration-theme: system motion, an
     ease; long enough to read as the light changing, not a flicker. */
  --theme-track-height: 8px;
  --theme-thumb-size: 24px;
  --theme-thumb-ring: 2px;
  --theme-tick-size: 3px;
  --theme-track-top: var(--space-8);
  --theme-stops: 8;
  --chrome-strip-height: var(--space-8);
  --theme-track: linear-gradient(90deg, #0e0e0e 0.00% 4.00%, #263041 10.29% 18.29%, #3e3f31 24.57% 32.57%, #546b60 38.86% 46.86%, #5e755e 53.14% 61.14%, #cdcbbe 67.43% 75.43%, #f3dda3 81.71% 89.71%, #ffffff 96.00% 100.00%);
  --duration-theme: 480ms;

  /* Moving between pages: the page that is left fades over --duration-leave;
     the new one fades in over --duration-arrive while settling down
     --arrive-rise. System motion (the click is over by then), so an ease,
     and short enough to read as the page drawing rather than an effect. */
  --duration-leave: var(--duration-fast);
  --duration-arrive: 280ms;
  --arrive-rise: 6px;

  /* Layout: 720px column, 360px sides at the 1440 frame; 24px sides on mobile. */
  --content-width: 720px;
  /* Safe areas: the parts of an iPhone screen behind the Dynamic Island, the
     rounded corners and the home indicator. They are only non-zero because
     the viewport is set to viewport-fit=cover (each page's head), which lets the
     page, and the lightbox in particular, reach the screen's edges. */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);

  --page-inset: max(var(--space-24), var(--safe-left), var(--safe-right));
  --page-top: var(--space-80);
  --page-bottom: var(--space-64);
  --section-gap: var(--space-80);
  --header-gap: var(--space-24);
  --year-width: 68px;
  --stat-width: 200px;  /* a case study's first fact on its index row */
  /* A figure in a case study's gallery: the plate each image sits on. */
  --figure-pad: var(--space-24);
  --figure-radius: var(--space-16);
  --figure-fill: color-mix(in oklab, var(--color-text) 4%, transparent);
  /* The tallest an image on its own gets, and the height a whole-page
     screenshot is shown at. */
  --figure-cap: 560px;
  /* A phone clip's corners: the frame's 44 radius on its 393 by 852, as
     the video file has square ones. */
  --figure-clip-radius: calc(44 / 393 * 100%) / calc(44 / 852 * 100%);
  /* The resume: the skills' term column, and the timeline's dates column. */
  --term-width: 112px;
  --when-width: 152px;
  --tap-target: 44px;

  /* Floating controls over images (the lightbox's hint) and the pill-shaped
     radio options: a translucent fill that frosts whatever passes behind it;
     a press shrinks the option slightly. Disabled options and the secondary
     count beside a label sit back at these opacities. */
  --control-size: var(--tap-target);
  --control-fill: color-mix(in oklab, var(--color-text) 10%, transparent);
  --control-blur: 20px;
  --control-press-scale: 0.96;
  --control-disabled-opacity: 0.4;
  --control-secondary-opacity: 0.7;
  --icon-size: 16px;
  --icon-stroke: 1.5px;
  /* A streaming service's mark beside or in place of its name (playlists). */
  --service-icon-size: 20px;
  --stack-mark-size: 24px;

  /* Liquid glass, for the floating scroll controls (navigation layer only).
     Less blur than frosted glass and a strong saturation lift, so colour
     reads through it; a faint tint of the page; a specular rim on the top
     edge and a softer one below; a soft shadow to lift it off the page; a
     specular sheen across the rim (--glass-sheen, masked to the edge).
     Chromium also bends what is behind it (--glass-refraction, px). */
  --glass-tint: color-mix(in oklab, var(--color-background) 42%, transparent);
  --glass-blur: 10px;
  --glass-saturate: 1.9;
  --glass-rim: light-dark(rgb(255 255 255 / 0.55), rgb(255 255 255 / 0.32));
  --glass-rim-soft: light-dark(rgb(255 255 255 / 0.18), rgb(255 255 255 / 0.08));
  --glass-edge: light-dark(rgb(0 0 0 / 0.08), rgb(255 255 255 / 0.1));
  --glass-sheen: linear-gradient(135deg, var(--glass-rim), transparent 35%, transparent 65%, var(--glass-rim-soft));
  --glass-shadow-near: light-dark(rgb(0 0 0 / 0.08), rgb(0 0 0 / 0.3));
  --glass-shadow-far: light-dark(rgb(0 0 0 / 0.14), rgb(0 0 0 / 0.45));
  --glass-shadow: 0 10px 30px var(--glass-shadow-far), 0 2px 6px var(--glass-shadow-near);
  --glass-refraction: 22;
  /* Pressing a glass control swells it and gathers light under the finger
     (.press-glow); hovering with a mouse shows the glow at part strength.
     A disabled button in the glass sits back. */
  --glass-press-scale: 1.06;
  --glass-press-glow: light-dark(rgb(255 255 255 / 0.35), rgb(255 255 255 / 0.18));
  --glass-press-glow-spread: 70%;
  --glass-hover-glow-opacity: 0.5;
  --glass-disabled-opacity: 0.3;
  --glass-gap: var(--space-4);
  /* Glass on the page itself: a capsule's padding (the lightbox's hint and
     date, the toast), a case study clip's pause button and its inset from the clip's
     corner, and the toast's place above the dock. */
  --glass-capsule-pad: var(--space-4) var(--space-16);
  --clip-toggle-size: calc(var(--space-16) * 2);
  --clip-toggle-inset: var(--space-8);
  --toast-bottom: calc(var(--safe-bottom) + var(--glass-offset) + var(--control-size) + var(--glass-gap) * 2 + var(--space-8));
  --glass-offset: var(--space-16);
  /* Appearing and leaving as the page scrolls: system motion, eased. Hidden,
     the glass is small, faded and blurred, so it takes shape as it appears. */
  --duration-glass: 320ms;
  --glass-hidden-scale: 0.9;
  --glass-hidden-blur: 6px;
  /* The scroll dock shows on pages at least this many screens tall, once
     scrolled this far down one. */
  --dock-long-page: 2.5;
  --dock-show-after: 0.6;
  --focus-ring: 2px solid var(--color-text);
  --focus-offset: 2px;
}

/* The theme slider's stops: dark at 0, light at 7, six themes between.
   Each sets the scheme (which the glass and the form controls follow) and
   the four colours. With nothing chosen the system's scheme applies. */
:root[data-theme='0'] {
  color-scheme: dark;
  --color-background: #0e0e0e;
  --color-text: #f0f0f0;
  --color-muted: #a3a3a3;
  --color-rule: #383838;
}

/* Stops 1 to 6 are palettes from the Color System v1 Figma file
   (6PxLhFCnRODZh7XV5oT3gZ): each gives a background and a type colour, and
   the muted and rule colours are mixed from those at the shares the two
   system themes use (about two thirds of the way to the text, and a sixth). */
:root[data-theme='1'] {
  /* Charcoal / Wheat (Brutalist, Palette 48) */
  color-scheme: dark;
  --color-background: #263041;
  --color-text: #d2c89e;
  --color-muted: color-mix(in oklab, #d2c89e 68%, #263041);
  --color-rule: color-mix(in oklab, #d2c89e 16%, #263041);
}

:root[data-theme='2'] {
  /* Coffee / Gold (Citrus, Palette 57) */
  color-scheme: dark;
  --color-background: #3e3f31;
  --color-text: #e8c564;
  --color-muted: color-mix(in oklab, #e8c564 68%, #3e3f31);
  --color-rule: color-mix(in oklab, #e8c564 16%, #3e3f31);
}

:root[data-theme='3'] {
  /* Slate / Peach (Earthwork, Palette 09) */
  color-scheme: dark;
  --color-background: #546b60;
  --color-text: #f4d1b0;
  --color-muted: color-mix(in oklab, #f4d1b0 68%, #546b60);
  --color-rule: color-mix(in oklab, #f4d1b0 16%, #546b60);
}

:root[data-theme='4'] {
  /* Moss / Chartreuse (Botanical, Palette 22) */
  color-scheme: dark;
  --color-background: #5e755e;
  --color-text: #adfa66;
  --color-muted: color-mix(in oklab, #adfa66 68%, #5e755e);
  --color-rule: color-mix(in oklab, #adfa66 16%, #5e755e);
}

:root[data-theme='5'] {
  /* Silver / Teal (Aquamarine, Palette 19) */
  color-scheme: light;
  --color-background: #cdcbbe;
  --color-text: #2a5961;
  --color-muted: color-mix(in oklab, #2a5961 68%, #cdcbbe);
  --color-rule: color-mix(in oklab, #2a5961 16%, #cdcbbe);
}

:root[data-theme='6'] {
  /* Butter / Slate (Citrus, Palette 56) */
  color-scheme: light;
  --color-background: #f3dda3;
  --color-text: #4a4b5e;
  --color-muted: color-mix(in oklab, #4a4b5e 68%, #f3dda3);
  --color-rule: color-mix(in oklab, #4a4b5e 16%, #f3dda3);
}

:root[data-theme='7'] {
  color-scheme: light;
  --color-background: #ffffff;
  --color-text: #131313;
  --color-muted: #666666;
  --color-rule: #e0e0e0;
}

/* Home / Mobile frame: 390 wide, 24px sides, 40px top (64 here, see below), 64px section gap,
   Display mobile 32/40 with -1px tracking. */
@media (max-width: 767px) {
  :root {
    --display-size: 32px;
    --display-leading: 40px;
    --display-tracking: -1px;
    --hero-tracking: -1.6px;
    --figure-pad: var(--space-16);
    /* 40 in the frame; 64 since the theme slider sits in this padding
       and needs clear space under it before the header. */
    --page-top: var(--space-64);
    --section-gap: var(--space-64);
    --header-gap: var(--space-8);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  letter-spacing: var(--body-tracking);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

p,
h1,
h2,
h3,
h4,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Every focusable element gets the same ring. Scoped to interactive elements so
   the lightbox dialog, which takes focus when it opens, is not outlined. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* Text styles */
.display {
  font-size: var(--display-size);
  line-height: var(--display-leading);
  letter-spacing: var(--display-tracking);
  font-weight: var(--weight-regular);
}

.title {
  font-size: var(--title-size);
  line-height: var(--title-leading);
  letter-spacing: var(--title-tracking);
  font-weight: var(--weight-regular);
}

.body {
  font-size: var(--body-size);
  line-height: var(--body-leading);
  letter-spacing: var(--body-tracking);
}

.link {
  font-size: var(--link-size);
  line-height: var(--link-leading);
  letter-spacing: var(--link-tracking);
  font-weight: var(--link-weight);
}

/* The contact footer's rhythm, in three tiers: the rule and the way back
   (24 below the rule), then the heading with its links held close (40
   above, 16 to the links), then the copyright set apart (40). */
.contact {
  gap: var(--space-16);
}

.contact > .rule + .link,
.contact > .rule + .title {
  margin-top: var(--space-8);
}

.contact > .link + .title {
  margin-top: var(--space-24);
}

.contact > .contact-links + .caption {
  margin-top: var(--space-24);
}

/* The ways to get in touch, in a line in every footer: the email address on
   the left, the links elsewhere on the right. Without room for both, the
   links wrap to a row of their own. */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-24);
}

.contact-elsewhere {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-24);
}

.caption {
  font-size: var(--caption-size);
  line-height: var(--caption-leading);
  letter-spacing: var(--caption-tracking);
  font-weight: var(--weight-regular);
}

.muted {
  color: var(--color-muted);
}

.eyebrow {
  font-size: var(--caption-size);
  line-height: var(--caption-leading);
  letter-spacing: var(--eyebrow-tracking);
  font-weight: var(--weight-regular);
  text-transform: uppercase;
}

.hero {
  font-size: var(--display-size);
  line-height: var(--display-leading);
  letter-spacing: var(--hero-tracking);
  font-weight: var(--weight-semibold);
}

/* Page shell */
.page {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
  width: min(var(--content-width), 100% - 2 * var(--page-inset));
  margin-inline: auto;
  padding-block: max(var(--page-top), calc(var(--safe-top) + var(--space-16)))
    calc(var(--page-bottom) + var(--safe-bottom));
}

/* Sub-pages (work, playground, moodboard) run a tighter rhythm than the home page. */
.page.sub {
  --section-gap: var(--space-64);
}

.section {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}

/* The introduction: the eyebrow sits close over the headline, the paragraph
   a section gap under that, and the buttons set apart below. */
.section.intro {
  gap: 0;
}

.intro > .eyebrow + .hero {
  margin-top: var(--space-8);
}

.intro > .hero + .body {
  margin-top: var(--space-24);
}

.intro > .actions {
  margin-top: var(--space-48);
}

/* The actions: pill buttons in link type, outlined with a hairline, or
   filled where a block asks for it (.primary, the resume's Print). Pointing
   at an outlined one frosts it with the controls' fill; a press shrinks
   either slightly. */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
}

/* On a phone the introduction's buttons stack, each the column's width,
   rather than breaking across lines. */
@media (max-width: 767px) {
  .intro > .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .intro > .actions .wp-block-button,
  .intro > .actions .wp-block-button__link {
    width: 100%;
  }
}

.button,
.actions .wp-block-button__link {
  display: inline-flex;
  background-color: transparent;
  font-family: inherit;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-target);
  padding: var(--button-pad-block) var(--button-pad-inline);
  border: var(--rule);
  border-radius: var(--radius-pill);
  color: var(--color-text);
  font-size: var(--link-size);
  line-height: var(--link-leading);
  letter-spacing: var(--link-tracking);
  font-weight: var(--link-weight);
  white-space: nowrap;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.button:hover,
.actions .wp-block-button__link:hover {
  background-color: var(--control-fill);
  text-decoration: none;
}

.button:active,
.actions .wp-block-button__link:active {
  transform: scale(var(--control-press-scale));
}

.button.primary,
.button.primary:hover,
.actions .wp-block-button:not(.is-style-outline) .wp-block-button__link,
.actions .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background-color: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-background);
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .actions .wp-block-button__link {
    transition: none;
  }
}

/* Liquid glass: the material for floating controls on the navigation layer
   (the scroll dock, the lightbox's controls, the theme slider's thumb, a
   clip's pause button, the toast). A light blur with a
   saturation lift and a faint tint, rims top and bottom, a hairline edge,
   a soft shadow, and a specular highlight round the rim (::before). The
   element using it sets its own shape and position. */
.glass {
  position: relative;
  background: var(--glass-tint);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  box-shadow:
    inset 0 var(--hairline) 0 var(--glass-rim),
    inset 0 calc(-1 * var(--hairline)) 0 var(--glass-rim-soft),
    inset 0 0 0 var(--hairline) var(--glass-edge),
    var(--glass-shadow);
}

.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: var(--hairline);
  border-radius: inherit;
  background: var(--glass-sheen);
  mask:
    linear-gradient(#000 0 0) content-box exclude,
    linear-gradient(#000 0 0);
  pointer-events: none;
}

/* The press glow on a glass button: light gathered under the finger
   (--px/--py, set by the button's script; the centre otherwise). The button
   positions itself and clips to its shape. */
.press-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--px, 50%) var(--py, 50%), var(--glass-press-glow), transparent var(--glass-press-glow-spread));
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
  pointer-events: none;
}

.press-glow:active:not(:disabled)::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .press-glow::after {
    transition: none;
  }
}

/* Anything the lightbox opens. */
[data-zoom] {
  display: block;
  cursor: zoom-in;
}

.rule {
  height: var(--hairline);
  background-color: var(--color-rule);
}

@media (max-width: 767px) {
  .page.sub {
    --section-gap: var(--space-48);
  }

  /* Desktop-only line breaks inside a paragraph. */
  .br-desktop {
    display: none;
  }
}


/* ---- Page shell ----------------------------------------------------- */
/* .wp-site-blocks is the page shell, one flex column with the section gap.
   The header and footer parts and the content wrapper exist in the markup
   but not in the layout, so their children take part in that column. */
.wp-site-blocks {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
  width: min(var(--content-width), 100% - 2 * var(--page-inset));
  margin-inline: auto;
  padding-block: max(var(--page-top), calc(var(--safe-top) + var(--space-16)))
    calc(var(--page-bottom) + var(--safe-bottom));
}

body.sub .wp-site-blocks {
  --section-gap: var(--space-64);
}

.wp-block-template-part,
.entry-content {
  display: contents;
}

/* The content wrapper carries a constrained-layout rule (core/ block CSS)
   that caps and centres each block on its own: one narrower than its text allows (the sections list) floats
   off the left edge. The shell is already the content width, so the blocks
   fill it. */
.entry-content > * {
  width: 100%;
  max-width: none;
}

/* Blocks the content may carry, in the site's own styles. */
.entry-content > .wp-block-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}

/* Safari 26 and later colour their toolbar (and the iPhone's status bar)
   from a fixed or sticky element found a few pixels inside the viewport's
   top edge, not from the theme-color meta, and paint no colour when there
   is none. This strip is that element: fixed, the full width, deeper than
   the sampled band, in the page's colour, and letting clicks through. The
   theme-color metas stay for Chrome and Android. On the Mac and iPad,
   WebKit samples the top edge only until the page is first scrolled or
   interacted with, so a stop chosen here reaches the toolbar on the next
   page load; the iPhone follows live. */
.chrome-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: var(--chrome-strip-height);
  background-color: var(--color-background);
  pointer-events: none;
}


/* ---- blocks/theme-slider ----------------------------------------- */
/* A range input, so the stops snap and the keyboard works, drawn as a
   colour picker's bar: the track is the stops' backgrounds dark to light,
   a dot in each stop's type colour marks it (the one under the thumb is
   hidden), and the thumb is a ring in the text colour filled with the page.
   It sits in the shell's top padding, under the safe area, so nothing
   moves for it. Once the script has placed it, the thumb is a lens of the
   dock's glass over the bar (.theme-thumb), and the input's own is hidden. */
.theme-slider {
  position: absolute;
  top: max(var(--theme-track-top), calc(var(--safe-top) + var(--space-4)), var(--chrome-strip-height));
  left: 0;
  right: 0;
  height: var(--theme-thumb-size);
}

.theme-ticks {
  position: absolute;
  inset: 0 calc(var(--theme-thumb-size) / 2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.theme-ticks span {
  width: var(--theme-tick-size);
  height: var(--theme-tick-size);
  border-radius: 50%;
  background: var(--tick);
}

.theme-ticks span:nth-child(1) { --tick: #f0f0f0; }
.theme-ticks span:nth-child(2) { --tick: #d2c89e; }
.theme-ticks span:nth-child(3) { --tick: #e8c564; }
.theme-ticks span:nth-child(4) { --tick: #f4d1b0; }
.theme-ticks span:nth-child(5) { --tick: #adfa66; }
.theme-ticks span:nth-child(6) { --tick: #2a5961; }
.theme-ticks span:nth-child(7) { --tick: #4a4b5e; }
.theme-ticks span:nth-child(8) { --tick: #131313; }

.theme-slider[data-stop='0'] .theme-ticks span:nth-child(1),
.theme-slider[data-stop='1'] .theme-ticks span:nth-child(2),
.theme-slider[data-stop='2'] .theme-ticks span:nth-child(3),
.theme-slider[data-stop='3'] .theme-ticks span:nth-child(4),
.theme-slider[data-stop='4'] .theme-ticks span:nth-child(5),
.theme-slider[data-stop='5'] .theme-ticks span:nth-child(6),
.theme-slider[data-stop='6'] .theme-ticks span:nth-child(7),
.theme-slider[data-stop='7'] .theme-ticks span:nth-child(8) {
  visibility: hidden;
}

.theme-range {
  display: block;
  width: 100%;
  height: var(--theme-thumb-size);
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
}

.theme-range:focus-visible {
  outline: none;
}

.theme-range::-webkit-slider-runnable-track {
  height: var(--theme-track-height);
  border-radius: var(--radius-pill);
  background: var(--theme-track);
}

.theme-range::-moz-range-track {
  height: var(--theme-track-height);
  border-radius: var(--radius-pill);
  background: var(--theme-track);
}

.theme-range::-webkit-slider-thumb {
  appearance: none;
  width: var(--theme-thumb-size);
  height: var(--theme-thumb-size);
  margin-top: calc((var(--theme-track-height) - var(--theme-thumb-size)) / 2);
  border: var(--theme-thumb-ring) solid var(--color-text);
  border-radius: 50%;
  background: var(--color-background);
  transition:
    background-color var(--duration-theme) var(--ease-out),
    border-color var(--duration-theme) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.theme-range::-moz-range-thumb {
  width: var(--theme-thumb-size);
  height: var(--theme-thumb-size);
  border: var(--theme-thumb-ring) solid var(--color-text);
  border-radius: 50%;
  background: var(--color-background);
  transition:
    background-color var(--duration-theme) var(--ease-out),
    border-color var(--duration-theme) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.theme-range:active::-webkit-slider-thumb,
.theme-range:focus-visible::-webkit-slider-thumb {
  transform: scale(1.25);
}

.theme-range:active::-moz-range-thumb,
.theme-range:focus-visible::-moz-range-thumb {
  transform: scale(1.25);
}

/* The glass thumb: the dock's material as a lens on the bar, at the stop
   the script sets (--stop). It springs to a new stop, swells under a press
   as the dock's buttons do, and takes a ring for keyboard focus. Pointer
   events pass through to the input beneath. */
.theme-thumb {
  position: absolute;
  top: 0;
  left: calc(var(--stop) / (var(--theme-stops) - 1) * (100% - var(--theme-thumb-size)));
  width: var(--theme-thumb-size);
  height: var(--theme-thumb-size);
  border-radius: 50%;
  pointer-events: none;
  transition:
    left var(--duration-spring) var(--ease-spring),
    scale var(--duration-fast) var(--ease-out);
}

.theme-slider:not([data-stop]) .theme-thumb {
  display: none;
}

.theme-slider[data-stop] .theme-range::-webkit-slider-thumb {
  opacity: 0;
}

.theme-slider[data-stop] .theme-range::-moz-range-thumb {
  opacity: 0;
}

.theme-range:active ~ .theme-thumb {
  scale: var(--glass-press-scale);
}

.theme-range:active ~ .theme-thumb::after {
  opacity: 1;
}

.theme-range:focus-visible ~ .theme-thumb {
  outline: var(--theme-thumb-ring) solid var(--color-text);
  outline-offset: var(--theme-thumb-ring);
}

/* Choosing a stop: every colour on the page eases to the new theme. The
   script sets the attribute for the duration, so the components' own
   transitions come back after. */
:root[data-theme-changing] *,
:root[data-theme-changing] *::before,
:root[data-theme-changing] *::after {
  transition:
    background-color var(--duration-theme) var(--ease-out),
    color var(--duration-theme) var(--ease-out),
    border-color var(--duration-theme) var(--ease-out),
    fill var(--duration-theme) var(--ease-out),
    outline-color var(--duration-theme) var(--ease-out),
    box-shadow var(--duration-theme) var(--ease-out) !important;
}

/* The glass thumb keeps its spring to the new stop while the colours ease. */
:root[data-theme-changing] .theme-thumb {
  transition:
    left var(--duration-spring) var(--ease-spring),
    scale var(--duration-fast) var(--ease-out),
    background-color var(--duration-theme) var(--ease-out),
    box-shadow var(--duration-theme) var(--ease-out) !important;
}

@media (prefers-reduced-motion: reduce) {
  .theme-range::-webkit-slider-thumb,
  .theme-range::-moz-range-thumb,
  .theme-thumb {
    transition: none;
  }
}


/* ---- components/SiteHeader --------------------------------------- */
.site-header {
  display: flex;
  gap: var(--header-gap);
  align-items: flex-start;
}
/* The name takes what the links leave, so the links stay on one line. */
.name {
  flex: 1 1 auto;
  min-width: 0;
}
.side {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-24);
}
@media (max-width: 767px) {
  .site-header {
    flex-direction: column;
  }
  .name,
  .side {
    flex: none;
  }
  /* Four links do not fit across a phone: two by two. */
  .side {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    column-gap: var(--space-24);
    row-gap: var(--space-8);
    justify-content: flex-start;
  }
}


/* ---- components/ProjectRow --------------------------------------- */
.row-item {
  border-bottom: var(--rule);
}
.row {
  display: flex;
  gap: var(--space-24);
  align-items: flex-start;
  padding-block: var(--space-16);
  min-height: var(--tap-target);
}
.row:hover {
  text-decoration: none;
}
.row:hover .row-title {
  text-decoration: underline;
}
.row .info {
  display: flex;
  flex: 1 0 0;
  min-width: 0;
  flex-direction: column;
  gap: var(--space-4);
}
.year {
  flex: none;
  width: var(--year-width);
  text-align: right;
}
/* The study's first fact: the value in the title's style over its label,
   a column of its own before the year. On a phone it drops under the row
   as one line. */
.row .stat {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: var(--space-4);
  width: var(--stat-width);
}
@media (max-width: 767px) {
  .row {
    flex-wrap: wrap;
  }
  .row .stat {
    flex-direction: row;
    flex-basis: 100%;
    align-items: baseline;
    gap: var(--space-8);
    width: auto;
    order: 2;
  }
}


/* ---- components/CoverRow ----------------------------------------- */
.cover-row {
  position: relative;
  display: flex;
  gap: var(--space-24);
  align-items: flex-start;
  padding-block: var(--space-24);
}

/* The title's link covers the row, and carries the focus ring there. */
.cover-row .row-title::after {
  content: '';
  position: absolute;
  inset: 0;
}

.cover-row .row-title:focus-visible {
  outline: none;
}

.cover-row .row-title:focus-visible::after {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.cover-row:hover .row-title {
  text-decoration: underline;
}

/* The row's own links sit above the title's reach. */
.actions {
  position: relative;
  z-index: 1;
  align-self: flex-start;
}

.cover-row:has(.actions:hover) .row-title {
  text-decoration: none;
}

/* The cover is the page's own element, so outside this component's scope. */
.cover-row > img {
  display: block;
  flex: none;
  width: var(--snap-thumb-width);
  height: auto;
  aspect-ratio: var(--snap-cover-ratio);
  object-fit: cover;
}

.cover-row.square > img {
  aspect-ratio: 1;
}

.cover-row .info {
  display: flex;
  flex: 1 0 0;
  min-width: 0;
  flex-direction: column;
  gap: var(--space-8);
}

.cover-row .meta {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding-top: var(--space-8);
}

.cover-row .meta-row {
  display: flex;
  gap: var(--space-16);
}

.cover-row .meta-row dt {
  flex: none;
  width: var(--snap-meta-label-width);
}

.cover-row .meta-row dd {
  flex: 1 0 0;
  min-width: 0;
  margin: 0;
}

/* The row's button sits a step under the facts, as the facts do under the text. */
.cover-row .actions {
  padding-top: var(--space-8);
}

/* No room for two columns on a phone: the cover goes full width above. */
@media (max-width: 767px) {
  .cover-row {
    flex-direction: column;
    gap: var(--space-16);
  }

  .cover-row > img {
    width: 100%;
  }
}


/* ---- components/Email -------------------------------------------- */
.email {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-4) var(--space-8);
}

/* A text control, like the links around it: underlined when pointed at. */
.copy {
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  cursor: pointer;
}

.copy:hover {
  text-decoration: underline;
}

/* The copy's confirmation: a capsule of the dock's glass above the dock,
   taking shape and leaving as the dock does. */
.toast {
  position: fixed;
  left: 50%;
  bottom: var(--toast-bottom);
  z-index: 10;
  margin: 0;
  padding: var(--glass-capsule-pad);
  border-radius: var(--radius-pill);
  color: var(--color-text);
  white-space: nowrap;
  translate: -50% 0;
  pointer-events: none;
  opacity: 0;
  scale: var(--glass-hidden-scale);
  filter: blur(var(--glass-hidden-blur));
  transition:
    opacity var(--duration-glass) var(--ease-out),
    scale var(--duration-glass) var(--ease-out),
    filter var(--duration-glass) var(--ease-out);
}

.toast.is-shown {
  opacity: 1;
  scale: 1;
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    scale: 1;
    filter: none;
    transition: none;
  }
}


/* ---- components/ServiceLinks ------------------------------------- */
.services {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-8) var(--space-24);
  margin: 0;
  padding: 0;
  list-style: none;
}

.service {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
}

.service img,
.service svg {
  flex: none;
  width: var(--service-icon-size);
  height: var(--service-icon-size);
  object-fit: contain;
  fill: currentColor;
}


/* ---- components/Gallery ------------------------------------------ */
/* Two columns, laid out by shape (the block classes each image): a wide
   image takes the row; squares and portraits sit two to a row, tops
   aligned; one of those left without a partner takes the row with the
   image centred and no taller than the cap; a whole-page screenshot shows
   its top at the cap's height. A grid, not multi-column, since browsers
   reorder items around column spanners. Figures sit 48 apart, each with
   its caption 16 under it. */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-48) var(--space-24);
  align-items: start;
}
.gallery li {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  grid-column: 1 / -1;
}
.gallery li.half {
  grid-column: auto;
}
.gallery li.lone img,
.gallery li.lone video {
  width: auto;
  max-width: 100%;
  max-height: var(--figure-cap);
  margin-inline: auto;
}
.gallery li.tall img {
  height: var(--figure-cap);
  object-fit: cover;
  object-position: top;
}
@media (max-width: 767px) {
  .gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery li.half img {
    width: auto;
    max-width: 100%;
    max-height: var(--figure-cap);
    margin-inline: auto;
  }
}

/* A case study's facts under the header's meta line: a ruled row, each a
   value in the title style over its label. */
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-16) var(--space-40);
  padding-top: var(--space-24);
  border-top: var(--rule);
}
.fact {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
/* Each image sits on a plate: a faint fill inside a hairline, the image
   inset from its edge, so screens exported without a background of their
   own read as one figure rather than parts floating on the page. */
.gallery a,
.gallery .plate {
  display: block;
  padding: var(--figure-pad);
  border: var(--rule);
  border-radius: var(--figure-radius);
  background: var(--figure-fill);
}
.gallery img,
.gallery video {
  display: block;
  width: 100%;
  height: auto;
}
.gallery video {
  border-radius: var(--figure-clip-radius);
}
/* A clip's plate holds its link and its pause button, the button in the
   clip's own corner, so the frame is no wider than the clip. */
.gallery .plate a {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
.clip-frame {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}

/* A clip's pause and play button: the dock's glass, small, in the clip's
   top corner, with the dock's press. It shows the action it will take. */
.clip-toggle {
  position: absolute;
  top: var(--clip-toggle-inset);
  right: var(--clip-toggle-inset);
  z-index: 3;
  display: grid;
  place-items: center;
  width: var(--clip-toggle-size);
  height: var(--clip-toggle-size);
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--color-text);
  cursor: pointer;
  transition:
    transform var(--duration-spring) var(--ease-spring),
    opacity var(--duration-controls) var(--ease-out);
}
.clip-toggle[hidden] {
  display: none;
}
.clip-toggle svg {
  width: var(--icon-size);
  height: var(--icon-size);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.clip-toggle .play,
.clip-toggle[data-paused] .pause {
  display: none;
}
.clip-toggle[data-paused] .play {
  display: inline;
}
.clip-toggle:active {
  transform: scale(var(--glass-press-scale));
}
@media (hover: hover) {
  .clip-toggle:hover::after {
    opacity: var(--glass-hover-glow-opacity);
  }
}
@media (prefers-reduced-motion: reduce) {
  .clip-toggle {
    transition: none;
  }
  .clip-toggle:active {
    transform: none;
  }
}


/* ---- components/Board -------------------------------------------- */
/* The page's copy stays in the 720px column; only the board breaks out
   wider. */
.board-wrap {
  --board-w: min(var(--board-width), calc(100vw - 2 * var(--page-inset)));
  width: var(--board-w);
  margin-inline: calc((100% - var(--board-w)) / 2);
}

/* Without the script: CSS columns, by column width. */
.board {
  columns: var(--board-column);
  column-gap: var(--board-gap);
}

/* An even board: no scatter (its tiles carry no place in the cycle), and
   on wide screens the spacing of a grid rather than a loose spread. */
@media (min-width: 900px) {
  .board.even {
    --board-gap: var(--space-24);
    --board-rhythm: var(--space-40);
  }
}

/* A formatting root, so the inner box's margins count in the tile's
   measured height. */
.tile {
  position: relative;
  display: flow-root;
  break-inside: avoid;
}

/* With it: each tile placed by the script, one column wide. */
.board.is-placed {
  position: relative;
  columns: auto;
}

.board.is-placed > .tile {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--lane-w);
}

/* The inner box carries the scatter: its width, indent and spacing are
   shares of the column. */
.tile-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  margin-bottom: var(--board-rhythm);
}

.board a {
  position: relative;
  transition: transform var(--duration-fast) var(--ease-out);
}

.board img {
  display: block;
  width: 100%;
  height: auto;
}

/* The clip lies over its own poster and fades in once it starts playing, so
   a video that never loads simply stays a still. */
.board video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.board .is-playing video {
  opacity: 1;
}

/* A clip with no still is the tile: in the flow at the column's width, its
   aspect from its attributes before it loads, visible from the start. */
.board .clip video {
  position: static;
  height: auto;
  opacity: 1;
}

/* Hovering lifts a tile above its neighbours as it grows. */
.tile:hover,
.tile:focus-within {
  z-index: 2;
}

.tile:hover a,
.tile:focus-within a {
  transform: scale(var(--tile-hover-scale));
}

/* An even board singles the tile out more: it grows further and the rest
   fade back a little. Pointer only, so a tap on a phone does not leave
   the board dimmed; keyboard focus does the same. */
.board.even .tile {
  transition: opacity var(--duration-fast) var(--ease-out);
}

.board.even .tile:focus-within a {
  transform: scale(var(--tile-hover-scale-even));
}

.board.even:has(.tile:focus-within) .tile:not(:focus-within) {
  opacity: var(--tile-dim-opacity);
}

/* In an outer column it grows from the page's edge inward, so it is not
   pushed off the screen. */
.board.even .tile[data-edge='start'] a {
  transform-origin: left center;
}

.board.even .tile[data-edge='end'] a {
  transform-origin: right center;
}

@media (hover: hover) {
  .board.even .tile:hover a {
    transform: scale(var(--tile-hover-scale-even));
  }

  .board.even:has(.tile:hover) .tile:not(:hover) {
    opacity: var(--tile-dim-opacity);
  }
}

@media (prefers-reduced-motion: reduce) {
  .board a,
  .board.even .tile {
    transition: none;
  }
}

/* Narrow screens have no room to scatter: even columns, tighter rhythm. */
@media (max-width: 899px) {
  .board {
    --board-column: var(--board-column-narrow);
    --board-gap: var(--space-16);
    --board-rhythm: var(--space-24);
  }
}

/* A nine-tile cycle of widths and offsets, wide screens only, by a tile's
   place in the order. Tiles land at different sizes and indents in each
   column, and each carries its own top padding, so the columns begin at
   different heights. Padding rather than margin, which browsers may
   truncate at a column break in the CSS-columns fallback. */
@media (min-width: 900px) {
  .tile[data-scatter='1'] .tile-inner {
    width: 100%;
    margin-bottom: var(--board-rhythm);
  }
  .tile[data-scatter='2'] .tile-inner {
    width: 42%;
    margin-left: 52%;
    padding-top: calc(var(--board-rhythm) * 0.9);
    margin-bottom: calc(var(--board-rhythm) * 1.4);
  }
  .tile[data-scatter='3'] .tile-inner {
    width: 78%;
    margin-left: 4%;
    padding-top: calc(var(--board-rhythm) * 0.15);
    margin-bottom: calc(var(--board-rhythm) * 0.8);
  }
  .tile[data-scatter='4'] .tile-inner {
    width: 54%;
    margin-left: 22%;
    padding-top: calc(var(--board-rhythm) * 0.55);
    margin-bottom: calc(var(--board-rhythm) * 1.3);
  }
  .tile[data-scatter='5'] .tile-inner {
    width: 92%;
    margin-left: 8%;
    margin-bottom: calc(var(--board-rhythm) * 0.9);
  }
  .tile[data-scatter='6'] .tile-inner {
    width: 36%;
    padding-top: calc(var(--board-rhythm) * 1.1);
    margin-bottom: calc(var(--board-rhythm) * 1.5);
  }
  .tile[data-scatter='7'] .tile-inner {
    width: 68%;
    margin-left: 30%;
    padding-top: calc(var(--board-rhythm) * 0.3);
    margin-bottom: var(--board-rhythm);
  }
  .tile[data-scatter='8'] .tile-inner {
    width: 48%;
    margin-left: 6%;
    padding-top: calc(var(--board-rhythm) * 0.8);
    margin-bottom: calc(var(--board-rhythm) * 1.25);
  }
  .tile[data-scatter='9'] .tile-inner {
    width: 84%;
    margin-left: 14%;
    padding-top: calc(var(--board-rhythm) * 0.1);
    margin-bottom: calc(var(--board-rhythm) * 0.95);
  }
}


/* ---- components/Lightbox ----------------------------------------- */
.lightbox {
  /* Room above the image for the controls' row, and below it for the
     home indicator. */
  /* The close button is glass, the height of the scroll dock. */
  --close-size: calc(var(--control-size) + var(--glass-gap) * 2);
  --stage-top: calc(var(--safe-top) + var(--space-16) * 2 + var(--close-size));
  --stage-bottom: calc(var(--safe-bottom) + var(--space-24));
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
}

/* The viewer's background is its own layer, so a dismissing gesture can
   fade it and let the page show through (--scrim, set by the script). */
.lightbox::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--color-background);
  opacity: var(--scrim, 1);
}
/* The dialog holds focus while open so the close button does not show a
   ring on open; a ring around the whole screen says nothing, so it has
   none. Tabbing reaches the close button, which has the site's ring. */
.lightbox:focus {
  outline: none;
}

.lightbox::backdrop {
  background: transparent;
}

/* The page beneath holds still while the viewer is open: a wheel or the
   keyboard would otherwise scroll it through the dialog, and it would be
   somewhere else on close. The scroll offset is kept, so a dismissed photo
   still finds its tile. */
html:has(.lightbox[open]) {
  overflow: hidden;
}
/* The controls' row: below the top safe area, inside the side ones. It
   lets clicks through between the controls, to the stage. */
.bar {
  position: fixed;
  top: calc(var(--safe-top) + var(--space-16));
  left: max(var(--space-16), var(--safe-left));
  right: max(var(--space-16), var(--safe-right));
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  pointer-events: none;
  transition: opacity var(--duration-controls) var(--ease-out);
}

.hint,
.close {
  pointer-events: auto;
}

/* The hint is a capsule of the same glass as the close button. */
.hint {
  margin: 0;
  padding: var(--glass-capsule-pad);
  border-radius: var(--radius-pill);
  cursor: default;
}

/* The same liquid glass as the scroll dock (.glass), and the same press:
   it swells on a spring and gathers light under the finger. */
.close {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--close-size);
  height: var(--close-size);
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  color: inherit;
  cursor: pointer;
  transition: transform var(--duration-spring) var(--ease-spring);
}

.close svg {
  width: var(--icon-size);
  height: var(--icon-size);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-stroke);
  stroke-linecap: round;
}

@media (hover: hover) {
  .close:hover::after {
    opacity: var(--glass-hover-glow-opacity);
  }
}

.close:active {
  transform: scale(var(--glass-press-scale));
}

/* The photo's date (feed photos), a glass capsule centred under it. The photo
   leaves room for it at fit size; zoomed in, the photo covers that space,
   so the date steps aside. */
.lightbox.has-date {
  --stage-bottom: calc(var(--safe-bottom) + var(--space-16) * 2 + var(--caption-leading) + var(--space-4) * 2);
}

.date {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + var(--space-16));
  margin: 0;
  padding: var(--glass-capsule-pad);
  border-radius: var(--radius-pill);
  translate: -50% 0;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity var(--duration-controls) var(--ease-out);
}

.lightbox:not(.has-date) .date,
.lightbox.is-video .date {
  display: none;
}

.lightbox.is-chrome-hidden .date,
.lightbox.is-dragging .date,
.lightbox.is-paging .date,
.lightbox.is-zoomed .date {
  opacity: 0;
}

/* The stage fits the media between the controls and the bottom edge. The
   photo and the one arriving on a turn share its one cell. */
.stage {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: var(--stage-top) max(var(--space-24), var(--safe-right)) var(--stage-bottom)
    max(var(--space-24), var(--safe-left));
}

.stage img,
.stage video {
  display: block;
  grid-area: 1 / 1;
  max-width: 100%;
  max-height: calc(100dvh - var(--stage-top) - var(--stage-bottom));
  width: auto;
  height: auto;
  cursor: zoom-in;
}

/* The photo arriving on a turn: until it has loaded, its tile's copy
   stands in for it (set by the script). */
.stage [data-neighbour] {
  background-size: 100% 100%;
  pointer-events: none;
}

.stage img[hidden] {
  display: none;
}

.stage video {
  cursor: default;
}

/* Only one of the two is ever in play. */
.lightbox:not(.is-video) [data-player],
.lightbox.is-video [data-image],
.lightbox.is-video .hint {
  display: none;
}
.lightbox.is-full .stage {
  display: block;
  overflow: auto;
}

.lightbox.is-chrome-hidden .bar,
.lightbox.is-dragging .bar {
  opacity: 0;
}

/* Closing with no tile to return to: the photo fades as it goes. */
.lightbox.is-fading [data-image] {
  opacity: 0;
  transition: opacity var(--duration-glass) var(--ease-out);
}

.lightbox.is-chrome-hidden .bar > * {
  pointer-events: none;
}

/* Touch: the script places and transforms the image itself, and the stage
   takes every gesture so the browser does not zoom the page instead. */
.lightbox.is-touch:not(.is-video) .stage {
  position: relative;
  display: block;
  overflow: hidden;
  touch-action: none;
}

.lightbox.is-touch:not(.is-video) .stage img {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--fit-w);
  height: var(--fit-h);
  max-width: none;
  max-height: none;
  transform-origin: 0 0;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.lightbox.is-full .stage img {
  max-width: none;
  max-height: none;
  margin: 0 auto;
  cursor: zoom-out;
}

/* Reduced motion: every transition is instant and the press does not
   swell. */
@media (prefers-reduced-motion: reduce) {
  .close,
  .date,
  .bar {
    transition: none;
  }

  .close:active {
    transform: none;
  }
}


/* ---- components/ScrollDock --------------------------------------- */
.defs {
  position: absolute;
  width: 0;
  height: 0;
}

.dock {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + var(--glass-offset));
  z-index: 10;
  display: flex;
  gap: var(--glass-gap);
  padding: var(--glass-gap);
  border-radius: var(--radius-pill);
  color: var(--color-text);
  translate: -50% 0;
  /* Hidden: small, faded and blurred, so it takes shape as it appears. */
  opacity: 0;
  scale: var(--glass-hidden-scale);
  filter: blur(var(--glass-hidden-blur));
  transition:
    opacity var(--duration-glass) var(--ease-out),
    scale var(--duration-glass) var(--ease-out),
    filter var(--duration-glass) var(--ease-out),
    transform var(--duration-spring) var(--ease-spring);
}

.dock.is-shown {
  opacity: 1;
  scale: 1;
  filter: none;
}

/* Chromium bends the backdrop before blurring it. */
.dock.is-refracting {
  backdrop-filter: url(#dock-refract) blur(var(--glass-blur)) saturate(var(--glass-saturate));
}

/* Pressing swells the glass on a spring, as a touch does on iOS. */
.dock:has(.dock-button:active:not(:disabled)) {
  transform: scale(var(--glass-press-scale));
}

.dock-button {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--control-size);
  height: var(--control-size);
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: inherit;
  cursor: pointer;
  overflow: hidden;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    opacity var(--duration-fast) var(--ease-out);
}

.dock-button svg {
  width: var(--icon-size);
  height: var(--icon-size);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) {
  .dock-button:hover:not(:disabled) {
    background: var(--control-fill);
  }
}

.dock-button:disabled {
  opacity: var(--glass-disabled-opacity);
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  .dock,
  .dock-button {
    transition: none;
  }

  .dock:has(.dock-button:active:not(:disabled)) {
    transform: none;
  }
}


/* ---- components/Segmented ---------------------------------------- */
.segmented {
  position: relative;
  display: inline-flex;
  align-self: flex-start;
  max-width: 100%;
  margin: 0;
  padding: var(--space-4);
  border: var(--rule);
  border-radius: var(--radius-pill);
}

.segmented:not(.is-ready) {
  visibility: hidden;
}

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

.option {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  min-height: var(--tap-target);
  padding: var(--filter-pad-block) var(--filter-pad-inline);
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  font-size: var(--link-size);
  line-height: var(--link-leading);
  letter-spacing: var(--link-tracking);
  font-weight: var(--link-weight);
  white-space: nowrap;
  cursor: pointer;
  transition:
    color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

/* The radio covers its option: native keyboard and screen reader behaviour,
   drawn by the option around it. */
.option input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}

.option:hover {
  color: var(--color-text);
}

.option:active {
  transform: scale(var(--control-press-scale));
}

.option:has(input:focus-visible) {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.option:has(input:disabled) {
  opacity: var(--control-disabled-opacity);
  cursor: default;
  transform: none;
}

/* One pill for the whole track, drawn under the options (they follow it
   in the DOM). */
.pill {
  position: absolute;
  top: var(--space-4);
  bottom: var(--space-4);
  left: 0;
  width: var(--pill-w, 0);
  translate: var(--pill-x, 0) 0;
  border-radius: var(--radius-pill);
  background: var(--color-text);
  pointer-events: none;
  transition:
    translate var(--duration-spring) var(--ease-spring),
    width var(--duration-spring) var(--ease-spring);
}

.segmented.is-instant .pill {
  transition: none;
}

.option-label,
.count {
  position: relative;
}

.count {
  font-size: var(--caption-size);
  line-height: var(--caption-leading);
  font-weight: var(--weight-regular);
  font-variant-numeric: tabular-nums;
  opacity: var(--control-secondary-opacity);
}

/* The checked option's text inverts over the pill. It eases across the
   pill's travel, so mid-slide it is a grey that reads on the pill and the
   track alike. */
.option:has(input:checked) {
  color: var(--color-background);
  transition:
    color var(--duration-spring) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .pill,
  .option,
  .option:has(input:checked) {
    transition: none;
  }
}

/* On a phone the options share the track evenly, in caption type. */
@media (max-width: 767px) {
  .segmented {
    display: flex;
    align-self: stretch;
  }

  .option {
    flex: 1 1 auto;
    justify-content: center;
    gap: var(--space-4);
    padding-inline: var(--space-8);
    font-size: var(--caption-size);
    line-height: var(--caption-leading);
    letter-spacing: var(--caption-tracking);
  }
}


/* ---- components/Prose -------------------------------------------- */
.post {
  gap: var(--space-16);
}

.post h2,
.post h3 {
  padding-top: var(--space-8);
  color: var(--color-muted);
  font-size: var(--caption-size);
  line-height: var(--caption-leading);
  letter-spacing: var(--caption-tracking);
  font-weight: var(--weight-regular);
}

/* A link inside running text: the text colour (so it stands out of a muted
   paragraph) and underlined. Pointing at it reverses it, the text colour
   behind and the page colour on top, which holds at every theme stop. */
.post a,
.intro > .body a {
  color: var(--color-text);
  text-decoration: underline;
}

.post a:hover,
.intro > .body a:hover {
  background-color: var(--color-text);
  color: var(--color-background);
  text-decoration: none;
}

.post strong {
  font-weight: var(--link-weight);
}

.post ul,
.post ol {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding-left: var(--space-24);
}

.post ul {
  list-style: disc;
}

.post ol {
  list-style: decimal;
}

.post blockquote {
  margin: 0;
  padding-left: var(--space-24);
  border-left: var(--rule);
  color: var(--color-muted);
}

.post hr {
  height: var(--hairline);
  margin: 0;
  border: 0;
  background-color: var(--color-rule);
}

.post img,
.post iframe {
  display: block;
  width: 100%;
  border: 0;
}

.post img {
  height: auto;
}

.post pre {
  max-width: 100%;
  margin: 0;
  padding: var(--space-16);
  overflow-x: auto;
  border: var(--rule);
}

.post code {
  font-family: var(--font-mono);
  font-size: var(--caption-size);
  line-height: var(--caption-leading);
  letter-spacing: 0;
}

.post table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.post th,
.post td {
  padding: var(--space-8) var(--space-16) var(--space-8) 0;
  border-bottom: var(--rule);
  text-align: left;
  vertical-align: top;
}

.post th {
  color: var(--color-muted);
  font-size: var(--caption-size);
  line-height: var(--caption-leading);
  font-weight: var(--weight-regular);
}


/* ---- blocks/repo ------------------------------------------------- */
/* A repository's files as a tree: folders are details elements, so they
   open and close without script; each level sits inside a left rule, the
   way the resume nests its clients. */
.tree-list {
  display: flex;
  flex-direction: column;
}

.tree-list .tree-list {
  margin-left: var(--space-8);
  padding-left: var(--space-16);
  border-left: var(--rule);
}

.tree-list > li {
  min-width: 0;
}

.tree-row {
  display: flex;
  gap: var(--space-8);
  align-items: center;
  padding-block: var(--space-8);
  font-size: var(--link-size);
  line-height: var(--link-leading);
  letter-spacing: var(--link-tracking);
  overflow-wrap: anywhere;
}

summary.tree-row {
  font-weight: var(--link-weight);
  list-style: none;
  cursor: pointer;
}

summary.tree-row::-webkit-details-marker {
  display: none;
}

/* The chevron: points right on a closed folder, down on an open one. */
summary.tree-row::before {
  content: '';
  flex: none;
  width: var(--space-8);
  height: var(--space-8);
  margin-inline: var(--space-4);
  border-right: var(--hairline) solid currentColor;
  border-bottom: var(--hairline) solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--duration-fast) var(--ease-out);
}

.tree-folder[open] > summary.tree-row::before {
  transform: rotate(45deg);
}

summary.tree-row:hover {
  text-decoration: underline;
}

summary.tree-row:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.tree-file {
  padding-left: var(--space-24);
  color: var(--color-muted);
}

.tree-file:hover,
.tree-file[aria-expanded='true'] {
  color: var(--color-text);
}

.tree-file[aria-expanded='true'] {
  font-weight: var(--link-weight);
}

.tree-file[aria-busy='true'] {
  cursor: progress;
}

/* An open file: one box around its name and its contents, so the file
   reads as the row that was clicked, grown. The name keeps its place in
   the list, the way to GitHub sits across from it, and the contents run
   the box's width below. The panel's parts are laid out on the row's grid. */
.tree-list > li:has(> .tree-panel) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--space-16);
  align-items: center;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-24);
  /* The outline is drawn, not laid out, and nothing is added above the
     name, so the row that was clicked does not move as its box appears. */
  box-shadow: inset 0 0 0 var(--hairline) var(--color-rule);
}

.tree-panel {
  display: contents;
}

.tree-panel > .caption {
  padding-right: var(--space-16);
}

.tree-panel > .post,
.tree-panel > .body {
  grid-column: 1 / -1;
  min-width: 0;
  padding: var(--space-8) var(--space-16) 0;
}

/* On a phone the levels step in less, and the way to GitHub takes its own
   line under the name, so a deep file still has room to read. */
@media (max-width: 767px) {
  .tree-list .tree-list {
    margin-left: var(--space-8);
    padding-left: var(--space-4);
  }

  .tree-panel > .caption {
    grid-column: 1 / -1;
    padding-left: var(--space-24);
  }
}

/* A file that is all code: no second box inside the first, and long
   lines wrap, since the box is the width there is. */
.tree-panel > .post > pre:only-child {
  padding: 0;
  border: 0;
  color: var(--color-muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tree li {
  scroll-margin-top: var(--space-24);
}

/* On a page with a tree the script holds the clicked row in place itself
   when a file opens or closes; the browser's own scroll anchoring would
   correct the same change a second time, which reads as a jump. */
html:has(.tree) body {
  overflow-anchor: none;
}

/* The open file: its path and the way to GitHub on one line, then the
   file. Its headings step down from the title, since a README has a
   hierarchy a blog post does not. */
.repo-file {
  scroll-margin-top: var(--space-24);
}

.repo-file-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8) var(--space-24);
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: var(--space-16);
  border-bottom: var(--rule);
}

.repo-file-head h2 {
  overflow-wrap: anywhere;
}

/* A file's headings, four steps a reader can tell apart: the document's
   title, its sections in semibold, their parts in medium, and anything
   deeper as a caption. Each step down sits closer to what it heads, and
   code in a heading takes the heading's size. */
:is(.repo-file, .tree-panel) .post :is(h2, h3, h4, h5, h6) {
  color: var(--color-text);
  font-size: var(--link-size);
  line-height: var(--link-leading);
  letter-spacing: var(--link-tracking);
}

:is(.repo-file, .tree-panel) .post h2 {
  padding-top: var(--space-8);
  font-size: var(--title-size);
  line-height: var(--title-leading);
  letter-spacing: var(--title-tracking);
  font-weight: var(--weight-regular);
}

:is(.repo-file, .tree-panel) .post h3 {
  padding-top: var(--space-40);
  font-weight: var(--weight-semibold);
}

:is(.repo-file, .tree-panel) .post h4 {
  padding-top: var(--space-24);
  font-weight: var(--link-weight);
}

:is(.repo-file, .tree-panel) .post :is(h5, h6) {
  padding-top: var(--space-16);
  color: var(--color-muted);
  font-size: var(--caption-size);
  line-height: var(--caption-leading);
  letter-spacing: var(--caption-tracking);
  font-weight: var(--weight-regular);
}

:is(.repo-file, .tree-panel) .post :is(h2, h3, h4, h5, h6) code {
  font-size: inherit;
  line-height: inherit;
}

/* A rule between sections gets air on both sides, and the heading after
   it does not add its own. */
:is(.repo-file, .tree-panel) .post hr {
  margin-block: var(--space-16);
}

:is(.repo-file, .tree-panel) .post :is(hr + *, :first-child) {
  padding-top: 0;
}


/* ---- layouts/Base ------------------------------------------------ */
/* Measures the top safe area for the script above. */
.status-probe {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  padding-top: var(--safe-top);
  visibility: hidden;
  pointer-events: none;
}


/* ---- pages/index ------------------------------------------------- */
/* The sections: the name, and a line about it under that. The whole row
   is the link. */
.jump {
  display: flex;
  flex-direction: column;
  /* The rules between rows, off for now:
  border-top: var(--rule); */
}

.jump-row {
  display: flex;
  gap: var(--space-24);
  align-items: center;
  padding-block: var(--space-24);
  /* border-bottom: var(--rule); */
}

.jump-info {
  display: flex;
  flex: 1 0 0;
  min-width: 0;
  flex-direction: column;
  gap: var(--space-4);
}

/* Pointing at a row: no underline. An arrow eases in beside the name, the
   other rows step back, and a fan of the section's newest things trails
   the pointer (the script below moves it). */
.jump-row:hover {
  text-decoration: none;
}

.arrow {
  display: inline-block;
  margin-left: var(--space-8);
  opacity: 0;
  translate: calc(-1 * var(--space-8)) 0;
  transition:
    opacity var(--duration-fast) var(--ease-out),
    translate var(--duration-spring) var(--ease-spring);
}

.jump-row:hover .arrow,
.jump-row:focus-visible .arrow {
  opacity: 1;
  translate: 0 0;
}

.jump-row {
  transition: opacity var(--duration-fast) var(--ease-out);
}

/* The fan: fixed to the screen and placed by the script at the pointer.
   Hidden, its cards sit stacked and small; shown, they spread and tilt on
   the site's spring. A phone has no pointer to follow, so it never shows.
   A card is a picture, or for the Stack row a black tile with a tool's
   mark centred on it in white, the same at every theme stop (the mark
   rules are with the Stack page's styles). */
.peek {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 5;
  width: var(--peek-size);
  height: var(--peek-size);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.peek > * {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--peek-radius);
  background: var(--color-rule);
  box-shadow: var(--glass-shadow);
  scale: var(--peek-hidden-scale);
  transition:
    translate var(--duration-spring) var(--ease-spring),
    rotate var(--duration-spring) var(--ease-spring),
    scale var(--duration-spring) var(--ease-spring);
}

.peek-mark {
  background: var(--peek-tile-background);
  color: var(--peek-tile-mark);
}

.peek-mark::before {
  content: '';
  position: absolute;
  inset: 0;
  width: var(--peek-mark-size);
  height: var(--peek-mark-size);
  margin: auto;
  background-color: currentColor;
  mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
}

@media (hover: hover) and (pointer: fine) {
  .jump:has(.jump-row:hover) .jump-row:not(:hover) {
    opacity: var(--peek-dim-opacity);
  }

  .peek.is-shown {
    opacity: 1;
  }

  .peek.is-shown > * {
    scale: 1;
  }

  /* First on top, the rest fanned out to the right behind it. */
  .peek > :nth-child(1) {
    z-index: 3;
  }

  .peek > :nth-child(2) {
    z-index: 2;
  }

  .peek.is-shown > :nth-child(1) {
    rotate: calc(-1 * var(--peek-tilt));
  }

  .peek.is-shown > :nth-child(2) {
    translate: var(--peek-spread) 0;
  }

  .peek.is-shown > :nth-child(3) {
    translate: calc(var(--peek-spread) * 2) 0;
    rotate: var(--peek-tilt);
  }
}

@media (prefers-reduced-motion: reduce) {
  .arrow,
  .jump-row,
  .peek,
  .peek > * {
    transition: none;
  }
}

/* The pictures, off for now with their markup:
.thumbs {
  display: flex;
  flex: none;
  gap: var(--space-4);
}

.thumbs img {
  display: block;
  width: var(--space-80);
  height: var(--space-80);
  object-fit: cover;
  background: var(--color-rule);
}

On a phone the pictures go under the name, sharing the row's width.
@media (max-width: 767px) {
  .jump-row {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-16);
  }

  .thumbs img {
    flex: 1 0 0;
    min-width: 0;
    width: auto;
    height: auto;
    aspect-ratio: 1;
  }
} */


/* ---- pages/work/index -------------------------------------------- */
.index {
  display: flex;
  flex-direction: column;
}
/* The Independent list, in three steps: a name sits 8 over its line, the
   entries are 40 apart (as the resume's roles are), and the caption 24
   over the first, so each step of the hierarchy has its own distance. */
.indie {
  display: flex;
  flex-direction: column;
  gap: var(--space-40);
}
.indie li {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.indie li.sub {
  padding-left: var(--space-24);
  border-left: var(--rule);
}
.tag {
  margin-left: var(--space-8);
}


/* ---- pages/work/[slug] ------------------------------------------- */
/* A case study's parts (Context, Contribution, Outcome, Work) each open
   with a rule and their caption, 16 to what follows, like the resume. */
.prose {
  gap: var(--space-16);
}

.single-work .prose {
  padding-top: var(--space-16);
  border-top: var(--rule);
}


/* ---- pages/moodboard --------------------------------------------- */
/* Random: a large glass pill at the bottom centre, on the navigation layer
   with the scroll dock. It rests where the dock does and steps up out of
   the dock's way when that appears; system motion, so it eases. Pressing
   swells it on a spring, like the dock. */
.random {
  --dock-height: calc(var(--control-size) + var(--glass-gap) * 2);
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + var(--glass-offset));
  z-index: 10;
  height: calc(var(--space-64) * 2);
  padding: 0 var(--space-80);
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--color-text);
  font-family: inherit;
  cursor: pointer;
  translate: -50% 0;
  transition:
    translate var(--duration-glass) var(--ease-out),
    transform var(--duration-spring) var(--ease-spring);
}

body:has(.dock.is-shown) .random {
  translate: -50% calc(-1 * (var(--dock-height) + var(--space-24)));
}

.random:active {
  transform: scale(var(--glass-press-scale));
}

/* On a phone it is half the size: the height of the old button, with the
   title's type in place of the display's. */
@media (max-width: 767px) {
  .random {
    height: var(--space-64);
    padding: 0 var(--space-40);
    font-size: var(--title-size);
    line-height: var(--title-leading);
    letter-spacing: var(--title-tracking);
  }
}

@media (hover: hover) {
  .random:hover::after {
    opacity: var(--glass-hover-glow-opacity);
  }
}

@media (prefers-reduced-motion: reduce) {
  .random {
    transition: none;
  }

  .random:active {
    transform: none;
  }
}

/* The board's narrow layout starts at 900px, so this page's tighter
   rhythm does too. */
@media (max-width: 899px) {
  .sub {
    --section-gap: var(--space-48);
  }
}


/* ---- pages/snaps/index ------------------------------------------- */
.snaps {
  gap: var(--space-40);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-16);
}

/* Albums and feed are two views of the same section; the film filter only
   applies to the albums, the order only to the feed. */
.snaps[data-view='feed'] .albums,
.snaps[data-view='feed'] .filter,
.snaps[data-view='albums'] .feed,
.snaps[data-view='albums'] .order {
  display: none;
}

.filter,
.order {
  display: contents;
}

.snaps[data-filter='digital'] .album-item:not([data-kind='digital']),
.snaps[data-filter='film'] .album-item:not([data-kind='film']),
.snaps[data-filter='expired'] .album-item:not([data-kind='expired']) {
  display: none;
}

.albums {
  display: flex;
  flex-direction: column;
  border-top: var(--rule);
}

/* One album per row (CoverRow), ruled like the home index. */
.album-item {
  border-bottom: var(--rule);
  view-transition-class: snap-row;
}

.feed {
  view-transition-name: snaps-feed;
  view-transition-class: snap-row;
}

/* On a phone the two controls stack. */
@media (max-width: 767px) {
  .controls {
    flex-direction: column;
  }
}


/* The rows' view transition is drawn at the document root, outside any
   component's scope. Reflowing rows are system motion, so they ease. The
   page itself shows live rather than crossfading from a snapshot, so the
   pill and the options keep moving underneath; the footer is named so it
   glides with the rows instead of jumping. Rows present before and after
   move as one solid snapshot; only those leaving or arriving fade. Clicks
   pass through, so the filter can be changed again mid-transition. */
::view-transition {
  pointer-events: none;
}

::view-transition-old(root) {
  animation: none;
  opacity: 0;
}

::view-transition-new(root) {
  animation: none;
}

main:has([data-snaps]) > footer {
  view-transition-name: snaps-footer;
  view-transition-class: snap-row;
}

::view-transition-group(.snap-row) {
  animation-duration: var(--duration-reflow);
  animation-timing-function: var(--ease-out);
}

::view-transition-old(.snap-row):not(:only-child) {
  animation: none;
  opacity: 0;
}

::view-transition-new(.snap-row):not(:only-child) {
  animation: none;
}

::view-transition-old(.snap-row):only-child,
::view-transition-new(.snap-row):only-child {
  animation-duration: var(--duration-reflow);
  animation-timing-function: var(--ease-out);
}


/* ---- pages/snaps/[slug] ------------------------------------------ */
.details-section {
  gap: var(--space-16);
}

/* The index's ruled rows, with the label in a fixed column like the year. */
.details {
  margin: 0;
  border-top: var(--rule);
}

.detail {
  display: flex;
  gap: var(--space-24);
  align-items: baseline;
  padding-block: var(--space-8);
  border-bottom: var(--rule);
}

.detail dt {
  flex: none;
  width: var(--detail-label-width);
}

.detail dd {
  flex: 1 0 0;
  min-width: 0;
  margin: 0;
}


/* ---- pages/playlists/index --------------------------------------- */
.playlists {
  display: flex;
  flex-direction: column;
  border-top: var(--rule);
}

.playlist-item {
  border-bottom: var(--rule);
}


/* ---- pages/playlists/[slug] -------------------------------------- */
.details-section {
  gap: var(--space-16);
}

/* The index's ruled rows, with the label in a fixed column like the year. */
.details,
.tracks {
  margin: 0;
  padding: 0;
  border-top: var(--rule);
  list-style: none;
}

.detail {
  display: flex;
  gap: var(--space-24);
  align-items: baseline;
  padding-block: var(--space-8);
  border-bottom: var(--rule);
}

.detail dt {
  flex: none;
  width: var(--detail-label-width);
}

.detail dd {
  flex: 1 0 0;
  min-width: 0;
  margin: 0;
}

/* A track is a home index row: its number where nothing was, the title
   over the artist and album, and the length in the year's column. */
.track {
  display: flex;
  gap: var(--space-16);
  align-items: baseline;
  padding-block: var(--space-8);
  border-bottom: var(--rule);
}

.number {
  flex: none;
  width: var(--space-40);
  font-variant-numeric: tabular-nums;
}

.track .info {
  display: flex;
  flex: 1 0 0;
  min-width: 0;
  flex-direction: column;
}

.length {
  flex: none;
  width: var(--year-width);
  text-align: right;
  font-variant-numeric: tabular-nums;
}


/* ---- blocks/system-assembly -------------------------------------- */
/* The Lilly case study's system diagram: six ruled stages down a hairline
   spine. The parts on the plates are HTML in LDS 3.0's own values (the
   --lds-* tokens below, light only, as the system is), drawn in design
   pixels: every length is a multiple of --u, which each plate sets from its
   own width, so a 1440px hero and a 48px button scale to the room they
   have and the screens at the end are the same parts composed. */
.assembly {
  --lds-red-060: #d31710;
  --lds-red-080: #9f180f;
  --lds-red-105: #2d0000;
  --lds-brand-030: #f6b8ae;
  --lds-tint: #fbf1ef;
  --lds-n000: #ffffff;
  --lds-n005: #f5f5f5;
  --lds-n020: #d6d6d6;
  --lds-n060: #5e5e5e;
  --lds-n100: #191919;
  --lds-ink: #111111;
  --lds-chrome: #333333;
  --lds-pill: #000000;
  --lds-scrim: rgb(25 25 25 / 0.6);
  --lds-shadow: rgb(0 0 0 / 0.12);
  --assembly-width: 1000px;
  --plate-radius: var(--space-4);
}

/* The copy stays in the column; the stats row, the plates and the rules
   between stages break out to the wide measure, centred. */
.assembly-wrap {
  --assembly-w: min(var(--assembly-width), calc(100vw - 2 * var(--page-inset)));
  --assembly-out: calc((100% - var(--assembly-w)) / 2);
  display: flex;
  flex-direction: column;
  gap: var(--space-40);
}

.assembly-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.assembly-head .body {
  max-width: var(--content-width);
}

/* The library's size, in a ruled row under the lead. */
.assembly-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-16);
  width: var(--assembly-w);
  margin: var(--space-16) var(--assembly-out) 0;
  padding-block: var(--space-16);
  border-block: var(--rule);
}

.assembly-stats div {
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-4);
}

.assembly-stats dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.assembly-stages {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}

.assembly-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-24);
  padding-block: var(--space-40) var(--space-48);
}

.assembly-stage + .assembly-stage::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: var(--assembly-out);
  border-top: var(--rule);
}

.assembly-stage:first-child {
  padding-top: 0;
}

.assembly-stage:last-child {
  padding-bottom: 0;
}

.assembly-stage-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 560px;
}

.assembly-stage-title {
  margin: 0;
  font-weight: var(--link-weight);
}

.assembly-stage-head p {
  margin: 0;
}

.specimens {
  width: var(--assembly-w);
  margin-inline: var(--assembly-out);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-16);
  align-items: stretch;
}

.specimens--thirds {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.specimen {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding: var(--space-16);
  border: var(--rule);
  border-radius: var(--space-8);
}

.specimen figcaption {
  display: flex;
  flex-direction: column;
  margin-top: auto;
}

.span-2 {
  grid-column: span 2;
}

.span-4 {
  grid-column: 1 / -1;
}

/* The plate a part sits on: the system's own surface, so the light-only
   parts keep their contrast in dark mode too. It is the container the part
   measures itself against. */
.plate {
  container-type: inline-size;
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  padding: var(--space-16);
  border-radius: var(--plate-radius);
  background: var(--lds-n005);
  color: var(--lds-n100);
  line-height: 1.3;
  overflow: hidden;
}

/* Token tiles are in the site's own colours and need no plate. */
.plate--site {
  padding: 0;
  background: none;
  color: inherit;
  place-items: stretch;
}

/* One design pixel: real size when the plate has the room, scaled to fit
   when it does not. --w is the part's design width. */
.spec,
.window {
  --u: min(1px, calc(100cqw / var(--w, 1440)));
  display: block;
  max-width: 100%;
}

.spec.fill,
.screen {
  width: calc(var(--w, 1440) * var(--u));
}

.stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(24 * var(--u));
  width: 100%;
}

.stack--left {
  align-items: flex-start;
  gap: calc(16 * var(--u));
}

/* A clipped window onto a screen. */
.window {
  width: 100%;
  height: calc(var(--h) * var(--u));
  overflow: hidden;
  border: var(--rule);
  border-radius: var(--plate-radius);
  background: var(--lds-n000);
}

/* Stage 01: the tokens. */
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-16);
}

.swatch {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.swatch i {
  display: block;
  width: var(--space-48);
  height: var(--space-48);
  border-radius: var(--space-8);
  border: var(--rule);
  background: var(--swatch);
}

.scale {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.step {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.step i {
  display: block;
  width: var(--px);
  height: var(--space-8);
  border-radius: 2px;
  background: var(--color-text);
}

.ramp {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.ramp > span {
  display: flex;
  flex-direction: column;
}

.ramp-display {
  font-size: var(--display-size);
  line-height: var(--display-leading);
  letter-spacing: var(--display-tracking);
}

.ramp-heading {
  font-size: var(--title-size);
  line-height: var(--title-leading);
  letter-spacing: var(--title-tracking);
  font-weight: 700;
}

.ramp-body {
  font-size: var(--body-size);
  line-height: var(--body-leading);
}

.ramp .caption {
  font-size: var(--caption-size);
  line-height: var(--caption-leading);
  letter-spacing: 0;
  font-weight: var(--weight-regular);
}

/* Stage 06: the values each market resolved to. */
.resolved {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.resolved div {
  display: flex;
  gap: var(--space-8);
}

.resolved dd {
  margin: 0;
}

/* ---- LDS 3.0 parts, in design pixels ----------------------------- */
.lds-ico {
  flex: none;
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
}

.lds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: calc(48 * var(--u));
  padding: 0 calc(24 * var(--u));
  border-radius: var(--radius-pill);
  font-size: calc(16 * var(--u));
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
  background: var(--lds-red-060);
  color: var(--lds-n000);
}

.lds-btn--outline {
  background: none;
  color: var(--lds-ink);
  box-shadow: inset 0 0 0 calc(1.5 * var(--u)) var(--lds-ink);
}

.lds-btn--contrast {
  background: #000;
}

.lds-btn--block {
  width: 100%;
}

.lds-link {
  color: var(--lds-red-060);
  font-size: calc(16 * var(--u));
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: calc(3 * var(--u));
  white-space: nowrap;
}

.lds-badge {
  display: inline-block;
  padding: calc(2 * var(--u)) calc(8 * var(--u));
  border-radius: calc(4 * var(--u));
  background: var(--lds-chrome);
  color: var(--lds-n000);
  font-size: calc(11 * var(--u));
  line-height: calc(16 * var(--u));
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.lds-crumb {
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--u));
  font-size: calc(11 * var(--u));
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.lds-crumb .lds-ico {
  width: calc(14 * var(--u));
  height: calc(14 * var(--u));
}

.lds-crumb b {
  font-weight: 500;
}

.lds-crumb--light {
  color: var(--lds-n000);
}

.lds-field {
  display: flex;
  flex-direction: column;
  gap: calc(4 * var(--u));
  width: 100%;
}

.lds-field-label {
  font-size: calc(16 * var(--u));
}

.lds-field-hint {
  font-size: calc(13 * var(--u));
  color: var(--lds-n060);
}

.lds-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(48 * var(--u));
  margin-top: calc(4 * var(--u));
  padding: 0 calc(24 * var(--u));
  border: calc(1 * var(--u)) solid var(--lds-n060);
  border-radius: var(--radius-pill);
  background: var(--lds-n000);
  font-size: calc(16 * var(--u));
  color: var(--lds-n060);
}

.lds-eyebrow {
  font-size: calc(12 * var(--u));
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lds-n060);
}

.lds-eyebrow--red {
  color: var(--lds-red-060);
  font-weight: 700;
}

/* Top Nav: the brand pill and the utility pill. */
.lds-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.lds-pill {
  display: inline-flex;
  align-items: center;
  gap: calc(16 * var(--u));
  height: calc(72 * var(--u));
  padding: 0 calc(24 * var(--u));
  border-radius: var(--radius-pill);
  background: var(--lds-pill);
  color: var(--lds-n000);
  font-size: calc(14 * var(--u));
  white-space: nowrap;
}

.lds-logo {
  display: inline-flex;
}

.lds-logo svg {
  width: calc(58 * var(--u));
  height: calc(32 * var(--u));
}

.lds-pill--mobile {
  justify-content: space-between;
  width: 100%;
  height: calc(56 * var(--u));
  padding: 0 calc(16 * var(--u));
}

.lds-wordmark {
  font-size: calc(20 * var(--u));
  font-weight: 700;
}

.lds-pill-icons {
  display: inline-flex;
  gap: calc(12 * var(--u));
}

/* Hero: the library's photo, with the dark wash the library lays over it. */
.lds-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: calc(24 * var(--u));
  width: 100%;
  height: calc(830 * var(--u));
  padding: calc(48 * var(--u)) calc(64 * var(--u));
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.65), rgb(0 0 0 / 0.2) 60%, rgb(0 0 0 / 0.1)),
    url('lds-hero.jpg') center / cover no-repeat;
  color: var(--lds-n000);
}

.lds-hero--l2 {
  height: calc(762 * var(--u));
}

.lds-hero--mobile {
  height: calc(764 * var(--u));
  padding: calc(24 * var(--u)) calc(16 * var(--u));
  gap: calc(16 * var(--u));
}

.lds-hero-h {
  margin: 0;
  max-width: calc(720 * var(--u));
  font-size: calc(64 * var(--u));
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lds-hero--mobile .lds-hero-h {
  font-size: calc(36 * var(--u));
  max-width: none;
}

.lds-hero-p {
  margin: 0;
  max-width: calc(640 * var(--u));
  font-size: calc(18 * var(--u));
  line-height: 1.5;
}

.lds-hero--mobile .lds-hero-p {
  font-size: calc(16 * var(--u));
}

.lds-hero--mobile .lds-btn {
  width: 100%;
}

.lds-hero .lds-ico--down {
  position: absolute;
  left: calc(64 * var(--u));
  bottom: calc(40 * var(--u));
}

.lds-hero--mobile .lds-ico--down {
  left: calc(16 * var(--u));
}

.lds-media-control {
  position: absolute;
  right: calc(64 * var(--u));
  bottom: calc(40 * var(--u));
  display: grid;
  place-items: center;
  width: calc(40 * var(--u));
  height: calc(40 * var(--u));
  border-radius: var(--radius-pill);
  background: var(--lds-n100);
}

.lds-hero--mobile .lds-media-control {
  right: calc(16 * var(--u));
}

/* ISI Drawer: fixed to the viewport, two headings, always visible. */
.lds-drawer {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: calc(32 * var(--u));
  width: 100%;
  height: calc(200 * var(--u));
  padding: calc(24 * var(--u)) calc(32 * var(--u));
  overflow: hidden;
  border-radius: calc(12 * var(--u)) calc(12 * var(--u)) 0 0;
  background: var(--lds-n000);
  box-shadow: 0 calc(-4 * var(--u)) calc(16 * var(--u)) var(--lds-shadow), inset 0 0 0 calc(1 * var(--u)) var(--lds-n020);
  text-align: left;
}

.lds-drawer--collapsed {
  height: calc(64 * var(--u));
  padding-block: calc(20 * var(--u));
}

.lds-drawer--mobile {
  grid-template-columns: 1fr;
  gap: calc(16 * var(--u));
  height: calc(230 * var(--u));
  padding: calc(16 * var(--u));
}

.lds-drawer--mobile.lds-drawer--collapsed {
  height: calc(112 * var(--u));
}

.lds-drawer-col {
  display: flex;
  flex-direction: column;
  gap: calc(12 * var(--u));
}

.lds-drawer-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: calc(14 * var(--u));
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lds-red-060);
}

.lds-drawer-h .lds-ico {
  width: calc(20 * var(--u));
  height: calc(20 * var(--u));
}

.lds-drawer-p {
  margin: 0;
  font-size: calc(16 * var(--u));
  line-height: 1.5;
}

/* Cookie Consent Banner. */
.lds-cookie {
  display: flex;
  align-items: center;
  gap: calc(24 * var(--u));
  width: 100%;
  height: calc(96 * var(--u));
  padding: 0 calc(24 * var(--u));
  border-radius: calc(16 * var(--u));
  background: var(--lds-n000);
  box-shadow: 0 calc(8 * var(--u)) calc(24 * var(--u)) var(--lds-shadow);
  text-align: left;
}

.lds-cookie-text {
  flex: 1;
  margin: 0;
  font-size: calc(14 * var(--u));
  line-height: 1.4;
}

.lds-cookie-link {
  color: var(--lds-red-060);
}

.lds-cookie-actions {
  display: flex;
  gap: calc(16 * var(--u));
}

.lds-cookie--mobile {
  flex-direction: column;
  align-items: stretch;
  height: auto;
  padding: calc(24 * var(--u));
}

.lds-cookie--mobile .lds-cookie-actions {
  flex-direction: column;
}

/* Content Module. */
.lds-module {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(12 * var(--u));
  width: 100%;
  text-align: left;
}

.lds-media {
  display: block;
  width: 100%;
  height: calc(203 * var(--u));
  border-radius: calc(16 * var(--u));
  background: var(--lds-n020);
}

.lds-module-title {
  font-size: calc(24 * var(--u));
  line-height: 1.2;
}

.lds-module-sub {
  font-size: calc(16 * var(--u));
  font-weight: 700;
}

.lds-chip {
  display: inline-flex;
  align-items: center;
  gap: calc(6 * var(--u));
  padding: calc(4 * var(--u)) calc(10 * var(--u));
  border-radius: var(--radius-pill);
  border: calc(1 * var(--u)) solid var(--lds-brand-030);
  background: var(--lds-tint);
  font-size: calc(12 * var(--u));
}

.lds-chip .lds-ico {
  width: calc(14 * var(--u));
  height: calc(14 * var(--u));
  color: var(--lds-red-060);
}

.lds-module-p {
  margin: 0;
  font-size: calc(14 * var(--u));
  line-height: 1.5;
}

.lds-updated {
  font-size: calc(11 * var(--u));
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lds-n060);
}

.lds-module-ctas {
  display: flex;
  align-items: center;
  gap: calc(12 * var(--u));
  width: 100%;
}

.lds-module-ctas .lds-btn {
  margin-right: auto;
}

.lds-circle {
  display: grid;
  place-items: center;
  width: calc(40 * var(--u));
  height: calc(40 * var(--u));
  border-radius: var(--radius-pill);
  box-shadow: inset 0 0 0 calc(1 * var(--u)) var(--lds-ink);
}

/* Card. */
.lds-card {
  display: block;
  width: 100%;
  aspect-ratio: 392 / 432;
  padding: calc(24 * var(--u));
  border-radius: calc(24 * var(--u));
  background: var(--lds-tint);
}

.lds-card-slot {
  display: block;
  height: 100%;
  border: calc(1 * var(--u)) dashed var(--lds-n060);
  border-radius: calc(4 * var(--u));
  background: #e2dddd;
}

/* Footer. */
.lds-footer {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: calc(48 * var(--u)) calc(64 * var(--u));
  width: 100%;
  padding: calc(80 * var(--u)) calc(64 * var(--u)) calc(48 * var(--u));
  background: var(--lds-red-060);
  color: var(--lds-n000);
  font-size: calc(13 * var(--u));
  line-height: 1.5;
  text-align: left;
}

.lds-footer--mobile {
  grid-template-columns: 1fr;
  padding: calc(48 * var(--u)) calc(16 * var(--u));
}

.lds-footer-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.lds-footer-logo .lds-logo svg {
  width: calc(128 * var(--u));
  height: calc(70 * var(--u));
}

.lds-footer-logo small {
  margin-top: calc(8 * var(--u));
  font-size: calc(12 * var(--u));
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lds-footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(32 * var(--u)) calc(24 * var(--u));
}

.lds-footer--mobile .lds-footer-cols {
  grid-template-columns: repeat(2, 1fr);
}

.lds-footer-col {
  display: flex;
  flex-direction: column;
  gap: calc(6 * var(--u));
}

.lds-footer-col b {
  margin-bottom: calc(6 * var(--u));
  font-size: calc(18 * var(--u));
}

.lds-footer-col span {
  text-decoration: underline;
  text-underline-offset: calc(2 * var(--u));
}

.lds-footer-support {
  grid-column: 2;
  justify-self: start;
  padding: calc(12 * var(--u)) calc(24 * var(--u));
  border-radius: var(--radius-pill);
  background: var(--lds-n000);
  color: var(--lds-n100);
  font-size: calc(16 * var(--u));
}

.lds-footer--mobile .lds-footer-support {
  grid-column: 1;
  justify-self: stretch;
  text-align: center;
}

.lds-footer-legal,
.lds-footer-stamp {
  grid-column: 2;
  margin: 0;
  max-width: calc(720 * var(--u));
  font-size: calc(11 * var(--u));
}

.lds-footer--mobile .lds-footer-legal,
.lds-footer--mobile .lds-footer-stamp {
  grid-column: 1;
}

.lds-footer-stamp {
  text-decoration: underline;
}

/* Inline ISI: the full safety text, in the content grid. */
.lds-isi {
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--u));
  width: 100%;
  padding: calc(48 * var(--u)) 0;
  text-align: left;
}

.lds-isi-h {
  font-size: calc(18 * var(--u));
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lds-red-060);
}

.lds-isi-cols {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: calc(48 * var(--u));
}

.lds-isi--mobile .lds-isi-cols {
  grid-template-columns: 1fr;
}

.lds-isi-col {
  font-size: calc(15 * var(--u));
  line-height: 1.5;
}

.lds-isi-col p {
  margin: 0 0 calc(12 * var(--u));
}

/* ---- The case study's patterns ----------------------------------- */
.pat-fair {
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--u));
  width: 100%;
  padding: calc(32 * var(--u)) 0;
  text-align: left;
}

.pat-fair-cols {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: calc(32 * var(--u));
}

.pat-fair--mobile .pat-fair-cols {
  grid-template-columns: 1fr;
}

.pat-fair-col {
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--u));
  font-size: calc(16 * var(--u));
  line-height: 1.5;
}

.pat-fair-col p {
  margin: 0;
}

.pat-fair-rule {
  width: calc(2 * var(--u));
  background: var(--lds-red-060);
}

.pat-fair--mobile .pat-fair-rule {
  width: 100%;
  height: calc(2 * var(--u));
}

.pat-gate {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(24 * var(--u));
  width: 100%;
  padding: calc(48 * var(--u));
  border-radius: calc(24 * var(--u));
  background: var(--lds-n000);
  box-shadow: 0 calc(24 * var(--u)) calc(48 * var(--u)) rgb(0 0 0 / 0.18);
  text-align: left;
}

.pat-gate--mobile {
  padding: calc(24 * var(--u));
}

.pat-gate-title {
  font-size: calc(40 * var(--u));
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.pat-gate--mobile .pat-gate-title {
  font-size: calc(28 * var(--u));
}

.pat-gate-p {
  margin: 0;
  font-size: calc(16 * var(--u));
  line-height: 1.5;
  color: var(--lds-n060);
}

.pat-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: calc(16 * var(--u));
  width: 100%;
}

.pat-gate--mobile .pat-gate-actions {
  flex-direction: column;
}

.pat-vars {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(8 * var(--u));
}

.pat-var {
  display: inline-flex;
  gap: calc(6 * var(--u));
  padding: calc(6 * var(--u)) calc(10 * var(--u));
  border-radius: calc(6 * var(--u));
  background: var(--lds-tint);
  font-size: calc(13 * var(--u));
  white-space: nowrap;
}

.pat-var-k {
  color: var(--lds-red-060);
  font-weight: 600;
}

.pat-var-eq {
  color: var(--lds-n060);
}

.pat-stamp {
  font-size: calc(12 * var(--u));
  line-height: 1.4;
  color: var(--lds-n060);
}

/* ---- The screens: the parts composed ----------------------------- */
.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--lds-n000);
  color: var(--lds-n100);
  text-align: left;
}

.screen--viewport {
  height: calc(900 * var(--u));
}

/* The nav pills float over the hero, a step down from the top edge; the
   hero's media runs to the top. */
.screen-bar {
  position: absolute;
  top: calc(24 * var(--u));
  left: 0;
  right: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  height: calc(72 * var(--u));
  padding: 0 calc(64 * var(--u));
}

.screen-bar--mobile {
  top: calc(16 * var(--u));
  height: calc(56 * var(--u));
  padding: 0 calc(16 * var(--u));
}

.screen-section {
  padding: 0 calc(64 * var(--u));
}

.screen-section--mobile {
  padding: 0 calc(16 * var(--u));
}

.screen-section--tint {
  background: var(--lds-n005);
}

.screen-modules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(32 * var(--u));
  padding: calc(64 * var(--u));
  background: var(--lds-n005);
}

.screen-modules--mobile {
  grid-template-columns: 1fr;
  gap: calc(16 * var(--u));
  padding: calc(16 * var(--u));
}

.screen-drawer {
  position: absolute;
  left: calc(64 * var(--u));
  right: calc(64 * var(--u));
  top: calc(700 * var(--u));
}

.screen-drawer--mobile {
  left: 0;
  right: 0;
  top: calc(582 * var(--u));
}

/* In a composed screen the hero fills the first viewport, nav included. */
.screen--desktop .lds-hero--l1 {
  height: calc(900 * var(--u));
}

.screen--desktop .lds-hero--l2 {
  height: calc(834 * var(--u));
}

.screen--mobile .lds-hero {
  height: calc(812 * var(--u));
}

.screen-scrim {
  position: absolute;
  inset: 0;
  background: var(--lds-scrim);
}

.screen-gate {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(640 * var(--u));
  translate: -50% -50%;
}

.screen-cookie {
  position: absolute;
  left: calc(64 * var(--u));
  right: calc(64 * var(--u));
  bottom: calc(24 * var(--u));
}

@media (max-width: 767px) {
  .assembly-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .specimens,
  .specimens--thirds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .span-2 {
    grid-column: 1 / -1;
  }

  .specimens--thirds .specimen {
    grid-column: 1 / -1;
  }
}


/* ---- pages/stack ------------------------------------------------- */
/* The Stack page, laid out as the Independent list on the Work page: a caption heading per
   part, then each tool as its name with a tag and a line under; the
   terminal tools indented as sub-entries. A tool with a logo (`marked`,
   with `mark-<name>` naming a file in assets/stack) draws it beside the
   name, a column of its own, centred on the name's line box, in the text
   colour: the file is a mask over currentColor, so it follows the theme
   stop like the type. */
.stack-group {
  gap: var(--space-24);
}

/* The tools in the Independent list's rhythm: 8 inside, 40 between. */
.stack-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-40);
}

.stack-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.stack-item.sub {
  padding-left: var(--space-24);
  border-left: var(--rule);
}

/* Sub-entries run closer, 24 apart. */
.stack-items .sub + .sub {
  margin-top: calc(-1 * var(--space-16));
}

.stack-item.marked {
  display: grid;
  grid-template-columns: var(--stack-mark-size) minmax(0, 1fr);
  column-gap: var(--space-16);
}

.stack-item.marked::before {
  content: '';
  grid-row: 1;
  align-self: center;
  width: var(--stack-mark-size);
  height: var(--stack-mark-size);
  background-color: currentColor;
  mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
}

.stack-item.marked > * {
  grid-column: 2;
}

.mark-figma::before {
  mask-image: url(stack/figma.svg);
}

.mark-pen::before {
  mask-image: url(stack/pen.svg);
}

.mark-affinity::before {
  mask-image: url(stack/affinity.svg);
}

.mark-claude-code::before {
  mask-image: url(stack/claude-code.svg);
}

.mark-codex::before {
  mask-image: url(stack/codex.svg);
}

.mark-orca::before {
  mask-image: url(stack/orca.svg);
}

.mark-zed::before {
  mask-image: url(stack/zed.svg);
}

.mark-ghostty::before {
  mask-image: url(stack/ghostty.svg);
}

.mark-xcode::before {
  mask-image: url(stack/xcode.svg);
}

.mark-supabase::before {
  mask-image: url(stack/supabase.svg);
}

.mark-vercel::before {
  mask-image: url(stack/vercel.svg);
}

.mark-railway::before {
  mask-image: url(stack/railway.svg);
}

.mark-craft::before {
  mask-image: url(stack/craft.svg);
}

.mark-reminders::before {
  mask-image: url(stack/reminders.svg);
}

.mark-raindrop::before {
  mask-image: url(stack/raindrop.svg);
}


/* ---- pages/resume ------------------------------------------------ */
/* The resume: a document in the page column, with the career timeline at
   the end. The parts sit a section apart, each opening with a rule and a
   caption, 16 to what follows. */
.resume-section {
  gap: var(--space-16);
  padding-top: var(--space-16);
  border-top: var(--rule);
}

/* The head: the name, the line under it, the ways to reach me in a row
   that wraps, then the actions. The address keeps its size in that row
   and goes without its Copy control. */
.resume-head {
  gap: var(--space-8);
}

.resume-head > .actions {
  margin-top: var(--space-24);
}

.resume-contact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-16);
}

.resume-contact .link {
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  font-weight: inherit;
}

.resume-contact .copy {
  display: none;
}

/* The lists keep their bullets here, a line of air between points. */
.resume-section .wp-block-list {
  display: grid;
  gap: var(--space-8);
  padding-left: var(--space-24);
  list-style: disc;
}

/* A role is a row like the work index's: the title with its dates on the
   right, the organisation as a caption under it, then what I did there,
   with the roles 40 apart. */
.role {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4) var(--space-16);
  align-items: baseline;
}

.resume-section .role + .role {
  margin-top: var(--space-24);
}

.role-title {
  font-weight: var(--weight-semibold);
}

.role-when {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.role-org,
.role .wp-block-list,
.clients {
  grid-column: 1 / -1;
}

/* The independent role's clients hang off it: each a role like the
   others, set in by the lists' indent, with one rule down their left edge
   tying them to the role. */
.clients {
  display: flex;
  flex-direction: column;
  margin-top: var(--space-16);
  padding-left: var(--space-24);
  border-left: var(--rule);
}

.role .wp-block-list {
  margin-top: var(--space-8);
}

/* Bold runs (a name at the start of a line) are semibold, like the titles. */
.resume-section strong {
  font-weight: var(--weight-semibold);
}

/* Skills: the term in a column of its own, in the muted colour. */
.resume-section .skills {
  gap: var(--space-16);
  padding-left: 0;
  list-style: none;
}

.skills li {
  display: grid;
  grid-template-columns: var(--term-width) 1fr;
  gap: var(--space-16);
}

.skills strong {
  font-weight: var(--weight-regular);
  color: var(--color-muted);
}

/* The timeline: one ruled row per role, the dates in a column of their
   own, the name and role, and a line about it under them. */
.moments {
  display: flex;
  flex-direction: column;
}

.moment {
  display: grid;
  grid-template-columns: var(--when-width) 1fr;
  gap: var(--space-4) var(--space-24);
  padding-block: var(--space-16);
  border-bottom: var(--rule);
}

.moment .when {
  grid-row: 1 / span 2;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 767px) {
  .role {
    grid-template-columns: 1fr;
  }

  .clients {
    padding-left: var(--space-16);
  }

  .role-when {
    text-align: left;
    white-space: normal;
  }

  .skills li {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .moment {
    grid-template-columns: 1fr;
  }

  .moment .when {
    grid-row: auto;
  }
}

/* On paper the resume is the document: black on white, the chrome, the
   actions and the timeline left off, in the sizes of a two-page
   print. The sizes live here, in points, since they are paper's. */
/* ---- Page transitions ------------------------------------------- */
/* Same-origin navigations cross-fade through the View Transitions API: the
   leaving page fades, the arriving one fades in and settles down a few
   pixels. Anchors within a page and back-forward cache restores do not
   count, and a browser without the API just swaps pages as before. The
   whole page is one group: the header's text changes between pages (the
   name on the home page, the way back elsewhere), so it fades with the
   rest. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: page-leave var(--duration-leave) var(--ease-out) both;
}

::view-transition-new(root) {
  animation: page-arrive var(--duration-arrive) var(--ease-out) both;
}

@keyframes page-leave {
  to {
    opacity: 0;
  }
}

@keyframes page-arrive {
  from {
    opacity: 0;
    translate: 0 var(--arrive-rise);
  }
}

/* Reduced motion: the fade alone, nothing moves. */
@media (prefers-reduced-motion: reduce) {
  @keyframes page-arrive {
    from {
      opacity: 0;
    }
  }
}

@media print {
  :root,
  :root[data-theme] {
    color-scheme: light;
    --color-background: #ffffff;
    --color-text: #000000;
    --color-muted: #444444;
    --color-rule: #bbbbbb;
    --print-body: 9pt;
    --print-leading: 1.28;
    --print-small: 8.5pt;
    --print-label: 7.5pt;
    --print-label-tracking: 0.04em;
    --print-name: 15pt;
    --print-tagline: 10pt;
    --print-role: 9.5pt;
    --print-skills: 8.75pt;
    --print-term: 5.5rem;
    --print-gap: 0.7rem;
    --print-part: 0.45rem;
    --print-tight: 0.3rem;
    --print-line: 0.15rem;
    --print-hair: 0.05rem;
    --print-indent: 0.9rem;
    --print-row-gap: 0.75rem;
  }

  @page {
    margin: 0.45in 0.55in;
  }

  /* The resume's body has the class `page`, so the shell's `.page`
     padding lands on it too; on paper that padding spilled onto a blank
     last page. */
  body,
  body.page {
    padding: 0;
    font-size: var(--print-body);
    line-height: var(--print-leading);
  }

  .site-header,
  .theme-slider,
  .chrome-strip,
  .contact,
  .actions,
  .dock,
  .toast,
  .clip-toggle,
  .timeline,
  .copy,
  .status-probe {
    display: none !important;
  }

  .wp-site-blocks {
    width: auto;
    padding: 0;
    gap: var(--print-gap);
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  .body,
  .link,
  .caption,
  .title,
  .wp-block-list {
    font-size: inherit;
    line-height: inherit;
    letter-spacing: 0;
  }

  .resume-head {
    gap: var(--print-line);
  }

  .resume-head .display {
    font-size: var(--print-name);
    line-height: var(--print-leading);
    letter-spacing: 0;
  }

  .resume-head .title {
    font-size: var(--print-tagline);
    line-height: var(--print-leading);
    letter-spacing: 0;
  }

  .resume-contact {
    gap: var(--print-hair) var(--print-row-gap);
    font-size: var(--print-small);
  }

  .resume-section {
    gap: var(--print-tight);
    padding-top: var(--print-tight);
  }

  .resume-section > .caption {
    font-size: var(--print-label);
    letter-spacing: var(--print-label-tracking);
    text-transform: uppercase;
    break-after: avoid;
  }

  .resume-section .wp-block-list {
    gap: var(--print-hair);
    padding-left: var(--print-indent);
  }

  .role {
    gap: 0 var(--print-row-gap);
    break-inside: avoid;
  }

  .resume-section .role + .role {
    margin-top: var(--print-part);
  }

  /* The clients keep the lists' indent on paper, without the rule, and
     the role that holds them may break between two of them. */
  .role:has(.clients) {
    break-inside: auto;
  }

  .clients {
    margin-top: var(--print-line);
    padding-left: var(--print-indent);
    border-left: 0;
  }

  .role-title {
    font-size: var(--print-role);
  }

  .role-when,
  .role-org {
    font-size: var(--print-small);
  }

  .role .wp-block-list {
    margin-top: var(--print-line);
  }

  .resume-section .skills {
    gap: var(--print-hair);
  }

  .skills li {
    grid-template-columns: var(--print-term) 1fr;
    gap: var(--print-hair) var(--print-row-gap);
    font-size: var(--print-skills);
  }
}
