/* ===================================================================
   dhvakr.me — Divakaran T

   The page is dark by default and an unstamped :root renders dark on
   purpose, so a visitor with no stored choice and no OS preference
   still gets the intended ground.

   Black and white carry the page. There is exactly one accent — a deep
   petrol blue — and one alarm:

     sig     petrol   the accent · emphasis · links · numbers
     trace   ink      the latency trace while it is inside the objective
     breach  rust     over the objective, and nothing else

   The latency panel reads plainly because of that last pair: a healthy
   system is drawn in ink like the rest of the page, and colour appears
   only when something is wrong. No legend needed.
   =================================================================== */

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

/* ---------------------- the accent family ----------------------
   Four accents, any of which can carry the page. Each defines the
   tone for a dark ground (-d), for text on a light ground (-l) and
   for strokes and filled blocks on a light ground (-lg) — the last
   is a shade stronger so white text on a filled button still clears
   AA. The theme blocks below consume these and never name a colour
   themselves, so adding a fifth accent is one block here.

   Stamped on <html> as data-accent; the default below is green. */
:root,
:root[data-accent="green"] {
  --acc-d: #7FBE94;   --acc-d-rgb: 127,190,148;
  --acc-l: #2D6A45;   --acc-lg: #2F6E47;   --acc-lg-rgb: 47,110,71;
}
:root[data-accent="blue"] {
  --acc-d: #6FB3D1;   --acc-d-rgb: 111,179,209;
  --acc-l: #1F5F78;   --acc-lg: #246A85;   --acc-lg-rgb: 36,106,133;
}
:root[data-accent="orange"] {
  --acc-d: #EDA74E;   --acc-d-rgb: 237,167,78;
  --acc-l: #8C5112;   --acc-lg: #9C5A16;   --acc-lg-rgb: 156,90,22;
}
:root[data-accent="brown"] {
  --acc-d: #CBA67E;   --acc-d-rgb: 203,166,126;
  --acc-l: #7A5230;   --acc-lg: #8A5E38;   --acc-lg-rgb: 138,94,56;
}

:root {
  /* ---- ground & ink (dark is the default) ---- */
  --bg:      #0A0A0B;
  --bg-2:    #131315;
  --bg-3:    #1B1B1E;
  --fg:      #F4F3EF;
  --fg-2:    #9D9D9B;
  --fg-3:    #85857F;
  --line:    rgba(244,243,239,0.10);
  --line-2:  rgba(244,243,239,0.17);

  /* ---- signal ---- */
  --sig:       var(--acc-d);   /* text-safe on this ground */
  --sig-graph: var(--acc-d);   /* strokes, fills, filled blocks */
  --sig-wash:  rgba(var(--acc-d-rgb), 0.13);
  --trace:     #F4F3EF;   /* the trace inside the objective — ink, not colour */
  --breach:       #E0674A;
  --breach-graph: #E0674A;
  --breach-wash:  rgba(224,103,74,0.14);
  --on-sig:   #0A0A0B;    /* ink laid on a signal-coloured block */
  --on-breach: #0A0A0B;   /* and on a rust one — white is 3.37:1 here */

  --sel-bg: rgba(var(--acc-d-rgb), 0.26);
  --sel-fg: #FFFFFF;

  /* ---- type ---- */
  --display: "Bricolage Grotesque", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --body:    "Instrument Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* fluid scale — 1.22 ratio, clamped so it never collapses on a phone
     and never gets gigantic on a 4K monitor */
  --step--2: clamp(0.70rem, 0.68rem + 0.10vw, 0.76rem);
  --step--1: clamp(0.81rem, 0.78rem + 0.14vw, 0.88rem);
  --step-0:  clamp(1.00rem, 0.97rem + 0.16vw, 1.08rem);
  --step-1:  clamp(1.13rem, 1.07rem + 0.28vw, 1.28rem);
  --step-2:  clamp(1.36rem, 1.24rem + 0.56vw, 1.70rem);
  --step-3:  clamp(1.70rem, 1.46rem + 1.10vw, 2.45rem);
  --step-4:  clamp(2.10rem, 1.64rem + 2.10vw, 3.60rem);
  --step-5:  clamp(2.60rem, 1.78rem + 3.70vw, 5.40rem);

  --measure: 64ch;
  --gut: clamp(20px, 5vw, 40px);
  --wrap: 1180px;
  --radius: 14px;
  --radius-sm: 9px;
}

:root[data-theme="light"] {
  --bg:      #FBFAF7;
  --bg-2:    #F2F0EA;
  --bg-3:    #E7E4DB;
  --fg:      #0F0F0E;
  --fg-2:    #52524E;
  --fg-3:    #6B6B66;
  --line:    rgba(15,15,14,0.12);
  --line-2:  rgba(15,15,14,0.20);

  --sig:       var(--acc-l);
  --sig-graph: var(--acc-lg);
  --sig-wash:  rgba(var(--acc-lg-rgb), 0.12);
  --trace:     #0F0F0E;
  --breach:       #A8331A;
  --breach-graph: #B83A1E;
  --breach-wash:  rgba(184,58,30,0.10);
  --on-sig:   #FFFFFF;
  --on-breach: #FFFFFF;

  --sel-bg: rgba(var(--acc-lg-rgb), 0.16);
  --sel-fg: #0F0F0E;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
  --bg:      #FBFAF7;
  --bg-2:    #F2F0EA;
  --bg-3:    #E7E4DB;
  --fg:      #0F0F0E;
  --fg-2:    #52524E;
  --fg-3:    #6B6B66;
  --line:    rgba(15,15,14,0.12);
  --line-2:  rgba(15,15,14,0.20);

  --sig:       var(--acc-l);
  --sig-graph: var(--acc-lg);
  --sig-wash:  rgba(var(--acc-lg-rgb), 0.12);
  --trace:     #0F0F0E;
  --breach:       #A8331A;
  --breach-graph: #B83A1E;
  --breach-wash:  rgba(184,58,30,0.10);
  --on-sig:   #FFFFFF;
  --on-breach: #FFFFFF;

  --sel-bg: rgba(var(--acc-lg-rgb), 0.16);
  --sel-fg: #0F0F0E;
  }
}

::selection { background: var(--sel-bg); color: var(--sel-fg); }

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

body {
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.65;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.022em;
  text-wrap: balance;
  font-variation-settings: "wdth" 100, "opsz" 36;
}

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

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--sig);
  outline-offset: 3px;
  border-radius: 3px;
}

img, svg, canvas, iframe { display: block; max-width: 100%; }

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

.mono {
  font-family: var(--mono);
  font-size: var(--step--1);
  font-variant-ligatures: none;
  letter-spacing: -0.01em;
}

/* An eyebrow names the section. It is the only uppercase on the page,
   which is what keeps it reading as a label rather than a heading. */
.eyebrow {
  font-family: var(--mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  /* 0.13em was pushing the longer role line onto a second row in the
     hero's narrower column; the label still reads as a label at 0.1 */
  letter-spacing: 0.1em;
  color: var(--fg-3);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
/* Sections are numbered instead of dashed: "02  OWNERSHIP". The number is
   the one accent mark per section, and it doubles as a sense of place on a
   long page. The hero's role line carries no number. */
main { counter-reset: sec; }
main > section:not(.hero):not(.proof) { counter-increment: sec; }
main > section:not(.hero):not(.proof) .eyebrow::before {
  content: counter(sec, decimal-leading-zero);
  color: var(--sig);
  font-weight: 500;
  letter-spacing: 0.04em;
  padding-right: 10px;
  margin-right: 2px;
  border-right: 1px solid var(--line-2);
}
/* the hero's role line is the longest on the page — let it hold one row
   wherever the column is wide enough for it */
.hero .eyebrow { flex-wrap: nowrap; }
@media (max-width: 560px) { .hero .eyebrow { flex-wrap: wrap; } }

/* ============================ header ============================ */

header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
header.stuck { border-bottom-color: var(--line); }

header .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 64px;
}

.logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: -0.03em;
  font-variation-settings: "wdth" 88, "opsz" 20;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 9px;
}
/* a live dot: the page is up, and so are his services */
.logo::after {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--sig-graph);
  box-shadow: 0 0 0 0 var(--sig-wash);
  animation: beat 2.6s ease-out infinite;
}
@keyframes beat {
  0%   { box-shadow: 0 0 0 0 var(--sig-wash); }
  70%  { box-shadow: 0 0 0 7px rgba(0,0,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}
.nav-links a {
  font-size: var(--step--1);
  color: var(--fg-2);
  white-space: nowrap;
  transition: color 0.18s ease;
}
.nav-links a:hover { color: var(--fg); }

.nav-links a.nav-ikat {
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.nav-links a.nav-ikat::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--sig-graph);
  flex: none;
}

.nav-cta {
  font-size: var(--step--1);
  padding: 7px 15px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--fg);
  white-space: nowrap;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.nav-cta:hover { border-color: var(--sig-graph); background: var(--sig-wash); }

.theme-toggle {
  width: 34px; height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.theme-toggle:hover { color: var(--fg); border-color: var(--line-2); }
.theme-toggle svg { width: 15px; height: 15px; }
.theme-toggle .i-sun { display: none; }
.theme-toggle .i-moon { display: block; }
:root[data-theme="light"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .i-moon { display: none; }
}

@media (max-width: 880px) {
  .nav-links li:not(.keep) { display: none; }
  header .wrap { gap: 12px; }
}

/* ============================ sections ============================ */

section { padding-block: clamp(56px, 7.5vw, 104px); position: relative; }
/* Sections are separated by a hairline that fades out at both ends rather
   than a full-bleed rule. The eyebrow's own accent dash sits just below it,
   so the divider itself carries no accent — one green mark per section. */
section + section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 18%, var(--line-2) 82%, transparent);
}

.sec-head { margin-bottom: clamp(34px, 5vw, 56px); }
.sec-head h2 { font-size: var(--step-3); max-width: 30ch; }
.sec-head p:not(.eyebrow) {
  margin-top: 18px;
  color: var(--fg-2);
  max-width: var(--measure);
  font-size: var(--step-1);
  text-wrap: pretty;
}

/* reveal on scroll — opt-in per element, and a no-op under
   prefers-reduced-motion so nothing is ever stuck invisible */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(0.2,0.7,0.3,1), transform 0.6s cubic-bezier(0.2,0.7,0.3,1);
}
.reveal.in { opacity: 1; transform: none; }
/* Set by the head script's failsafe when the observer never came up. */
:root.reveal-all .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .logo::after { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============================== hero ============================== */

.hero {
  padding-top: clamp(48px, 7vw, 92px);
  padding-bottom: clamp(56px, 8vw, 104px);
}
.hero .eyebrow { margin-bottom: 26px; }

.hero h1 {
  font-size: var(--step-5);
  font-variation-settings: "wdth" 92, "opsz" 72;
  letter-spacing: -0.035em;
  margin-bottom: 26px;
}
/* The initial stays on the same line as the given name, a shade back.
   One object, but the eye lands on "Divakaran" first. */
.hero h1 .sur {
  font-weight: 400;
  color: var(--fg-2);
}

/* The familiar name, kept close to the formal one. */
.hero-alias {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: -10px;
  margin-bottom: 24px;
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 600;
  font-variation-settings: "wdth" 96, "opsz" 20;
  color: var(--sig);
  letter-spacing: -0.02em;
}
.hero-alias span {
  font-family: var(--mono);
  font-size: var(--step--2);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
}

.hero-lede {
  font-size: var(--step-2);
  line-height: 1.42;
  color: var(--fg);
  max-width: 38ch;
  letter-spacing: -0.012em;
  text-wrap: pretty;
  margin-bottom: 20px;
}
.hero-lede em {
  font-style: normal;
  color: var(--sig);
  font-weight: 500;
}

.hero-sub {
  color: var(--fg-2);
  max-width: 54ch;
  font-size: var(--step-1);
  text-wrap: pretty;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: var(--step--1);
  font-weight: 500;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--sig-graph); color: var(--on-sig); }
.btn-primary:hover { background: color-mix(in srgb, var(--sig-graph) 86%, var(--fg)); }
.btn-ghost { border-color: var(--line-2); color: var(--fg); }
.btn-ghost:hover { border-color: var(--sig-graph); background: var(--sig-wash); }

.hero-social {
  display: flex;
  gap: 18px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.hero-social a {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--fg-3);
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.hero-social a:hover { color: var(--fg); border-bottom-color: var(--sig-graph); }

/* ---------------------- the latency panel ----------------------
   The hero's argument. A strip chart of P95 under rising load, with
   his three real interventions landing in the order he shipped them.
   Amber means inside the objective, red means over it; the dashed
   rule is the 1 s objective itself. No legend — the colours and the
   line say it.                                                     */

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-3) 60%, transparent);
}
.panel-title {
  font-family: var(--mono);
  font-size: var(--step--2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-right: auto;
}
.panel-badge {
  font-family: var(--mono);
  font-size: var(--step--2);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--fg-3);
  white-space: nowrap;
}

.readouts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}
.readout { padding: 14px 16px; }
.readout + .readout { border-left: 1px solid var(--line); }
.readout-k {
  font-family: var(--mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-3);
  display: block;
  margin-bottom: 5px;
}
.readout-v {
  font-family: var(--mono);
  font-size: var(--step-1);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  letter-spacing: -0.02em;
}
.readout-v.is-breach { color: var(--breach); }
.readout-v.is-ok { color: var(--fg); }

/* At phone width the three labels have to share ~90px each. Tracking and
   size come down just enough that "vs objective" stays on one line, so the
   three cells keep equal height. */
@media (max-width: 560px) {
  .readout { padding: 12px 10px; }
  .readout-k { font-size: 9px; letter-spacing: 0.05em; }
  .panel-head { padding: 11px 12px; gap: 8px; }
  .panel-note { padding: 11px 12px; }
}

.chart-hold { position: relative; }

/* the caption under the live note — what you are actually watching */
.panel-note {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--fg-2);
  min-height: 46px;
}
.panel-note .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--fg-2);
  flex: none;
  transition: background 0.3s ease;
}
.panel-note.is-breach .dot { background: var(--breach-graph); }
.panel-note .txt { transition: color 0.3s ease; }
.panel-note.is-breach .txt { color: var(--breach); }

.panel-cap {
  margin-top: 16px;
  font-size: var(--step--1);
  color: var(--fg-3);
  max-width: 56ch;
  text-wrap: pretty;
}
.panel-cap b { color: var(--fg-2); font-weight: 500; }

/* ============================= proof ============================= */

.proof { padding-block: clamp(44px, 6vw, 72px); }

.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.pstat {
  background: var(--bg);
  padding: 22px 20px;
  transition: background 0.2s ease;
}
.pstat:hover { background: var(--bg-2); }
.pstat b {
  display: block;
  font-family: var(--display);
  font-size: var(--step-3);
  font-weight: 600;
  font-variation-settings: "wdth" 86, "opsz" 32;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.pstat span {
  display: block;
  font-size: var(--step--1);
  color: var(--fg-2);
  line-height: 1.5;
  text-wrap: pretty;
}
.pstat.hl b { color: var(--sig); }

/* ============================== work ==============================
   Each role is a claim with its evidence attached. The delta bar uses
   one mechanism for both directions: a tick marks where the number
   started, the amber bar shows where it ended. Short of the tick is a
   reduction, past it is a gain — so "2s to under 1s" and "+40%
   throughput" read on the same ruler.                               */

.role { padding-block: clamp(30px, 4vw, 44px); }
.role + .role { border-top: 1px solid var(--line); }

.role-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 8px;
}
.role-head h3 {
  font-size: var(--step-2);
  font-variation-settings: "wdth" 94, "opsz" 24;
}
/* nowrap keeps it beside the company name on a wide screen; on a phone
   the longer titles ("Software Engineer II -> III") must be allowed to
   wrap or they push the whole page sideways. */
.role-meta { color: var(--fg-3); white-space: nowrap; }
@media (max-width: 560px) { .role-meta { white-space: normal; } }
.role-aka {
  font-family: var(--body);
  font-size: var(--step--1);
  font-weight: 400;
  color: var(--fg-3);
  letter-spacing: 0;
}

.role-tag {
  font-family: var(--mono);
  font-size: var(--step--2);
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--sig-wash);
  color: var(--sig);
  white-space: nowrap;
}

.role-what {
  color: var(--fg-2);
  max-width: var(--measure);
  margin-bottom: 26px;
  text-wrap: pretty;
}
.role-what strong { color: var(--fg); font-weight: 500; }

.role-also {
  margin-top: 20px;
  color: var(--fg-2);
  max-width: var(--measure);
  font-size: var(--step--1);
  text-wrap: pretty;
}

.deltas { list-style: none; display: grid; gap: 2px; }

.delta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 128px;
  align-items: center;
  gap: 18px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.delta:last-child { border-bottom: 1px solid var(--line); }

.d-label { font-size: var(--step--1); color: var(--fg-2); text-wrap: pretty; }

.d-bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-3);
  overflow: visible;
}
/* where the number started */
.d-bar::after {
  content: "";
  position: absolute;
  top: -4px;
  left: var(--base, 100%);
  width: 1px;
  height: 14px;
  background: var(--line-2);
}
/* where it ended — grown on reveal so the change is something you watch */
.d-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  /* a near-total reduction lands around 1% — keep it visible as a mark
     rather than letting it round away to nothing */
  min-width: 4px;
  border-radius: 999px;
  background: var(--sig-graph);
  transition: width 1.1s cubic-bezier(0.2,0.75,0.25,1);
}
.in .d-bar i, .reveal.in .d-bar i { width: var(--w, 50%); }
@media (prefers-reduced-motion: reduce) {
  .d-bar i { width: var(--w, 50%); transition: none; }
}

.d-nums {
  font-family: var(--mono);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
  letter-spacing: -0.02em;
}
.d-nums s { color: var(--fg-3); text-decoration-thickness: 1px; }
.d-nums em { font-style: normal; color: var(--sig); font-weight: 500; }
.d-nums .arw { color: var(--fg-3); padding-inline: 3px; }

@media (max-width: 720px) {
  .delta { grid-template-columns: minmax(0, 1fr) 104px; gap: 10px 14px; }
  .d-bar { grid-column: 1 / -1; order: 3; }
  .d-nums { text-align: right; }
}

/* ============================= systems =============================
   Things built because they were interesting, not because a ticket
   asked for them. Benchmarks included — that is the whole point of
   putting them here. */

.sys-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}
/* Three columns with the first card featured: 2+1 over 3, so five cards
   never leave a lone card on the last row. */
@media (min-width: 900px) {
  .sys-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sys-grid .sys:first-child { grid-column: span 2; padding: 28px 30px; }
  .sys-grid .sys:first-child h3 { font-size: var(--step-2); }
  .sys-grid .sys:first-child p { max-width: 52ch; font-size: var(--step-0); }
}

.sys {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.22s ease, transform 0.22s ease;
}
.sys:hover { border-color: var(--line-2); transform: translateY(-2px); }

/* Designed but not published. The dashed edge says so before the label
   does — a solid card next to a shipped one would overclaim. */
.sys-soon {
  border-style: dashed;
  background: transparent;
}
.sys-soon .sys-kind { color: var(--sig); }

.sys-top { display: flex; align-items: baseline; gap: 10px; }
.sys-top h3 {
  font-size: var(--step-1);
  font-variation-settings: "wdth" 96, "opsz" 18;
  margin-right: auto;
}
.sys-kind {
  font-family: var(--mono);
  font-size: var(--step--2);
  color: var(--fg-3);
  white-space: nowrap;
}
.sys p { font-size: var(--step--1); color: var(--fg-2); text-wrap: pretty; }
.sys p em { color: var(--fg); }
.sys-bench {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--sig);
  padding-top: 12px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.sys-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sys-tags span {
  font-family: var(--mono);
  font-size: var(--step--2);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-3);
  /* --fg-3 on --bg-3 is only 4.21:1 in the light theme; these are small
     and need the darker ink to clear AA. */
  color: var(--fg-2);
}
.sys-link {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--fg-2);
  border-bottom: 1px solid var(--line-2);
  align-self: flex-start;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.sys-link:hover { color: var(--sig); border-color: var(--sig-graph); }

/* ============================== ikat ==============================
   The product block. It is the one place on the page that gets to
   look like somewhere else, because it is a door to somewhere else. */

.ikat-block {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 88% 8%, var(--sig-wash), transparent 58%),
    var(--bg-2);
}
.ikat-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.84fr);
  gap: clamp(26px, 4vw, 52px);
  padding: clamp(26px, 4vw, 44px);
  align-items: center;
}
@media (max-width: 860px) { .ikat-inner { grid-template-columns: 1fr; } }

.ikat-mark {
  font-family: var(--display);
  font-size: var(--step-3);
  font-weight: 700;
  font-variation-settings: "wdth" 82, "opsz" 32;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
}
.ikat-block h3 {
  font-size: var(--step-2);
  margin-bottom: 14px;
  max-width: 28ch;
}
.ikat-block p { color: var(--fg-2); max-width: 50ch; text-wrap: pretty; }
.ikat-block .ikat-cta { margin-top: 26px; }

/* a miniature of the thing itself: four planes, one of them refusing */
.planes { display: grid; gap: 8px; }
.plane {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: var(--mono);
  font-size: var(--step--1);
}
.plane .pname { color: var(--fg); margin-right: auto; }
.plane .pv {
  font-size: var(--step--2);
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.06em;
}
.plane .pv.allow { background: var(--sig-wash); color: var(--sig); }
.plane .pv.deny  { background: var(--breach-wash); color: var(--breach); }
.plane .pn { color: var(--fg-3); font-size: var(--step--2); }

/* ============================== stack ==============================
   Tiered on purpose. A flat wall of 30 logos tells a reader nothing
   about what you would actually be trusted with on day one. */

.tiers { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tier {
  background: var(--bg);
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px;
  padding: 22px 24px;
}
@media (max-width: 760px) { .tier { grid-template-columns: 1fr; gap: 12px; } }

.tier-k { }
.tier-k b {
  display: block;
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 600;
  font-variation-settings: "wdth" 94, "opsz" 18;
  margin-bottom: 4px;
}
.tier-k span { font-size: var(--step--2); color: var(--fg-3); font-family: var(--mono); }
.tier-v { display: flex; flex-wrap: wrap; gap: 7px; align-content: flex-start; }
.tier-v span {
  font-family: var(--mono);
  font-size: var(--step--1);
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--fg-2);
}
.tier.primary .tier-k b { color: var(--sig); }
.tier.primary .tier-v span { border-color: color-mix(in srgb, var(--sig-graph) 34%, transparent); color: var(--fg); }

/* =========================== recognition =========================== */

.signals { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.signal {
  border-left: 2px solid var(--sig-graph);
  padding: 4px 0 4px 18px;
}
.signal b {
  display: block;
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 600;
  font-variation-settings: "wdth" 96, "opsz" 18;
  margin-bottom: 5px;
}
.signal span { display: block; font-size: var(--step--1); color: var(--fg-2); text-wrap: pretty; }
.signal span em { font-style: normal; color: var(--sig); }
.signal a { color: var(--fg-2); border-bottom: 1px solid var(--line-2); }
.signal a:hover { color: var(--sig); border-color: var(--sig-graph); }

/* ============================== music ============================== */

.music-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  gap: clamp(22px, 4vw, 44px);
  align-items: center;
}
@media (max-width: 820px) { .music-row { grid-template-columns: 1fr; } }

.music-copy p { color: var(--fg-2); max-width: 46ch; text-wrap: pretty; }
.music-copy h2 { font-size: var(--step-2); margin-bottom: 14px; }

/* ---- the Now card ----
   Same panel chrome as the hero, so the two read as one family. */
.nowcard { }
.nowlist { list-style: none; }
.nowlist li {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 14px;
  padding: 13px 16px;
  align-items: baseline;
}
.nowlist li + li { border-top: 1px solid var(--line); }
.nowlist .nk {
  font-family: var(--mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--fg-3);
}
.nowlist .nv { font-size: var(--step--1); color: var(--fg); text-wrap: pretty; }
.nowlist .nv a { color: var(--sig); border-bottom: 1px solid var(--sig-graph); }
.nowlist .nv a:hover { color: var(--fg); }
@media (max-width: 520px) {
  .nowlist li { grid-template-columns: 1fr; gap: 3px; }
}

/* ============================= contact ============================= */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: clamp(28px, 5vw, 60px);
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact h2 { font-size: var(--step-3); max-width: 24ch; margin-bottom: 16px; }
.contact-lede { color: var(--fg-2); max-width: 46ch; font-size: var(--step-1); text-wrap: pretty; }

.mail-big {
  display: inline-block;
  margin-top: 28px;
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 500;
  font-variation-settings: "wdth" 96, "opsz" 24;
  letter-spacing: -0.02em;
  border-bottom: 2px solid var(--sig-graph);
  padding-bottom: 3px;
  transition: color 0.18s ease;
}
.mail-big:hover { color: var(--sig); }

.reach { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.reach a, .reach div {
  background: var(--bg);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  font-family: var(--mono);
  font-size: var(--step--1);
  transition: background 0.18s ease;
}
.reach a:hover { background: var(--bg-2); }
.reach .k { color: var(--fg-3); width: 74px; flex: none; }
.reach .v { color: var(--fg); margin-right: auto; }
.reach a:hover .v { color: var(--sig); }
.reach .ext { color: var(--fg-3); font-size: var(--step--2); }

/* ============================== footer ============================== */

footer {
  border-top: 1px solid var(--line);
  padding-block: 34px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  font-family: var(--mono);
  font-size: var(--step--2);
  color: var(--fg-3);
}
footer .wrap .sp { margin-right: auto; }
footer a { color: var(--fg-2); }
footer a:hover { color: var(--sig); }

/* ======================= skip link & a11y ======================= */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--sig-graph);
  color: var(--on-sig);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  font-size: var(--step--1);
}
.skip:focus { left: 0; }

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


/* ============================= ownership ============================
   Not called "strategy": Strategy is the employer's name, and the clash
   reads as a section about the company. Numbered because the order is the
   argument: direction first, then what it cost, then what came back, then
   the people, then what's next. */

.moves { list-style: none; counter-reset: none; }

.move {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.move:last-child { border-bottom: 1px solid var(--line); }

.move-n {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--sig);
  letter-spacing: 0.04em;
  padding-top: 3px;
}

.move b {
  display: block;
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 600;
  font-variation-settings: "wdth" 96, "opsz" 20;
  letter-spacing: -0.018em;
  margin-bottom: 8px;
  text-wrap: balance;
}
/* Scoped through the div on purpose: a bare `.move span` is 0,1,1 and
   would outrank `.move-n` at 0,1,0, quietly repainting the number. */
.move > div > span {
  display: block;
  color: var(--fg-2);
  max-width: var(--measure);
  font-size: var(--step--1);
  text-wrap: pretty;
}
.move > div > span a { color: var(--sig); border-bottom: 1px solid var(--sig-graph); }
.move > div > span a:hover { color: var(--fg); }

@media (max-width: 620px) {
  .move { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .move-n { padding-top: 0; }
}

/* =============================== the arc ===============================
   Three phases of the same career, drawn in order. The rail draws itself
   once the block is on screen and each station lights as the line reaches
   it, so the animation is the chronology rather than decoration. A slow
   pulse afterwards keeps it alive without asking for attention.

   On a phone the rail turns vertical and the pulse is dropped — a dot
   crossing a 320px line reads as a glitch rather than a journey. */

.arc {
  position: relative;
  margin-bottom: clamp(44px, 6vw, 72px);
  padding-top: 6px;
}

.arc-rail {
  position: absolute;
  top: 11px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
  overflow: visible;
  /* The rail runs past the last station and fades, because the last
     station is "now" — a line stopping dead would read as an ending. */
  -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent 100%);
          mask-image: linear-gradient(90deg, #000 78%, transparent 100%);
}
.arc-rail i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--sig-graph);
  transition: width 1.6s cubic-bezier(0.3, 0.7, 0.3, 1) 0.15s;
}
.reveal.in .arc-rail i { width: 100%; }

.arc-pulse {
  position: absolute;
  top: 50%;
  left: 0;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--sig-graph);
  opacity: 0;
  box-shadow: 0 0 0 3px var(--sig-wash);
}
.reveal.in .arc-pulse { animation: arc-travel 7s 2.1s cubic-bezier(0.4,0,0.2,1) infinite; }
@keyframes arc-travel {
  0%   { left: 0;    opacity: 0; }
  8%   { opacity: 1; }
  82%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.arc-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.arc-step { position: relative; padding-right: 8px; }

.arc-dot {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  margin-bottom: 20px;
  transform: scale(0.35);
  opacity: 0;
  transition:
    transform 0.5s cubic-bezier(0.2,1.4,0.4,1),
    opacity 0.4s ease,
    background 0.4s ease,
    border-color 0.4s ease;
  /* the line reaches each station in turn, so each dot waits its turn */
  transition-delay: calc(var(--i) * 520ms + 350ms);
}
.reveal.in .arc-dot {
  transform: none;
  opacity: 1;
  background: var(--sig-graph);
  border-color: var(--sig-graph);
}
/* the station you are standing at */
.arc-step:last-child .arc-dot { box-shadow: 0 0 0 4px var(--sig-wash); }

.arc-year {
  display: block;
  font-family: var(--mono);
  font-size: var(--step--2);
  letter-spacing: 0.08em;
  color: var(--fg-3);
  margin-bottom: 7px;
}
.arc-step b {
  display: block;
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 600;
  font-variation-settings: "wdth" 94, "opsz" 24;
  letter-spacing: -0.022em;
  line-height: 1.1;
  margin-bottom: 10px;
  text-wrap: balance;
}
.arc-desc {
  display: block;
  font-size: var(--step--1);
  color: var(--fg-2);
  text-wrap: pretty;
}
.arc-desc strong { color: var(--fg); font-weight: 500; }


@media (max-width: 820px) {
  .arc-steps { grid-template-columns: 1fr; gap: 26px; }
  .arc-rail {
    top: 6px; left: 5px; right: auto; bottom: 6px; width: 1px; height: auto;
    -webkit-mask-image: linear-gradient(180deg, #000 86%, transparent 100%);
            mask-image: linear-gradient(180deg, #000 86%, transparent 100%);
  }
  .arc-rail i { inset: 0 0 auto 0; width: 1px; height: 0; transition: height 1.6s cubic-bezier(0.3,0.7,0.3,1) 0.15s; }
  .reveal.in .arc-rail i { width: 1px; height: 100%; }
  .arc-pulse { display: none; }
  .arc-step { padding-left: 26px; padding-right: 0; }
  .arc-dot { position: absolute; left: 0; top: 4px; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .arc-rail i { width: 100%; transition: none; }
  .arc-dot { transform: none; opacity: 1; transition: none; background: var(--sig-graph); border-color: var(--sig-graph); }
  .arc-pulse { display: none; }
  /* the mobile rail is vertical: it must stay 1px wide and grow in height,
     not inherit the horizontal 100% width set just above */
  @media (max-width: 820px) { .arc-rail i { width: 1px; height: 100%; } }
}

/* =========================== accent switcher ===========================
   Four accents live in the stylesheet; this lets the reader pick one.
   The swatches are coloured from the accent tokens themselves, so each
   dot is literally the thing it selects — no second list of hex values
   to drift out of step with the first. */

.accent { position: relative; flex: none; }

.accent-btn {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.18s ease;
}
.accent-btn:hover { border-color: var(--line-2); }
.accent-swatch {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--sig-graph);
  box-shadow: 0 0 0 3px var(--sig-wash);
}

.accent-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 70;
  display: grid;
  gap: 1px;
  min-width: 142px;
  padding: 5px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  box-shadow: 0 14px 34px rgba(0,0,0,0.30);
}
.accent-menu[hidden] { display: none; }

.accent-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--fg-2);
  font-family: var(--mono);
  font-size: var(--step--2);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.accent-menu button:hover { background: var(--bg-3); color: var(--fg); }
.accent-menu button[aria-checked="true"] { color: var(--fg); }

/* each dot paints itself from that accent's own tokens */
.accent-menu button span {
  width: 11px; height: 11px;
  border-radius: 50%;
  flex: none;
  background: var(--dot);
}
.accent-menu button[data-accent="blue"]   { --dot: #6FB3D1; }
.accent-menu button[data-accent="green"]  { --dot: #7FBE94; }
.accent-menu button[data-accent="orange"] { --dot: #EDA74E; }
.accent-menu button[data-accent="brown"]  { --dot: #CBA67E; }
:root[data-theme="light"] .accent-menu button[data-accent="blue"]   { --dot: #246A85; }
:root[data-theme="light"] .accent-menu button[data-accent="green"]  { --dot: #2F6E47; }
:root[data-theme="light"] .accent-menu button[data-accent="orange"] { --dot: #9C5A16; }
:root[data-theme="light"] .accent-menu button[data-accent="brown"]  { --dot: #8A5E38; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .accent-menu button[data-accent="blue"]   { --dot: #246A85; }
  :root:not([data-theme="dark"]) .accent-menu button[data-accent="green"]  { --dot: #2F6E47; }
  :root:not([data-theme="dark"]) .accent-menu button[data-accent="orange"] { --dot: #9C5A16; }
  :root:not([data-theme="dark"]) .accent-menu button[data-accent="brown"]  { --dot: #8A5E38; }
}

/* the chosen one gets a ring rather than a tick, so the row stays even */
.accent-menu button[aria-checked="true"] span { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 3.5px var(--dot); }

@media (max-width: 880px) { .accent-menu { right: -40px; } }

/* ============================== the fleet ==============================
   A crew of agents builds the page in front of you. Each is a labelled
   cursor that travels to a real element, clicks it, and that element
   appears. On arrival the whole crew works the hero; after that a single
   scout is dispatched per section as it scrolls into view.

   The page is the stage, so there is no intro screen to sit through — and
   nothing here is ever allowed to gate content. See the escape hatches in
   the script: any input reveals everything, a hard timeout fires
   regardless, and reduced motion skips the layer entirely. */

#fleet-layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}

.agent {
  position: absolute;
  top: 0; left: 0;
  will-change: transform;
  transform: translate(-120px, -120px);
  color: var(--sig-graph);
}
.agent.deny { color: var(--breach-graph); }
.agent svg {
  width: 17px; height: 21px;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
}
.agent .tag {
  position: absolute;
  left: 14px; top: 17px;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.015em;
  padding: 2.5px 7px;
  border-radius: 4px;
  color: var(--on-sig);
  background: var(--sig-graph);
}
.agent.deny .tag { background: var(--breach-graph); color: var(--on-breach); }

/* the click */
.agent .ping {
  position: absolute;
  left: -13px; top: -13px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0;
  transform: scale(.3);
}
.agent.click .ping { animation: agent-ping .5s ease-out; }
@keyframes agent-ping {
  from { opacity: .85; transform: scale(.3); }
  to   { opacity: 0;   transform: scale(1.55); }
}

/* Elements waiting for an agent. Scoped under .fleet-on so that the moment
   the class comes off the body — for any reason — everything is visible. */
body.fleet-on .awaiting { opacity: 0; transform: translateY(8px); }
body.fleet-on .awaiting.lit {
  opacity: 1; transform: none;
  transition: opacity .45s ease, transform .45s cubic-bezier(.2,.7,.3,1);
}

#fleet-bar {
  position: fixed;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  z-index: 91;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-2);
  box-shadow: 0 10px 30px rgba(0,0,0,.34);
  transition: opacity .5s ease, transform .5s ease;
}
#fleet-bar b { color: var(--fg); font-weight: 500; font-variant-numeric: tabular-nums; }
#fleet-bar .skip { color: var(--fg-3); }
#fleet-bar.gone {
  opacity: 0;
  transform: translateX(-50%) translateY(16px);
  pointer-events: none;
}
#fleet-bar .pulse { display: flex; gap: 3px; }
#fleet-bar .pulse i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--sig-graph);
  animation: fleet-pulse 1.1s ease-in-out infinite;
}
#fleet-bar .pulse i:nth-child(2) { animation-delay: .14s; }
#fleet-bar .pulse i:nth-child(3) { animation-delay: .28s; }
#fleet-bar .pulse i:nth-child(4) { animation-delay: .42s; }
@keyframes fleet-pulse { 0%,100% { opacity: .25 } 50% { opacity: 1 } }

@media (max-width: 560px) {
  #fleet-bar { font-size: 10.5px; gap: 10px; padding: 8px 13px; bottom: 16px; }
  #fleet-bar .skip { display: none; }
  .agent .tag { font-size: 9.5px; padding: 2px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  #fleet-layer, #fleet-bar { display: none !important; }
  body.fleet-on .awaiting { opacity: 1; transform: none; }
}

/* ---- typing ----
   Words stay whole so wrapping still happens between them, and the
   original markup is restored the instant typing ends. */
.wd { white-space: nowrap; }
body.fleet-on .typing .tk,
.typing .tk { opacity: 0; }
.typing .tk.on { opacity: 1; }
.typing .wd.tk { opacity: 0; }
.typing .wd.tk.on { opacity: 1; }

.caret {
  display: inline-block;
  width: 0.5em;
  height: 1em;
  margin-right: -0.5em;
  vertical-align: -0.12em;
  background: var(--sig-graph);
  animation: caret-blink .8s steps(1) infinite;
}
@keyframes caret-blink { 0%,50% { opacity: 1 } 51%,100% { opacity: 0 } }

/* an element being typed is itself visible — only its glyphs are pending */
body.fleet-on .awaiting.typing { opacity: 1; transform: none; }

/* ---- a box being drawn ----
   The outline is stroked on before anything goes inside it. */
.panel { position: relative; }
body.fleet-on .panel.drawing {
  opacity: 1;
  transform: none;
  border-color: transparent;
  background: transparent;
}
body.fleet-on .panel.drawing > *:not(.box-draw) { opacity: 0; }
.box-draw {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  color: var(--sig-graph);
}

/* ---- the readout bar ---- */
#fleet-bar .grp { white-space: nowrap; }
#fleet-bar .dim { color: var(--fg-3); }
#fleet-bar .log {
  max-width: 34ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--fg-3);
  padding-left: 12px;
  border-left: 1px solid var(--line);
}
#fleet-bar .log em { font-style: normal; color: var(--fg-2); }
#fleet-bar .log .ok { color: var(--sig); }
@media (max-width: 680px) { #fleet-bar .log { display: none; } }

/* ---- the load waterfall ----
   Real phases from this page load. The dashed mark on each track is the
   1s budget; a phase that ends past it is drawn in rust, same contract as
   everywhere else on the page. */
.chart-hold { padding: 16px; }
.fall { display: grid; gap: 7px; }
.fall-row { display: grid; grid-template-columns: 72px minmax(0,1fr) 62px; gap: 11px; align-items: center; }
.fall-k {
  font-family: var(--mono); font-size: var(--step--2);
  color: var(--fg-3); text-transform: uppercase; letter-spacing: .07em;
}
.fall-track {
  position: relative; height: 9px; border-radius: 3px;
  background: var(--bg-3); overflow: visible;
}
.fall-track i {
  position: absolute; top: 0; bottom: 0;
  border-radius: 3px; background: var(--fg-2);
  animation: fall-in .5s cubic-bezier(.2,.8,.3,1) both;
}
.fall-row.over i { background: var(--breach-graph); }
@keyframes fall-in { from { transform: scaleX(0); transform-origin: left } to { transform: none } }
/* the budget */
.fall-track::after {
  content: ""; position: absolute; top: -3px; bottom: -3px;
  left: var(--budget, 100%); width: 1px;
  background: repeating-linear-gradient(to bottom, var(--line-2) 0 2px, transparent 2px 4px);
}
.fall-v {
  font-family: var(--mono); font-size: var(--step--2);
  color: var(--fg); text-align: right; font-variant-numeric: tabular-nums;
}
.fall-row.over .fall-v { color: var(--breach); }
.fall-none { font-family: var(--mono); font-size: var(--step--2); color: var(--fg-3); padding: 18px 2px; }
@media (prefers-reduced-motion: reduce) { .fall-track i { animation: none; } }
@media (max-width: 520px) {
  .fall-row { grid-template-columns: 58px minmax(0,1fr) 54px; gap: 8px; }
}


/* ============================ page chrome ============================
   Progress line, section rail, mobile menu. All fixed, all cheap. */

.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 65; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--sig-graph); transform: scaleX(0); transform-origin: left; }

.rail {
  position: fixed; right: 22px; top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: none; flex-direction: column; gap: 14px;
}
@media (min-width: 1240px) { .rail { display: flex; } }
.rail a {
  position: relative; width: 8px; height: 8px; border-radius: 50%;
  background: var(--line-2);
  transition: background .2s ease, transform .2s ease;
}
.rail a:hover, .rail a.on { background: var(--sig-graph); }
.rail a.on { transform: scale(1.35); }
.rail a span {
  position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%) translateX(6px);
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--fg-2); white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
/* labels on hover only — a standing label floats over content and clips at
   narrow widths; the active dot already says where you are */
.rail a:hover span, .rail a:focus-visible span { opacity: 1; transform: translateY(-50%); }

.menu-btn {
  display: none; width: 34px; height: 34px; flex: none;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer;
  place-items: center; padding: 0;
}
.menu-btn i { display: block; width: 14px; height: 1.5px; background: var(--fg); margin: 2.5px auto; border-radius: 1px; }
@media (max-width: 880px) { .menu-btn { display: grid; } }

.menu {
  position: fixed; inset: 0; z-index: 80;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  display: flex; flex-direction: column;
  padding: 0 var(--gut) 28px;
  opacity: 0; transition: opacity .26s ease;
}
.menu[hidden] { display: none; }
.menu.open { opacity: 1; }
.menu-head { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.menu-head .logo { margin-right: 0; }
.menu-close {
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line-2);
  background: transparent; color: var(--fg); font-size: 24px; line-height: 1; cursor: pointer;
}
.menu-links { display: flex; flex-direction: column; margin-top: 22px; }
.menu-links a {
  display: flex; align-items: baseline; gap: 16px;
  padding: 15px 0; border-top: 1px solid var(--line);
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.9rem, 8vw, 2.6rem); letter-spacing: -.03em; line-height: 1;
  font-variation-settings: "wdth" 92, "opsz" 48;
  transform: translateY(8px); opacity: 0;
  transition: transform .4s cubic-bezier(.2,.7,.3,1), opacity .4s ease;
}
.menu-links a:last-child { border-bottom: 1px solid var(--line); }
.menu.open .menu-links a { transform: none; opacity: 1; }
.menu-links a:nth-child(2) { transition-delay: .04s }
.menu-links a:nth-child(3) { transition-delay: .08s }
.menu-links a:nth-child(4) { transition-delay: .12s }
.menu-links a:nth-child(5) { transition-delay: .16s }
.menu-links a:nth-child(6) { transition-delay: .20s }
.menu-links a:nth-child(7) { transition-delay: .24s }
.menu-links a:nth-child(8) { transition-delay: .28s }
.menu-links a:nth-child(9) { transition-delay: .32s }
.menu-links a i { font-family: var(--mono); font-style: normal; font-size: 12px; color: var(--fg-3); width: 28px; flex: none; }
.menu-links a.menu-ikat { color: var(--sig); }
.menu-foot {
  margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-family: var(--mono); font-size: var(--step--1); color: var(--fg-2);
}

/* ============================ micro-interactions ============================ */

/* nav: an underline that grows from the left, not a colour swap */
.nav-links a { position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 1px;
  background: var(--sig-graph); transform: scaleX(0); transform-origin: left;
  transition: transform .22s cubic-bezier(.2,.7,.3,1);
}
.nav-links a:hover::after { transform: scaleX(1); }

/* ledger rows: hovering shows the ghost of where the number started */
.delta { transition: background .18s ease; }
.delta:hover { background: color-mix(in srgb, var(--bg-2) 70%, transparent); }
.d-bar::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: var(--base, 100%);
  border-radius: 999px; background: var(--fg-3); opacity: 0; transition: opacity .2s ease;
}
.delta:hover .d-bar::before { opacity: .22; }
.delta:hover .d-label { color: var(--fg); }

/* cards: the link leads the way */
.sys .sys-link { transition: color .18s ease, border-color .18s ease, transform .2s cubic-bezier(.2,.7,.3,1); }
.sys:hover .sys-link { color: var(--sig); border-color: var(--sig-graph); transform: translateX(4px); }
.sys:hover .sys-top h3 { color: var(--fg); }

/* proof numbers take the accent on hover */
.pstat b { transition: color .18s ease; }
.pstat:hover b { color: var(--sig); }

/* ============================ ownership: pinned opener ============================
   The one section that reads as an essay rather than a grid: the heading
   stays put while the moves scroll past it. */
@media (min-width: 960px) {
  .own-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
  .own-pin { position: sticky; top: 96px; margin-bottom: 0; }
  .own-grid .moves { margin-top: 6px; }
}

/* ============================ contact & footer ============================ */

.mail-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.mail-row .mail-big { margin-top: 0; }
.copy {
  font-family: var(--mono); font-size: var(--step--2); letter-spacing: .06em; text-transform: uppercase;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2);
  background: transparent; color: var(--fg-2); cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.copy:hover { border-color: var(--sig-graph); color: var(--fg); }
.copy.did { background: var(--sig-wash); border-color: var(--sig-graph); color: var(--sig); }

footer .clock { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
footer .clock i { width: 6px; height: 6px; border-radius: 50%; background: var(--sig-graph); animation: beat 2.6s ease-out infinite; }
footer .clock b { color: var(--fg); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .menu, .menu-links a, .rail a, .rail a span, .nav-links a::after, .sys .sys-link { transition: none; }
  footer .clock i { animation: none; }
}

/* =========================== career.architecture ===========================
   The career drawn as a system: each stage a service boundary, each chip a
   component that actually ran there, and the wires are what carried forward.
   Requests travel the wires; hovering a component lights its lineage. */

.arch {
  margin-bottom: clamp(44px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--fg) 7%, transparent) 1px, transparent 1.4px) 0 0 / 22px 22px,
    var(--bg-2);
  overflow: hidden;
}
.arch-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-3) 55%, transparent);
  font-family: var(--mono); font-size: var(--step--2); color: var(--fg-3);
}
.arch-title { display: inline-flex; align-items: center; gap: 9px; color: var(--fg-2); letter-spacing: .02em; }
.arch-title i { width: 7px; height: 7px; border-radius: 50%; background: var(--sig-graph); animation: beat 2.6s ease-out infinite; }

.arch-body { position: relative; padding: 22px; }
.arch-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 0; }
.arch-wire { fill: none; stroke: var(--line-2); stroke-width: 1.2; transition: stroke .2s ease, opacity .2s ease, stroke-width .2s ease; }
.arch-packet { fill: var(--sig-graph); opacity: .9; }
.arch.focus .arch-wire { opacity: .25; }
.arch.focus .arch-wire.lit { opacity: 1; stroke: var(--sig-graph); stroke-width: 1.8; }
.arch.focus .arch-packet { opacity: .2; }

.arch-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, .82fr);
  gap: clamp(26px, 3.4vw, 46px);
}
.arch-zone {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px 14px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.arch-zone.arch-now .arch-year { color: var(--sig); }

.arch-zone-top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  padding: 0; border: 0; background: none; cursor: pointer; text-align: left; color: inherit;
  font-family: var(--mono); font-size: var(--step--2); letter-spacing: .06em;
}
.arch-year { color: var(--fg-3); }
.arch-org { color: var(--sig); white-space: nowrap; transition: transform .18s ease; }
.arch-zone-top:hover .arch-org { transform: translateX(3px); }
.arch-name {
  display: block;
  font-family: var(--display); font-weight: 600; font-size: var(--step-1);
  font-variation-settings: "wdth" 94, "opsz" 20; letter-spacing: -.02em; line-height: 1.15;
}
.arch-desc { font-size: var(--step--1); color: var(--fg-2); line-height: 1.5; text-wrap: pretty; }
.arch-desc strong { color: var(--fg); font-weight: 500; }

.arch-nodes { list-style: none; display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
.arch-node {
  width: 100%; text-align: left;
  padding: 7px 10px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .01em;
  color: var(--fg-2);
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  cursor: default;
  transition: border-color .18s ease, color .18s ease, background .18s ease, opacity .18s ease;
}
.arch-node:hover, .arch-node:focus-visible { color: var(--fg); }
.arch.focus .arch-node { opacity: .38; }
.arch.focus .arch-node.lit { opacity: 1; color: var(--fg); border-color: var(--sig-graph); }
.arch.focus .arch-node.here { background: var(--sig-wash); color: var(--sig); }

.arch-readout {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  font-size: var(--step--1); color: var(--fg-2);
  min-height: 48px; text-wrap: pretty;
}
.arch-readout b { color: var(--sig); font-weight: 500; font-family: var(--mono); font-size: var(--step--2); letter-spacing: .02em; }

@media (max-width: 1100px) { .arch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .arch-grid { grid-template-columns: 1fr; } .arch-hint { display: none; } }

/* =========================== role tabs =========================== */
.role-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
  overflow-x: auto; scrollbar-width: none;
  scroll-margin-top: 90px;
}
.role-tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 12px 22px 12px 0; margin-right: 22px;
  border: 0; background: none; cursor: pointer; color: var(--fg-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.role-tab b {
  font-family: var(--display); font-weight: 600; font-size: var(--step-1);
  font-variation-settings: "wdth" 94, "opsz" 20; letter-spacing: -.02em;
}
.role-tab span { font-family: var(--mono); font-size: var(--step--2); letter-spacing: .04em; }
.role-tab:hover { color: var(--fg-2); }
.role-tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--sig-graph); }
.role-tab[aria-selected="true"] span { color: var(--sig); }
.roles.tabbed .role { border-top: 0; padding-top: clamp(22px, 3vw, 32px); }
.roles.tabbed .role[hidden] { display: none; }

/* =========================== show more =========================== */
.move.more-hidden { display: none; }
.more-btn {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 18px; padding: 9px 16px;
  font-family: var(--mono); font-size: var(--step--1);
  color: var(--fg-2); background: transparent;
  border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.more-btn:hover { color: var(--fg); border-color: var(--sig-graph); }
.more-btn i { font-style: normal; color: var(--sig); transition: transform .2s ease; }
.more-btn[aria-expanded="true"] i { transform: rotate(45deg); }

/* =========================== stack lookups =========================== */
.tier-v span.chip-live { cursor: default; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.tier-v span.chip-live:hover, .tier-v span.chip-live:focus-visible, .tier-v span.chip-live.lit {
  border-color: var(--sig-graph); color: var(--fg); background: var(--sig-wash); outline: none;
}
.stack-readout {
  margin: 0; padding: 16px 24px; min-height: 1.6em;
  background: var(--bg);
  font-family: var(--mono); font-size: var(--step--1); color: var(--fg-3);
}
.stack-readout b { color: var(--sig); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .arch-title i { animation: none; }
  .arch-wire, .arch-node, .role-tab, .more-btn i { transition: none; }
}
