/* ═══════════════════════════════════════════════════════════════════════════
   tarikalhadethi.com, built to the Sevora reference, near-1:1

   The client picked sevora.framer.website and said COPY IT. So this matches its
   anatomy rather than blending: serif display (Lora) over a clean sans
   (Instrument Sans), an off-white page with white cards at ~24px radii, a
   near-black block as punctuation, soft shadows, and the density carried by
   IMAGERY: six real screenshots in a two-column work grid.

   ⚠️ THE LESSON OF SEVEN FAILED VERSIONS, kept here so it is never relearned:
   every reference the client responded to was IMAGE-DRIVEN. Layout without the
   assets looks empty no matter how it is styled. The tiles in /shots are real
   captures: the app itself via PrintWindow, the live sites via headless
   Chrome, and the grid is the point of the whole page.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Warm paper palette anchored on the client's #ECE2D0. Same relationships
     as the reference (card lighter than page, hero a shade darker, near-black
     punctuation) - the temperature is what changed. */
  --page: #ece2d0;
  --card: #f6f0e5;
  --hero: #e1d5be;
  --hero-top: #e6dbc7;
  --dark: #1b1610;
  --ink: #1b1610;
  --paper: #f8f3ea;   /* light on dark: button text, dark blocks, the glass */
  --grey: #6a6154;
  --grey-2: #877b68;   /* 3.2:1 on the page, 3.5:1 on a card - the old value fell under 3 */
  --line: #dacdb4;
  --chip: #e7dcc6;    /* chips, inline code, ghost buttons */
  --blue: #0099ff;

  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 11px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* for hover states you watch happen: a gentle start and a long settle,
     where --ease does most of its change in the first few frames */
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --shell: 1200px;
  --gut: clamp(20px, 3.4vw, 40px);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

/* Lenis (smooth scroll) - the five rules the reference injects, verbatim.
   `.lenis-smooth` switches off native scroll-behavior while Lenis drives, so
   the `smooth` above only applies when it is not running (reduced motion,
   script blocked). */
html.lenis,
html.lenis body {
  height: auto;
}

/* The reference's <html> computes scroll-behavior:auto - Lenis owns every
   frame, and native smoothing on top of it would double-ease each write.
   Keyboard/touch stay native there too, so this matches, not just avoids. */
html.lenis {
  scroll-behavior: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

::selection {
  background: var(--dark);
  color: var(--paper);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

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

.wrap {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gut);
}

/* ── type ────────────────────────────────────────────────────────────────── */
h1 {
  font-family: "Lora", Georgia, serif;
  font-weight: 500;
  font-size: clamp(38px, 4.6vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 0;
}

h1 .soft {
  color: var(--grey-2);
}

h2 {
  font-family: "Lora", Georgia, serif;
  font-weight: 500;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.sub {
  color: var(--grey);
  font-size: 16.5px;
  line-height: 1.6;
}

.kicker {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--grey-2);
  margin-bottom: 12px;
}

code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.86em;
  background: var(--chip);
  border-radius: 4px;
  padding: 0.08em 0.34em;
  white-space: nowrap;
}

/* ── buttons: the reference's measured recipe ────────────────────────────── */
/* radius 8 · 48px tall · 12/22 padding · bevel = inset top highlight + soft
   drop shadow · the arrow is its own span so it can travel on hover. Values
   read off the live template's computed styles, not eyeballed. */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  background: var(--dark);
  color: var(--paper);
  box-shadow: rgb(76, 68, 58) 0 2px 0 0 inset, rgba(27, 22, 16, 0.5) 0 2px 4px -2px,
    rgba(27, 22, 16, 0.18) 0 6px 14px -6px;
  overflow: hidden;
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease), background 0.24s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: rgb(92, 84, 72) 0 2px 0 0 inset, rgba(27, 22, 16, 0.5) 0 4px 8px -3px,
    rgba(27, 22, 16, 0.24) 0 12px 24px -8px;
}

.btn:active {
  transform: translateY(0);
  box-shadow: rgb(76, 68, 58) 0 1px 0 0 inset, rgba(27, 22, 16, 0.5) 0 1px 2px -1px;
}

/* the arrow slides up-right and a fresh one arrives from below-left */
.btn .arr {
  position: relative;
  display: inline-block;
  width: 15px;
  height: 15px;
  overflow: hidden;
  flex: none;
}

.btn .arr svg {
  position: absolute;
  inset: 0;
  width: 15px;
  height: 15px;
  transition: transform 0.32s var(--ease), opacity 0.32s var(--ease);
}

.btn .arr svg + svg {
  transform: translate(-100%, 100%);
  opacity: 0;
}

.btn:hover .arr svg:first-child {
  transform: translate(100%, -100%);
  opacity: 0;
}

.btn:hover .arr svg + svg {
  transform: translate(0, 0);
  opacity: 1;
}

/* a download falls instead of flying off up-right */
.btn .arr.down svg + svg {
  transform: translate(0, -100%);
}

.btn:hover .arr.down svg:first-child {
  transform: translate(0, 100%);
  opacity: 0;
}

.btn:hover .arr.down svg + svg {
  transform: translate(0, 0);
  opacity: 1;
}

.btn.ghost {
  background: var(--chip);
  color: var(--ink);
  box-shadow: none;
}

.btn.ghost:hover {
  background: #dfd3bb;
  transform: translateY(-1px);
  box-shadow: rgba(27, 22, 16, 0.1) 0 6px 14px -6px;
}

/* ── nav: the reference's header, 68px, three zones ──────────────────────── */
.top {
  height: 68px;
  display: flex;
  align-items: center;
}

.top-in {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
}

.mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--dark);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-family: "Lora", Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

.name {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 15px;
  color: var(--ink);
}

.top-links a {
  opacity: 0.86;
  transition: opacity 0.18s var(--ease);
}

.top-links a:hover {
  opacity: 1;
}

.top .btn {
  justify-self: end;
  height: 40px;
  padding: 8px 16px;
  font-size: 14px;
}

/* ── hero: one big rounded card ──────────────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--hero-top) 0%, var(--hero) 100%);
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: clamp(420px, 42vw, 560px);
  display: flex;
  align-items: center;
}

.hero-in {
  position: relative;
  z-index: 2;
  padding: clamp(30px, 4.6vw, 70px);
  max-width: 60%;
}

/* The headline breaks where its colour does: the name, then the soft line
   under it, balanced. */
.hero h1 {
  text-wrap: balance;
}

.hero h1 .soft {
  display: block;
  margin-top: 0.2em;
  font-size: 0.58em;
  line-height: 1.15;
}

@media (min-width: 961px) {
  /* Side by side, the hero's right half is empty above the Open to work card,
     and at 62px the first line is wider than the 60% column, so the headline
     may run into that space instead of breaking "the ticket" off. */
  .hero h1 {
    margin-right: -20%;
  }
}

.hero .sub {
  margin: 18px 0 24px;
  max-width: 44ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-stats {
  display: flex;
  gap: clamp(24px, 3.6vw, 56px);
  margin-top: clamp(26px, 3.6vw, 48px);
}

.hero-stats b {
  display: block;
  font-family: "Lora", Georgia, serif;
  font-weight: 500;
  font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1;
}

.hero-stats span {
  display: block;
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--grey);
}

/* Each label stays on one line. Held to the 60% text column, the four stats
   squeezed and folded "days, handover to live" onto three lines; the row may
   run past that column instead, into empty hero, and still ends well clear of
   the Open to work card (measured 961-1440px: 39px+ between them). Its gaps
   tighten toward 961px, where that room is smallest; from 1100px up they are
   the old 3.6vw. Phones keep their own two-by-two grid below. */
@media (min-width: 701px) {
  .hero-stats > * {
    flex: none;
  }
  .hero-stats span {
    white-space: nowrap;
  }
}

@media (min-width: 961px) {
  .hero-stats {
    gap: clamp(24px, min(3.6vw, calc(11.2vw - 83.6px)), 56px);
  }
}

/* the labels are a little longer than the old ones, so on wider screens they fold onto two
   lines instead of running under the Open to work card */
@media (min-width: 701px) {
  .hero-stats span {
    white-space: normal;
    max-width: 12ch;
  }
}

/* The hero's right-hand column: the app icons, then the Open to work card at
   its foot. The column takes the insets the card used to be positioned with on
   its own, so the card lands on exactly the pixels it always did (measured at
   eight widths, 961 to 1440) and the icons centre in whatever height is left
   above it. Click-through except on the icons and the card, so its empty
   corners never sit over the headline. */
.hero-side {
  position: absolute;
  z-index: 3;
  top: clamp(30px, 4.6vw, 70px);
  right: clamp(18px, 3vw, 44px);
  bottom: clamp(18px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}

/* the dark glass widget, the template’s signature */
.glass {
  position: relative;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(27, 22, 16, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-md);
  padding: 16px 16px 16px 20px;
  color: var(--paper);
  max-width: 340px;
  transition: transform 0.55s var(--ease-soft);
}

.glass:hover {
  transform: translateY(-2px);
}

.glass .g-k {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.glass b {
  display: block;
  font-size: 15.5px;
  font-weight: 600;
  margin: 2px 0 3px;
}

/* on a phone the card's lines wrap: after "Visa," and before "No", never
   inside "Self-Sponsored" or leaving "No" alone at a line end */
.glass .nw {
  white-space: nowrap;
}

.glass p {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.glass .g-arr {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--dark);
  display: grid;
  place-items: center;
}

.glass .g-arr svg {
  width: 18px;
  height: 18px;
}

/* ── the app icons: where else to find me ────────────────────────────────────
   Greyed out at rest, so they sit behind the headline instead of competing
   with it: a monochrome glyph on a paper tile. The tile is still bevelled and
   shadowed like every other button here, so it reads as something to press,
   and hovering (or keyboard focus) fades in the real brand face underneath.
   Each icon declares its own face, glyph colour and glow; --g is its optical
   size, because a dense square glyph and an open round one look the same size
   at different widths. */
.apps {
  flex: 1 1 0;
  min-height: 0;
  align-self: stretch;
  display: grid;
  grid-template-columns: repeat(3, auto);
  place-content: center;
  gap: 18px 24px;
  padding-bottom: clamp(16px, 2vw, 28px);
  --tile: clamp(66px, 5.4vw, 78px);
}

.app {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  -webkit-tap-highlight-color: transparent;
}

.app-ico {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--tile);
  height: var(--tile);
  border-radius: 23%;
  background: linear-gradient(180deg, #fbf8f2 0%, #f1e9da 100%);
  color: var(--grey-2);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 0 0 1px rgba(27, 22, 16, 0.06),
    0 1px 2px rgba(27, 22, 16, 0.07),
    0 10px 20px -12px rgba(27, 22, 16, 0.34);
  transition: transform 0.55s var(--ease-soft), box-shadow 0.55s var(--ease-soft), color 0.5s var(--ease-soft);
}

/* the brand face, waiting underneath */
.app-ico::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--face);
  box-shadow: var(--rim, inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 1px rgba(0, 0, 0, 0.1));
  opacity: 0;
  transition: opacity 0.5s var(--ease-soft);
}

.app-ico svg {
  display: block;
  width: calc(var(--tile) * var(--g, 0.46));
  height: calc(var(--tile) * var(--g, 0.46));
  overflow: visible;   /* an edge that touches the viewBox keeps its anti-aliasing */
}

.app-name {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.005em;
  color: #5f574b;   /* --grey is 4.2:1 on the hero; this is 4.9 */
  transition: color 0.5s var(--ease-soft);
}

.app-gh {
  --face: linear-gradient(180deg, #3a342c 0%, #1b1610 100%);
  --hi: var(--paper);
  --glow: rgba(27, 22, 16, 0.42);
  --g: 0.479;   /* a 25-unit box round the 24-unit circle: same size as before */
}

.app-in {
  --face: linear-gradient(180deg, #2b87de 0%, #0a66c2 100%);
  --hi: #fff;
  --glow: rgba(10, 102, 194, 0.46);
  --g: 0.4;
}

.app-mail {
  --face: linear-gradient(180deg, #3fb5ff 0%, #0a84ff 100%);
  --hi: #fff;
  --glow: rgba(10, 132, 255, 0.42);
  --g: 0.48;
}

/* The Clarus tile IS the app's icon. At rest it carries the full mark (the
   app's FinalMark, transcribed point for point) in the same grey as its
   neighbours; lit, the mark is drawn in its own colours on the icon's dark
   tile with its gold rim, both sampled from src-tauri/icons/icon.png. The two
   versions are separate layers that cross-fade, because a gradient fill and a
   blur cannot transition from one colour scheme to another. */
.app-clarus {
  --face: radial-gradient(55% 45% at 50% 0%, rgba(122, 98, 56, 0.38), rgba(122, 98, 56, 0)),
    linear-gradient(180deg, #282116 0%, #18140d 45%, #060503 100%);
  /* the icon's gold rim is 9px of its 495px square: 1.8% of the tile, with a
     brighter top edge, sampled from icon.png */
  --rim: inset 0 calc(var(--tile) * 0.018) 0 rgb(124, 103, 60),
    inset 0 0 0 calc(var(--tile) * 0.018) rgb(92, 77, 46);
  --hi: #e3b04f;
  --glow: rgba(176, 128, 40, 0.42);
}

/* The SVG covers the whole tile and is framed exactly as the icon frames its
   mark (tools/make-clarus-icon.py), so the tile has the icon's composition in
   both states: the icon in grey at rest, the icon itself when lit - the same
   treatment as the other three, where only the colours change. */
.app-clarus .app-ico svg {
  width: 100%;
  height: 100%;
}

:is(.app-clarus, .app-mark) :is(.cl-rest, .cl-lit) {
  transition: opacity 0.5s var(--ease-soft);
}

:is(.app-clarus, .app-mark) .cl-lit {
  opacity: 0;
}

@media (hover: hover) {
  .app:hover .app-ico {
    transform: translateY(-4px);
    color: var(--hi);
    box-shadow:
      inset 0 1px 0 #fff,
      0 2px 4px rgba(27, 22, 16, 0.08),
      0 18px 30px -14px var(--glow);
  }
  .app:hover .app-ico::before {
    opacity: 1;
  }
  .app:hover .app-name {
    color: var(--ink);
  }
  :is(.app-clarus, .app-mark):hover .cl-rest {
    opacity: 0;
  }
  :is(.app-clarus, .app-mark):hover .cl-lit {
    opacity: 1;
  }
}

/* The project tiles work exactly as the Clarus tile does: one SVG of the project's own mark with two
   layers on the same geometry, the mark in the tiles' grey at rest and in its own colours when lit,
   over the project's own face. Each mark spans 0.64 of its tile at its widest. */
/* Spotter, where I work: centred over the six, always shown in its own
   colours on Spotter's navy rather than greyed, then a hairline that fades
   out at both ends. */
.app-spotter {
  grid-column: 1 / -1;
  justify-self: center;
  --face: radial-gradient(70% 60% at 50% 0%, #0d2a50 0%, #061830 70%);
  --hi: #fff;
  --glow: rgba(6, 24, 48, 0.5);
  --g: 0.64;
}

.app-spotter .app-ico::before {
  opacity: 1;
}

.app-spotter .app-name {
  color: var(--ink);
}

.apps-rule {
  grid-column: 1 / -1;
  align-self: center;
  justify-self: stretch;
  height: 1px;
  margin: 2px 0;
  background: linear-gradient(90deg, rgba(27, 22, 16, 0) 0%, rgba(27, 22, 16, 0.22) 50%, rgba(27, 22, 16, 0) 100%);
}

.app-sams { --face: #001641; --hi: #fff; --glow: rgba(0, 22, 65, 0.42); --g: 0.64; }
.app-lt { --face: #f8f6f3; --hi: #24312c; --glow: rgba(36, 49, 44, 0.3); --g: 0.64; }
.app-tract { --face: #ffffff; --hi: #0c2366; --glow: rgba(12, 35, 102, 0.3); --g: 0.64; }
.app-up { --face: #193b22; --hi: #eaefd1; --glow: rgba(25, 59, 34, 0.45); --g: 0.64; }

.app-wr {
  --face: linear-gradient(180deg, #3a342c 0%, #1b1610 100%);
  --hi: var(--paper);
  --glow: rgba(27, 22, 16, 0.42);
  --g: 0.5;
}

/* the same lit state for keyboard focus and for a tap */
:is(.app-clarus, .app-mark):is(:focus-visible, :active) .cl-rest {
  opacity: 0;
}

:is(.app-clarus, .app-mark):is(:focus-visible, :active) .cl-lit {
  opacity: 1;
}

.app:focus-visible {
  outline: none;
}

.app:focus-visible .app-ico {
  color: var(--hi);
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.app:focus-visible .app-ico::before,
.app:active .app-ico::before {
  opacity: 1;
}

.app:focus-visible .app-name {
  color: var(--ink);
}

.app:active .app-ico {
  color: var(--hi);
  transform: translateY(-1px) scale(0.96);
  transition-duration: 0.1s;
}

/* ── sections ────────────────────────────────────────────────────────────── */
section {
  padding: clamp(40px, 5vw, 72px) 0;
}

.sec-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto clamp(30px, 4vw, 48px);
}

/* The homepage runs six blocks, and its rhythm is a little tighter than the
   bare section's (6 Oct layout pass: 72px a side became 56). Scoped to it, so
   /writing/ and the 404, which also use a bare <section>, do not move. */
.home > section {
  padding: clamp(36px, 4vw, 56px) 0;
}

.home .sec-head {
  margin-bottom: clamp(26px, 3vw, 40px);
}

.sec-head .sub {
  margin-top: 12px;
}

/* a heading never strands its last word ("Cat / Sentry.", "roles.") */
.sec-head h2,
.contact h2 {
  text-wrap: balance;
}

/* ── the work grid: six real screenshots, two columns ────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}

.tile {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 10px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -18px rgba(27, 22, 16, 0.25);
}

.tile .ph {
  border-radius: calc(var(--r-lg) - 8px);
  overflow: hidden;
  background: var(--hero);
  aspect-ratio: 4 / 3;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.tile-cap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 10px 8px;
}

.tile-cap span {
  font-size: 13px;
  color: var(--grey);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* ⚠️ A flex item's min-width is its content, so without this the ellipsis
     never engages: a long caption widened its tile instead, and on a phone every
     tile came out 380px wide on a 375px screen (the page scrolled sideways). */
  min-width: 0;
}

/* ── how I work rows ─────────────────────────────────────────────────────── */
.rows {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(6px, 1vw, 10px) clamp(20px, 2.6vw, 34px);
}

/* ⚠️ Every .row is its own grid, so an `auto` tag column made the TEXT column
   start at a different x in every row (a wider tag pushed it left). Fixed
   width for the tag = one x for all rows. 11.5em holds "4 negative controls". */
.row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) 11.5em;
  gap: clamp(16px, 2.4vw, 40px);
  align-items: baseline;
  padding: clamp(18px, 2.2vw, 26px) 0;
}

.row + .row {
  border-top: 1px solid var(--line);
}

.row h3 {
  font-family: "Lora", Georgia, serif;
  font-weight: 500;
  font-size: clamp(18px, 1.7vw, 22px);
  letter-spacing: -0.015em;
}

.row p {
  color: var(--grey);
  font-size: 15px;
}

.row .n {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  justify-self: end;
}

/* ── skills ──────────────────────────────────────────────────────────────── */
.skills {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(10px, 1.4vw, 16px) clamp(20px, 2.6vw, 34px);
  margin: 0;
}

.sk {
  display: grid;
  grid-template-columns: 175px minmax(0, 1fr);
  gap: 20px;
  padding: 16px 0;
  align-items: start;
}

.sk + .sk {
  border-top: 1px solid var(--line);
}

.sk dt {
  font-weight: 600;
  font-size: 14.5px;
  padding-top: 6px;
}

.sk dd {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ⚠️ Grey text separated by middots read as one continuous dash to the
   client - the eye could not find the boundaries. Each skill is a discrete
   chip now: a countable object with its own edge, in ink rather than grey. */
.chip {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.2;
  white-space: nowrap;
}

/* ── at a glance: the five facts a recruiter screens on ──────────────────────
   Directly under the hero, in the skills wall's label | value shape, so it
   reads as a fact sheet rather than a pitch. The same list closes the page
   inside the contact card. ⚠️ It is a <section>, and the bare `section` rule
   pads 72px top and bottom: the padding below replaces all four sides. */
.glance {
  margin-top: clamp(14px, 2vw, 22px);
  padding: clamp(18px, 2.2vw, 26px) clamp(20px, 2.6vw, 34px) clamp(8px, 1vw, 12px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

/* an h2 for the document outline, set as a label */
.glance-h {
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--grey-2);
  margin: 0 0 6px;
}

.facts {
  margin: 0;
}

.facts > div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 20px;
  align-items: baseline;
  padding: 13px 0;
}

.facts > div + div {
  border-top: 1px solid var(--line);
}

.facts dt {
  font-size: 14px;
  font-weight: 600;
  color: var(--grey);
}

.facts dd {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.5;
  text-wrap: pretty;
}

/* ── experience: the .rows card, with the employer under each role ───────── */
.xp-org {
  display: block;
  margin-top: 6px;
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--grey);
}

.xp-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

/* the proof is the line a reader should remember, so it is in ink */
.row .xp-proof {
  color: var(--ink);
}

.xp-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.xp-link:hover .go-arr svg {
  transform: translate(2px, -2px);
}

/* ── wide project cards ──────────────────────────────────────────────────────
   A feature with its picture beside it, and a one-line card for a smaller
   build. Both span the two-column grid and keep the tile's surface, border
   and hover lift, so they read as more of the same work, not a new kind. */
.grid > .wide {
  grid-column: 1 / -1;
}

.feat {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(18px, 2.6vw, 34px);
  align-items: center;
}

/* the screenshot's own proportions, so nothing is cropped */
.feat .ph {
  aspect-ratio: 960 / 570;
  background: #0c1710;   /* the live view's own ground, under the rounded corners */
}

.feat-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 12px clamp(8px, 1.6vw, 22px) 12px 0;
}

.feat-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 2px;
}

/* Upchirp's own app icon: it draws its rounded square, this adds the lift */
.feat-ico {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 23%;
  box-shadow: 0 1px 2px rgba(27, 22, 16, 0.12), 0 8px 18px -10px rgba(25, 59, 34, 0.6);
}

.feat-ico svg {
  display: block;
  width: 100%;
  height: 100%;
}

.feat h3,
.mini h3 {
  font-family: "Lora", Georgia, serif;
  font-weight: 500;
  font-size: clamp(22px, 2vw, 26px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.feat-meta {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  color: var(--grey);
}

.feat-body p,
.mini p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--grey);
}

.tile.mini {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr) auto;
  gap: clamp(16px, 2.4vw, 40px);
  align-items: baseline;
  padding: clamp(18px, 2.2vw, 24px) clamp(20px, 2.6vw, 30px);
}

.mini h3 {
  font-size: clamp(20px, 1.7vw, 22px);
}

/* the action, in ink with the site's arrow, which travels on the card's hover */
.go {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.go-arr svg {
  display: block;
  width: 14px;
  height: 14px;
  transition: transform 0.24s var(--ease);
}

.tile:hover .go-arr svg {
  transform: translate(2px, -2px);
}

@media (max-width: 900px) {
  .feat {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .feat-body {
    padding: 16px 10px 10px;
  }
  .tile.mini {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
}

/* ── contact ─────────────────────────────────────────────────────────────── */
.contact {
  background: var(--dark);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 40px) clamp(24px, 3.4vw, 48px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  color: var(--paper);
}

.contact h2 {
  font-size: clamp(24px, 2.2vw, 32px);
}

.contact .sub {
  color: rgba(255, 255, 255, 0.66);
  margin: 14px auto 26px;
  max-width: 46ch;
}

.contact .btn {
  background: var(--paper);
  color: var(--dark);
}

.contact .btn.ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}


/* ── footer ──────────────────────────────────────────────────────────────── */
footer {
  padding: 26px 0 40px;
  color: var(--grey-2);
  font-size: 13.5px;
}

.foot-in {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.foot-in a {
  transition: color 0.18s var(--ease);
}

.foot-in a:hover {
  color: var(--ink);
}

/* ── responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 899px) {
  /* hide-s marks the header links that drop out first: How I work and
     Contact. The five-link nav of 6 Oct 2026 (Experience, Projects, How I work,
     Writing, Contact) is narrower than the old one, so it now holds down to
     900px (measured: 44px either side at 900). The header grid overlaps silently instead
     of wrapping, so re-measure before moving this. Experience, Projects and
     Writing fit from 701; below 700 the whole nav goes. */
  .top-links .hide-s {
    display: none;
  }
}

@media (max-width: 960px) {
  .hero-in {
    max-width: 100%;
  }
  /* Stacked, the column becomes two rows under the stats: the icons in a
     line, then the card, both on the hero's text margins. */
  .hero-side {
    position: static;
    display: block;
  }
  /* Spread edge to edge on a phone, capped so a tablet does not scatter
     them; the tiles shrink below 390px wide so five always fit on a row. */
  .apps {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    justify-items: center;
    max-width: 360px;
    gap: 14px 6px;
    margin: 0 clamp(30px, 4.6vw, 70px) 26px;
    padding: 0;
    --tile: clamp(42px, 12vw, 52px);
  }
  .app-name {
    font-size: 11px;
    white-space: nowrap;
  }
  .glass {
    position: static;
    margin: 0 clamp(30px, 4.6vw, 70px) 30px;
    max-width: none;
  }
  .hero {
    display: block;
  }
  .row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .xp .n {
    grid-row: 1;
    justify-self: start;
    color: var(--grey);
  }
}

@media (max-width: 700px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Measured at 390px through an iframe (headless Chrome will not lay out
     narrower than ~500 on its own): the name broke onto two lines, the button
     onto two lines over the links, and the third stat fell to its own row.
     Below 700 the header is brand + button; the links live in the page. */
  .top-links {
    display: none;
  }
  .top-in {
    display: flex;
    justify-content: space-between;
  }
  .name,
  .top .btn {
    white-space: nowrap;
  }
  .sk {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .facts > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
    padding: 12px 0;
  }
  .contact {
    flex-direction: column;
    text-align: center;
  }
  .contact-links {
    justify-content: center;
  }
  /* Four numbers in one row squeezed the last label onto three lines on a
     390px phone, so below 700 they sit two by two. */
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
  }
  .hero-stats b {
    font-size: 26px;
  }
  .hero-stats span {
    font-size: 13px;
  }
  /* A caption that cannot fit beside its title stacks under it rather than
     being cut off with an ellipsis ("any spreadsheet, corrected..."). */
  .tile-cap {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .tile-cap span {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition-duration: 0.001ms !important;
  }
}

@media print {
  body {
    background: #fff;
  }
  .contact {
    background: #fff;
    color: #000;
    border: 1pt solid #000;
  }
  .contact .sub {
    color: #333;
  }
}

/* SKIP LINK - WCAG 2.4.1 Bypass Blocks (A).
   Off-screen rather than display:none: a hidden element cannot take focus, so
   display:none would look right and do nothing. */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper);
  border-radius: 0 0 8px 0; padding: 12px 18px;
  font-size: 15px; font-weight: 600;
}
.skip:focus { left: 0; }
#main { outline: none; }


/* ── writing ─────────────────────────────────────────────────────────────────
   Long-form prose, which the rest of this site has no need for. Measure is
   capped near 68 characters: the CV taught this the hard way -- a wide measure
   with small type is what makes a page read as a wall before a word is read. */
/* ⚠️ Longhands, never `padding: 8vh 0 10vh`. These sit on a .wrap, and that
   shorthand zeroed the wrap's side gutters: invisible on a desktop, where the
   column is centred, and on a phone every post ran flush against both edges of
   the screen (found 24 Sep 2026 from his phone). The max-width adds the two
   gutters back so the desktop text column stays 700px. */
.post { max-width: calc(700px + 2 * var(--gut)); margin: 0 auto; padding-top: 8vh; padding-bottom: 10vh; }
.post-meta { font-size: 14px; color: var(--grey); letter-spacing: 0.02em; }
.post h1 { margin: 12px 0 0; }
.post .lede { font-size: 20px; line-height: 1.55; color: var(--grey-2); margin: 20px 0 0; }
.post-body { margin-top: 38px; }
.post-body > * + * { margin-top: 20px; }
.post-body p, .post-body li { font-size: 17px; line-height: 1.7; }
.post-body h2 { font-size: 25px; margin-top: 44px; letter-spacing: -0.02em; }
.post-body h3 { font-size: 19px; margin-top: 30px; }
.post-body ul, .post-body ol { padding-left: 22px; }
.post-body li + li { margin-top: 8px; }
.post-body code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.88em;
  background: rgba(0,0,0,0.05); padding: 2px 2px; border-radius: 4px; }
/* 2px, not 5px. The pill's right padding sits between the last glyph and any
   punctuation that follows, and at 5px it renders as exactly one word space:
   "RegisterHotKey ." Measured against 5/4/3/2px; 2px is where the full stop
   reattaches while the background still reads as a pill. Same trap as kbd. */
/* ⚠️ WRAPS, NEVER SCROLLS. A shell command in a horizontally-scrolling grey box
   is unreadable and ugly: the line runs off the edge, a scrollbar appears under
   it, and the reader has to drag to see the flag that matters. pre-wrap keeps
   the authored line breaks AND folds anything longer than the measure, so the
   whole command is visible at once and no scrollbar exists. */
.post-body pre {
  background: var(--dark); color: var(--paper);
  border-radius: 12px; padding: 18px 20px;
  white-space: pre-wrap; overflow-wrap: anywhere;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13.5px; line-height: 1.65;
}
/* ⚠️ white-space MUST be reset here. The bare `code` rule further up sets
   `white-space: nowrap` -- correct for inline snippets, which should not break
   mid-token -- but it also lands on `pre > code`, where it overrides the pre
   entirely: the authored line breaks stop rendering AND the line refuses to
   wrap, so a three-line shell command became one long line running off the
   edge of the box. The pre had `pre-wrap` the whole time and it did nothing,
   because the child was overriding it. */
.post-body pre code { background: none; padding: 0; color: inherit;
  font-size: inherit; white-space: inherit; }
.post-body blockquote { border-left: 3px solid var(--line); padding-left: 18px; color: var(--grey-2); font-style: italic; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 15px; }
.post-body th, .post-body td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.post-body th { font-weight: 650; }
.post-body td.num { font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
/* At 320px the three-column stats table in the SAMS post came out 5px wider
   than its column and the page scrolled sideways; tighter cells fit it. */
@media (max-width: 380px) { .post-body th, .post-body td { padding: 8px 6px; } }
.post-foot { margin-top: 54px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 15px; color: var(--grey); }

.postlist { max-width: calc(700px + 2 * var(--gut)); margin: 0 auto; padding-top: 8vh; padding-bottom: 10vh; } /* longhands: see .post */
/* ⚠️ Entries are CARDS, not text with rules between them. On a cream page a
   list of dark text on the same cream is invisible as a list -- nothing says
   "these are separate things you can click". A lighter surface, a border and a
   hover lift give each one an edge, matching the tiles used elsewhere. */
.postlist ol { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 14px; }
.postlist a.entry {
  display: block; padding: 24px 26px 26px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 1px 2px rgba(27,22,16,0.04);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.postlist a.entry:hover {
  transform: translateY(-3px);
  border-color: var(--grey-2);
  box-shadow: 0 14px 28px -14px rgba(27,22,16,0.28);
}
.postlist a.entry:focus-visible { outline: 2px solid var(--dark); outline-offset: 3px; }
.postlist h2 { font-size: 23px; letter-spacing: -0.02em; margin: 10px 0 0; }
.postlist p { font-size: 16px; line-height: 1.6; color: var(--grey-2); margin: 9px 0 0; }
/* the draft flag reads as a state, not as body copy */
.postlist .post-meta {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: var(--chip); border: 1px solid var(--line);
  font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--grey);
}
@media (prefers-reduced-motion: reduce) { .postlist a.entry { transition: none; } }
@media (max-width: 700px) {
  .post, .postlist { padding-top: 5vh; }
  .post-body p, .post-body li { font-size: 16px; }
}


/* ── the writing popup ───────────────────────────────────────────────────────
   A small dark card in the bottom-left corner, cut from the same cloth as the
   hero's Open to work card (warm glass, a paper arrow chip), so it reads as
   part of the page rather than an ad. Its one flourish is the stack of pages
   on the left: on hover the front page straightens and lifts while the one
   behind fans out, the gesture of pulling a page out to read it. It replaced
   the folder card (a port of the Framer reference, scaled to 0.6) on 6 Oct
   2026. The script shows it once the hero is off screen, hides it again at
   the closing band, and the x hides it for the rest of the visit. */
.wpop {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 40;
  width: 340px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.98);
  transform-origin: bottom left;
  transition: opacity 0.3s var(--ease), transform 0.45s var(--ease), visibility 0.3s;
}

.wpop.on {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.wpop-card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 14px;
  padding: 14px 14px 14px 12px;
  border-radius: 18px;
  background: rgba(27, 22, 16, 0.9);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 2px 6px rgba(27, 22, 16, 0.16),
    0 22px 44px -18px rgba(27, 22, 16, 0.55);
  color: var(--paper);
  transition: transform 0.45s var(--ease-soft), box-shadow 0.45s var(--ease-soft);
}

.wpop-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 3px 8px rgba(27, 22, 16, 0.18),
    0 28px 52px -18px rgba(27, 22, 16, 0.6);
}

.wpop-card:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* the stack of pages */
.wpop-art {
  position: relative;
  width: 50px;
  height: 56px;
}

.wpop-pg {
  position: absolute;
  left: 9px;
  top: 7px;
  width: 32px;
  height: 42px;
  border-radius: 4px;
  transition: transform 0.5s var(--ease-soft);
}

.wpop-pg.back {
  background: #b5a587;
  transform: rotate(-11deg) translate(-3px, 2px);
}

/* A page in five layers: the folded corner on top, a title and four lines of
   text, then the paper itself with that corner cut away (225deg, 5.66px is an
   8px leg), so what shows through the cut is whatever lies behind it. */
.wpop-pg.front {
  background:
    linear-gradient(to bottom left, transparent 50%, #d9ccb3 50%) right top / 8px 8px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 6px 8px / 14px 2.6px no-repeat,
    linear-gradient(#cdbfa6, #cdbfa6) 6px 15px / 20px 2px no-repeat,
    linear-gradient(#cdbfa6, #cdbfa6) 6px 20px / 18px 2px no-repeat,
    linear-gradient(#cdbfa6, #cdbfa6) 6px 25px / 20px 2px no-repeat,
    linear-gradient(#cdbfa6, #cdbfa6) 6px 30px / 12px 2px no-repeat,
    linear-gradient(225deg, transparent 5.66px, var(--paper) 5.66px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28), 0 6px 12px -6px rgba(0, 0, 0, 0.5);
  transform: rotate(5deg) translate(2px, 1px);
}

.wpop-card:hover .wpop-pg.front {
  transform: rotate(0deg) translate(2px, -3px);
}

.wpop-card:hover .wpop-pg.back {
  transform: rotate(-17deg) translate(-6px, 3px);
}

.wpop-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wpop-k {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.wpop-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.wpop-desc {
  margin-top: 1px;
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.66);
}

/* the paper arrow chip, as on the Open to work card */
.wpop-go {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--paper);
  color: var(--dark);
  display: grid;
  place-items: center;
}

.wpop-go svg {
  width: 17px;
  height: 17px;
  transition: transform 0.3s var(--ease);
}

.wpop-card:hover .wpop-go svg {
  transform: translate(2px, -2px);
}

/* Hide for this visit. Out of the way until the card is hovered or focused;
   always there on a touch screen, which cannot hover. */
.wpop-x {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 24px;
  height: 24px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(27, 22, 16, 0.12);
  background: var(--paper);
  color: var(--dark);
  box-shadow: 0 2px 6px rgba(27, 22, 16, 0.22);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.wpop-x svg {
  width: 12px;
  height: 12px;
}

.wpop:hover .wpop-x,
.wpop:focus-within .wpop-x {
  opacity: 1;
}

.wpop-x:hover {
  transform: scale(1.08);
}

.wpop-x:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

@media (hover: none) {
  .wpop-x {
    opacity: 1;
  }
}

/* ⚠️ Hidden where a fixed card would cover the page rather than sit beside it. */
@media (max-width: 900px), (max-height: 560px) {
  .wpop {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wpop,
  .wpop-card,
  .wpop-pg,
  .wpop-go svg {
    transition: none;
  }
}

@media print {
  .wpop {
    display: none;
  }
}

/* Where I work now: a tall dark card above the project rings, the only dark
   block in the section so it reads first. Spotter's mark sits on Spotter's
   own navy (#061830, sampled from spotter.ai's og-image). Only facts the
   employment agreement allows are on it: the job itself, nothing about the
   company's products, numbers or customers. */
.now {
  display: grid;
  grid-template-columns: clamp(150px, 17vw, 210px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(22px, 3.4vw, 48px);
  margin-bottom: clamp(14px, 2vw, 20px);
  padding: clamp(22px, 3.4vw, 44px);
  background: var(--dark);
  color: var(--paper);
  border-radius: var(--r-lg);
}

/* Spotter.ai's own navy (#061830), lifted a touch at the top like its icon */
.now {
  background: radial-gradient(90% 120% at 15% 0%, #0f2c52 0%, #061830 60%);
}

.now-logo {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 24%;
  background: radial-gradient(70% 60% at 50% 0%, #0d2a50 0%, #061830 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 18px 34px -18px rgba(0, 0, 0, 0.7);
  transition: transform 0.45s var(--ease-soft);
}

.now-logo:hover {
  transform: translateY(-3px);
}

.now-logo:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

.now-logo img {
  width: 62%;
  height: auto;
}

.now-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.now-k {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(248, 243, 234, 0.55);
}

.now-t {
  font-family: "Lora", Georgia, serif;
  font-weight: 600;
  font-size: clamp(26px, 3.2vw, 38px);
  letter-spacing: -0.01em;
  line-height: 1.12;
  text-wrap: balance;
}

/* "at Spotter Labs" always on its own line, so the title never splits
   mid-phrase ("Business Operations / Engineer at ...") */
.now-at {
  display: block;
  color: rgba(248, 243, 234, 0.55);
}

.now-d {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(248, 243, 234, 0.8);
  max-width: 62ch;
}

.now .now-go {
  margin-top: 6px;
  color: var(--paper);
}

.now:hover .go-arr svg {
  transform: translate(2px, -2px);
}

@media (max-width: 640px) {
  .now {
    grid-template-columns: minmax(0, 1fr);
  }
  .now-logo {
    width: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .now-logo,
  .now-logo:hover {
    transition: none;
    transform: none;
  }
}

/* Projects as rings: each fills clockwise from 12 o'clock for as long as that project has run, a full
   ring being the time since the oldest began. The logo sits in the middle. Picking a ring crossfades
   the picture and text in the stage underneath; all of them are stacked there from the start. */
.bs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(8px, 1.4vw, 16px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(14px, 2vw, 22px);
}

.bs-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 6px 14px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.35s var(--ease-soft);
}

.bs-row:hover {
  background: rgba(27, 22, 16, 0.03);
}

.bs-row.is-on {
  background: rgba(27, 22, 16, 0.055);
}

.bs-row:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.bs-dial {
  position: relative;
  width: min(100%, 124px);
  aspect-ratio: 1;
  margin-bottom: 10px;
}

.bs-dial svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  transform: rotate(-90deg);
}

.bs-track,
.bs-arc {
  fill: none;
  stroke-width: 6;
}

.bs-track {
  stroke: var(--chip);
  transition: stroke 0.35s var(--ease-soft);
}

/* no progress: the picked ring simply turns ink */
.bs-row:hover .bs-track {
  stroke: #d9ccb2;
}

.bs-row.is-on .bs-track {
  stroke: #c3b394;
}

.bs-arc {
  stroke: #b8a98d;
  stroke-linecap: round;
  stroke-dasharray: var(--p) 100;
  transition: stroke 0.35s var(--ease-soft), stroke-dasharray 1.3s var(--ease) var(--d, 0ms), opacity 0.2s var(--d, 0ms);
}

.bs-row:hover .bs-arc,
.bs-row.is-on .bs-arc {
  stroke: var(--ink);
}

.bs-dial .bs-logo {
  position: absolute;
  left: 29%;
  top: 29%;
  width: 42%;
  height: 42%;
  border-radius: 24%;
  box-shadow: 0 0 0 1px rgba(27, 22, 16, 0.08), 0 6px 14px -8px rgba(27, 22, 16, 0.4);
  transition: transform 0.4s var(--ease);
}

.bs-row.is-on .bs-dial .bs-logo {
  transform: scale(1.06);
}

.bs-nm {
  font-family: "Lora", Georgia, serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.15;
  color: var(--grey);
  white-space: nowrap;
  transition: color 0.3s var(--ease-soft);
}

.bs-row:hover .bs-nm,
.bs-row.is-on .bs-nm {
  color: var(--ink);
}

.bs-row small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--grey-2);
  white-space: nowrap;
}

/* a project still being worked on carries a small pulsing dot */
.bs-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  animation: bs-pulse 2.4s ease-out infinite;
}

@keyframes bs-pulse {
  0% { box-shadow: 0 0 0 0 rgba(27, 22, 16, 0.35); }
  70%, 100% { box-shadow: 0 0 0 6px rgba(27, 22, 16, 0); }
}

/* the arcs draw themselves in the first time the rings are seen */
.bs.pre .bs-arc {
  stroke-dasharray: 0 100;
  opacity: 0;
}

/* the stage: every picture and text is stacked here; the picked one fades in over the others */
.bs-stage {
  margin-top: clamp(14px, 2vw, 20px);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(18px, 2.6vw, 34px);
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 10px;
}

/* the card opens the shown project from anywhere but its text */
.bs-stage {
  cursor: pointer;
  transition: box-shadow 0.3s var(--ease-soft), transform 0.3s var(--ease);
}

.bs-stage:hover {
  box-shadow: 0 18px 40px -22px rgba(27, 22, 16, 0.3);
}

.bs-texts {
  cursor: auto;
}

.bs-shot {
  display: grid;
  aspect-ratio: 16 / 10;
  border-radius: calc(var(--r-lg) - 8px);
  overflow: hidden;
  background: var(--hero);
  isolation: isolate;
}

.bs-shot img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.45s var(--ease-soft), transform 0.7s var(--ease);
}

.bs-shot img.is-on {
  opacity: 1;
  transform: none;
  z-index: 1;
}

.bs-texts {
  display: grid;
  padding: 8px 14px 8px 0;
}

.bs-text {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.35s var(--ease-soft), transform 0.45s var(--ease), visibility 0s linear 0.35s;
}

.bs-text.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0.08s, 0.08s, 0s;
}

.bs-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bs-title .bs-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(27, 22, 16, 0.08);
}

.bs-title b {
  font-family: "Lora", Georgia, serif;
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 30px);
  letter-spacing: -0.01em;
}

.bs-kind {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey-2);
}

.bs-desc {
  margin: 0;
  color: var(--grey);
  line-height: 1.55;
}

@media (max-width: 760px) {
  .bs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .bs-nm {
    font-size: 16px;
  }
  .bs-stage {
    grid-template-columns: minmax(0, 1fr);
  }
  .bs-texts {
    padding: 4px 10px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bs-arc, .bs-row, .bs-logo, .bs-nm, .bs-shot img, .bs-text { transition: none; }
  .bs-live { animation: none; }
}

/* the open-source line under the stage */
.bs-also {
  margin: 16px auto 0;
  max-width: 62ch;
  text-align: center;
  font-size: 14px;
  color: var(--grey-2);
}

.bs-also a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
