/* edgar-roth.com: shared styles for the Crypto and Plain English versions (and the
   bar on the AI version). Loads after scrollcraft.css; the engine's file is untouched,
   everything site-specific lives here. */

/* ------------------------------------------------------------------ fonts -- */
@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(assets/fonts/fraunces-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(assets/fonts/source-serif-4-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4'; font-style: italic; font-weight: 400 600; font-display: swap;
  src: url(assets/fonts/source-serif-4-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------------------------------------------------------- the rebrand -- */
:root {
  --sc-canvas:      #f5f2eb;
  --sc-surface:     #fcfaf5;
  --sc-ink:         #191e1b;
  --sc-ink-soft:    #59635d;
  --sc-accent:      #1d5c48;
  --sc-accent-ink:  #f5f2eb;

  --sc-font-display: "Fraunces", Georgia, serif;
  --sc-font-text:    "Source Serif 4", Georgia, serif;

  --sc-shadow-color: 150 12% 8%;
  /* tighter air than the default floor: Edgar found v1 too zoomed in */
  --sc-section: clamp(3rem, 6vw, 6.5rem);
  --paper-2: #eeeae1;
  --dark:    #0b100e;
  --body-ink: #3c453f;
  --bar-h: 3.6rem;

  --t-hero: clamp(2.4rem, 1.6rem + 3.2vw, 4.6rem);
  --t-head: clamp(1.7rem, 1.2rem + 2vw, 3rem);
  --t-sub:  clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem);
}

.on-dark {
  --sc-canvas:   var(--dark);
  --sc-ink:      #efeae0;
  --sc-ink-soft: #a9b3ac;
  --sc-accent:   #8fc3ab;
  --sc-accent-ink: #0b100e;
  color: var(--sc-ink);
}

html { scroll-behavior: smooth; }
body { background: #f5f2eb; }
[id] { scroll-margin-top: var(--bar-h); }

/* Content must never depend on the engine. Without JS, or if scrollcraft.js
   fails to load (the html.sc-failed flag is set by the head script after 4 s),
   cues and reveals render settled. */
html:not(.js) [data-sc-cue], html.sc-failed [data-sc-cue],
html:not(.js) [data-sc-in], html.sc-failed [data-sc-in],
html:not(.js) [data-sc-stagger] > *, html.sc-failed [data-sc-stagger] > * { opacity: 1 !important; transform: none !important; }

.skip {
  position: absolute; left: 0.8rem; top: -3rem; z-index: 100;
  background: var(--sc-ink); color: var(--sc-canvas);
  padding: 0.5rem 0.9rem; border-radius: 6px; font-weight: 600; font-size: 0.85rem;
}
.skip:focus { top: 0.8rem; }
:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 3px; border-radius: 4px; }

.k-label {
  font-family: var(--sc-font-text);
  font-size: var(--sc-t-xs);
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--sc-ink-soft);
}
.k-accent { color: var(--sc-accent); }
a { transition: color var(--sc-d-fast) var(--sc-ease-out); }
a:hover { color: var(--sc-accent); }

h1, h2, h3 { font-family: var(--sc-font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; text-wrap: balance; margin: 0; }

/* -------------------------------------------------------------- top bar -- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: var(--sc-z-chrome);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: var(--bar-h);
  padding: 0 clamp(1.1rem, 3.5vw, 2.6rem);
  pointer-events: none;
  color: var(--bar-ink, #f0ece2);
  transition: color 300ms var(--sc-ease-out), background-color 300ms var(--sc-ease-out);
}
.bar a { pointer-events: auto; text-decoration: none; color: inherit; }
.bar__mark { font-family: var(--sc-font-display); font-weight: 600; font-size: 1.05rem; white-space: nowrap; }
.bar__links { display: flex; gap: clamp(0.9rem, 1.6vw, 1.6rem); align-items: center; list-style: none; margin: 0; padding: 0; }
.bar__links a { font-size: 0.85rem; font-weight: 600; opacity: 0.85; }
.bar__links a:hover { opacity: 1; color: inherit; }
.bar__links a.bar__cta {
  opacity: 1;
  border: 1px solid currentColor; border-radius: 999px;
  padding: 0.4rem 0.95rem;
}
.bar--ink { --bar-ink: #191e1b; }
/* Over paper the bar gets a frosted ground so the tabs never sit on body text. */
.bar--ink::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in oklab, #f5f2eb 82%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid rgba(25, 30, 27, 0.08);
}

/* Over the dark hero, once the page has moved, the bar gets a dark frosted ground
   too, so the big name never scrolls under the small one. */
.bar--scrolled:not(.bar--ink)::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(13, 17, 15, 0.74);
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid rgba(240, 236, 226, 0.08);
}

/* Without JS the bar never re-inks, so it keeps light text on a dark ground everywhere. */
html:not(.js) .bar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(13, 17, 15, 0.9);
}

/* --------------------------------------------------- version tabs (nav) -- */
.vtabs {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; border-radius: 999px;
  border: 1px solid color-mix(in oklab, currentColor 32%, transparent);
  background: color-mix(in oklab, currentColor 7%, transparent);
  list-style: none; margin: 0;
  view-transition-name: vtabs;
}
.vtabs a {
  display: block; white-space: nowrap;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.01em;
  padding: 0.34rem 0.85rem; border-radius: 999px;
  color: inherit; opacity: 0.78;
  transition: opacity 160ms var(--sc-ease-out), background-color 200ms var(--sc-ease-out), color 200ms var(--sc-ease-out);
}
.vtabs a:hover { opacity: 1; color: inherit; }
.vtabs a[aria-current="page"] {
  opacity: 1;
  background: var(--bar-ink, #f0ece2);
  color: #0b100e;
}
.bar--ink .vtabs a[aria-current="page"] { color: #f5f2eb; }
.vtabs__short { display: none; }

@media (max-width: 1180px) {
  .bar__links li.bar__sec { display: none; }
}
@media (max-width: 860px) {
  .bar__links { display: none; }
  /* the tabs become a floating pill, thumb height, clear of the iOS toolbar */
  .vtabs {
    position: fixed; z-index: var(--sc-z-chrome);
    left: 50%; translate: -50% 0;
    bottom: calc(0.9rem + env(safe-area-inset-bottom, 0px));
    color: #f0ece2;
    background: rgba(11, 16, 14, 0.82);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-color: rgba(240, 236, 226, 0.18);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
  }
  .vtabs a { font-size: 0.78rem; padding: 0.5rem 0.8rem; }
  .vtabs a[aria-current="page"] { background: #f0ece2; color: #0b100e !important; }
  .vtabs__long { display: none; }
  .vtabs__short { display: inline; }
  .bar { justify-content: flex-start; }
  .bar__cta-m { display: inline-block !important; margin-left: auto; }
}
.bar__cta-m {
  display: none; pointer-events: auto;
  font-size: 0.8rem; font-weight: 600;
  border: 1px solid currentColor; border-radius: 999px; padding: 0.32rem 0.8rem;
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: vt-out 220ms cubic-bezier(0.4, 0, 1, 1) both; }
  ::view-transition-new(root) { animation: vt-in 320ms cubic-bezier(0.23, 1, 0.32, 1) both; }
  ::view-transition-group(vtabs) { animation-duration: 260ms; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* ----------------------------------------------------------------- hero -- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  overflow: clip;
  background: #0d110f;
}
.hero__media {
  position: absolute; inset: 0 0 0 auto; width: 72%;
}
.hero__media img, .hero__media video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 30%;
}
.hero__media video { opacity: 0; transition: opacity 900ms var(--sc-ease-out); }
.hero__media video.is-playing { opacity: 1; }
.hero__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, #0d110f 0%, #0d110f 28%, rgba(13,17,15,0.86) 40%, rgba(13,17,15,0.35) 56%, transparent 70%),
    linear-gradient(to bottom, rgba(6,9,8,0.55), transparent 22%),
    linear-gradient(to top, rgba(6,9,8,0.94) 0%, rgba(6,9,8,0.55) 30%, rgba(6,9,8,0.05) 58%, transparent 70%);
}
.hero__inner {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--sc-maxw); margin-inline: auto;
  padding: 6rem var(--sc-gutter) clamp(1.6rem, 4vh, 3rem);
}
.hero__copy { max-width: 40rem; }
.hero__avail { color: #a9d8c2; display: inline-flex; align-items: center; gap: 0.5rem; }
.hero__avail::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #a9d8c2; box-shadow: 0 0 0 0 rgba(169,216,194,0.6); animation: avail 2.6s ease-out infinite; }
@keyframes avail { 0% { box-shadow: 0 0 0 0 rgba(169,216,194,0.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(169,216,194,0); } }
.hero h1 { font-size: var(--t-hero); color: #f4f0e6; margin: 0.5rem 0 0.45rem; }
.hero__role {
  font-family: var(--sc-font-display); font-weight: 500;
  font-size: var(--t-sub); color: #e6e1d5; margin: 0 0 0.25rem; line-height: 1.3;
}
.hero__role .dot { color: #6f8f80; padding-inline: 0.15em; }
.hero__domain {
  font-family: var(--sc-font-display); font-weight: 500; font-style: normal;
  font-size: var(--t-sub); color: #a9d8c2; margin: 0 0 0.9rem;
}
.hero__sub { font-size: clamp(0.98rem, 0.9rem + 0.35vw, 1.12rem); line-height: 1.58; color: #d6d1c5; max-width: 54ch; margin: 0; text-wrap: pretty; }
.hero__actions { display: flex; gap: 1.4rem; align-items: center; margin-top: 1.15rem; flex-wrap: wrap; }
.hero__actions a { font-weight: 600; font-size: 0.95rem; }
.hero__actions a.act-primary {
  color: #0b100e; background: #e9e4d7;
  border-radius: 999px; padding: 0.6rem 1.25rem; text-decoration: none;
}
.hero__actions a.act-primary:hover { background: #fff; color: #0b100e; }
.hero__actions a.act-secondary { color: #ddd8cc; text-underline-offset: 0.28em; }
.hero__facts {
  display: flex; gap: clamp(1.4rem, 4vw, 3.5rem); flex-wrap: wrap;
  margin-top: clamp(1rem, 2.5vh, 1.8rem);
  padding-top: clamp(0.8rem, 2vh, 1.2rem);
  border-top: 1px solid rgba(240,236,226,0.22);
}
.hero__facts .num {
  font-family: var(--sc-font-display); font-weight: 600;
  font-size: clamp(1.3rem, 1rem + 1.2vw, 2rem); color: #f4f0e6; line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.hero__facts .lbl { font-size: 0.8rem; color: #c9c4b8; margin-top: 1px; max-width: 24ch; }
.hero__foot {
  display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap;
  margin-top: clamp(0.9rem, 2.2vh, 1.4rem);
  font-size: 0.78rem; color: #a3ab9f;
}
.hero__foot a { color: #d6d1c5; font-weight: 600; text-underline-offset: 0.25em; }
.hero__pause {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font: 600 0.74rem/1 var(--sc-font-text); letter-spacing: 0.06em; text-transform: uppercase;
  color: #d6d1c5; background: rgba(240,236,226,0.08);
  border: 1px solid rgba(240,236,226,0.3); border-radius: 999px;
  padding: 0.38rem 0.7rem; cursor: pointer;
}
.hero__pause:hover { background: rgba(240,236,226,0.16); }
.hero__pause[hidden] { display: none; }
.hero__pause svg { width: 10px; height: 10px; fill: currentColor; }

/* ---------------------------------------------------------- story beats -- */
.beats { background: var(--sc-canvas); }
.beat {
  max-width: var(--sc-maxw); margin-inline: auto;
  padding: clamp(2.6rem, 7vh, 5rem) var(--sc-gutter);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.6rem, 4vw, 4rem); align-items: center;
}
.beat h2 { font-size: var(--t-head); max-width: 18ch; }
.beat p { color: var(--body-ink); max-width: 58ch; margin: 1rem 0 0; text-wrap: pretty; line-height: 1.7; }
.beat p a { color: var(--sc-accent); font-weight: 600; }
.beat figure { margin: 0; }
.beat figure img {
  width: 100%; height: auto; max-height: 66svh; object-fit: cover;
  border-radius: 12px; box-shadow: var(--sc-e3);
}
.beat figcaption { margin-top: 0.5rem; font-size: 0.78rem; color: var(--sc-ink-soft); }
.beat:nth-child(odd) figure:not(.ag-b) { transform: rotate(0.8deg); }
.beat:nth-child(even) figure:not(.ag-b) { transform: rotate(-0.8deg); }
.beat--portrait figure { max-width: 21rem; justify-self: center; }

/* beat 5: the AI diagram, "light path" (tools -> Claude Code -> projects, GitHub beneath).
   Chosen 3 Oct 2026 from three motion concepts; source in _build/anim/option-b.*. */
/* Option B: "Light path". One horizontal flow, tools -> Claude Code -> projects, with a quiet git
   branch beneath. Everything scoped under .ag-b; keyframes are prefixed agb-. 8 s seamless loop.
   Only transform, opacity and stroke-dashoffset are animated. */

.ag-b {
  margin: 0;
  width: 100%;
  max-width: 470px;
  background: #121815;
  background-image: radial-gradient(120% 90% at 50% 0%, #182119 0%, #121815 62%);
  border-radius: 14px;
  box-shadow: 0 22px 44px -22px rgba(11, 16, 14, 0.55), 0 2px 6px rgba(11, 16, 14, 0.16);
  overflow: hidden;
  container-type: inline-size;
}
.ag-b .ag-b__svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 470 / 304;
  overflow: visible;
}

/* ---------- type ---------- */
.ag-b .ag-b__col {
  font: 600 10.5px "Source Serif 4", Georgia, serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  fill: #8fc3ab;
  opacity: 0.78;
}
.ag-b .ag-b__label {
  font: 400 15.25px "Source Serif 4", Georgia, serif;
  fill: #a9b3ac;
}
.ag-b .ag-b__label--lit {
  fill: #f2eee5;
  opacity: 0;
}
.ag-b .ag-b__hubtext {
  font: 600 15.25px "Fraunces", Georgia, serif;
  fill: #f2eee5;
}
.ag-b .ag-b__gh {
  font: 500 15.25px "Fraunces", Georgia, serif;
  fill: #a9b3ac;
}
.ag-b .ag-b__gh--lit {
  fill: #f2eee5;
  opacity: 0;
}
/* On a phone-width card the micro-caps scale down too far; let them grow with the card. */
@container (max-width: 400px) {
  .ag-b .ag-b__col { font-size: 15.2px; letter-spacing: 0.11em; }
}

/* ---------- static drawing ---------- */
.ag-b .ag-b__rail {
  fill: none;
  stroke: rgba(143, 195, 171, 0.3);
  stroke-width: 1.1;
  stroke-linecap: round;
}
.ag-b .ag-b__pill {
  fill: #17201b;
  stroke: rgba(143, 195, 171, 0.5);
  stroke-width: 1.1;
}
.ag-b .ag-b__pill-lit {
  fill: none;
  stroke: #a9d8c2;
  stroke-width: 1.2;
  opacity: 0;
}
.ag-b .ag-b__halo {
  fill: #8fc3ab;
  opacity: 0.09;
  filter: url(#agb-soft);
}
.ag-b .ag-b__dot {
  fill: rgba(143, 195, 171, 0.55);
}
.ag-b .ag-b__dot--lit {
  fill: #a9d8c2;
  opacity: 0;
}
.ag-b .ag-b__ripple {
  fill: #a9d8c2;
  opacity: 0;
  transform: scale(0.3);
  transform-box: fill-box;
  transform-origin: center;
}
.ag-b .ag-b__commit {
  fill: #8fc3ab;
}
.ag-b .ag-b__commit--new {
  fill: #a9d8c2;
  opacity: 0;
  transform: scale(0.2);
  transform-box: fill-box;
  transform-origin: center;
}

/* ---------- travelling light: three layers share one head, tails trail behind ---------- */
.ag-b .ag-b__lt {
  fill: none;
  stroke-linecap: round;
}
.ag-b .ag-b__lt--tail { stroke: #8fc3ab; stroke-width: 1.5; opacity: 0.42; stroke-dasharray: 22 400; stroke-dashoffset: 24; }
.ag-b .ag-b__lt--core { stroke: #a9d8c2; stroke-width: 2;   opacity: 0.95; stroke-dasharray: 6 400;  stroke-dashoffset: 8; }
.ag-b .ag-b__lt--head { stroke: #f2eee5; stroke-width: 2.3; opacity: 1;    stroke-dasharray: 2 400;  stroke-dashoffset: 4; }

/* ---------- choreography (one 8 s timeline; 1% = 80 ms) ---------- */
.ag-b .ag-b__a .ag-b__lt--tail,
.ag-b .ag-b__a.ag-b__lt--tail { animation: agb-run-a-tail 8s cubic-bezier(0.5, 0, 0.2, 1) infinite; }
.ag-b .ag-b__a.ag-b__lt--core { animation: agb-run-a-core 8s cubic-bezier(0.5, 0, 0.2, 1) infinite; }
.ag-b .ag-b__a.ag-b__lt--head { animation: agb-run-a-head 8s cubic-bezier(0.5, 0, 0.2, 1) infinite; }
.ag-b .ag-b__b.ag-b__lt--tail { animation: agb-run-b-tail 8s cubic-bezier(0.5, 0, 0.2, 1) infinite; }
.ag-b .ag-b__b.ag-b__lt--core { animation: agb-run-b-core 8s cubic-bezier(0.5, 0, 0.2, 1) infinite; }
.ag-b .ag-b__b.ag-b__lt--head { animation: agb-run-b-head 8s cubic-bezier(0.5, 0, 0.2, 1) infinite; }
.ag-b .ag-b__c.ag-b__lt--tail { animation: agb-run-c-tail 8s cubic-bezier(0.5, 0, 0.2, 1) infinite; }
.ag-b .ag-b__c.ag-b__lt--core { animation: agb-run-c-core 8s cubic-bezier(0.5, 0, 0.2, 1) infinite; }
.ag-b .ag-b__c.ag-b__lt--head { animation: agb-run-c-head 8s cubic-bezier(0.5, 0, 0.2, 1) infinite; }

/* stagger: the three tool lights leave 0.1 s apart, the four branch lights 0.09 s apart */
.ag-b .ag-b__d1 { animation-delay: 0s; }
.ag-b .ag-b__d2 { animation-delay: 0.1s; }
.ag-b .ag-b__d3 { animation-delay: 0.2s; }
.ag-b .ag-b__e1 { animation-delay: 0s; }
.ag-b .ag-b__e2 { animation-delay: 0.09s; }
.ag-b .ag-b__e3 { animation-delay: 0.18s; }
.ag-b .ag-b__e4 { animation-delay: 0.27s; }

.ag-b .ag-b__tool-lit   { animation: agb-lit-tool 8s ease-in-out infinite; }
.ag-b .ag-b__pill-lit   { animation: agb-pill-lit 8s ease-in-out infinite; }
.ag-b .ag-b__halo       { animation: agb-halo 8s ease-in-out infinite; }
.ag-b .ag-b__proj-lit   { animation: agb-lit-proj 8s ease-in-out infinite; }
.ag-b .ag-b__dot--lit   { animation: agb-lit-proj 8s ease-in-out infinite; }
.ag-b .ag-b__ripple--p  { animation: agb-ripple-p 8s cubic-bezier(0.2, 0.6, 0.3, 1) infinite; }
.ag-b .ag-b__ripple--g  { animation: agb-ripple-g 8s cubic-bezier(0.2, 0.6, 0.3, 1) infinite; }
.ag-b .ag-b__commit--new { animation: agb-commit 8s cubic-bezier(0.3, 0, 0.2, 1) infinite; }
.ag-b .ag-b__gh--lit    { animation: agb-lit-gh 8s ease-in-out infinite; }
.ag-b .ag-b__commits    { animation: agb-slide 8s cubic-bezier(0.65, 0, 0.25, 1) infinite; }

/* travel windows: a = tools -> hub (0 to 1.28 s), b = hub -> projects (2.16 to 3.6 s), c = git branch (4 to 5.28 s).
   The gap (400) is longer than the whole trip so the pattern never wraps; the offset runs from L+2 to L-122 so the
   heads of the three layers stay aligned and the round caps are hidden off both ends of the path. */
@keyframes agb-run-a-tail { 0% { stroke-dashoffset: 24; } 16% { stroke-dashoffset: -100; } 100% { stroke-dashoffset: -100; } }
@keyframes agb-run-a-core { 0% { stroke-dashoffset: 8; }  16% { stroke-dashoffset: -116; } 100% { stroke-dashoffset: -116; } }
@keyframes agb-run-a-head { 0% { stroke-dashoffset: 4; }  16% { stroke-dashoffset: -120; } 100% { stroke-dashoffset: -120; } }
@keyframes agb-run-b-tail { 0%, 27% { stroke-dashoffset: 24; } 45% { stroke-dashoffset: -100; } 100% { stroke-dashoffset: -100; } }
@keyframes agb-run-b-core { 0%, 27% { stroke-dashoffset: 8; }  45% { stroke-dashoffset: -116; } 100% { stroke-dashoffset: -116; } }
@keyframes agb-run-b-head { 0%, 27% { stroke-dashoffset: 4; }  45% { stroke-dashoffset: -120; } 100% { stroke-dashoffset: -120; } }
@keyframes agb-run-c-tail { 0%, 50% { stroke-dashoffset: 24; } 66% { stroke-dashoffset: -100; } 100% { stroke-dashoffset: -100; } }
@keyframes agb-run-c-core { 0%, 50% { stroke-dashoffset: 8; }  66% { stroke-dashoffset: -116; } 100% { stroke-dashoffset: -116; } }
@keyframes agb-run-c-head { 0%, 50% { stroke-dashoffset: 4; }  66% { stroke-dashoffset: -120; } 100% { stroke-dashoffset: -120; } }

@keyframes agb-lit-tool { 0% { opacity: 0; } 3% { opacity: 1; } 11% { opacity: 1; } 19% { opacity: 0; } 100% { opacity: 0; } }
@keyframes agb-pill-lit { 0%, 15% { opacity: 0; } 19% { opacity: 1; } 42% { opacity: 1; } 56% { opacity: 0; } 100% { opacity: 0; } }
@keyframes agb-halo { 0%, 14% { opacity: 0.09; } 20% { opacity: 0.46; } 34% { opacity: 0.17; } 60% { opacity: 0.09; } 80% { opacity: 0.13; } 100% { opacity: 0.09; } }
@keyframes agb-lit-proj { 0%, 43% { opacity: 0; } 47% { opacity: 1; } 66% { opacity: 1; } 78% { opacity: 0; } 100% { opacity: 0; } }
@keyframes agb-ripple-p {
  0%, 43.5% { opacity: 0; transform: scale(0.3); }
  45.5% { opacity: 0.5; transform: scale(0.45); }
  55% { opacity: 0; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}
@keyframes agb-ripple-g {
  0%, 65.5% { opacity: 0; transform: scale(0.3); }
  67.5% { opacity: 0.5; transform: scale(0.45); }
  78% { opacity: 0; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}
@keyframes agb-commit {
  0%, 65.9% { opacity: 0; transform: scale(0.2); }
  66% { opacity: 1; transform: scale(0.2); }
  70% { opacity: 1; transform: scale(1.35); }
  75% { opacity: 1; transform: scale(1); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes agb-lit-gh { 0%, 65% { opacity: 0; } 69% { opacity: 1; } 84% { opacity: 1; } 96% { opacity: 0; } 100% { opacity: 0; } }
@keyframes agb-slide { 0%, 78% { transform: translateX(0); } 96% { transform: translateX(-30px); } 100% { transform: translateX(-30px); } }

/* ---------- reduced motion: the complete, resting picture ---------- */
@media (prefers-reduced-motion: reduce) {
  .ag-b * { animation: none !important; }
  .ag-b .ag-b__pill-lit { opacity: 0.55; }
  .ag-b .ag-b__halo { opacity: 0.14; }
  .ag-b .ag-b__commit--new { opacity: 1; transform: none; }
  .ag-b .ag-b__ripple { opacity: 0; }
}

.cred {
  max-width: var(--sc-maxw); margin-inline: auto;
  padding: clamp(2rem, 5vh, 3.5rem) var(--sc-gutter) clamp(2.6rem, 7vh, 5rem);
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1.6rem;
  border-top: 1px solid var(--sc-hairline);
}
.cred .k-label { color: var(--sc-accent); }
.cred p { font-size: 0.86rem; color: var(--sc-ink-soft); margin: 0.4rem 0 0; text-wrap: pretty; }

/* -------------------------------------------------- the wall of stages -- */
.wall {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: clamp(90px, 15vw, 200px);
  gap: 6px;
  padding-inline: 6px;
  margin-block: clamp(1.2rem, 3vh, 2rem);
}
.wall figure { margin: 0; overflow: hidden; border-radius: 6px; }
.wall img { width: 100%; height: 100%; object-fit: cover; display: block; }
.w-c img { object-position: 50% 18%; }
.w-a { grid-area: 1 / 1 / 3 / 6; }
.w-b { grid-area: 1 / 6 / 2 / 9; }
.w-c { grid-area: 1 / 9 / 2 / 11; }
.w-d { grid-area: 1 / 11 / 2 / 13; }
.w-e { grid-area: 2 / 6 / 3 / 10; }
.w-f { grid-area: 2 / 10 / 3 / 13; }
.w-g { grid-area: 3 / 1 / 4 / 4; }
.w-h { grid-area: 3 / 4 / 4 / 8; }
.w-i { grid-area: 3 / 8 / 4 / 11; }
.w-j { grid-area: 3 / 11 / 4 / 13; }
.w-k { grid-area: 4 / 1 / 5 / 5; }
.w-l { grid-area: 4 / 5 / 5 / 8; }
.w-m { grid-area: 4 / 8 / 5 / 11; }
.w-n { grid-area: 4 / 11 / 5 / 13; }
@media (max-width: 900px) {
  .wall { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 30vw; }
  .wall figure { grid-area: auto; }
  .wall .w-a, .wall .w-h, .wall .w-k { grid-column: span 2; }
}

/* ---------------------------------------------------- the speaking map -- */
.atlas {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(1.4rem, 4vw, 3.5rem); align-items: center;
  margin: clamp(0.6rem, 2vh, 1.4rem) 0 clamp(1.6rem, 4vh, 2.6rem);
}
.map { width: 100%; height: auto; display: block; overflow: visible; }
.map__land { fill: none; stroke: color-mix(in oklab, var(--sc-ink) 30%, transparent); stroke-width: 3.4; stroke-linecap: round; }
.map__pin text { font-family: var(--sc-font-text); font-size: 21px; font-weight: 600; fill: var(--sc-ink); paint-order: stroke; stroke: var(--paper-2); stroke-width: 4px; stroke-linejoin: round; }
.map__dot { fill: var(--sc-accent); stroke: var(--paper-2); stroke-width: 2; }
.map__pulse { fill: none; stroke: var(--sc-accent); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.map__pin { opacity: 0; transition: opacity 500ms var(--sc-ease-out); transition-delay: calc(var(--i) * 180ms); }
.atlas.sc-in .map__pin, html:not(.js) .map__pin, html.sc-failed .map__pin { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .atlas.sc-in .map__pulse { animation: ping 2.8s ease-out infinite; animation-delay: calc(0.9s + var(--i) * 180ms); }
}
@keyframes ping { 0% { opacity: 0.7; scale: 1; } 100% { opacity: 0; scale: 3.4; } }
.atlas__stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0.4rem clamp(1.2rem, 3vw, 2.2rem); margin-bottom: 1.1rem; }
.atlas__stats .num { font-family: var(--sc-font-display); font-weight: 600; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.atlas__stats .lbl { font-size: 0.78rem; color: var(--sc-ink-soft); margin-top: 0.25rem; }
.atlas p { font-size: 0.92rem; color: var(--sc-ink-soft); margin: 0; max-width: 46ch; text-wrap: pretty; line-height: 1.65; }

/* ----------------------------------------------------- speaking, on paper */
.section-head { display: flex; align-items: center; gap: 1rem; margin-bottom: clamp(1.6rem, 4vh, 2.6rem); }
.section-head .sc-rule { flex: 0 0 3rem; background: var(--sc-hairline-strong); }
.section-head h2 { font-size: var(--t-head); }
.wrap { max-width: var(--sc-maxw); margin-inline: auto; padding-inline: var(--sc-gutter); }

#speaking { background: var(--paper-2); padding-block: var(--sc-section); }

.program { margin-top: clamp(1rem, 3vh, 2rem); }
.program-row {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1.7fr) minmax(0, 1fr) auto;
  gap: 1.2rem; align-items: baseline;
  padding-block: 0.95rem;
  border-top: 1px solid var(--sc-hairline-strong);
  text-decoration: none;
}
.program-row:last-child { border-bottom: 1px solid var(--sc-hairline-strong); }
.program-row .pr-type { color: var(--sc-accent); }
.program-row .pr-title { font-family: var(--sc-font-display); font-weight: 500; font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem); line-height: 1.3; color: var(--sc-ink); }
.program-row .pr-gloss { display: block; font-family: var(--sc-font-text); font-size: 0.84rem; font-weight: 400; color: var(--sc-ink-soft); margin-top: 0.3rem; line-height: 1.5; }
.program-row .pr-meta { color: var(--sc-ink-soft); font-size: 0.85rem; }
.program-row .pr-watch { font-size: 0.82rem; font-weight: 600; color: var(--sc-ink-soft); white-space: nowrap; }
.program-row:hover .pr-title, .program-row:hover .pr-watch { color: var(--sc-accent); }

.pods { margin-top: clamp(2rem, 5vh, 3.2rem); display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
.pod { padding: 0 1.6rem; border-left: 1px solid var(--sc-hairline-strong); }
.pod:first-child { border-left: 0; padding-left: 0; }
.pod img { width: 100%; height: auto; border-radius: 8px; box-shadow: var(--sc-e1); margin-bottom: 0.9rem; }
.pod h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.pod .pod-meta { margin-bottom: 0.7rem; }
.pod p { color: var(--sc-ink-soft); font-size: 0.88rem; margin: 0 0 0.7rem; text-wrap: pretty; }
.pod .pod-eps { color: var(--sc-ink); font-size: 0.82rem; font-weight: 600; }
.pod a { font-size: 0.84rem; font-weight: 600; color: var(--sc-accent); }

/* ------------------------------------------------------------ experience -- */
#experience { background: var(--sc-surface); border-top: 1px solid var(--sc-hairline); padding-block: var(--sc-section); }

/* the career band: custody -> yield -> collateral, drawn as the reader arrives */
.stack { position: relative; margin: 0 0 clamp(2rem, 5vh, 3.4rem); }
.stack__intro { color: var(--body-ink); max-width: 64ch; font-size: 0.98rem; line-height: 1.7; margin: 0 0 clamp(1.4rem, 3.5vh, 2.2rem); text-wrap: pretty; }
.stack__rail { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); }
.stack__line { position: absolute; left: 23px; right: 0; top: 22px; height: 2px; pointer-events: none; background: var(--sc-hairline-strong); }
.stack__line::after {
  content: ""; position: absolute; inset: 0; background: var(--sc-accent);
  transform-origin: 0 0; transform: scaleX(clamp(0, (var(--sc-p, 1) - 0.16) * 2.8, 1));
}
.step { position: relative; }
.step__node {
  position: relative; z-index: 1;
  width: 46px; height: 46px; border-radius: 12px;
  background: #fff; border: 1px solid var(--sc-hairline-strong); box-shadow: var(--sc-e1);
  display: grid; place-items: center; margin-bottom: 1rem;
}
.step__node img { width: 30px; height: 30px; object-fit: contain; }
.step .k-label { color: var(--sc-accent); display: block; margin-bottom: 0.35rem; }
.step h3 { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem); margin-bottom: 0.4rem; }
.step__co { font-weight: 600; color: var(--sc-ink); font-size: 0.92rem; }
.step__yrs { color: var(--sc-ink-soft); font-size: 0.85rem; }
.step p { color: var(--sc-ink-soft); font-size: 0.88rem; margin: 0.45rem 0 0; text-wrap: pretty; line-height: 1.6; }
.stack__pre { margin-top: 1.2rem; font-size: 0.82rem; color: var(--sc-ink-soft); }
.stack__pre strong { color: var(--sc-ink); font-weight: 600; }

.role {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  gap: clamp(1.4rem, 3vw, 2.6rem);
  padding-block: clamp(1.8rem, 4.5vh, 3rem);
  border-top: 1px solid var(--sc-hairline-strong);
}
.role-meta { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; }
.role-meta img {
  width: 44px; height: 44px; object-fit: contain;
  background: #fff; border: 1px solid var(--sc-hairline);
  border-radius: 8px; padding: 6px; box-shadow: var(--sc-e1);
}
.role-company { font-family: var(--sc-font-display); font-weight: 600; font-size: 1.15rem; }
.role-sub { font-size: 0.85rem; color: var(--sc-ink-soft); }
.role-period { color: var(--sc-accent); }
.role-body h3 { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem); font-weight: 500; margin-bottom: 0.8rem; max-width: 30ch; }
.role-body > p { color: var(--body-ink); max-width: 68ch; margin: 0 0 0.8rem; font-size: 0.95rem; }
.role-body ul { margin: 0; padding-left: 1.05rem; max-width: 68ch; }
.role-body li { margin-bottom: 0.55rem; color: var(--body-ink); font-size: 0.92rem; line-height: 1.62; }
.role-body li::marker { color: var(--sc-accent); }
.role-body strong { color: var(--sc-ink); }
.role-body a { color: var(--sc-accent); font-weight: 600; }
.role-tags { margin-top: 0.9rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--sc-ink-soft); }

/* ------------------------------------------------------------ highlights -- */
#highlights { background: var(--paper-2); border-top: 1px solid var(--sc-hairline); padding-block: var(--sc-section); }
.plate {
  background: #171c19; color: #efeae0;
  border-radius: 12px;
  padding: clamp(1.6rem, 4vw, 3rem);
  box-shadow: var(--sc-e3);
  margin-bottom: clamp(1.8rem, 4.5vh, 3rem);
}
.plate h3 { font-size: clamp(1.4rem, 1.1rem + 1.3vw, 2.2rem); line-height: 1.1; margin: 0.5rem 0 0.8rem; max-width: 24ch; }
.plate p { color: #c9c4b9; max-width: 72ch; margin: 0; font-size: 0.95rem; text-wrap: pretty; }
.plate .k-label { color: #8fc3ab; }
.plate p.plate__link { margin-top: 0.9rem; }
.plate a { color: #a9d8c2; font-weight: 600; text-underline-offset: 0.22em; }
.plate a:hover { color: #f2eee5; }
/* Nexus card: text left, Nexus Mutual's announcement graphic right; stacks under 900px */
.plate--media { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(1.6rem, 4vw, 3.2rem); align-items: center; }
.plate__media { display: block; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px rgba(239, 234, 224, 0.10), 0 18px 40px -18px rgba(0, 0, 0, 0.6); }
.plate__media img { display: block; width: 100%; height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .plate__media { transition: transform 0.4s ease, box-shadow 0.4s ease; }
  .plate__media:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(169, 216, 194, 0.35), 0 22px 44px -18px rgba(0, 0, 0, 0.65); }
}
@media (max-width: 900px) { .plate--media { grid-template-columns: 1fr; } .plate__media { max-width: 560px; } }
.proof-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 clamp(1.6rem, 4vw, 3.5rem); }
.proof { padding-block: 1.2rem; border-top: 1px solid var(--sc-hairline-strong); }
.proof h3 { font-size: 1.1rem; margin-bottom: 0.45rem; }
.proof p { color: var(--sc-ink-soft); font-size: 0.88rem; margin: 0 0 0.5rem; text-wrap: pretty; }
.proof .k-label { font-size: 0.62rem; }
.proof a { color: var(--sc-accent); font-weight: 600; }

/* ------------------------------------------------------------------- now -- */
#now { background: var(--sc-surface); border-top: 1px solid var(--sc-hairline); padding-block: var(--sc-section); }
.now-intro { color: var(--body-ink); max-width: 68ch; font-size: 0.95rem; margin: 0 0 clamp(1.4rem, 3.5vh, 2.2rem); text-wrap: pretty; }
.now-tags { margin-top: 1.4rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--sc-ink-soft); }

/* ---------------------------------------------------------------- skills -- */
#skills { background: var(--paper-2); border-top: 1px solid var(--sc-hairline); padding-block: var(--sc-section); }
.skill-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.4rem clamp(1.6rem, 4vw, 3.5rem); }
.skill-group p { margin: 0.3rem 0 0; line-height: 1.85; color: var(--sc-ink-soft); font-size: 0.9rem; }
.skill-group .s-strong { color: var(--sc-ink); font-weight: 600; }
.skill-sep { color: color-mix(in oklab, var(--sc-ink) 25%, transparent); padding-inline: 0.3em; }

/* ----------------------------------------------------------------- close -- */
.close {
  position: relative; min-height: 88svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: clip;
  background: var(--dark);
}
.close img.close__photo { position: absolute; inset: -4% 0; width: 100%; height: 108%; object-fit: cover; }
.close__shade { position: absolute; inset: 0; background: rgba(6,9,8,0.45); }
.close__inner { position: relative; z-index: 2; padding: 5rem var(--sc-gutter); max-width: 46rem; }
.close h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.6rem); color: #f4f0e6; }
.close p.close-sub { color: #d5d0c4; max-width: 52ch; margin: 0.9rem auto 1.6rem; text-wrap: pretty; }
.close a.mail {
  display: inline-block;
  font-family: var(--sc-font-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.2rem, 1rem + 1.4vw, 2rem);
  color: #f4f0e6;
  text-decoration-color: rgba(143,195,171,0.5);
  text-underline-offset: 0.18em; text-decoration-thickness: 1.5px;
  overflow-wrap: anywhere;
}
.close a.mail:hover { color: #a9d8c2; }
.close__links { display: flex; gap: 1.6rem; justify-content: center; margin-top: 1.3rem; flex-wrap: wrap; }
.close__links a { font-size: 0.88rem; font-weight: 600; color: #d5d0c4; }

footer {
  background: var(--dark); color: #8b968f;
  font-size: 0.78rem;
  padding: 1.1rem var(--sc-gutter) calc(1.1rem + env(safe-area-inset-bottom, 0px));
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid rgba(239,234,224,0.1);
}
footer a { color: #b9c2bb; }

/* ------------------------------------------------- the on-air lamp ------ */
.lamp {
  position: fixed; left: 1.1rem; bottom: 1rem; z-index: var(--sc-z-chrome);
  display: flex; align-items: center; gap: 0.55rem;
  pointer-events: none;
  font-family: var(--sc-font-text);
  font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--lamp-ink, #7a847d);
  transition: color 400ms var(--sc-ease-out), opacity 300ms var(--sc-ease-out);
}
.lamp--hidden { opacity: 0; }
.lamp__dot {
  width: 7px; height: 7px; border-radius: 50%;
  border: 1.5px solid currentColor; background: transparent;
  transition: background 400ms var(--sc-ease-out), border-color 400ms var(--sc-ease-out);
}
.lamp__wave { display: flex; align-items: center; gap: 2px; height: 11px; }
.lamp__wave i {
  width: 2px; height: 100%; border-radius: 1px;
  background: currentColor;
  transform: scaleY(0.18); transform-origin: center;
  transition: transform 120ms linear;
}
.lamp--on { --lamp-ink: #2c7a61; }
.lamp--on .lamp__dot { background: #2c7a61; border-color: #2c7a61; }
.lamp--dark.lamp--on { --lamp-ink: #8fc3ab; }
.lamp--dark.lamp--on .lamp__dot { background: #8fc3ab; border-color: #8fc3ab; }
.lamp--after .lamp__dot { background: currentColor; border-color: currentColor; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .beat, .role, .proof-grid, .skill-grid, .atlas { grid-template-columns: 1fr; }
  .beat figure { order: -1; }
  .beat figure.ag-b { order: 0; max-width: none; }
  .beat--portrait figure { justify-self: start; max-width: 16rem; }
  .cred { grid-template-columns: 1fr 1fr; gap: 1.2rem; }
  .program-row { grid-template-columns: 1fr; gap: 0.15rem; padding-block: 0.85rem; }
  .pods { display: block; }
  .pod { border-left: 0; padding: 0 0 1.6rem; }
  .role-meta { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .stack__rail { grid-template-columns: 1fr; gap: 1.6rem; padding-left: 64px; }
  .stack__line { left: 22px; right: auto; top: 23px; bottom: 0; width: 2px; height: auto; }
  .stack__line::after { transform: scaleY(clamp(0, (var(--sc-p, 1) - 0.1) * 2.2, 1)); }
  .step__node { position: absolute; left: -64px; top: 0; }
  .hero { display: block; min-height: 0; }
  .hero__media { position: relative; inset: auto; width: 100%; height: min(64svh, 150vw); }
  .hero__media::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
      linear-gradient(to bottom, rgba(6,9,8,0.55), transparent 22%),
      linear-gradient(to top, #0d110f 0%, rgba(13,17,15,0.82) 18%, transparent 46%);
  }
  .hero__shade { display: none; }
  .hero__inner { margin-top: -5.5rem; padding-top: 0; padding-bottom: calc(5.4rem + env(safe-area-inset-bottom, 0px)); }
  .section-head { flex-wrap: wrap; gap: 0.5rem 1rem; }
  .section-head h2 { flex-basis: 100%; }
  .map__pin text { font-size: 40px; stroke-width: 7px; }
  .map__dot { r: 9; stroke-width: 3.5; }
  .map__pulse { r: 10; stroke-width: 3; }
  .map__land { stroke-width: 3.8; }
  .lamp { display: none; }
  footer { padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 520px) {
  .hero__facts { gap: 1.1rem 1.6rem; }
  .hero__facts > div { flex: 1 1 40%; }
  .atlas__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
