/* ==========================================================================
   This Is Klatt / thisisklatt.com
   Hand-built one-page portfolio. No framework, no build step.
   ========================================================================== */

/* ---------- fonts (self-hosted, SIL Open Font License: see assets/fonts/OFL-*.txt) ---------- */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Doto";
  src: url("../fonts/doto-latin-ext.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Doto";
  src: url("../fonts/doto-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --night: #0b0b0c;
  --on-night: #ecebe6;
  --on-night-2: rgba(236, 235, 230, .62);
  --line-night: rgba(236, 235, 230, .16);

  --paper: #f1efe9;
  --ink: #0e0e0f;
  --ink-2: #55545a;
  --line: rgba(14, 14, 15, .14);

  --accent: #e3261b;          /* klatt red, from the klatt // draft mark */
  --accent-deep: #c41d13;     /* darker klatt red for hovers and errors on paper (about 5.2:1) */
  --accent-ink: #ffffff;

  --gutter: max(clamp(16px, 2.2vw, 32px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --header-h: 64px;
  --section-pad: clamp(88px, 11vw, 176px);

  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --dots: "Doto", "JetBrains Mono", ui-monospace, monospace;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-gutter: stable; }
@media (prefers-reduced-motion: no-preference) {
  html.no-js, html.no-lenis { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--night);
  color: var(--on-night);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
/* targets of in-page links get focus programmatically; they need no ring */
main:focus, section:focus { outline: none; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- utilities ---------- */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -9999px; top: 12px; z-index: 300; background: #fff; color: #000; padding: 10px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }
.mono {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 500;
}
.doto { font-family: var(--dots); font-weight: 800; letter-spacing: 0; }
.ph {
  color: var(--accent);
  text-decoration: underline dashed 1.5px;
  text-underline-offset: .18em;
}
@media (max-width: 700px) { .hide-sm { display: none !important; } }

/* ---------- preloader ---------- */
.preloader { display: none; }
.js .preloader {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--gutter);
  background: var(--night); color: var(--on-night);
}
.preloader__top { display: flex; justify-content: space-between; color: var(--on-night-2); }
.preloader__count { font-size: clamp(96px, 20vw, 300px); line-height: .8; }
.preloader__bar { height: 1px; background: var(--line-night); overflow: hidden; }
.preloader__bar span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.is-loaded .preloader { pointer-events: none; }
.late .preloader { display: none !important; }
/* last resort if scripts never run at all */
.js .preloader { animation: preloader-failsafe 0s 12s forwards; }
@keyframes preloader-failsafe { to { visibility: hidden; pointer-events: none; } }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter);
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.brand {
  display: inline-flex; align-items: baseline; gap: .12em;
  font-weight: 700; font-size: 22px; letter-spacing: -.02em; text-decoration: none;
  font-stretch: 110%;
}
.site-nav { display: flex; gap: clamp(16px, 3vw, 44px); }
.site-nav a { text-decoration: none; display: inline-flex; gap: 8px; position: relative; padding: 6px 0; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease-out);
}
.site-nav a:hover::after, .site-nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.nav-num { opacity: .7; }
.clock { display: inline-flex; align-items: center; gap: 10px; }
.clock__label { opacity: .7; }
.clock__time { font-size: 17px; font-variant-numeric: tabular-nums; min-width: 8ch; text-align: right; }
@media (max-width: 760px) { .site-nav { display: none; } }
/* desktop: logo left, section links truly centred, tools right */
@media (min-width: 760.02px) {
  .site-header { display: grid; grid-template-columns: 1fr auto 1fr; }
  .site-header > .brand { justify-self: start; }
  .site-header > .header-tools { justify-self: end; }
}
.site-header :focus-visible { outline-color: #fff; }
.header-tools { display: inline-flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.motion-toggle {
  background: none; border: 0; padding: 6px 0; color: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.motion-toggle::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  animation: motion-dot 1.6s ease-in-out infinite;
}
/* hidden until main.js wires it up, so it never shows as a dead control */
.motion-toggle:not(.is-ready) { visibility: hidden; }
.motion-off .motion-toggle::before { animation: none; background: transparent; box-shadow: inset 0 0 0 1px currentColor; }
@keyframes motion-dot { 50% { opacity: .25; } }
@media (max-width: 420px) { .motion-toggle { font-size: 10px; } .clock__label { display: none; } }

/* ---------- custom cursor ---------- */
.cursor, .cursor-dot { display: none; }
.has-cursor .cursor, .has-cursor .cursor-dot { display: flex; }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor [data-cursor] { cursor: none; }
.has-cursor input, .has-cursor textarea { cursor: text; }
.cursor {
  position: fixed; left: 0; top: 0; z-index: 120; pointer-events: none;
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  align-items: center; justify-content: center;
  border: 1px solid #fff; border-radius: 999px;
  mix-blend-mode: difference;
  transition: width .45s var(--ease-out), height .45s var(--ease-out), margin .45s var(--ease-out),
              background-color .3s, border-color .3s, opacity .3s;
  will-change: transform;
}
.cursor.is-hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: #fff; }
.cursor.is-label {
  width: 92px; height: 92px; margin: -46px 0 0 -46px;
  mix-blend-mode: normal; background: var(--accent); border-color: var(--accent);
}
.cursor.is-hidden { opacity: 0; }
.cursor__label {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500;
  color: #fff; opacity: 0; transition: opacity .25s;
}
.cursor.is-label .cursor__label { opacity: 1; }
.cursor-dot {
  position: fixed; left: 0; top: 0; z-index: 121; pointer-events: none;
  width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: #fff; mix-blend-mode: difference; will-change: transform;
}

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  height: 100vh; height: 100svh; min-height: 560px;
  background: var(--night); color: var(--on-night);
}
.hero__gl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__fallback {
  position: absolute; inset: 0; z-index: 0; opacity: 0; transition: opacity 1s;
}
.no-gl .hero__fallback { opacity: 1; }
.hero__meta {
  position: absolute; left: var(--gutter); right: var(--gutter); z-index: 3;
  display: flex; justify-content: space-between; gap: 16px; color: var(--on-night-2);
}
.hero__meta--top { top: calc(var(--header-h) + 6px); border-top: 1px solid var(--line-night); padding-top: 10px; }
.hero__meta--bottom { bottom: max(var(--gutter), env(safe-area-inset-bottom)); align-items: flex-end; }
.hero__meta:focus-within, .hero__meta > :focus-within, .hero__meta > :focus-visible { opacity: 1 !important; transform: none !important; }
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.scroll-cue i { position: relative; width: 1px; height: 36px; background: var(--line-night); overflow: hidden; }
.scroll-cue i::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--on-night);
  animation: cue 1.8s var(--ease-in-out) infinite;
}
@keyframes cue { to { top: 100%; } }

.hero__title {
  position: absolute; z-index: 2;
  left: var(--gutter); right: var(--gutter); bottom: clamp(64px, 11vh, 120px);
  color: #fff; mix-blend-mode: difference;
  pointer-events: none; user-select: none;
}
.hero__line { white-space: nowrap; line-height: .8; }
.hero__line--this {
  font-size: clamp(40px, 8.4vw, 150px);
  font-weight: 200; font-stretch: 62%;
  letter-spacing: -.01em;
  margin-bottom: .1em;
  padding-left: .04em;
}
.hero__line--klatt {
  font-size: 22vw; /* replaced by the fit script */
  font-weight: 800; font-stretch: 125%;
  letter-spacing: -.045em;
  line-height: .74;
}
.ch { display: inline-block; will-change: transform; }
.ch-wrap { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .04em; margin-bottom: -.04em; }

/* ---------- shared section bits ---------- */
.paper { background: var(--paper); color: var(--ink); color-scheme: light; }
.label-row {
  display: flex; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--line); padding-top: 12px;
  margin-bottom: clamp(48px, 7vw, 112px);
}
.projects .label-row, .contact .label-row { border-top-color: var(--line-p, var(--line-night)); }
.paper .label-row { color: var(--ink-2); }

/* faint four-column grid on paper sections */
.paper { position: relative; }
.paper::before {
  content: ""; position: absolute; inset: 0 var(--gutter); pointer-events: none;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: 25% 100%;
  opacity: .45;
}
.paper > * { position: relative; }

/* ---------- intro ---------- */
.intro { padding: var(--section-pad) var(--gutter) clamp(64px, 8vw, 120px); }
.intro__statement {
  font-size: clamp(30px, 4.7vw, 78px);
  line-height: 1.04;
  letter-spacing: -.028em;
  font-weight: 500;
  text-indent: 25%;   /* first line starts on the second hairline */
}
.intro__statement .w { display: inline; }
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(72px, 9vw, 150px);
  border-top: 1px solid var(--line);
}
.stats li { padding: 22px 18px 0 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.stats li + li { padding-left: 18px; }
.stats li:last-child { border-right: 0; }
.stats__num {
  font-size: clamp(64px, 9vw, 150px); line-height: .82;
  font-weight: 250; font-stretch: 70%; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.stats__label { color: var(--ink-2); max-width: 22ch; }   /* 22ch keeps "Process optimization tools" to two lines */
@media (max-width: 760px) {
  .intro__statement { text-indent: 0; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats li { padding: 18px 12px 22px 0; border-bottom: 1px solid var(--line); }
  .stats li:nth-child(2) { border-right: 0; }
  .stats li:nth-child(3) { padding-left: 0; }
}

/* ---------- day job ---------- */
.work { padding: clamp(40px, 5vw, 80px) var(--gutter) var(--section-pad); }
.work__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 96px) 0; align-items: end; }
.work__head { padding-right: 24px; }
.display {
  font-size: clamp(80px, 13.5vw, 230px);
  line-height: .78; letter-spacing: -.02em;
  font-weight: 900; font-stretch: 62%;
}
.work__lede { margin-top: clamp(28px, 3.5vw, 56px); max-width: 36ch; font-size: clamp(18px, 1.5vw, 22px); color: var(--ink-2); line-height: 1.45; }
.facts { border-top: 1px solid var(--line); }
.facts > div {
  display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: baseline;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.facts dt { color: var(--ink-2); }
.facts dd { font-size: clamp(20px, 2.1vw, 32px); letter-spacing: -.015em; font-weight: 500; }

.skills { margin-top: clamp(72px, 9vw, 140px); border-top: 1px solid var(--ink); counter-reset: s; }
.skill {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 80px minmax(0, calc(50% - 80px)) minmax(0, 1fr);
  gap: 12px 0; align-items: baseline;
  padding: clamp(22px, 2.6vw, 36px) 0;
  border-bottom: 1px solid var(--line);
  transition: color .45s var(--ease-out), padding .45s var(--ease-out);
  outline: none;
}
.skill::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .55s var(--ease-out);
}
.skill:hover { color: var(--paper); padding-left: 18px; padding-right: 18px; }
.skill:hover::before { transform: scaleY(1); transform-origin: top; }
.skill:hover .ph { color: #ff7a70; }
.skill__num { color: var(--ink-2); transition: color .45s; }
.skill:hover .skill__num { color: var(--on-night-2); }
.skill__title { font-size: clamp(22px, 2.5vw, 40px); line-height: 1.05; letter-spacing: -.02em; font-weight: 600; padding-right: 24px; }
.skill__desc { color: inherit; opacity: .72; max-width: 46ch; }
@media (max-width: 860px) {
  .work__grid { grid-template-columns: 1fr; }
  .facts > div { grid-template-columns: 96px 1fr; }
  .skill { grid-template-columns: 44px 1fr; gap: 12px 0; }
  .skill__desc { grid-column: 2 / 3; }
  .work__head { padding-right: 0; }
}

/* ---------- projects ----------
   Default (no JS, no GSAP, reduced motion, phones, short screens): stacked cards, each in its own colours.
   With the desktop ride running, main.js adds .has-ride to <html>; then the whole section takes the active
   project's colours and the cards become panels on one horizontal track. */
/* Inside Out in its own amber (the brand's accent), with its dark brown as the ink */
.has-ride .projects[data-theme="insideout"], html:not(.has-ride) .project[data-p="insideout"] {
  --bg: #e9a26a; --fg: #1a1512; --muted: rgba(26, 21, 18, .74);
  --pa: #1a1512; --line-p: rgba(26, 21, 18, .24); --bar: rgba(26, 21, 18, .08);
}
.has-ride .projects[data-theme="regions"], html:not(.has-ride) .project[data-p="regions"] {
  --bg: #1e3b30; --fg: #f3ece0; --muted: rgba(243, 236, 224, .68);
  --pa: #f08a84; --line-p: rgba(243, 236, 224, .18); --bar: rgba(243, 236, 224, .08);
}
.has-ride .projects[data-theme="spots"], html:not(.has-ride) .project[data-p="spots"] {
  --bg: #0f2a30; --fg: #e3f4f1; --muted: rgba(227, 244, 241, .68);
  --pa: #3fd1b8; --line-p: rgba(227, 244, 241, .17); --bar: rgba(227, 244, 241, .08);
}
.has-ride .projects[data-theme="brainwidth"], html:not(.has-ride) .project[data-p="brainwidth"] {
  --bg: #f5f5f7; --fg: #1d1d1f; --muted: rgba(29, 29, 31, .64);
  --pa: #0099ff; --line-p: rgba(29, 29, 31, .14); --bar: rgba(29, 29, 31, .06);
}
/* the bright Brainwidth blue is too light for small text on its pale background */
.has-ride .projects[data-theme="brainwidth"] .project__num,
html:not(.has-ride) .project[data-p="brainwidth"] .project__num { color: #0066cc; }

/* stacked cards (default) */
.projects { background: var(--night); color: var(--on-night); }
.projects__pin {
  display: flex; flex-direction: column;
  padding: calc(var(--header-h) + 8px) var(--gutter) var(--section-pad);
}
.projects .label-row { margin-bottom: 18px; color: var(--muted, var(--on-night-2)); }
.projects__counter { display: none; font-variant-numeric: tabular-nums; }
.projects__title {
  font-size: clamp(30px, 3.5vw, 58px); line-height: 1; letter-spacing: -.025em; font-weight: 500;
  max-width: 17ch; margin-bottom: 40px;
}
.projects__track { display: flex; flex-direction: column; gap: 18px; }
.project {
  display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center;
  background: var(--bg); color: var(--fg);
  border-radius: 22px; padding: 26px 20px 28px;
}
.project--app { position: relative; overflow: hidden; isolation: isolate; }
.projects :focus-visible { outline-color: var(--fg, var(--on-night)); }
.project__meta > :focus-within { opacity: 1 !important; transform: none !important; }
@media (min-width: 900px) {
  html:not(.has-ride) .project {
    grid-template-columns: minmax(260px, .78fr) minmax(0, 1.7fr);
    gap: clamp(28px, 4vw, 72px); padding: clamp(32px, 4vw, 56px);
  }
}

/* desktop ride */
.has-ride .projects {
  background: var(--bg, var(--night)); color: var(--fg, var(--on-night));
  transition: background-color .9s var(--ease-out), color .9s var(--ease-out);
}
.has-ride .projects__pin {
  min-height: 100vh; min-height: 100svh;
  padding-bottom: 28px;
  overflow: hidden; overflow: clip;
}
.has-ride .projects__counter { display: inline; }
.has-ride .projects__title { max-width: none; margin-bottom: 0; font-size: clamp(28px, 3vw, 52px); }
.has-ride .projects__track {
  flex: 1; flex-direction: row; align-items: center;
  gap: clamp(48px, 7vw, 140px);
  width: max-content;
  padding: 4vh calc(var(--gutter) * 2) 4vh 0;
}
.has-ride .project {
  width: min(86vw, 1320px);
  grid-template-columns: minmax(260px, .78fr) minmax(0, 1.7fr);
  gap: clamp(28px, 4vw, 72px);
  background: none; color: inherit; border-radius: 0; padding: 0;
}
.has-ride .project--app { overflow: visible; }
.has-ride .window { width: 100%; max-width: calc((100vh - 330px) * 1.6); max-width: calc((100svh - 330px) * 1.6); }
/* sized with headroom: Safari renders the phone frame taller than Chrome, and the ride needs the panel to fit */
.has-ride .phone { width: min(21vw, 330px, calc((100vh - 340px) / 2.3)); width: min(21vw, 330px, calc((100svh - 340px) / 2.3)); }

.project__num { color: var(--pa); }
.project__name {
  margin: 16px 0 20px;
  font-size: clamp(40px, 11vw, 64px); line-height: .88; letter-spacing: -.025em;
  font-weight: 750; font-stretch: 72%;
}
@media (min-width: 900px) { .project__name { font-size: clamp(42px, 5vw, 92px); } }
.project__desc { color: var(--muted); max-width: 38ch; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.tags li { border: 1px solid var(--line-p); border-radius: 999px; padding: 6px 10px; font-size: 10px; }
.project__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line-p); color: var(--muted);
}
.link-arrow { color: var(--fg); text-decoration: none; display: inline-flex; gap: 6px; }
.link-arrow span { display: inline-block; transition: transform .45s var(--ease-out); }
.link-arrow:hover span, .link-arrow:focus-visible span { transform: translate(3px, -3px); }
.link-back:hover span, .link-back:focus-visible span { transform: translateX(-3px); }   /* same-tab link home: arrow points back */

.window {
  display: block; text-decoration: none;
  border-radius: 14px; overflow: hidden;
  background: #111;
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .65), 0 0 0 1px var(--line-p);
  transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--sc, 1));
  transition: transform .7s var(--ease-out);   /* no box-shadow transition: it only ever ran on theme changes */
  will-change: transform;
}
.window__bar {
  height: 34px; display: flex; align-items: center; gap: 12px; padding: 0 14px;
  background: var(--bar); color: var(--muted); backdrop-filter: blur(6px);
}
.window__dots { display: inline-flex; gap: 6px; }
.window__dots i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.window__dots i:nth-child(2) { background: #febc2e; }
.window__dots i:nth-child(3) { background: #28c840; }
.window__url {
  flex: 0 1 360px; margin: 0 auto; text-align: center; text-transform: none; letter-spacing: .02em;
  background: var(--bar); border-radius: 6px; padding: 4px 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transform: translateX(-24px);
}
.window__shot { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.window__shot img {
  width: 112%; max-width: none; height: 100%; object-fit: cover; object-position: top left;
  transform: translateX(var(--px, -5%));
  will-change: transform;
}

/* Brainwidth phone */
.project--app .phone { justify-self: center; }
.project--app::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 80vmax; height: 80vmax; right: -20%; top: 50%; transform: translateY(-50%);
  background: radial-gradient(closest-side, rgba(64, 224, 209, .35), rgba(0, 153, 255, .18) 55%, transparent 72%);
  filter: blur(10px);
}
.phone {
  container-type: inline-size;
  display: block; text-decoration: none; color: #1d1d1f;
  width: min(72vw, 300px);
  transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .7s var(--ease-out);
}
.phone__frame {
  display: block; aspect-ratio: 9 / 19.3;
  border-radius: 15cqi; padding: 3.4cqi;
  background: linear-gradient(145deg, #3a3a3d, #121214 40%, #2a2a2d);
  box-shadow: 0 60px 120px -40px rgba(0, 40, 90, .55), inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.phone__screen {
  position: relative; display: flex; flex-direction: column; gap: 3.2cqi;
  height: 100%; overflow: hidden;
  border-radius: 12cqi; background: #f5f5f7;
  padding: 3.8cqi 4.6cqi 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--sans);
  font-size: 4.1cqi; line-height: 1.25;
}
.bw-status { display: flex; justify-content: space-between; align-items: center; height: 7cqi; padding: 0 2cqi; }
.bw-status b { font-weight: 600; font-size: 4.4cqi; }
.bw-island { width: 30cqi; height: 8.6cqi; border-radius: 99px; background: #000; }
.bw-icons { display: inline-flex; gap: 1.2cqi; }
.bw-icons i { width: 3.4cqi; height: 3.4cqi; border-radius: 1cqi; background: #1d1d1f; opacity: .85; }
.bw-icons i:nth-child(3) { width: 6cqi; border-radius: 1.2cqi; }
.bw-head { display: flex; align-items: center; gap: 2.6cqi; margin-top: 2cqi; }
.bw-icon { width: 8.6cqi; height: 8.6cqi; border-radius: 2.2cqi; background: #fff; padding: .8cqi; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.bw-head b { font-size: 6.6cqi; letter-spacing: -.02em; }
.bw-seg { display: grid; grid-template-columns: repeat(3, 1fr); background: #e8e8ed; border-radius: 99px; padding: 1cqi; }
.bw-seg span { text-align: center; padding: 1.6cqi 0; border-radius: 99px; font-weight: 600; font-size: 3.6cqi; color: #6e6e73; }
.bw-seg .is-on { background: #fff; color: #1d1d1f; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.bw-card { display: flex; align-items: center; gap: 4cqi; background: #fff; border-radius: 5cqi; padding: 3.6cqi; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.bw-ring { position: relative; width: 24cqi; height: 24cqi; flex: none; }
.bw-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.bw-ring circle { fill: none; stroke-width: 11; stroke-linecap: round; }
.bw-ring__bg { stroke: #e8e8ed; }
.bw-ring__fg { stroke: #0099ff; stroke-dasharray: 100; stroke-dashoffset: var(--off, 28); transition: stroke-dashoffset 1.6s var(--ease-out); }
.bw-ring__val { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.bw-ring__val b { font-size: 6cqi; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bw-ring__val small { font-size: 3cqi; color: #0099ff; font-weight: 600; }
.bw-card__text { display: grid; gap: 1cqi; }
.bw-card__text b { font-size: 4.6cqi; }
.bw-card__text small { font-size: 3.3cqi; color: #6e6e73; }
.bw-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.4cqi; }
.bw-scale i { height: 1.6cqi; border-radius: 99px; background: var(--c); opacity: .28; }
.bw-scale i.is-on { opacity: 1; }
.bw-list { display: grid; gap: 1.8cqi; }
.bw-row {
  position: relative; display: flex; justify-content: space-between; align-items: center; gap: 2cqi;
  background: #fff; border-radius: 3.6cqi; padding: 2.4cqi 3.2cqi; overflow: hidden;
}
.bw-row::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--w) * 3.2);
  background: linear-gradient(90deg, rgba(0, 153, 255, .16), rgba(64, 224, 209, .08));
  transform: scaleX(var(--grow, 1)); transform-origin: left; transition: transform 1.2s var(--ease-out);
}
.bw-row > span { position: relative; display: grid; gap: .4cqi; }
.bw-row b { font-size: 3.7cqi; font-weight: 600; }
.bw-row small { font-size: 3cqi; color: #6e6e73; }
.bw-row em { position: relative; font-style: normal; font-weight: 700; font-size: 3.5cqi; color: #0a84ff; background: #eef6ff; border-radius: 99px; padding: .8cqi 2.2cqi; }
.bw-home { position: absolute; left: 50%; bottom: 2.4cqi; width: 34cqi; height: 1.4cqi; margin-left: -17cqi; border-radius: 99px; background: #1d1d1f; opacity: .8; }
.phone__screen::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 16cqi;
  background: linear-gradient(to top, #f5f5f7 30%, transparent);
}

.has-ride .project--app::after { width: 46vmax; height: 46vmax; right: 2%; }
@media (min-width: 900px) { html:not(.has-ride) .phone { width: clamp(250px, 21vw, 330px); } }

.projects__progress { display: none; height: 2px; background: var(--line-p, var(--line-night)); overflow: hidden; }
.has-ride .projects__progress { display: block; }
.projects__progress span { display: block; height: 100%; background: var(--pa, var(--accent)); transform: scaleX(0); transform-origin: left; }

/* ---------- marquee ---------- */
.marquee {
  background: var(--night); color: var(--on-night);
  overflow: hidden; padding: clamp(28px, 5vw, 72px) 0;
  border-top: 1px solid var(--line-night); border-bottom: 1px solid var(--line-night);
}
.marquee__inner {
  display: flex; width: max-content; white-space: nowrap;
  font-size: clamp(64px, 11vw, 190px); line-height: 1;
  will-change: transform;
}
.marquee__inner span { padding-right: .3em; }

/* ---------- contact ---------- */
.contact { background: var(--night); color: var(--on-night); padding: var(--section-pad) var(--gutter) clamp(72px, 8vw, 128px); }
.contact .label-row { color: var(--on-night-2); }
.contact__title {
  font-size: 15vw; /* replaced by the fit script */
  line-height: .8; letter-spacing: -.045em;
  font-weight: 800; font-stretch: 125%;
  white-space: nowrap;
  margin-bottom: clamp(56px, 7vw, 120px);
}
.contact__title .ch-wrap:last-child .ch { color: var(--accent); }
.contact__grid {
  display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 120px);
  border-top: 1px solid var(--line-night); padding-top: 36px;
}
.contact__kicker { color: var(--on-night-2); margin-bottom: 14px; }
.contact__email {
  display: inline-block; font-size: clamp(26px, 3vw, 50px); letter-spacing: -.025em; font-weight: 500; line-height: 1.1;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 6px; transition: background-size .6s var(--ease-out), color .3s;
  word-break: break-all;
}
.contact__email:hover, .contact__email:focus-visible { color: #fff; background-size: 0 1px; background-position: 100% 100%; }
.copy {
  display: inline-flex; margin-top: 20px;
  border: 1px solid var(--line-night); background: transparent; color: var(--on-night);
  border-radius: 999px; padding: 9px 14px; cursor: pointer;
  transition: background-color .3s, color .3s, border-color .3s;
}
.copy:hover, .copy:focus-visible { background: var(--on-night); color: var(--night); border-color: var(--on-night); }
.contact__note { margin-top: 28px; color: var(--on-night-2); max-width: 34ch; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; position: relative; }
.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { color: var(--on-night-2); }
.field input, .field textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid rgba(236, 235, 230, .42);
  padding: 10px 0 12px; font-size: clamp(18px, 1.5vw, 22px); color: var(--on-night); border-radius: 0;
  transition: border-color .3s;
  resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.field input:focus-visible, .field textarea:focus-visible { outline: none; }
.field.is-invalid input, .field.is-invalid textarea { border-bottom-color: #ff6a5f; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 8px; }
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 999px; padding: 16px 26px;
  font-weight: 600; font-size: 16px; letter-spacing: -.005em; cursor: pointer;
  transition: background-color .35s, color .35s, transform .35s var(--ease-out);
}
.btn:hover, .btn:focus-visible { background: var(--on-night); color: var(--night); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .6; pointer-events: none; }
.form__status { color: var(--on-night-2); min-height: 1.4em; }
.form__status.is-ok { color: #6ee7a8; }
.form__status.is-err { color: #ff8a80; }
@media (max-width: 860px) {
  .contact__grid { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
}

/* ---------- footer ---------- */
.footer { background: var(--night); color: var(--on-night); padding: clamp(20px, 2.5vw, 36px) var(--gutter) 0; overflow: hidden; }
.footer__row {
  display: flex; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--line-night); padding-top: 14px; color: var(--on-night-2);
}
.to-top { text-decoration: none; }
.footer__mark {
  display: flex; align-items: baseline;
  font-size: 38vw; line-height: .74; letter-spacing: -.055em;
  font-weight: 800; font-stretch: 125%;
  height: .6em; margin-top: 3vw; overflow: hidden;
  white-space: nowrap;
  color: #26262a;   /* just "klatt", dark grey on night, so it signs off quietly */
}
.footer__mark span { margin-left: -.065em; }   /* pull the k's side bearing back to the gutter */

/* ---------- film grain + toast ---------- */
.grain {
  /* 120%, not 200%: the keyframes move it at most 9.6% of the screen, and a 4x-screen noise layer cost frames in the ride */
  position: fixed; inset: -10%; width: 120%; height: 120%; z-index: 90; pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.2 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 7s steps(8) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6%, 4%); }
  40% { transform: translate(5%, -7%); }
  60% { transform: translate(-3%, 6%); }   /* keeps ~25px of spare at the top edge of the 120% layer */
  80% { transform: translate(7%, 2%); }
}
.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom, 0px)); z-index: 130;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); box-shadow: 0 0 0 1px var(--line-night); border-radius: 999px; padding: 10px 16px;
  transition: opacity .35s, transform .5s var(--ease-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reduced motion ---------- */
.motion-off .grain, .motion-off .scroll-cue i::after { animation: none; }

@media (prefers-reduced-motion: reduce) {
  html.no-js, html.no-lenis { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .grain { animation: none; }
}

/* ==========================================================================
   [printed-in-dots] LED hero (assets/js/hero-led.js)
   ========================================================================== */
/* The canvas prints THIS IS and KLATT itself once it starts (html.led-on). The HTML letters keep
   their layout but are hidden; they were aria-hidden already, and the sr-only h1 still names the page.
   With no JavaScript, or if the canvas cannot start or loses its context, .led-on is absent and the
   HTML title shows as before. */
.led-on .hero__title { visibility: hidden; }

/* Static fallback when the canvas cannot run: the board's faint square pads, no glow. */
.hero__fallback {
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10'><rect x='.5' y='.5' width='9' height='9' fill='%23ecebe6' fill-opacity='.05'/></svg>") var(--gutter) 0 / 10px 10px;
}


/* ==========================================================================
   2026-10-18: changes from the design audit
   ========================================================================== */

/* red full stop: the signature on section headings */
.dot { color: var(--accent); }

/* ---- hero meta: role readable on every screen ---- */
.hero__role { text-align: center; }
/* wrap the role onto its own row only where hero-led.js lifts the title (tall phones) */
@media (max-width: 700px) and (max-aspect-ratio: 4/5) {
  .hero__meta--bottom { flex-wrap: wrap; row-gap: 14px; }
  .hero__role { order: -1; flex: 1 0 100%; text-align: left; font-size: 12px; color: var(--on-night); }
}
/* no-canvas fallback title sits where hero-led.js prints it on tall screens */
@media (max-aspect-ratio: 4/5) { .hero__title { bottom: 40%; } }

/* ---- header: tucks away on scroll down, shows the current section ---- */
.site-header { transition: transform .6s var(--ease-out); }
.hdr-up .site-header:not(:focus-within) { transform: translateY(-110%); }
.site-nav a[aria-current] .nav-num { opacity: 1; }
.site-nav a[aria-current]::after { transform: scaleX(1); transform-origin: left; }

/* ---- mobile menu ---- */
.menu-toggle { display: none; background: none; border: 0; padding: 10px 2px; color: inherit; cursor: pointer; }
@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  .motion-toggle { padding: 10px 4px; }
  .motion-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.menu {
  position: fixed; inset: 0; z-index: 150;
  display: flex; flex-direction: column; justify-content: flex-start; gap: 28px;
  padding: max(var(--gutter), env(safe-area-inset-top, 0px)) var(--gutter) max(var(--gutter), env(safe-area-inset-bottom, 0px));
  background: var(--night); color: var(--on-night);
  overflow-y: auto; overscroll-behavior: contain;
}
.menu[hidden] { display: none; }
.menu__top { display: flex; justify-content: space-between; align-items: center; min-height: calc(var(--header-h) - var(--gutter)); color: var(--on-night-2); }
.menu__close { background: none; border: 1px solid var(--line-night); color: var(--on-night); border-radius: 999px; padding: 9px 14px; cursor: pointer; }
.menu__nav { display: flex; flex-direction: column; margin-block: auto; }
.menu__nav a { display: flex; align-items: baseline; gap: 16px; padding: 14px 0 18px; border-top: 1px solid var(--line-night); text-decoration: none; }
.menu__nav a:last-child { border-bottom: 1px solid var(--line-night); }
.menu__num { font-size: 20px; min-width: 2.4em; color: var(--on-night-2); }
.menu__nav a[aria-current] .menu__num { color: var(--on-night); }
.menu__label { font-size: clamp(56px, 17vw, 120px); line-height: .82; font-weight: 900; font-stretch: 62%; letter-spacing: -.02em; word-spacing: .12em; }
.menu__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; color: var(--on-night-2); }
.menu__foot a { color: var(--on-night); text-decoration: none; }
.menu__foot a[href^="mailto"] { text-transform: none; }
.menu .motion-toggle { padding: 0; color: var(--on-night); }
.menu .motion-toggle__label { position: static; width: auto; height: auto; clip: auto; overflow: visible; }
.menu__bar { height: 1px; background: var(--line-night); overflow: hidden; }
.menu__bar span { display: block; height: 100%; background: var(--accent); transform-origin: left; }

/* ---- After hours: a display headline to pair with "Day job." ---- */
/* same top spacing as the Day job section, so the ticker leads straight into the heading */
.projects__intro { padding: clamp(40px, 5vw, 80px) var(--gutter) 0; }
.projects__intro .label-row { color: var(--muted, var(--on-night-2)); margin-bottom: clamp(48px, 7vw, 112px); }
.projects__intro .display { margin-bottom: clamp(16px, 3vw, 48px); }
.projects__counter { font-size: 18px; letter-spacing: 0; text-transform: none; }
html:not(.has-ride) .projects__pin { padding-top: 0; }

/* the ride starts and ends on night, and fades into each project's colours */
.has-ride .projects[data-theme="night"] {
  --bg: var(--night); --fg: var(--on-night); --muted: var(--on-night-2);
  --pa: var(--accent); --line-p: var(--line-night); --bar: rgba(236, 235, 230, .07);
}

/* ---- ticker: 9 to 5 // 5 to 9, between the two halves of the page ---- */
.marquee { border-top: 0; padding: clamp(22px, 4vw, 56px) 0; }
.marquee__inner { font-size: clamp(48px, 8vw, 140px); }
.marquee__sl { color: var(--accent); }
.marquee__inner span { padding-right: 0; }

/* ---- phones: full-bleed colour bands, screenshot right under the name ---- */
html:not(.has-ride) .project { border-radius: 0; }
@media (max-width: 899.98px) {
  html:not(.has-ride) .projects__track { gap: 0; margin-inline: calc(var(--gutter) * -1); }
  html:not(.has-ride) .project { padding: clamp(48px, 12vw, 96px) var(--gutter); gap: 22px; }
  html:not(.has-ride) .project__meta { display: contents; }
  html:not(.has-ride) .project__num { order: 1; }
  html:not(.has-ride) .project__name { order: 2; margin: 0; }
  html:not(.has-ride) .project .window, html:not(.has-ride) .project .phone { order: 3; }
  html:not(.has-ride) .project__desc { order: 4; }
  html:not(.has-ride) .project .tags { order: 5; margin-top: 0; }
  html:not(.has-ride) .project__foot { order: 6; margin-top: 4px; }
}

/* ---- Day job: one real link row ---- */
.skills__more {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 80px 1fr auto; align-items: baseline;
  padding: clamp(22px, 2.6vw, 36px) 0; border-bottom: 1px solid var(--line);
  font-size: clamp(22px, 2.5vw, 40px); line-height: 1.05; letter-spacing: -.02em; font-weight: 600;
  text-decoration: none; transition: color .45s var(--ease-out), padding .45s var(--ease-out);
}
/* same ink sweep as the rows above, since this is the row you can click */
.skills__more::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .55s var(--ease-out);
}
.skills__more .mono { color: var(--ink-2); transition: color .45s; }
.skills__more > span[aria-hidden] { font-size: 28px; transition: transform .5s var(--ease-out); }
.skills__more:hover, .skills__more:focus-visible { color: var(--paper); padding-left: 18px; padding-right: 18px; }
.skills__more:hover::before, .skills__more:focus-visible::before { transform: scaleY(1); transform-origin: top; }
.skills__more:hover .mono, .skills__more:focus-visible .mono { color: var(--on-night-2); }
.skills__more:hover > span[aria-hidden], .skills__more:focus-visible > span[aria-hidden] { transform: translate(4px, -4px); }
@media (max-width: 860px) { .skills__more { grid-template-columns: 44px 1fr auto; } }

/* ---- contact ---- */
.contact__grid { grid-template-columns: 1fr 1fr; column-gap: 0; }
.contact__direct { padding-right: 24px; }
.contact__line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.contact__line .copy { margin-top: 0; }
.contact__kicker--gap { margin-top: 36px; }
.contact__elsewhere { font-size: clamp(18px, 1.6vw, 24px); color: var(--on-night); }
.field textarea { resize: none; min-height: calc(4 * 1.5em + 22px); field-sizing: content; }
.form__privacy { grid-column: 1 / -1; color: var(--on-night-2); }
.form__privacy a { color: var(--on-night); }
@media (max-width: 860px) {
  .contact__grid { grid-template-columns: 1fr; }
  .contact__direct { padding-right: 0; }
}

/* ---- footer ---- */
.footer__links { display: inline-flex; flex-wrap: wrap; gap: 8px 20px; justify-content: flex-end; }
.footer__links a { text-decoration: none; }
.footer__links a:hover, .footer__links a:focus-visible { color: var(--on-night); }

/* ---- review fixes (2026-10-18) ---- */
.cursor { z-index: 160; }
.cursor-dot { z-index: 161; }
/* a header button keeps mouse/touch focus after a click; only keyboard focus should hold the header down */
.hdr-up .site-header:focus-within:not(:has(:focus-visible)) { transform: translateY(-110%); }
html.menu-open { overflow: hidden; }
.menu-toggle:not(.is-ready) { visibility: hidden; }
.footer__row > :first-child { flex-shrink: 0; white-space: nowrap; }

/* ==========================================================================
   2026-10-18 (later): contact moves to paper, quieter footer mark
   ========================================================================== */
.contact.paper { background: var(--paper); color: var(--ink); }
.contact.paper .label-row { color: var(--ink-2); border-top-color: var(--line); }
.contact.paper .contact__grid { border-top-color: var(--line); }
.contact.paper .contact__kicker,
.contact.paper .contact__note,
.contact.paper .field label,
.contact.paper .form__status,
.contact.paper .form__privacy { color: var(--ink-2); }
.contact.paper .contact__email:hover, .contact.paper .contact__email:focus-visible { color: var(--accent-deep); }
.contact.paper .copy { border-color: rgba(14, 14, 15, .35); color: var(--ink); }
.contact.paper .copy:hover, .contact.paper .copy:focus-visible { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.contact.paper .contact__elsewhere, .contact.paper .form__privacy a { color: var(--ink); }
.contact.paper .field input, .contact.paper .field textarea { color: var(--ink); border-bottom-color: rgba(14, 14, 15, .42); }
.contact.paper .field input:focus, .contact.paper .field textarea:focus { border-bottom-color: var(--accent); }
.contact.paper .field.is-invalid input, .contact.paper .field.is-invalid textarea { border-bottom-color: var(--accent-deep); }
.contact.paper .btn:hover, .contact.paper .btn:focus-visible { background: var(--ink); color: var(--paper); }
.contact.paper .form__status.is-ok { color: #1d7a46; }
.contact.paper .form__status.is-err { color: var(--accent-deep); }

/* red highlight for the key facts in the intro sentence (echoes the red full stops) */
.hl { color: var(--accent); }

/* stats: figure row (number plus an optional red multiplier) */
.stats__fig { display: flex; align-items: baseline; }
.stats__x { font-size: clamp(36px, 5vw, 84px); line-height: .82; font-weight: 250; font-stretch: 70%; color: var(--accent); margin-left: .06em; }
/* a unit that is part of the number (15k): same cut as the figure, not the red multiplier */
.stats__unit { font-size: clamp(64px, 9vw, 150px); line-height: .82; font-weight: 250; font-stretch: 70%; letter-spacing: -.03em; }

/* ticker: a slim band, not a headline; small and quick */
.marquee { padding: clamp(10px, 1.3vw, 18px) 0; }
.marquee__inner { font-size: clamp(20px, 2.5vw, 38px); }

/* tighter run-in to the ticker: the Day job section no longer ends on a full section gap */
.work { padding-bottom: clamp(48px, 6vw, 88px); }

/* ==========================================================================
   2026-10-18: consistency review fixes
   ========================================================================== */
/* phones: the URL pill fills the bar, so the desktop centring nudge would cover the dots */
@media (max-width: 899.98px) { .window__url { transform: none; } }
/* stacked layout: no counter, so skip the half-empty "Selected work" row (the statement works like the Day job lede) */
html:not(.has-ride) .projects__head .label-row { display: none; }
html:not(.has-ride) .projects__intro .display { margin-bottom: 28px; }
/* phones: footer line stays, links get their own row with bigger tap targets */
@media (max-width: 700px) {
  .footer__row { flex-wrap: wrap; row-gap: 10px; }
  .footer__links { flex-basis: 100%; justify-content: flex-start; }
  .footer__links a { padding-block: 6px; }
}
/* phones: a slightly smaller Brainwidth mockup, so it keeps the rhythm of the other screenshots */
@media (max-width: 899.98px) { html:not(.has-ride) .phone { width: min(58vw, 240px); } }

/* Pause motion lives in the hero's top row (Alex, 2026-10-17); the phone menu has a second one */
.hero__meta--top { align-items: center; }
.hero .motion-toggle { padding: 6px 0; margin-block: -6px; }   /* keep the row its usual height (phones too) */
.hero .motion-toggle:hover, .hero .motion-toggle:focus-visible { color: var(--on-night); }
.hero .motion-toggle__label { position: static; width: auto; height: auto; clip: auto; overflow: visible; }   /* label stays visible on phones */
