/* ==========================================================================
   Landing belt — single page, four fields of view in one line, left → right:
   Landing · About · Workflow · Contact. Landing (idx 0) is the cold load.
   (docs/belt-schematic.png shows the older three-scene layout.)

   Geometry model (tablet+):
   - .fov is the field of view: an axis-aligned clip window and a size container.
   - Each .belt is one horizontal row of .cell shells (axis-aligned rectangles).
   - Only the inner .face is skewed; the shell never is, so layout maths stay
     rectangular and nothing depends on the skew except --overhang.
   - ONE step:  --step = --cell-w + --gap  (one panel to the next).
   - A belt's position is its index --idx = the belt index of the first fully
     visible panel.   translateX = --peek − --idx × --step
     → index goes UP   = belt slides LEFT  on screen
     → index goes DOWN = belt slides RIGHT on screen
     (Schematic "move two panels to the right" = idx −2.)
   - --peek is the strip at each edge where the neighbouring (partial) panel
     shows. It is never narrower than the skew overhang, so the parallelogram
     tips of the two centre panels always stay inside the window.
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #020617;
  --accent: #38bdf8;
  --panel: #0f172a;
  --border: rgba(51, 65, 85, 0.65);
  --hook: #f8fafc;
  --detail: #94a3b8;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Motion (one vocabulary for every leg, forward and reverse) */
  --dur: 680ms;
  --ease: cubic-bezier(0.45, 0, 0.2, 1);
}

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

/* Tablet and desktop (768px and wider): all type 30% smaller than the original design; phone unchanged.
   --s scales the viewport/container parts of the fluid sizes, the root font size the rem parts. */
:root { --s: 1; }
@media (min-width: 768px) {
  :root { --s: 0.7; --topics-trim: 0.85; }   /* topic list: its fit only shrinks, so trim it explicitly */
  html { font-size: 70%; }
}

html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  background:
    radial-gradient(ellipse 90% 55% at 0% -15%, rgba(14, 165, 233, 0.14), transparent 52%),
    radial-gradient(ellipse 70% 45% at 100% 5%, rgba(56, 189, 248, 0.1), transparent 48%),
    var(--bg);
  color: #e2e8f0;
  font-family: var(--font);
}

/* ---------- Banners (static) ---------- */
.site-header,
.site-footer {
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
  text-align: center;
  position: relative;
  z-index: 2;
}
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 1.25rem 1.35rem;
}
.site-header h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.6rem, 1.8vw * var(--s) + 1.2rem, 2.175rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.9rem;
  font-size: clamp(1.15rem, 0.8vw * var(--s) + 0.95rem, 1.5rem);
  /* One fixed row height for every item (room for a selected, 1.25× link),
     so the bar is equally tall whichever page is selected. */
  line-height: calc(1.25em * 1.35);
}
.site-nav a,
.site-footer a {
  color: #94a3b8;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.12s ease;
}
.site-nav a:hover,
.site-footer a:hover { color: var(--accent); }
/* Header links and About topics carry an invisible underline, so selecting
   one fades the light-blue line in (and the colour to white) smoothly. */
.site-nav a[data-nav],
.topic a[data-topic-link] {
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.28em;
  transition: color 0.3s ease, text-decoration-color 0.3s ease;
}

/* Selected state — shared by the header links (page) and the About topics:
   white text, light-blue underline, larger. */
.site-nav a[aria-current="page"],
.topic a[aria-current="true"] {
  color: #fff;
  /* Longhands on purpose: Safari ignores the one-line shorthand with
     thickness + colour, which would drop the underline entirely. */
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.28em;
}
.site-nav a[aria-current="page"] { font-size: 1.25em; }
.site-nav a[aria-current="page"]:hover,
.topic a[aria-current="true"]:hover { color: #fff; }
.site-nav .sep { color: #334155; user-select: none; }
.site-footer .sep { color: #334155; user-select: none; }
/* Page switch: belt.js glides the header links with transforms only (FLIP) */
.site-nav a[data-nav], .site-nav .sep { transform-origin: 0 0; }
.nav-flip a[data-nav] {
  transition: color 0.3s ease, text-decoration-color 0.3s ease,
              transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.nav-flip .sep { transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
/* Footer links behave exactly like the header links: same size, spacing,
   colours, hover, and the same "selected" look for the current page. */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.1rem 1.25rem 1.05rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.9rem;
  font-size: clamp(1.15rem, 0.8vw * var(--s) + 0.95rem, 1.5rem);
  line-height: calc(1.25em * 1.35);  /* same fixed row height as the header nav */
}
.site-footer a {
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.28em;
  transition: color 0.3s ease, text-decoration-color 0.3s ease;
}
.site-footer [aria-current="page"] {
  color: #fff;
  font-weight: 600;
  font-size: 1.25em;
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.28em;
}
.site-nav a:focus-visible,
.site-footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Main ---------- */
.main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: clamp(0.6rem, 1.4vw, 1.1rem) 0;
}

/* ---------- Panel faces (shared by belt and phone layouts) ---------- */
.cell { position: relative; min-width: 0; }
.face {
  position: absolute;
  inset: 0;
  transform: skewX(var(--skew));
  border-radius: 0.28rem;
  border: 2px solid var(--border);
  border-left: 6px solid var(--accent);
  background:
    linear-gradient(155deg, rgba(30, 41, 59, 0.35) 0%, transparent 42%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(148, 163, 184, 0.07),
    0 18px 48px -32px rgba(2, 6, 23, 1);
  overflow: hidden;
  transition: opacity 0.3s ease, border-color 0.2s ease;
}
.face::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.45), transparent);
  pointer-events: none;
  z-index: 1;
}
/* Content is counter-skewed so text stays upright inside the parallelogram;
   horizontal padding includes the overhang so text never reaches a slanted edge. */
.body {
  position: absolute;
  inset: 0;
  transform: skewX(calc(-1 * var(--skew)));
  padding: var(--pad-y) calc(var(--overhang) + var(--pad-x));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.6em;
}
.hook {
  margin: 0;
  color: var(--hook);
  font-weight: 600;
  font-size: var(--hook-size);
  line-height: 1.24;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.detail {
  margin: 0;
  color: var(--detail);
  font-size: var(--detail-size);
  line-height: 1.45;
  text-wrap: pretty;
}
/* "What I do" (Landing) panels: subtitles 15% larger, all breakpoints */
.cell[data-fov="landing"] .detail { font-size: calc(var(--detail-size) * 1.15 - 2pt); }
/* Photo panel: image counter-skewed and widened to cover the whole parallelogram */
.cell--photo .face { border-left-color: var(--border); }
.cell--photo img {
  position: absolute;
  top: 0;
  left: calc(-1 * var(--overhang));
  width: calc(100% + 2 * var(--overhang));
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: skewX(calc(-1 * var(--skew)));
  display: block;
}

/* Corner tag: placed in .face (not .body), so it carries the face skew and
   always leans exactly like the panel's left edge — on every breakpoint. */
.tag {
  position: absolute;
  left: 1.1rem;
  bottom: 0.9rem;
  margin: 0;
  color: var(--accent);
  font-size: var(--detail-size);
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
}
/* Tablet+: tag on About 3. Phone: tag on the photo panel instead (see phone block). */
.tag--phone { display: none; }
/* "I ♥ models": the heart in red (as a text glyph, never an emoji) */
.tag .heart { color: #ef4444; font-variant-emoji: text; }
/* Every 12 s "I ♥ models" swivels out (turns away around its vertical
   axis) and "U should 2" swivels in; 3 s later the same back — only on
   Workflow and About. Both lines sit in the same grid cell. The cycle
   starts over with "I ♥ models" each time you arrive; leaving for
   Predictions swivels "I ♥ models" back in (belt.js). The phone tag lives
   on the Predictions photo, so it never swaps. */
.tag > .tag-a, .tag > .tag-b { grid-area: 1 / 1; white-space: nowrap; transform-origin: 50% 50%; }
.tag--belt { display: grid; }
.tag { justify-items: start; }
.tag > .tag-b { opacity: 0; transform: perspective(400px) rotateY(-90deg); }
.fov:is([data-scene="workflow"], [data-scene="about"]) .tag--belt > .tag-a { animation: tag-a 15.6s linear infinite; }
.fov:is([data-scene="workflow"], [data-scene="about"]) .tag--belt > .tag-b { animation: tag-b 15.6s linear infinite; }
/* 15.6 s: "I ♥ models" until 11.4 s · 0.4 s out · 0.4 s "U should 2" in ·
   up until 14.8 s · 0.4 s out · 0.4 s "I ♥ models" in */
@keyframes tag-a {
  0%      { opacity: 1; transform: perspective(400px) rotateY(0deg); }
  73.08%  { opacity: 1; transform: perspective(400px) rotateY(0deg); animation-timing-function: ease-in; }
  75.64%  { opacity: 1; transform: perspective(400px) rotateY(90deg); }
  75.65%, 97.43% { opacity: 0; transform: perspective(400px) rotateY(-90deg); }
  97.44%  { opacity: 1; transform: perspective(400px) rotateY(-90deg); animation-timing-function: ease-out; }
  100%    { opacity: 1; transform: perspective(400px) rotateY(0deg); }
}
@keyframes tag-b {
  0%, 75.63% { opacity: 0; transform: perspective(400px) rotateY(-90deg); }
  75.64%  { opacity: 1; transform: perspective(400px) rotateY(-90deg); animation-timing-function: ease-out; }
  78.21%  { opacity: 1; transform: perspective(400px) rotateY(0deg); }
  94.87%  { opacity: 1; transform: perspective(400px) rotateY(0deg); animation-timing-function: ease-in; }
  97.44%  { opacity: 1; transform: perspective(400px) rotateY(90deg); }
  97.45%, 100% { opacity: 0; transform: perspective(400px) rotateY(-90deg); }
}

/* About 1: topic list (each link shows its text in About 2) */
.topic {
  margin: 0;
  font-size: var(--topic-size);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.topic + .topic { margin-top: 0.7em; }
/* Heading switch: belt.js animates the headings with transforms only (FLIP),
   so sizes and positions change in one smooth, shared motion. */
.topic a[data-topic-link] {
  display: inline-block;
  line-height: 1.2;          /* same in every state, so box ∝ text and FLIP lines up exactly */
  transform-origin: 0 0;
}
.topics-flip .topic a[data-topic-link] {
  transition: color 0.3s ease, text-decoration-color 0.3s ease,
              transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.no-trans, .no-trans * { transition: none !important; }
/* The open topic: 1.8× larger (belt.js re-fits the list after each switch) */
.topic:has(> a[aria-current="true"]) {
  font-size: calc(var(--topic-size) * 1.8);
  line-height: 1.15;
}
.topic a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.15s ease;
}
.topic a:hover { color: var(--accent); }
.topic a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
/* A partial (peek) panel is one big "go to" target: its links stay inert */
.cell:not([data-state="full"]) .topic a { pointer-events: none; }

/* About 2: reader */
.reader {
  color: #cbd5e1;
  font-size: var(--reader-size);
  line-height: 1.5;
}
/* The topic list already shows the headline, so the reader's title is kept
   for screen readers only. */
.reader-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  margin: 0 0 0.6em;
  color: var(--hook);
  font-size: var(--reader-title-size);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.reader p { margin: 0 0 0.75em; }
.reader ul { margin: 0 0 0.75em; padding-left: 1.1em; }
.reader li + li { margin-top: 0.35em; }
.reader .reader-sub {
  margin: 1.1em 0 0.35em;
  color: var(--detail);
  font-size: 0.8em;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* Links in the reader: same colour as the text, underlined; accent on hover */
.reader a { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; }
.reader a:hover { color: var(--accent); }
.reader article > :last-child { margin-bottom: 0; }
.reader:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

/* Slanted text margins (tablet+ only; elements injected by belt.js) */
.slant, .slant-spacer, .rslant, .rslant-gap { display: none; }
/* Measures --pad-x / --pad-y in px for the reader layout (belt.js) */
.rslant-probe {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--pad-x);
  height: var(--pad-y);
  visibility: hidden;
  pointer-events: none;
}
/* About 2: on scroll the text slides along the slant (tablet+, see below) */
@keyframes reader-glide {
  from { transform: translateX(calc(-1 * var(--glide, 0px))); }
  to   { transform: none; }
}

/* About 2 carousel: a large ‹ and › on either side of the text, vertically
   centred. They sit in .face (not .body), so they lean with the panel edges.
   --arrow-lane is the extra side margin the text keeps free for them. */
.cell--reader { --arrow-lane: 2.6rem; }
.reader-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: var(--arrow-lane);
  height: 40%;
  max-height: 7rem;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(148, 163, 184, 0.75);
  cursor: pointer;
  transition: color 0.15s ease;
}
.reader-arrow svg { width: 1.15rem; height: 2.4rem; }
.reader-arrow--prev { left: calc(var(--pad-x) * 0.35); }
.reader-arrow--next { right: calc(var(--pad-x) * 0.35); }
.reader-arrow:hover { color: var(--accent); }
/* First / last topic: the arrow that has nowhere to go is dimmed and inert */
.reader-arrow[aria-disabled="true"],
.reader-arrow[aria-disabled="true"]:hover {
  color: rgba(148, 163, 184, 0.18);
  cursor: default;
}
.reader-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 0.3rem; }
.cell:not([data-state="full"]) .reader-arrow { pointer-events: none; }

/* About 2 topic switch: old text rolls out, new text rolls in (belt.js).
   `translate` (not `transform`) so it never fights the reader's own glide. */
.reader.topic-leave-next { animation: topic-leave-next 0.17s ease-in forwards; }
.reader.topic-leave-prev { animation: topic-leave-prev 0.17s ease-in forwards; }
.reader.topic-enter-next { animation: topic-enter-next 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.reader.topic-enter-prev { animation: topic-enter-prev 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes topic-leave-next { to   { opacity: 0; translate: -1.75rem 0; } }
@keyframes topic-leave-prev { to   { opacity: 0; translate:  1.75rem 0; } }
@keyframes topic-enter-next { from { opacity: 0; translate:  1.75rem 0; } }
@keyframes topic-enter-prev { from { opacity: 0; translate: -1.75rem 0; } }

/* Phone carousel dots (built by belt.js; shown in the phone layout only) */
.reader-dots { display: none; }
.reader-dot {
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.reader-dot::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.35);
  transition: background-color 0.3s ease, transform 0.3s ease;
}
.reader-dot[aria-current="true"]::before { background: var(--accent); transform: scale(1.4); }
.reader-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 50%; }

/* ==========================================================================
   Contact form (Contact panels 1–4). One <form id="contact-form"> after the belt;
   its controls sit in the four panels and join it via form="contact-form".
   Field boxes and chips are small parallelograms (::before, skewed) with
   upright text, echoing the panels.
   ========================================================================== */
.form-anchor {                      /* the form element itself has no box */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.cell--form { --fld-skew: var(--skew); }
.form-head {
  margin: 0 0 0.75em;
  color: var(--hook);
  font-weight: 600;
  font-size: calc(var(--fld-font) * 1.3);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.fld {
  position: relative;
  display: inline-block;
  vertical-align: top;
  font-size: var(--fld-font);
  line-height: normal;
  white-space: nowrap;
}
/* Labels are for screen readers; the visible label is the placeholder. */
.fld-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.fld-box { position: relative; display: block; height: 2.35em; }
.fld input::placeholder { color: #7b8aa0; opacity: 1; }
.fld input:focus::placeholder { color: #55657d; }
.fld-box::before,
.chip::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: skewX(var(--fld-skew));
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 0.2rem;
  background: rgba(30, 41, 59, 0.55);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.fld-box:hover::before { border-color: rgba(56, 189, 248, 0.45); }
.fld-box:focus-within::before {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}
/* Missing or invalid after "Send": a clear red outline + soft red glow */
.fld.is-invalid .fld-box::before {
  border-color: #f87171;
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.22);
  background: rgba(127, 29, 29, 0.18);
}
.fld.is-invalid input::placeholder { color: #fca5a5; }
.fld input,
.fld select {
  position: relative;               /* above the box's ::before */
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 0.8em;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f1f5f9;
  font: inherit;
  outline: none;
}
.fld input:-webkit-autofill {
  -webkit-text-fill-color: #f1f5f9;
  transition: background-color 600000s 0s;
}
.fld select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.2em;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2394a3b8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85em center;
  background-size: 0.75em;
}
.fld select:invalid,
.fld select:has(option[value=""]:checked) { color: #7b8aa0; }
.fld select option { background: #0f172a; color: #e2e8f0; }

/* Note above the Timeline ("set to Urgent because …"), 5 s, belt.js */
.fld-note {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.45em);
  z-index: 3;
  max-width: 100%;
  padding: 0.5em 0.75em;
  border: 1px solid var(--accent);
  border-radius: 0.25rem;
  background: #0b1f33;
  box-shadow: 0 10px 28px -12px rgba(2, 6, 23, 0.9);
  color: #e2e8f0;
  font-size: 0.82em;
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transform: translateY(0.3em);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.fld-note::after {                   /* little pointer down to the field */
  content: "";
  position: absolute;
  left: 1.2em;
  top: 100%;
  border: 0.4em solid transparent;
  border-top-color: var(--accent);
}
.fld.has-note .fld-note { opacity: 1; transform: none; }
.fld.has-note .fld-box::before { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18); }
.fld.has-note select { color: #f1f5f9; }

/* "And mine": my email and phone in the same boxes, read-only; a click copies */
.form-subhead {
  margin: 0.35em 0 0.55em;
  color: var(--hook);
  font-weight: 600;
  font-size: calc(var(--fld-font) * 1.05);
  line-height: 1.3;
}
.vcard-link {
  margin-left: 0.6em;
  color: var(--accent);
  font-size: 0.82em;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.vcard-link::before { content: "\2193\00a0"; }
.vcard-link:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.vcard-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.fld--copy {
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: var(--fld-font);
  text-align: left;
  cursor: copy;
}
.fld-copy-text {
  position: relative;
  display: block;
  height: 100%;
  padding: 0 1.8em 0 0.8em;
  overflow: hidden;
  color: #e2e8f0;
  font-size: 0.8em;
  line-height: calc(2.35em / 0.8);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.fld--copy .fld-box::after {        /* copy icon */
  content: "";
  position: absolute;
  top: 50%;
  right: 0.8em;
  width: 0.85em;
  height: 0.85em;
  transform: translateY(-50%);
  background: currentColor;
  color: #64748b;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='5' y='5' width='9' height='9' rx='1.5' fill='none' stroke='black' stroke-width='1.6'/%3E%3Cpath d='M11 3.5V3a1.5 1.5 0 0 0-1.5-1.5h-6A1.5 1.5 0 0 0 2 3v6a1.5 1.5 0 0 0 1.5 1.5H4' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='5' y='5' width='9' height='9' rx='1.5' fill='none' stroke='black' stroke-width='1.6'/%3E%3Cpath d='M11 3.5V3a1.5 1.5 0 0 0-1.5-1.5h-6A1.5 1.5 0 0 0 2 3v6a1.5 1.5 0 0 0 1.5 1.5H4' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: color 0.15s ease;
}
.fld--copy:hover .fld-box::before { border-color: rgba(56, 189, 248, 0.55); }
.fld--copy:hover .fld-box::after { color: var(--accent); }
.fld--copy:focus-visible { outline: none; }
.fld--copy:focus-visible .fld-box::before { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18); }
.fld--copy.is-copied .fld-box::before { border-color: var(--accent); background: rgba(56, 189, 248, 0.17); }
.fld--copy.is-copied .fld-copy-text { color: #fff; }

/* Topic chips: checkboxes styled as slanted toggles */
.chips { font-size: 0; line-height: 0; }
.chip {
  position: relative;
  display: inline-block;
  vertical-align: top;
  margin: 0 0.55em 0.55em 0;
  font-size: calc(var(--fld-font) * 0.9);
  line-height: 1.2;
  cursor: pointer;
}
.chip input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.chip span {
  position: relative;
  display: block;
  padding: 0.55em 1em;
  color: #cbd5e1;
  font-weight: 500;
  white-space: nowrap;
}
.chip:hover::before { border-color: rgba(56, 189, 248, 0.55); }
/* Ticked: colour only, so a chip never changes width (no re-wrapping) */
.chip:has(input:checked)::before {
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.24);
}
.chip:has(input:checked) span { color: #fff; }
.chip:has(input:focus-visible)::before { box-shadow: 0 0 0 2px var(--accent); }
/* "What you need predictions on:" — one chip per line, all one width, so
   they read as a list (each line still starts along the slanted edge). */
.chip-line { font-size: 0; line-height: 0; }
.chips--stack .chip { width: 14.6em; }
/* "OPTIONAL", bold, on the two optional panels (What you need, Your
   message): centred along the top edge and centred along the left edge.
   Only the contact details are required. Both sit in the face;
   skewX(−skew) undoes the face skew so the letters stay upright, and the
   left one is turned to run up, parallel to the slanted edge. */
.opt-tag {
  position: absolute;
  z-index: 1;
  color: var(--accent);
  font-size: clamp(0.62rem, calc(var(--fld-font, 1rem) * 0.72), 0.85rem);
  font-weight: 800;
  letter-spacing: 0.32em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}
/* "Optionals for fine-tuning": phones only (folds What you need) */
.opt-toggle { display: none; }
/* "And mine ↓" top right of Your contact details: phones only */
.vcard-mini { display: none; }
.opt-tag--top {
  top: calc(var(--pad-x) * 0.3);
  left: 50%;
  transform: translateX(-50%) skewX(calc(-1 * var(--skew)));
}
.opt-tag--left {
  top: 50%;
  left: calc(var(--pad-x) * 0.32);
  transform: translate(-50%, -50%) skewX(calc(-1 * var(--skew))) rotate(calc(-90deg - var(--skew)));
}
/* Contact details: a fine line splits theirs (top) from mine (bottom),
   like the divider in the Workflow and About panels. It runs from edge to
   edge: the panel's face clips it to the slant. */
.form-split {
  position: relative;
  height: 0;
  margin: calc(var(--fld-font) * 1.3) 0 calc(var(--fld-font) * 1.5);
}
.form-split::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100vw;
  right: -100vw;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

/* Contact 3: the message (contenteditable, plain text) */
.msg {
  outline: none;
  color: #f1f5f9;
  font-size: var(--fld-font);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  cursor: text;
}
.msg.is-empty::before {             /* placeholder */
  content: attr(data-placeholder);
  color: #7b8aa0;
  pointer-events: none;
}
.cell--form-msg .face { transition: opacity 0.3s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.cell--form-msg:has(.msg:focus) .face { border-color: rgba(56, 189, 248, 0.55); border-left-color: var(--accent); }

/* Contact 4: the send button (the whole panel) */
.send {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: center;
  align-items: center;
  cursor: pointer;
}
.send-hook {
  display: block;
  color: var(--hook);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  transition: color 0.2s ease;
}
.send-hook::after {                 /* arrow; nudges right on hover */
  content: "\2192";
  display: inline-block;
  margin-left: 0.35em;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.cell--send.is-sending .send-hook::after,
.cell--send.is-sent .send-hook::after { content: none; }
.cell--send.is-sent .send-hook::before { content: "\2713\00a0"; color: var(--accent); }
.send-detail {
  display: block;
  max-width: 24em;
  color: var(--detail);
  line-height: 1.45;
  text-wrap: balance;
}
/* Tagline after the Send arrow ("Become a lover of models"), so the arrow
   points at it. Absolutely placed: "Send →" keeps its centred position.
   Hidden until the Send panel is hovered; belt.js slides the mask across
   it. Belt + mouse only; touch screens and reduced motion: always shown.
   Phones: centred under "Send →" (phone block). */
.send-hook { position: relative; }
.send-tagline {
  display: none;
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 0.9em;
  color: var(--detail);
  font-size: calc(var(--detail-size) * 0.95);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
}
.cell--send.has-tagline .send-tagline { display: block; }
.send-tagline.is-oops { color: #fca5a5; }   /* same soft red as "Not sent" */
@media (min-width: 768px) and (hover: hover) and (prefers-reduced-motion: no-preference) {
  .cell--send.has-tagline .send-tagline {
    -webkit-mask-image: linear-gradient(90deg, transparent 25%, #000 37.5%, #000 62.5%, transparent 75%);
            mask-image: linear-gradient(90deg, transparent 25%, #000 37.5%, #000 62.5%, transparent 75%);
    -webkit-mask-size: 400% 100%;
            mask-size: 400% 100%;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: 100% 0%;
            mask-position: 100% 0%;
  }
}
.send:disabled { cursor: default; }
.send:focus-visible { outline: none; }
.cell--send:has(.send:focus-visible) .face { outline: 2px solid var(--accent); outline-offset: -4px; }
.cell--send[data-state="full"]:has(.send:not(:disabled)):hover .face {
  border-color: rgba(56, 189, 248, 0.6);
  border-left-color: var(--accent);
}
.cell--send[data-state="full"]:hover .send:not(:disabled) .send-hook::after { transform: translateX(0.25em); }
.cell--send.is-ready .face {
  border-color: rgba(56, 189, 248, 0.5);
  border-left-color: var(--accent);
  background:
    radial-gradient(ellipse 80% 70% at 50% 50%, rgba(56, 189, 248, 0.14), transparent 70%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.88));
}
.cell--send.is-ready .send-hook { color: #fff; }
.cell--send.is-error .send-hook { color: #fca5a5; }
.cell--send.is-sending .send { cursor: progress; }

/* A partial (peek) panel is one big "go to" target: its controls stay inert */
.cell--form:not([data-state="full"]) .face * { pointer-events: none; }

/* Interactivity (set by belt.js via data-action) */
.cell[data-action] { cursor: pointer; }
.cell[data-action]:hover .face { border-color: rgba(56, 189, 248, 0.55); border-left-color: var(--accent); }
.cell[data-action]:focus-visible { outline: none; }
.cell[data-action]:focus-visible .face {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

/* ==========================================================================
   Tablet and up: the belt
   ========================================================================== */
@media (min-width: 768px) {
  .fov {
    flex: 1 1 0;
    min-height: 15rem;
    overflow: hidden;           /* the field of view clips the belt */
    container-type: size;       /* cqw / cqh below = this window */
  }

  .belt-rows {
    /* All geometry derives from the window size and the skew. */
    --skew: -14deg;
    --skew-tan: 0.2493;          /* tan(14deg) — keep in sync with --skew */
    --gap: clamp(0.45rem, 0.9cqw, 0.75rem);
    --row-gap: var(--gap);
    --row-h: calc((100cqh - var(--row-gap)) / 2);
    --overhang: calc(var(--skew-tan) * var(--row-h) / 2);   /* tip beyond shell */
    --peek: max(10cqw, calc(var(--overhang) + var(--gap) + 1.5rem));
    --cell-w: calc((100cqw - 2 * var(--peek) - var(--gap)) / 2);
    --step: calc(var(--cell-w) + var(--gap));               /* THE step */

    --pad-x: clamp(1.1rem, 2.4cqw, 2.5rem);
    --pad-y: clamp(0.75rem, 3cqh, 2rem);
    --hook-size: clamp(0.95rem, min(2.1cqw, 4.4cqh) * var(--s), 1.85rem);
    --detail-size: clamp(0.85rem, min(1.5cqw, 3.4cqh) * var(--s), 1.4rem);
    --topic-size: calc(var(--detail-size) * 1.1 * var(--topics-fit, 1) * var(--topics-trim, 1));
    --reader-size: calc(max(0.9rem, calc(var(--detail-size) * 0.95)) * var(--reader-fit, 1));   /* fitted: no scrolling on the belt */
    --reader-title-size: calc(var(--hook-size) * 0.8);

    height: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--row-gap);
  }

  .belt {
    --idx: 0;                    /* Landing (leftmost); belt.js owns this afterwards */
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    gap: var(--gap);
    transform: translateX(calc(var(--peek) - var(--idx) * var(--step)));
    transition: transform var(--dur) var(--ease);
    will-change: transform;
  }
  .cell { flex: 0 0 var(--cell-w); }

  /* Partial panels at the edges: real belt cells, just dimmed */
  .cell[data-state="peek"] .face { opacity: 0.6; }
  .cell[data-state="peek"]:hover .face,
  .cell[data-state="peek"]:focus-visible .face { opacity: 0.85; }

  /* Text follows the slanted edges: each line starts (and ends) further left
     the lower it sits, parallel to the panel edges. The text box is widened by
     the overhang on both sides so it spans the whole parallelogram; two floats
     with a slanted shape-outside carve out the edges. Letters stay upright.
     .slant-spacer pushes the text down to centre it vertically (height set by
     belt.js, because floats and vertical centring can't be combined in CSS). */
  .body.is-slanted {
    display: block;
    inset: 0 calc(-1 * var(--overhang));
    padding: 0;
  }
  .slant {
    display: block;
    height: 100%;
    width: calc(2 * var(--overhang) + var(--pad-x));
  }
  .slant--l {
    float: left;
    shape-outside: polygon(0 0, 100% 0, var(--pad-x) 100%, 0 100%);
  }
  .slant--r {
    float: right;
    shape-outside: polygon(calc(2 * var(--overhang)) 0, 100% 0, 100% 100%, 0 100%);
  }
  .slant-spacer { display: block; height: 0; }
  .body.is-slanted .detail { margin-top: 0.6rem; }

  /* "What I do" (Landing) panels on the belt: text +35%, reduced by
     --landing-fit (belt.js, ≤ 1) only when the longest text would not fit its
     panel, then 10% smaller (--landing-trim) so the panels feel less loaded. */
  .cell[data-fov="landing"] .hook   { font-size: calc(var(--hook-size) * 1.35 * var(--landing-fit, 1) * var(--landing-trim, 0.9)); }
  .cell[data-fov="landing"] .detail { font-size: calc((var(--detail-size) * 1.15 - 2pt) * 1.35 * var(--landing-fit, 1) * var(--landing-trim, 0.9)); }
  /* Landing lines break only where index.html says (br.br-belt), never on their
     own — so every desktop/tablet screen shows the same lines. belt.js scales the
     text so the longest line fits between the slanted edges. */
  .cell[data-fov="landing"] .hook,
  .cell[data-fov="landing"] .detail { white-space: nowrap; }
  /* Topic titles never wrap on the belt; belt.js scales the list so the
     longest title still fits between the slanted edges when it is open. */
  .topic { white-space: nowrap; }

  /* About 2: the reader. Its text follows the slanted edges like the other
     panels (two floats with a slanted shape-outside, injected by belt.js).
     Longer text scrolls without a visible scrollbar: belt.js lays the article
     out as one tall parallelogram, and while scrolling it slides sideways along
     the slant, so the visible lines always stay parallel to the panel edges.
     Fades at the top and bottom hint that there is more. */
  .cell--reader .body {
    display: block;
    inset: 0 calc(-1 * var(--overhang));
    padding: 0;
  }
  .reader {
    position: absolute;
    /* Narrower by the arrow lane on each side; a constant side inset keeps
       the slanted text margins parallel to the panel edges. */
    inset: 0 var(--arrow-lane);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    --fade-top: 0px;
    --fade-bottom: 0px;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
  }
  .reader::-webkit-scrollbar { display: none; }
  .reader.has-more { --fade-bottom: 2.5rem; }
  .reader.has-less { --fade-top: 2.5rem; }
  .reader:focus-visible { outline-offset: -4px; }
  .reader article { will-change: transform; }
  .rslant { display: block; }
  .rslant--l {
    float: left;
    shape-outside: polygon(0 0, 100% 0, var(--pad-x) 100%, 0 100%);
  }
  .rslant--r {
    float: right;
    shape-outside: polygon(calc(100% - var(--pad-x)) 0, 100% 0, 100% 100%, 0 100%);
  }
  .rslant-gap { display: block; }
  .reader article > :has(+ .rslant-gap--bottom) { margin-bottom: 0; }
  /* List markers sit inline, so they follow the slanted edge too */
  .reader ul { padding-left: 0; list-style: none; }
  /* Bullets inside the reading area: the bullet sits on the slanted text
     edge, and wrapped lines indent by the bullet's width (text-indent …
     hanging), so all lines of a point line up after the bullet.
     Older browsers without "hanging": the bullet hangs in the side padding
     instead, and the lines start on the text edge. */
  .reader li { text-indent: -1.1em; }
  @supports (text-indent: 1em hanging) {
    .reader li { text-indent: 1.1em hanging; }
  }
  /* The bullet: 1.4× the text size, in the text colour. Its box stays
     1.1em of the TEXT wide (1.1 / 1.4 of its own em), so the indent of the
     wrapped lines still matches; nudged down to sit centred on the x-height. */
  .reader li::before {
    content: "\2022";
    display: inline-block;
    font-size: 1.4em;
    line-height: 1;
    width: calc(1.1em / 1.4);
    vertical-align: -0.12em;
    text-indent: 0;
    color: inherit;
  }
  @supports (animation-timeline: scroll()) {
    .reader article {
      animation-name: reader-glide;
      animation-duration: auto;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: scroll(nearest block);
    }
  }

  /* Workflow panels: belt.js lowers --workflow-fit (≤ 1) only if the longest
     text would not fit its panel. */
  .cell[data-fov="workflow"] .hook   { font-size: calc(var(--hook-size) * var(--workflow-fit, 1)); }
  .cell[data-fov="workflow"] .detail { font-size: calc(var(--detail-size) * var(--workflow-fit, 1)); }

  /* About 3 (name panel): larger type on the belt */
  .cell--name .hook   { font-size: calc(var(--hook-size) * 1.8); }
  .cell--name .detail { font-size: calc(var(--detail-size) * 1.2); }


  /* ---- Contact form on the belt ---- */
  .cell--form {
    /* Same scale as the rest of the belt; belt.js lowers --form-fit (≤ 1)
       only if the busiest panel would not fit. */
    --fld-font: calc(clamp(0.9rem, min(1.7cqw, 3.7cqh) * var(--s), 1.4rem) * var(--form-fit, 1));
    --fld-vgap: calc(var(--fld-font) * 0.45);   /* below each field */
    --fld-line-h: calc(var(--fld-font) * 2.35 + var(--fld-vgap));
    /* Width of one line between the slanted edges: the line band is
       --fld-line-h tall, and the edges cut in by tan(skew) × that height. */
    --fld-avail: calc(var(--cell-w) - 2 * var(--pad-x) - var(--skew-tan) * var(--fld-line-h) - 4px);
  }
  /* One field per line. Fields are inline-blocks, so like text lines they
     start along the slanted edge: the boxes step down parallel to it
     (floats injected by belt.js, see .body.is-slanted). */
  .fld-line { font-size: 0; line-height: 0; white-space: nowrap; }
  .fld {
    height: 2.35em;
    margin-bottom: var(--fld-vgap);
    width: var(--fld-avail);
  }
  .fld.fld--full { width: min(var(--fld-avail), 19.5em); }
  /* Two boxes on one line (Company | Role, my email | my phone) */
  .cell--form { --fld-gap: calc(var(--fld-font) * 0.7); }
  .fld + .fld { margin-left: var(--fld-gap); }
  .fld.fld--half { width: calc((var(--fld-avail) - var(--fld-gap)) / 2); }
  .fld.fld--w58  { width: calc((var(--fld-avail) - var(--fld-gap)) * 0.6); }
  .fld.fld--w42  { width: calc((var(--fld-avail) - var(--fld-gap)) * 0.4); }
  /* Tall, narrow windows (tablet portrait): my email and phone one per line */
  @container (max-aspect-ratio: 5 / 4) {
    .fld-line:has(.fld--copy) { white-space: normal; }
    .fld.fld--w58, .fld.fld--w42 { width: var(--fld-avail); }
    .fld.fld--w42 { margin-left: 0; }
  }
  .chips { margin-bottom: calc(var(--fld-vgap) * 0.5); }
  .cell--form .body.is-slanted .form-head { margin-bottom: 0.5em; }
  .cell--form .body.is-slanted .form-subhead { margin: 0.15em 0 0.4em; }

  /* Contact 3: the message lines follow the slant like the About reader:
     belt.js lays the text out as one tall parallelogram that slides sideways
     while it scrolls. No scrollbar; fades show there is more. */
  .body--msg {
    display: block;
    inset: 0 calc(-1 * var(--overhang));
    padding: 0;
  }
  .msg-scroll {
    position: absolute;
    inset: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    --fade-top: 0px;
    --fade-bottom: 0px;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
  }
  .msg-scroll::-webkit-scrollbar { display: none; }
  .msg-scroll.has-more { --fade-bottom: 2rem; }
  .msg-scroll.has-less { --fade-top: 2rem; }
  /* Only while the message is longer than the panel (belt.js sets
     .is-gliding): an idle animation would soften the text. */
  @supports (animation-timeline: scroll()) {
    .msg-flow.is-gliding {
      animation-name: reader-glide;
      animation-duration: auto;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: scroll(nearest block);
    }
  }

  /* Contact 4: the button covers the whole parallelogram (the face clips it) */
  .send.body {
    inset: 0 calc(-1 * var(--overhang));
    padding: var(--pad-y) calc(2 * var(--overhang) + var(--pad-x));
    justify-content: center;
    gap: 0.7em;
  }
  .send-hook { font-size: calc(var(--hook-size) * 1.8); }
  .send-detail { font-size: calc(var(--detail-size) * 0.95); }
  .fov.no-anim .belt,
  .fov.no-anim .face { transition: none; }
}

/* ==========================================================================
   Chapter panels (About 1–2, Workflow 1–2): ONE wide panel each (tablet+).
   Each cell spans two belt slots:
   2 × --cell-w + --gap = exactly two --step's, so the belt geometry and the
   scene indices stay as they are (belt.js counts data-span="2" as 2 slots).
   Chapter heading (.chapter-topics) on the left, reader on the right.
   ========================================================================== */
@media (min-width: 768px) {
  .cell--wide { flex: 0 0 calc(2 * var(--cell-w) + var(--gap)); }
  .cell--chapter {
    /* Each panel has its own text size: belt.js sets --reader-fit on the cell. */
    --reader-size: calc(max(0.9rem, calc(var(--detail-size) * 0.95)) * var(--reader-fit, 1));
    --list-w: calc((2 * var(--cell-w) + var(--gap)) * 0.30);   /* heading share (two-part titles still fit on two lines) */
  }
  /* Left: the chapter heading. Full panel height, so its slanted text
     margins (belt.js) work as in the old About 1 panel. A thin line along
     the panel's slant separates it from the reader. */
  .chapter-topics {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--list-w);
    border-right: 1px solid rgba(148, 163, 184, 0.14);
  }
  /* Right: the reader fills the rest (full height, so the slant geometry
     is the same as in the old About 2 panel). */
  .cell--chapter > .face > .body--scroll {
    left: calc(var(--list-w) - var(--overhang));
  }
  /* Slightly tighter paragraph spacing: more room, so belt.js can fit the
     text at a larger size. */
  .cell--chapter .reader p { margin-bottom: 0.5em; }

  /* The dots centre in the left section, between the slanted edges. */
  .chapter-topics .body { text-align: center; }

  /* Only the open topic is shown: large, white, on two lines. */
  .chapter-topics .topic { display: none; }
  .chapter-topics .topic:has(> a[aria-current="true"]) {
    display: block;
    margin: 0;               /* no list spacing: every title starts at the same spot */
    font-size: calc(var(--detail-size) * 2);
    line-height: 1.15;
    letter-spacing: -0.02em;
    white-space: normal;
    text-wrap: balance;
    /* Always two lines tall, so the heading block keeps one height and its
       arrows and dots stay put when the topic changes. */
    min-height: calc(2 * 1.15em);
    text-align: left;
    /* Only as wide as the title itself, centred in the column: the stagger
       below then depends on the two halves, not on the screen width. */
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    animation: chapter-in 0.35s ease both;
  }
  /* Two-part titles (index.html: span.tl / span.tr): first half on the
     left, second half on the right. The second half is indented at least
     --stagger, so the step stays visible when it is the longer half. */
  .chapter-topics .topic .tl,
  .chapter-topics .topic .tr { display: block; width: fit-content; white-space: nowrap; }
  .chapter-topics .topic .tr { margin-left: auto; padding-left: var(--stagger, 1.6em); }
  /* Inline (not inline-block as in the old list's glide), so long titles
     wrap along the slanted edges. */
  .chapter-topics .topic > a { display: inline; line-height: inherit; }
  /* Light-blue line under each title line, drawn as a background so it can
     shrink: during autoplay (belt.js) it disappears from left to right over
     the topic's reading time. Lines are only as wide as their text
     (fit-content); the stagger indent of the second line is padding, so the
     line starts at the text (content-box). */
  .chapter-topics .topic > a[aria-current="true"] { text-decoration: none; cursor: default; }
  .chapter-topics .topic > a[aria-current="true"] .tl,
  .chapter-topics .topic > a[aria-current="true"] .tr {
    background-image: linear-gradient(var(--accent), var(--accent));
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: 100% 2px;
    background-origin: content-box;
    background-clip: content-box;
  }
  @keyframes chapter-in { from { opacity: 0; } }
  /* Reset to the first topic after the visitor left (belt.js): heading and
     text fade out, switch, and fade back in. */
  .cell--chapter .reader,
  .cell--chapter .chapter-topics .body { transition: opacity 0.35s ease; }
  .cell--chapter.is-fading .reader,
  .cell--chapter.is-fading .chapter-topics .body { opacity: 0; }

  /* ‹ › beside the text: vertically centred, in the reader's side lanes
     (--arrow-lane); the left one sits just right of the heading. */
  .cell--chapter .reader-arrow--prev { left: calc(var(--list-w) + var(--pad-x) * 0.35); }
  /* Arrows + dots under the heading. Inline boxes (not a flex box), so the row
     follows the slanted edge like the text lines above it. */
  .chapter-nav {
    margin-top: 1.1em;
    white-space: nowrap;
    line-height: 0;
  }
  .chapter-dots { display: inline-flex; vertical-align: middle; }
  /* ‹ › around the dots too (small, in the line, not beside the text). */
  .chapter-nav .reader-arrow {
    position: static;
    display: inline-grid;
    vertical-align: middle;
    transform: none;
    width: 2rem;
    height: 2.6rem;
    max-height: none;
  }
  .chapter-nav .reader-arrow svg { width: 0.95rem; height: 1.9rem; }
}


/* ==========================================================================
   Phone: no belt — the current field of view's four panels, stacked
   ========================================================================== */
@media (max-width: 767px) {
  html, body { height: auto; overscroll-behavior-x: none; }   /* sideways swipes change pages, not browser history */
  /* Header links: ONE row that scrolls sideways (no wrapping), soft at
     the edges as a hint; centred when it fits. belt.js keeps the current
     link in view. */
  .site-header { padding-inline: 0; }
  .site-header h1 { padding-inline: 1.25rem; }
  .site-nav {
    position: relative;
    flex-wrap: nowrap;
    justify-content: flex-start;
    column-gap: 1.1rem;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding-inline: 1.25rem;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 1.25rem, #000 calc(100% - 1.25rem), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 1.25rem, #000 calc(100% - 1.25rem), transparent 100%);
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { flex: 0 0 auto; white-space: nowrap; }
  .site-nav > a:first-of-type { margin-left: auto; }
  .site-nav > a:last-of-type { margin-right: auto; }
  .site-nav .sep { display: none; }
  .main {
    padding: 0.9rem 1rem 1.25rem;
    overflow-x: clip;               /* page swipes slide sideways */
    touch-action: pan-y;            /* sideways drags are ours (belt.js), vertical scrolling native */
  }
  .belt-rows {
    --skew: 0deg;                  /* phones: upright panels, no slant */
    --overhang: 0rem;
    --pad-x: 1rem;
    --pad-y: 1.15rem;
    --hook-size: 1.15rem;
    --detail-size: 0.98rem;
    --topic-size: 1.05rem;
    --reader-size: 0.98rem;
    --reader-title-size: 1.12rem;
    /* (reader carousel: see .cell--reader rule below) */
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
  }
  .belt { display: flex; flex-direction: column; gap: 0.8rem; }
  .cell:not([data-state="full"]) { display: none; }
  .face { position: relative; border-left-width: 4px; }   /* 2/3 of the belt's 6px */
  .body { position: relative; }
  .cell--photo .face { aspect-ratio: 4 / 3; }
  /* About on phones: the topic list (About 1) and the reader (About 2) merge
     into ONE swipeable carousel of topic cards — heading + text per card.
     Native horizontal scrolling with snap; one card at a time (‹ dots ›
     below, and a one-time nudge on arrival, show that there are more).
     belt.js keeps the current topic and the dots in sync. */
  .cell--topics { display: none; }
  .reader-arrow { display: none; }
  .cell--reader .face {
    transform: none;
    background: none;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }
  .cell--reader .face::before { display: none; }
  .cell--reader .body { padding: 0; transform: none; }
  .reader {
    display: flex;
    align-items: flex-start;       /* belt.js makes every card as tall as the tallest */
    gap: 2rem;                     /* wide enough that the next card stays off screen */
    margin-inline: -1rem;          /* run to the screen edges (main has 1rem padding) */
    padding: 0.25rem 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1rem;
    scrollbar-width: none;
  }
  .reader::-webkit-scrollbar { display: none; }
  .reader article,
  .reader article[hidden] {        /* every topic is a card here */
    --card-skew: 0deg;             /* upright, like the other phone panels */
    flex: 0 0 100%;
    /* Shorter texts sit in the vertical middle of the (equally tall)
       card, as one block with generous, regular spacing; still left-aligned. */
    display: flex;
    flex-direction: column;
    justify-content: center;
    scroll-snap-align: start;
    position: relative;
    isolation: isolate;
    /* --oh = how far the slanted edge leans in over half the card's height
       (set per card by belt.js), so text never crosses a slanted edge */
    padding: 1.15rem calc(0.85rem + var(--oh, 1rem)) 1.25rem;
  }
  .reader article::before {       /* the slanted panel behind the upright text */
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    transform: skewX(var(--card-skew));
    border-radius: 0.28rem;
    border: 2px solid var(--border);
    border-left: 4px solid var(--accent);
    background:
      linear-gradient(155deg, rgba(30, 41, 59, 0.35) 0%, transparent 42%),
      linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.88));
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.07), 0 18px 48px -32px rgba(2, 6, 23, 1);
  }
  .reader .reader-title {          /* visible on the cards, in the "selected" style */
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
    margin: 0 0 0.75em;
    color: #fff;
    text-decoration-line: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.28em;
  }
  .reader article p,
  .reader article ul { margin-bottom: 1.05em; }
  .reader article > :last-child { margin-bottom: 0; }
  .reader-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.15rem;
    margin-top: 0.55rem;
  }
  .reader-dots .reader-arrow {
    position: static;
    display: inline-grid;
    transform: none;
    width: 2.4rem;
    height: 2.4rem;
    max-height: none;
    color: var(--accent);
  }
  .reader-dots .reader-arrow svg { width: 0.7rem; height: 1.4rem; }
  /* First arrival on a phone: the cards nudge left so the next card's
     edge shows for a moment (belt.js adds .is-hinting once) */
  @keyframes swipe-hint {
    0%, 100% { transform: none; }
    35%, 60% { transform: translateX(-3.4rem); }
  }
  .reader.is-hinting > article { animation: swipe-hint 1.3s cubic-bezier(0.45, 0, 0.25, 1); }
  /* Workflow / About on phones: the topic cards first, then my photo with
     my name right under it, joined into one tight block. */
  .fov:is([data-scene="about"], [data-scene="workflow"]) .belt[data-belt="bottom"] { gap: 0; }
  .fov:is([data-scene="about"], [data-scene="workflow"]) .cell--photo .face {
    border-bottom: 0;
    border-radius: 0.28rem 0.28rem 0 0;
    box-shadow: none;
  }
  .fov:is([data-scene="about"], [data-scene="workflow"]) .cell--name .face {
    border-top: 0;
    border-radius: 0 0 0.28rem 0.28rem;
  }
  .fov:is([data-scene="about"], [data-scene="workflow"]) .cell--name .face::before { display: none; }
  /* About 3 (name panel): centred on phones */
  .cell--name .body { text-align: center; align-items: center; }

  /* ---- Contact form on phones: one classic, upright panel, top to bottom.
     The four contact cells stack without gaps and share one frame. ---- */
  .fov[data-scene="contact"] .belt-rows,
  .fov[data-scene="contact"] .belt { gap: 0; }
  .cell--form { --fld-font: 1rem; --fld-skew: 0deg; }   /* ≥ 16px: no zoom-on-focus in iOS */
  .cell--form .face {
    transform: none;
    border-radius: 0;
    border-top: 0;
    border-bottom: 0;
    box-shadow: none;
    background: rgba(15, 23, 42, 0.95);
  }
  .cell--form .face::before { display: none; }
  /* Order: your details (+ mine) · your message · optionals (folded) ·
     Send. The belts dissolve (display: contents) so the cells can be
     ordered across both rows. Optionals opened: Send moves up above them,
     so it stays where it was instead of dropping to the bottom. */
  .fov[data-scene="contact"] .belt { display: contents; }
  .cell--form-who  { order: 1; }
  .cell--form-msg  { order: 2; }
  .cell--form-what { order: 3; }
  .cell--send      { order: 4; }
  .fov:has(.cell--form-what.is-open) .cell--send { order: 3; }
  .fov:has(.cell--form-what.is-open) .cell--form-what { order: 4; }
  /* One frame: the first panel carries its top edge, the last one its bottom */
  .cell--form-who .face { border-top: 2px solid var(--border); border-radius: 0.28rem 0.28rem 0 0; }
  .cell--form-who .face::before { display: block; }
  .cell--send .face,
  .fov:has(.cell--form-what.is-open) .cell--form-what .face {
    border-bottom: 2px solid var(--border);
    border-radius: 0 0 0.28rem 0.28rem;
    box-shadow: 0 18px 48px -32px rgba(2, 6, 23, 1);
  }
  .fov:has(.cell--form-what.is-open) .cell--send .face { border-bottom: 0; border-radius: 0; box-shadow: none; }
  .cell--form .body { transform: none; padding: 0.6rem 1.15rem; gap: 0; }
  .cell--form-who .body { padding-top: 1.3rem; padding-bottom: 0.2rem; }
  /* "And mine": a download link top right, beside "Your contact details";
     the "And mine" line, my email/phone boxes and the divider go. */
  .cell--form-who .form-subhead,
  .cell--form-who .form-split,
  .cell--form-who .fld-line:has(.fld--copy) { display: none; }
  .vcard-mini {
    display: block;
    position: absolute;
    top: 1.95rem;
    right: 1.15rem;
    z-index: 1;
    color: var(--hook);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
  }
  .vcard-mini::after { content: "\00a0\2193"; color: var(--accent); }
  .vcard-mini:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 0.2rem; }
  /* "Optionals for fine-tuning": a fold-out; closed, only the button shows */
  .opt-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin: 0;
    padding: 0.8rem 0;
    border: 0;
    background: none;
    color: var(--hook);
    font: inherit;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-align: left;
    cursor: pointer;
  }
  .opt-toggle::after {                /* chevron: down when closed, up when open */
    content: "";
    flex: 0 0 auto;
    width: 0.55rem;
    height: 0.55rem;
    margin: 0 0.35rem 0.3rem 0;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
    transition: transform 0.2s ease, margin 0.2s ease;
  }
  .cell--form-what.is-open .opt-toggle::after { transform: rotate(-135deg); margin-bottom: -0.3rem; }
  .opt-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 0.2rem; }
  .cell--form-what:not(.is-open) .body > :not(.opt-toggle) { display: none; }
  .cell--form-what:not(.is-open) .opt-tag { display: none; }
  /* Opened for good: the button goes; "OPTIONAL" shows like on the message */
  .cell--form-what.is-open .opt-toggle { display: none; }
  /* The one "OPTIONAL" on phones: centred, larger, above "What you need
     predictions on:" once the optionals are open */
  .cell--form-what .opt-tag--top {
    top: 0.85rem;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    padding-left: 0.3em;             /* balances the trailing letter-spacing */
  }
  .cell--form-what.is-open .body { padding-top: 2rem; }
  .cell--form-what .form-head:focus { outline: none; }
  /* "OPTIONAL" on phones: the top leg only, upright, top right beside
     "Your message" (the fold-out says "Optionals" itself) */
  .opt-tag--left { display: none; }
  .opt-tag--top {
    top: 0.6rem;
    left: auto;
    right: 1.15rem;
    transform: none;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
  }
  .cell--form-msg .opt-tag { display: none; }   /* phones: only the optionals carry the label */
  .cell--form .form-head { margin: 0.4rem 0 0.8rem; }
  .fld-line { font-size: inherit; line-height: normal; }
  .fld { display: block; width: 100%; margin-bottom: 0.6rem; }
  .fld-box { height: 2.75rem; }
  .fld-copy-text { font-size: 1em; line-height: 2.75rem; }
  .chips { margin-bottom: 0.45rem; }
  .msg-scroll, .msg-flow { all: unset; display: block; }
  .msg {
    min-height: 9rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 0.2rem;
    background: rgba(2, 6, 23, 0.5);
  }
  .msg:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18); }
  .cell--form-msg:has(.msg:focus) .face { border-color: var(--border); border-left-color: var(--accent); }
  .send.body {
    width: calc(100% - 2.3rem);
    margin: 0.5rem 1.15rem 1.4rem;
    padding: 0.9rem 1rem;
    border-radius: 0.28rem;
    background: var(--accent);
    gap: 0.25rem;
  }
  .send-hook, .cell--send.is-ready .send-hook { color: #020617; font-size: 1.2rem; }
  .send-hook::after { color: #020617; }
  .send-detail { color: rgba(2, 6, 23, 0.75); font-size: 0.85rem; }
  .send-tagline {
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    margin: 0.2rem 0 0;
    color: rgba(2, 6, 23, 0.75);
    font-size: 0.85rem;
  }
  .cell--send.has-tagline .send-hook { margin-bottom: 1.25rem; }
  .send-tagline.is-oops { color: #7f1d1d; }
  .cell--send.is-ready .face { background: rgba(15, 23, 42, 0.95); border-color: var(--border); }
  .cell--send.is-error .send-hook { color: #7f1d1d; }
  .cell--send:has(.send:focus-visible) .face { outline: none; }
  .send:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
  /* Line breaks meant for the belt only */
  .br-belt { display: none; }
  /* Corner tag moves from About 3 to the photo, bottom right */
  .tag--belt { display: none; }
  .tag--phone {
    display: grid;
    left: auto;
    right: 1rem;
    bottom: 0.8rem;
    color: var(--panel);   /* panel dark blue (#0f172a) */
    justify-items: end;
    font-size: calc(var(--detail-size) * 1.25);
    z-index: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chapter-topics .topic { animation: none !important; }
  .tag > .tag-a, .tag > .tag-b { animation: none !important; }
  .belt, .face { transition: none !important; }
  .site-nav a[data-nav], .topic a[data-topic-link] { transition: none !important; }
  .reader { animation: none !important; }
  .reader-dot::before, .reader { transition: none !important; }
}
