/* site.css — Jamie Dean
 *
 * The one device this site reuses is the spec plate: the hairline label/value row you
 * find riveted to a motorbike, printed on a graphics-card box, or chalked on a barbell.
 * Bike specs, GPU notes, gym stats and the experience bullets are all the same object.
 *
 * Gold does exactly three jobs — the rule under the name, the "live" status tag, and
 * focus/link underlines. Everything else is greyscale.
 */

/* ---------------------------------------------------------------- tokens */
:root {
  --bg: #141310;          /* warm graphite, not a tinted black */
  --panel: #1c1a16;
  --panel-2: #232019;
  --fg: #ede8dc;
  --muted: #9a948a;
  --line: #2e2b24;
  --line-strong: #45412f;
  --accent: #ffd700;
  --accent-2: #ffa500;
  --accent-ink: #ffd700;  /* the accent when it has to carry text */
  --card: var(--panel);

  --sans: 'Archivo', ui-sans-serif, 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Newsreader', ui-serif, Georgia, 'Times New Roman', serif;

  --w: 1180px;            /* grid measure — 3 card columns at minmax(320px) */
  --prose: 68ch;          /* reading measure */
  --gap: 1.5rem;
  --pad: clamp(1.25rem, 4vw, 3rem);
  color-scheme: dark;
}

[data-theme='light'] {
  --bg: #f3f1ec;
  --panel: #ffffff;
  --panel-2: #eceae3;
  --fg: #191713;
  --muted: #5e594f;
  --line: #ddd8cd;
  --line-strong: #c3bba6;
  --accent-ink: #7a5c00;  /* #ffd700 is unreadable on paper; brass is not */
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 0.22em; }
a:hover { text-decoration-color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -999px; top: 0; z-index: 20;
  background: var(--accent); color: #141310; padding: 0.6rem 1rem;
  font-family: var(--sans); font-weight: 600; text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------------------------------------------------------------- typography */
h1, h2, h3, .brand, .chip, .pill, .top nav a, .btn, .plate dt, .stat .v, .stat .k, .kicker {
  font-family: var(--sans);
  font-variation-settings: 'wdth' 100;
}

h1, h2, h3 { line-height: 1.08; margin: 0 0 0.6rem; text-wrap: balance; }

h1 {
  font-size: clamp(2.4rem, 6.5vw, 4.2rem);
  font-weight: 800;
  font-variation-settings: 'wdth' 112;
  letter-spacing: -0.022em;
}

h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  font-variation-settings: 'wdth' 108;
  letter-spacing: -0.012em;
  margin-top: 2.5rem;
}

h3 {
  font-size: 1.125rem;
  font-weight: 700;
  font-variation-settings: 'wdth' 96;
  letter-spacing: -0.006em;
}

/* The section marker: a short gold tick above the title. Never an all-caps eyebrow. */
main h2::before {
  content: '';
  display: block;
  width: 34px; height: 3px;
  margin-bottom: 0.85rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

p { margin: 0 0 1.1rem; }
strong { font-weight: 600; }

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 56ch;
}

/* ---------------------------------------------------------------- header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: var(--gap);
  padding: 0.75rem var(--pad);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
}

.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 700; font-variation-settings: 'wdth' 92;
  letter-spacing: -0.01em; text-decoration: none;
  white-space: nowrap;
}
.brand img { width: 30px; height: 30px; border-radius: 3px; }

.top nav {
  display: flex; gap: 1.15rem; margin-left: auto;
  font-size: 0.9rem; font-weight: 500;
  font-variation-settings: 'wdth' 88;
}
.top nav a {
  color: var(--muted); text-decoration: none;
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
}
.top nav a:hover { color: var(--fg); border-bottom-color: var(--accent-ink); }

.theme {
  flex: none;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  font-size: 0; line-height: 1;
  background: none; color: var(--muted);
  border: 1px solid var(--line); border-radius: 3px;
  cursor: pointer;
}
.theme::before {
  content: '';
  width: 14px; height: 14px;
  border: 1.5px solid currentColor; border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}
.theme:hover { color: var(--accent-ink); border-color: var(--line-strong); }

/* ---------------------------------------------------------------- shell */
main {
  flex: 1;
  width: 100%; max-width: var(--w);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--pad) 5rem;
}

footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem var(--pad);
  display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: baseline;
  font-family: var(--sans); font-size: 0.85rem;
  font-variation-settings: 'wdth' 88;
  color: var(--muted);
}
footer span { margin-right: auto; }
footer a { text-decoration: none; }
footer a:hover { color: var(--fg); }

/* ---------------------------------------------------------------- prose */
.prose { max-width: var(--prose); }
.prose > :first-child { margin-top: 0; }
.prose h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin-bottom: 1.2rem; }
.prose p { color: color-mix(in srgb, var(--fg) 88%, var(--muted)); }
.prose a { color: var(--fg); text-decoration-color: var(--accent-ink); }
.prose img { margin: 1.5rem 0; border-radius: 4px; }

.prose hr {
  border: 0; border-top: 1px solid var(--line);
  margin: 3.5rem 0 0;
}

/* Bullets shaped "**Label**: value" are spec-plate rows, not list items. */
.prose ul { list-style: none; margin: 1.25rem 0; padding: 0; }
.prose li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}
.prose li:first-child { border-top: 1px solid var(--line); }
.prose li strong {
  font-family: var(--sans); font-weight: 600; font-size: 0.9rem;
  font-variation-settings: 'wdth' 86;
  letter-spacing: 0.01em;
  color: var(--fg);
}

/* Skills is a list of names, not of label/value pairs — it reads as a chip cloud. */
.page-skills .prose { max-width: none; }
.page-skills .prose p { max-width: var(--prose); }
.page-skills .prose ul {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin: 1rem 0 0;
}
.page-skills .prose li {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
  font-family: var(--sans); font-size: 0.875rem;
  font-variation-settings: 'wdth' 90;
  line-height: 1.5;
}
.page-skills .prose li strong { min-width: 0; color: var(--fg); font-size: inherit; letter-spacing: 0; }

/* ---------------------------------------------------------------- home hero */
.hero {
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}

.kicker {
  font-size: 0.82rem; font-weight: 600;
  font-variation-settings: 'wdth' 84;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-bottom: 0.7rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
  max-width: 32rem;
}
.kicker a { color: var(--fg); text-decoration-color: var(--accent-ink); }

.hero h1 {
  font-size: clamp(3rem, 11.5vw, 6.5rem);
  font-variation-settings: 'wdth' 122;
  letter-spacing: -0.035em;
  margin-bottom: 0;
}

/* The one non-user-triggered motion on the site: the rule draws once, on load. */
.hero .rule {
  display: block;
  height: 5px; width: min(420px, 100%);
  margin: 1.1rem 0 1.6rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: left;
  animation: draw 620ms cubic-bezier(0.22, 0.9, 0.3, 1) both;
}
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.tagline {
  font-size: clamp(1.15rem, 2.1vw, 1.45rem);
  line-height: 1.55;
  max-width: 42ch;
  color: color-mix(in srgb, var(--fg) 90%, var(--muted));
  margin-bottom: 1.9rem;
}

.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }

.btn {
  display: inline-block;
  padding: 0.62rem 1.15rem;
  font-family: var(--sans); font-size: 0.9rem; font-weight: 600;
  font-variation-settings: 'wdth' 92;
  text-decoration: none;
  border-radius: 3px;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #17150f;
  border: 1px solid transparent;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost {
  background: none; color: var(--fg);
  border-color: var(--line-strong);
}
.btn.ghost:hover { border-color: var(--accent-ink); filter: none; }

.featured h2 { margin-top: clamp(2.5rem, 5vw, 3.5rem); }

/* ---------------------------------------------------------------- project cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  align-items: start;
  gap: var(--gap);
  margin-top: 1.5rem;
}

.card {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.card:hover { border-color: var(--line-strong); }

/* The screenshot sits flush to the card edge. When the file is not there yet the
 * hatching plus the styled alt text still reads as a deliberate placeholder.
 * Keep this display:block — a flex or grid img ignores aspect-ratio and renders at
 * its natural height, which turns every card into a full-page screenshot. */
.shot {
  display: block;
  position: relative;
  width: 100%;
  /* height:auto is load-bearing: the HTML height="900" attribute is a presentational
   * hint that otherwise wins over aspect-ratio and renders the card 900px tall. */
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(135deg,
      var(--panel-2) 0 9px,
      var(--panel) 9px 18px);
  color: var(--muted);
  font-family: var(--sans); font-size: 0.78rem;
  font-variation-settings: 'wdth' 82;
  letter-spacing: 0.04em;
  overflow: hidden;
}
.shot::after {
  content: attr(alt);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(135deg,
      var(--panel-2) 0 9px,
      var(--panel) 9px 18px);
  color: var(--muted);
  font: inherit;
}

.card-body { padding: 1.15rem 1.2rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.card-body h3 {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  margin-bottom: 0.55rem;
}
.card-body p { font-size: 0.98rem; color: var(--muted); margin-bottom: 1rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: auto 0 0; padding: 0; }
.chip {
  font-family: var(--sans); font-size: 0.75rem; font-weight: 500;
  font-variation-settings: 'wdth' 82;
  letter-spacing: 0.015em;
  color: var(--muted);
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.card .links {
  margin: 0.9rem 0 0; padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  font-family: var(--sans); font-size: 0.82rem;
  font-variation-settings: 'wdth' 86;
}
.card .links a { color: var(--fg); text-decoration-color: var(--accent-ink); }
.card .links.muted { color: var(--muted); }

/* Status tags. Only "live" is gold — the accent means it is running right now. */
.pill {
  font-size: 0.68rem; font-weight: 700;
  font-variation-settings: 'wdth' 78;
  letter-spacing: 0.07em;
  padding: 0.12rem 0.42rem;
  border: 1px solid currentColor;
  border-radius: 2px;
  white-space: nowrap;
  color: var(--muted);
}
.pill.live { color: var(--accent-ink); }
/* "staged" is hardware that exists but is not serving yet — the same blue as a project
 * in progress, deliberately, rather than a fifth hue on a page that already has four. */
.pill.active, .pill.staged { color: #8fb8d8; }
.pill.design { color: #b3a2d6; }
.pill.paused, .pill.done, .pill.dormant, .pill.planned { color: var(--muted); }
[data-theme='light'] .pill.active, [data-theme='light'] .pill.staged { color: #35688e; }
[data-theme='light'] .pill.design { color: #5b4b86; }


/* ---------------------------------------------------------------- projects page */
.projects .lede { margin-bottom: 0.5rem; }

.also { list-style: none; padding: 0; margin: 1.25rem 0 0; max-width: var(--prose); }
.also li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.also li:first-child { border-top: 1px solid var(--line); }
.also strong { font-family: var(--sans); font-weight: 600; color: var(--fg); font-variation-settings: 'wdth' 90; }

/* ---------------------------------------------------------------- hobbies */
.hobby + .hobby {
  margin-top: clamp(2.75rem, 5vw, 4rem);
  padding-top: clamp(2.5rem, 4.5vw, 3.5rem);
  border-top: 1px solid var(--line);
}
/* The heading is .prose's first child, so `.prose > :first-child { margin-top: 0 }`
 * zeroes its own top margin — the gap has to come from the wrapper instead, or the
 * section tick crowds whatever sits above it. */
.hobby .sub { margin: 2.25rem 0 0.5rem; }
.hobby .sub > :last-child { margin-bottom: 0; }
.hobby .sub p { color: var(--muted); font-size: 1.05rem; }

/* The plate: the label/value row the whole site is built around. */
.plate { margin: 0; display: grid; grid-template-columns: auto 1fr; }
.plate dt {
  grid-column: 1;
  font-size: 0.72rem; font-weight: 600;
  font-variation-settings: 'wdth' 78;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.4rem 1.25rem 0.4rem 0;
  border-top: 1px solid var(--line);
  line-height: 1.9;
}
.plate dd {
  grid-column: 2;
  margin: 0;
  padding: 0.4rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  line-height: 1.9;
}
.plate:empty { display: none; }

/* --- bikes --- */
.bike-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  align-items: start;
  gap: var(--gap);
  margin-top: 1.75rem;
}

.bike {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.bike img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--panel-2);
}
.bike figcaption { padding: 1rem 1.1rem 1.15rem; }
.bike h3 { margin-bottom: 0.5rem; }

/* --- the estate --- */
/* Six spec plates, one per machine. Same card furniture as .bike and .card — panel,
 * hairline, 4px radius — so the page reads as one system rather than three. */
/* No align-items: start here, unlike the bike grid. These plates are text only, so an
 * uneven bottom edge across a row reads as a mistake rather than as a photo wall — let
 * them stretch to the row and pin the purpose to the foot of each. */
.estate {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
  margin-top: 1.75rem;
}

.estate-plate {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.1rem 1.15rem 1.2rem;
}
/* The pill sits on the name's baseline, and wraps beneath it rather than squeezing a
 * long name — "ProDure Staged" is the widest pairing here and still fits at 280px. */
.estate-plate h3 {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.55rem;
  margin: 0 0 0.3rem;
  font-size: 1.15rem;
}
.estate-plate .kind {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-variation-settings: 'wdth' 88;
  line-height: 1.45;
  color: var(--muted);
}
/* Hairline rows, matching .plate dd — the spec list is the same kind of object as the
 * bikes' label/value table, just without labels worth printing. */
/* The auto bottom margin absorbs whatever slack the row stretch created, so every purpose
 * in a row starts on the same line. It is on the list rather than on .purpose because
 * `margin-top: auto` would resolve to 0 with no slack and swallow the gap on mobile. */
.estate-plate .specs {
  list-style: none;
  margin: 0.85rem 0 auto;
  padding: 0;
}
.estate-plate .specs li {
  padding: 0.32rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  line-height: 1.5;
}
.estate-plate .purpose {
  margin: 0.9rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--fg) 82%, var(--muted));
}

/* --- the GPU rail --- */
/* A genuine chronology, so the sequence is drawn as a rail with a node per card.
 * No 01/02/03 numerals: the rail already says "these are in order". */
.timeline {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 1.4rem 0 1rem;
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--accent) 40%, transparent),
      color-mix(in srgb, var(--accent) 6%, transparent))
    left 0.55rem / 100% 1px no-repeat;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
}
.timeline::-webkit-scrollbar { height: 8px; }
.timeline::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }

.timeline li {
  position: relative;
  flex: 0 0 232px;
  scroll-snap-align: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.85rem 0.9rem 0.95rem;
}
.timeline li::before {
  content: '';
  position: absolute; top: -1.15rem; left: 0.9rem;
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 1px;
}
.timeline img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
  background: var(--panel-2);
  margin-bottom: 0.7rem;
}
.timeline h3 {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-variation-settings: 'wdth' 88;
  margin-bottom: 0.35rem;
}
.timeline p { font-size: 0.85rem; color: var(--muted); margin: 0; line-height: 1.5; }

/* --- gym --- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  /* The two groups hold two and three tiles. Capping the plate keeps both the same
   * width and left-aligned instead of letting the pair stretch across the column. */
  max-width: 42rem;
  margin: 1.25rem 0 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.stat {
  background: var(--panel);
  padding: 1.15rem 1.1rem 1.2rem;
  display: flex; flex-direction: column; gap: 0.3rem;
  border-top: 3px solid var(--line-strong);
}
/* The source groups these under "Body Stats" and "Strength Feats"; the rule colour is
 * what carries that split once the headings are gone. */
.stat.lift { border-top-color: var(--accent); }
.stat .v {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 800;
  font-variation-settings: 'wdth' 96;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
/* The aside under a headline figure: "down from 99kg" beneath "72kg". Wrapping the aside
 * into the headline instead costs a full display-sized line and leaves one plate visibly
 * taller than the other. The line is reserved on every tile, empty or not, so all five
 * tiles are one shape and the Body Stats and Strength Feats plates match. */
.stat .note {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-variation-settings: 'wdth' 86;
  color: var(--muted);
  line-height: 1.25;
  min-height: 1.25em;
}
.stat .k {
  font-size: 0.72rem; font-weight: 600;
  font-variation-settings: 'wdth' 78;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.goals { list-style: none; margin: 0; padding: 0; max-width: var(--prose); }
.goals li { padding: 0.7rem 0; border-top: 1px solid var(--line); }
.goals li:last-child { border-bottom: 1px solid var(--line); }

/* ---------------------------------------------------------------- moments */
/* A contact sheet at the foot of the experience page: photographs from the jobs and
 * projects listed above, cropped to the same 4/3 and 4px radius the project cards use
 * so the two pages read as one system. It sits inside .prose, so the reading measure
 * decides the column count rather than a breakpoint. */
.moments {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--gap);
  margin: 1.75rem 0 0;
  /* The wide figure below cannot start mid-row, which would leave a hole beside the
   * figure before it and strand the last one on a row of its own. `dense` backfills
   * that hole with a later figure instead. It decouples visual order from source
   * order for one item; the captions are self-contained, so nothing depends on it. */
  grid-auto-flow: row dense;
}
.moments figure { margin: 0; }

/* A panorama loses its subject to a 4/3 centre crop — the class photo is 2.34:1, so the
 * crop would keep barely half its width and cut a person off each end. It gets the full
 * row and its own natural shape instead. */
.moments .wide { grid-column: 1 / -1; }
/* Its own 730x312, not `auto`. A lazy image with `aspect-ratio: auto` has no box until it
 * loads, and an element of zero height need never enter the viewport that would trigger
 * the load — so `auto` risks a photo that renders at 0px and stays there. */
.moments .wide img { aspect-ratio: 730 / 312; }
.moments img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  background: var(--panel-2);
  /* `.prose img` carries a 1.5rem block margin meant for a standalone illustration.
   * Inside the grid the gap does that job, so it has to be cleared here. */
  margin: 0;
}
.moments figcaption {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  font-variation-settings: 'wdth' 82;
  letter-spacing: 0.015em;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 0.55rem;
}

/* --- homelab --- */
/* Prose only — no per-item treatment, so the bullets are the site's ordinary
 * label/value plate rows from `.prose li`. All this adds is the breathing room the
 * other sections get from their `.sub` wrapper, which this one does not have. */
.hobby.homelab .prose h2 { margin-top: 2.25rem; }
.hobby.homelab .prose ul { margin-top: 1rem; }

/* ---------------------------------------------------------------- phones */
@media (max-width: 640px) {
  :root { --gap: 1rem; }

  body { font-size: 1rem; }

  .top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem 1rem;
    padding-bottom: 0;
  }
  .top .brand { grid-column: 1; grid-row: 1; }
  .top .theme { grid-column: 2; grid-row: 1; }
  .top nav {
    grid-column: 1 / -1; grid-row: 2;
    margin-inline: calc(var(--pad) * -1);
    padding: 0 var(--pad) 0.2rem;
    gap: 1.05rem;
    overflow-x: auto;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent);
  }
  .top nav::-webkit-scrollbar { display: none; }
  .top nav a { white-space: nowrap; }

  main { padding-top: 2.25rem; }

  .hero h1 { font-size: clamp(2.6rem, 13vw, 3.4rem); font-variation-settings: 'wdth' 108; }
  .hero .rule { width: 65%; height: 4px; }
  .kicker { max-width: none; }

  .cards, .bike-grid, .estate { grid-template-columns: 1fr; }

  /* Two up: five full-width 4/3 photographs would be most of a phone screen each. */
  .moments { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

  /* The rail turns into a vertical spine — a phone scrolls down, not sideways. */
  .timeline {
    flex-direction: column;
    gap: 0.9rem;
    overflow-x: visible;
    mask-image: none;
    padding: 0 0 0 1.35rem;
    background:
      linear-gradient(180deg,
        color-mix(in srgb, var(--accent) 40%, transparent),
        color-mix(in srgb, var(--accent) 6%, transparent))
      left 0.4rem top / 1px 100% no-repeat;
  }
  .timeline li { flex: none; }
  .timeline li::before { top: 1.15rem; left: -1.05rem; }
  .timeline img { aspect-ratio: 16 / 9; }

  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat { padding: 0.95rem 0.9rem 1rem; }


  footer { gap: 0.9rem 1.1rem; }
  footer span { flex-basis: 100%; margin-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero .rule { animation: none; }
}
