:root {
  --bg: #f2f0ec;
  --bg-soft: #f8f6f1;
  --surface: #ece8e0;
  --surface-glass: rgba(248, 246, 241, 0.76);
  --ink: #141414;
  --ink-soft: #2a2927;
  --muted: #77736d;
  --muted-2: #a5a09a;
  --line: #d7d2ca;
  --line-soft: rgba(20, 20, 20, 0.08);
  --accent: #d94135;
  --accent-soft: #f1d8d4;
  --success: #6f8d62;
  --warning: #d4a048;
  --sev-none: #a5a09a;
  --sev-low: #6f8d62;
  --sev-medium: #cf9a3f;
  --sev-high: #d3742f;
  --sev-critical: #c1497c;
  --sev-exceptional: #d94135;
  --terminal: #171615;
  --terminal-text: #f2f0ec;
  --terminal-muted: rgba(242, 240, 236, 0.74);
  --body-bg: radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.9), rgba(242, 240, 236, 0.86) 42%, var(--bg) 100%);
  --grain-dot: rgba(20, 20, 20, 0.1);
  --grain-opacity: 0.18;
  --grain-blend: multiply;
  --page-sheen: rgba(20, 20, 20, 0.025);
  --pointer-glow: rgba(217, 65, 53, 0.08);
  --accent-border: rgba(217, 65, 53, 0.35);
  --accent-border-soft: rgba(217, 65, 53, 0.24);
  --accent-border-hover: rgba(217, 65, 53, 0.26);
  --accent-border-strong: rgba(217, 65, 53, 0.42);
  --card-bg: rgba(248, 246, 241, 0.6);
  --panel-bg: rgba(248, 246, 241, 0.58);
  --panel-bg-strong: rgba(248, 246, 241, 0.7);
  --glass-bg: rgba(248, 246, 241, 0.78);
  --card-border: rgba(255, 255, 255, 0.74);
  --card-border-strong: rgba(255, 255, 255, 0.8);
  --ghost-border: rgba(20, 20, 20, 0.16);
  --ghost-border-soft: rgba(20, 20, 20, 0.08);
  --ghost-border-mid: rgba(20, 20, 20, 0.18);
  --ghost-border-strong: rgba(20, 20, 20, 0.24);
  --profile-image-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(236, 232, 224, 0.48)), radial-gradient(circle at 50% 24%, rgba(217, 65, 53, 0.08), transparent 44%);
  --profile-image-filter: grayscale(1) contrast(0.95) brightness(1.03);
  --logo-filter: none;
  --logo-opacity: 1;
  --header-glass-bg: rgba(242, 240, 236, 0.74);
  --header-glass-border: rgba(20, 20, 20, 0.08);
  --header-glass-shadow: 0 18px 48px rgba(42, 38, 30, 0.08);
  --mobile-nav-bg: rgba(242, 240, 236, 0.96);
  --input-bg: rgba(255, 255, 255, 0.42);
  --success-border: rgba(111, 141, 98, 0.4);
  --success-bg: rgba(111, 141, 98, 0.1);
  --cursor-border: rgba(20, 20, 20, 0.25);
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-snap: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast: 180ms;
  --dur-base: 260ms;
  --dur-slow: 440ms;
  --dur-reveal: 620ms;
  --theme-duration: 280ms;
  --shadow-soft: 0 18px 60px rgba(42, 38, 30, 0.08);
  --shadow-card: 0 12px 32px rgba(42, 38, 30, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --shadow-card-hover: 0 18px 46px rgba(42, 38, 30, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --shadow-list-hover: 0 18px 42px rgba(42, 38, 30, 0.12);
  --shadow-terminal: 0 16px 36px rgba(10, 10, 10, 0.22);
  --magnetic-x: 0;
  --magnetic-y: 0;
  color-scheme: light;
}

html[toggle-theme="dark"] {
  --bg: #10100f;
  --bg-soft: #171615;
  --surface: #1e1c19;
  --surface-glass: rgba(26, 25, 23, 0.78);
  --ink: #f4f1eb;
  --ink-soft: #ded8ce;
  --muted: #aaa39a;
  --muted-2: #746f68;
  --line: #39342f;
  --line-soft: rgba(244, 241, 235, 0.1);
  --accent: #e05246;
  --accent-soft: rgba(224, 82, 70, 0.16);
  --success: #9bb887;
  --warning: #dfb763;
  --sev-none: #8f8981;
  --sev-low: #9bb887;
  --sev-medium: #dfb763;
  --sev-high: #e6975a;
  --sev-critical: #d878a4;
  --sev-exceptional: #e05246;
  --terminal: #080807;
  --terminal-text: #f4f1eb;
  --terminal-muted: rgba(244, 241, 235, 0.68);
  --body-bg: radial-gradient(circle at 50% 22%, rgba(58, 52, 45, 0.42), rgba(16, 16, 15, 0.94) 46%, var(--bg) 100%);
  --grain-dot: rgba(244, 241, 235, 0.08);
  --grain-opacity: 0.14;
  --grain-blend: screen;
  --page-sheen: rgba(244, 241, 235, 0.022);
  --pointer-glow: rgba(224, 82, 70, 0.12);
  --accent-border: rgba(224, 82, 70, 0.42);
  --accent-border-soft: rgba(224, 82, 70, 0.28);
  --accent-border-hover: rgba(224, 82, 70, 0.34);
  --accent-border-strong: rgba(224, 82, 70, 0.5);
  --card-bg: rgba(26, 25, 23, 0.7);
  --panel-bg: rgba(26, 25, 23, 0.62);
  --panel-bg-strong: rgba(26, 25, 23, 0.76);
  --glass-bg: rgba(28, 27, 25, 0.84);
  --card-border: rgba(244, 241, 235, 0.1);
  --card-border-strong: rgba(244, 241, 235, 0.16);
  --ghost-border: rgba(244, 241, 235, 0.14);
  --ghost-border-soft: rgba(244, 241, 235, 0.08);
  --ghost-border-mid: rgba(244, 241, 235, 0.16);
  --ghost-border-strong: rgba(244, 241, 235, 0.22);
  --profile-image-bg: linear-gradient(180deg, rgba(244, 241, 235, 0.08), rgba(26, 25, 23, 0.64)), radial-gradient(circle at 50% 24%, rgba(224, 82, 70, 0.12), transparent 44%);
  --profile-image-filter: grayscale(1) contrast(1.02) brightness(0.9);
  --logo-filter: brightness(0) invert(1);
  --logo-opacity: 0.86;
  --header-glass-bg: rgba(16, 16, 15, 0.78);
  --header-glass-border: rgba(244, 241, 235, 0.09);
  --header-glass-shadow: 0 18px 52px rgba(0, 0, 0, 0.28);
  --mobile-nav-bg: rgba(16, 16, 15, 0.96);
  --input-bg: rgba(244, 241, 235, 0.06);
  --success-border: rgba(155, 184, 135, 0.42);
  --success-bg: rgba(155, 184, 135, 0.12);
  --cursor-border: rgba(244, 241, 235, 0.25);
  --shadow-soft: 0 18px 60px rgba(0, 0, 0, 0.32);
  --shadow-card: 0 18px 48px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(244, 241, 235, 0.08);
  --shadow-card-hover: 0 20px 54px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(244, 241, 235, 0.1);
  --shadow-list-hover: 0 18px 46px rgba(0, 0, 0, 0.34);
  --shadow-terminal: 0 16px 40px rgba(0, 0, 0, 0.36);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--sans);
  background: var(--body-bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: radial-gradient(var(--grain-dot) 0.6px, transparent 0.6px);
  background-size: 6px 6px;
  mix-blend-mode: var(--grain-blend);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, var(--page-sheen) 50%, transparent),
    radial-gradient(circle at var(--pointer-x, 50%) var(--pointer-y, 30%), var(--pointer-glow), transparent 230px);
}

html.theme-is-changing,
html.theme-is-changing *,
html.theme-is-changing *::before,
html.theme-is-changing *::after {
  transition:
    background-color var(--theme-duration) var(--ease),
    background var(--theme-duration) var(--ease),
    border-color var(--theme-duration) var(--ease),
    box-shadow var(--theme-duration) var(--ease),
    color var(--theme-duration) var(--ease),
    fill var(--theme-duration) var(--ease),
    filter var(--theme-duration) var(--ease),
    opacity var(--theme-duration) var(--ease),
    stroke var(--theme-duration) var(--ease) !important;
}

img,
svg {
  display: block;
}

/* Page transitions: crossfade the main region between routes. */
main {
  view-transition-name: main-content;
}

::view-transition-old(main-content) {
  animation: vtFadeOut 300ms var(--ease) both;
}

::view-transition-new(main-content) {
  animation: vtFadeIn 320ms var(--ease) both;
}

@keyframes vtFadeOut {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes vtFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Fallback loading hint for browsers without the View Transitions API. */
@supports not (view-transition-name: none) {
  body.is-navigating main {
    opacity: 0.65;
    transition: opacity var(--dur-fast) var(--ease);
  }
}

/* Navigation loader: centered terminal cue over a dimmed page during the fetch. */
.nav-loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition:
    opacity var(--dur-base) var(--ease),
    visibility var(--dur-base) var(--ease);
}

body.is-navigating .nav-loader {
  opacity: 1;
  visibility: visible;
  transition-delay: 150ms;
}

.nav-loader-cue {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 20px;
  border: 1px solid var(--card-border-strong);
  border-radius: 11px;
  background: var(--surface-glass);
  box-shadow: var(--shadow-card);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  animation: navPulse 1.7s var(--ease-in-out) infinite;
}

.nav-loader-prompt {
  color: var(--accent);
  font-weight: 500;
}

.nav-loader-caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}

@keyframes navPulse {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.92;
  }
  50% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-loader-caret {
    animation: none;
    opacity: 1;
  }
}

/* Scroll-reveal: hidden initial state applies only when JS is active. */
.has-js .reveal-item,
.has-js .reveal-block {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--dur-reveal) var(--ease),
    transform var(--dur-reveal) var(--ease);
  transition-delay: calc(var(--reveal-i, 0) * 60ms);
}

.has-js .reveal-item.is-revealed,
.has-js .reveal-block.is-revealed {
  opacity: 1;
  transform: none;
}

/* ---- Command Bloom ---- */
.bloom-field-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 60px 24px 110px;
}

.bloom-field-head {
  max-width: 660px;
  margin: 0 auto 44px;
  text-align: center;
}

.bloom-field-head h2 {
  margin: 12px 0 18px;
}

.bloom-command {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.bloom-command .prompt {
  color: var(--accent);
}

.bloom-command .cmd {
  color: var(--ink);
}

.bloom-command .caret {
  width: 8px;
  height: 1.05em;
  background: var(--accent);
  display: inline-block;
  animation: blink 1.1s steps(1) infinite;
}

.bloom-stage {
  position: relative;
}

.bloom-links,
.bloom-core {
  display: none;
}

/* Default: stacked responsive grid (mobile / tablet). */
.bloom-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.bloom-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 158px;
  padding: 24px;
  border: 1px solid var(--card-border-strong);
  border-radius: 18px;
  background: var(--glass-bg);
  box-shadow: var(--shadow-card);
  color: inherit;
  text-decoration: none;
  transition:
    transform var(--dur-base) var(--ease),
    box-shadow var(--dur-base) var(--ease),
    border-color var(--dur-base) var(--ease);
}

.bloom-card:hover {
  border-color: var(--accent-border-strong);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-6px) scale(1.025);
}

.bloom-card:active {
  transform: scale(0.98);
}

.bloom-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bloom-index {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

.bloom-icon .icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: color var(--dur-base) var(--ease);
}

.bloom-card:hover .bloom-icon .icon {
  color: var(--accent);
}

.bloom-card-title {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.bloom-card-desc {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.bloom-card-arrow {
  margin-top: auto;
  padding-top: 14px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity var(--dur-base) var(--ease),
    transform var(--dur-base) var(--ease);
}

.bloom-card-arrow .icon {
  width: 18px;
  height: 18px;
}

.bloom-card:hover .bloom-card-arrow,
.bloom-card:focus-visible .bloom-card-arrow {
  opacity: 1;
  transform: none;
}

/* Head reveal (driven by the field's own IntersectionObserver). */
.has-js [data-bloom-field] .bloom-field-head {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--dur-reveal) var(--ease),
    transform var(--dur-reveal) var(--ease);
}

.has-js [data-bloom-field].is-revealed .bloom-field-head {
  opacity: 1;
  transform: none;
}

/* Desktop: radial constellation. */
@media (min-width: 960px) {
  .bloom-field-head {
    margin-bottom: 4px;
  }

  .bloom-stage {
    max-width: 760px;
    height: 580px;
    margin: 0 auto;
  }

  .bloom-links {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
  }

  .bloom-link {
    stroke: var(--card-border-strong);
    stroke-width: 1.5;
    fill: none;
    opacity: 0.55;
    transition: opacity var(--dur-base) var(--ease);
  }

  .bloom-stage:hover .bloom-link {
    opacity: 0.85;
  }

  .bloom-core {
    display: grid;
    place-items: center;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 74px;
    height: 74px;
    transform: translate(-50%, -50%);
    border: 1px solid var(--accent-border-strong);
    border-radius: 50%;
    background: var(--glass-bg);
    box-shadow: var(--shadow-card);
    color: var(--accent);
    z-index: 2;
  }

  .bloom-core b {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 15px;
  }

  .bloom-cards {
    display: block;
  }

  .bloom-card {
    position: absolute;
    width: 190px;
    height: 158px;
    min-height: 0;
    left: calc(50% - 95px + var(--tx));
    top: calc(50% - 79px + var(--ty));
    z-index: 3;
  }

  /* Bloom out from the centre once the field scrolls into view. */
  .has-js [data-bloom-field] .bloom-card {
    opacity: 0;
  }

  .has-js [data-bloom-field].is-revealed .bloom-card {
    animation: bloomIn 760ms var(--ease) both;
    animation-delay: calc(var(--bloom-i, 0) * 90ms);
  }

  .has-js [data-bloom-field].bloom-settled .bloom-card {
    animation: none;
    opacity: 1;
  }
}

@keyframes bloomIn {
  from {
    opacity: 0;
    transform: translate(calc(var(--tx) * -1), calc(var(--ty) * -1)) scale(0.86);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes lineRise {
  from {
    transform: translateY(110%);
  }
  to {
    transform: none;
  }
}

/* ---- Micro-interactions ---- */
.site-nav a::after {
  transition:
    opacity var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.text-link {
  position: relative;
}

.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease);
}

.text-link:hover::after,
.text-link:focus-visible::after {
  transform: scaleX(1);
}

.contact-socials a {
  transition:
    color var(--dur-base) var(--ease),
    border-color var(--dur-base) var(--ease),
    background var(--dur-base) var(--ease),
    transform var(--dur-base) var(--ease);
}

.contact-socials a:hover,
.contact-socials a:focus-visible {
  color: var(--ink);
  border-color: var(--accent-border-strong);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  transform: translateY(-2px);
}

.site-footer nav a {
  position: relative;
}

.site-footer nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease);
}

.site-footer nav a:hover::after,
.site-footer nav a:focus-visible::after {
  transform: scaleX(1);
}

.button-primary:active,
.button-secondary:active,
.social-link-card:active {
  transform: scale(0.98);
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 24px;
  top: 16px;
  z-index: 10000;
  padding: 10px 14px;
  background: var(--terminal);
  color: var(--terminal-text);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.magnetic {
  transform: translate(var(--magnetic-x), var(--magnetic-y));
  transition: transform 240ms var(--ease), color 240ms var(--ease), border-color 240ms var(--ease), background 240ms var(--ease);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  min-height: 78px;
  padding: 20px 48px;
  pointer-events: none;
  isolation: isolate;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: transparent;
  border-bottom: 1px solid transparent;
  box-shadow: none;
  backdrop-filter: blur(0) saturate(1);
  -webkit-backdrop-filter: blur(0) saturate(1);
  transition: background 240ms var(--ease), border-color 240ms var(--ease), box-shadow 240ms var(--ease), backdrop-filter 240ms var(--ease);
}

.site-header.is-scrolled::before {
  background: var(--header-glass-bg);
  border-bottom-color: var(--header-glass-border);
  box-shadow: var(--header-glass-shadow);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

.site-header > * {
  pointer-events: auto;
}

.brand-mark {
  justify-self: start;
  font: 14px var(--mono);
}

.brand-mark i {
  color: var(--accent);
  font-style: normal;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 42px;
  font: 12px var(--mono);
  text-transform: uppercase;
}

.site-nav a {
  position: relative;
  padding: 10px 0;
  color: var(--ink-soft);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0;
  transform: translateX(-50%);
}

.site-nav a:is(:hover, .is-active)::after {
  opacity: 1;
}

.theme-toggle,
.sound-toggle,
.menu-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.header-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.theme-toggle,
.sound-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font: 12px var(--mono);
  text-transform: uppercase;
}

.theme-toggle-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
}

.theme-toggle-icon-light {
  opacity: 0;
  transform: rotate(-45deg) scale(0.7);
}

html[toggle-theme="dark"] .theme-toggle-icon-dark {
  opacity: 0;
  transform: rotate(45deg) scale(0.7);
}

html[toggle-theme="dark"] .theme-toggle-icon-light {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle .icon,
.sound-toggle .icon {
  width: 22px;
  height: 22px;
  color: var(--ink);
  opacity: 0.52;
  transition: color 240ms var(--ease), opacity 240ms var(--ease), transform 240ms var(--ease);
}

.theme-toggle:hover .icon,
.sound-toggle:hover .icon {
  opacity: 0.82;
  transform: scale(1.06);
}

.theme-toggle[aria-pressed="true"] .icon,
.sound-toggle[aria-pressed="true"] .icon {
  color: var(--accent);
  opacity: 1;
}

.sound-toggle[aria-pressed="true"] .icon path {
  transform-origin: center;
  animation: soundBars 840ms ease-in-out infinite;
}

.sound-toggle[aria-pressed="true"] .icon path:nth-child(2) {
  animation-delay: 80ms;
}

.sound-toggle[aria-pressed="true"] .icon path:nth-child(3) {
  animation-delay: 160ms;
}

.sound-toggle[aria-pressed="true"] .icon path:nth-child(4) {
  animation-delay: 240ms;
}

.sound-toggle[aria-pressed="true"] .icon path:nth-child(5) {
  animation-delay: 320ms;
}

.menu-toggle {
  display: none;
}

.hero-section {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(270px, 0.72fr) minmax(620px, 1.1fr);
  gap: clamp(28px, 3vw, 48px);
  align-items: center;
  padding: 110px 48px 124px;
}

.hero-identity {
  animation: softIn 900ms var(--ease) both;
}

.terminal-mark {
  margin: 0 0 28px;
  font: 36px var(--mono);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero-identity h1,
.page-hero h1 {
  margin: 0 0 28px;
  font-family: var(--display);
  font-size: 7rem;
  font-weight: 400;
  line-height: 0.9;
}

.hero-identity h1 span {
  display: block;
  overflow: hidden;
}

.hero-identity h1 span > i {
  display: block;
  font-style: normal;
  padding-bottom: 0.08em;
  animation: lineRise 900ms var(--ease) both;
}

.hero-identity h1 span:nth-child(1) > i {
  animation-delay: 160ms;
}

.hero-identity h1 span:nth-child(2) > i {
  animation-delay: 260ms;
}

.role-line,
.section-kicker,
.sync-note,
.stat-item span,
.text-link,
.button-primary,
.button-secondary,
.profile-link-grid span {
  font-family: var(--mono);
  text-transform: uppercase;
}

.role-line {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.hero-copy,
.page-hero p,
.section-split p,
.contact-preview p,
.bio-section p,
.talks-section p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.text-link,
.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  white-space: nowrap;
}

.text-link .icon,
.button-primary .icon,
.button-secondary .icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.button-primary,
.button-secondary {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.button-primary {
  background: var(--surface-glass);
  box-shadow: var(--shadow-card);
}

.button-secondary {
  background: transparent;
  color: var(--ink-soft);
}

.button-secondary .icon {
  transform: rotate(180deg);
}

.button-primary:hover {
  border-color: var(--accent-border);
}

.button-secondary:hover {
  border-color: var(--accent-border);
  color: var(--ink);
}

.command-bloom {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  height: 680px;
  min-height: 680px;
  padding: 28px;
  isolation: isolate;
}

.shell-orbit {
  position: absolute;
  inset: 8%;
  z-index: 0;
  border: 1px dashed var(--ghost-border);
  border-radius: 50%;
  pointer-events: none;
}

.shell-orbit-outer {
  animation: orbitDrift 18s linear infinite;
}

.shell-orbit-inner {
  inset: 19%;
  opacity: 0.72;
  animation: orbitDrift 14s linear infinite reverse;
}

.terminal-window {
  position: relative;
  z-index: 2;
  align-self: stretch;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 560px;
  min-height: 0;
  max-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(244, 241, 235, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 12%, rgba(217, 65, 53, 0.18), transparent 28%),
    radial-gradient(circle at 82% 78%, rgba(111, 141, 98, 0.14), transparent 26%),
    linear-gradient(145deg, rgba(23, 22, 21, 0.98), rgba(9, 9, 8, 0.98));
  box-shadow:
    0 36px 90px rgba(15, 14, 12, 0.28),
    inset 0 1px 0 rgba(244, 241, 235, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55);
  animation: terminalRise 800ms var(--ease) 240ms both;
}

.terminal-window::before,
.terminal-window::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.terminal-window::before {
  opacity: 0.18;
  background:
    linear-gradient(90deg, rgba(244, 241, 235, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(244, 241, 235, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
}

.terminal-window::after {
  background: linear-gradient(180deg, transparent, rgba(244, 241, 235, 0.08), transparent);
  transform: translateY(-100%);
  animation: terminalSweep 4.8s ease-in-out 1200ms infinite;
}

.terminal-topbar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(244, 241, 235, 0.1);
  color: var(--terminal-text);
  font-family: var(--mono);
}

.terminal-lights {
  display: inline-flex;
  gap: 7px;
}

.terminal-lights span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--muted);
}

.terminal-lights span:nth-child(1) { background: var(--accent); }
.terminal-lights span:nth-child(2) { background: var(--warning); }
.terminal-lights span:nth-child(3) { background: var(--success); }

.terminal-topbar p,
.terminal-topbar span {
  margin: 0;
}

.terminal-topbar p,
.terminal-topbar strong {
  font-size: 12px;
  text-transform: uppercase;
}

.terminal-topbar span {
  display: block;
  margin-top: 3px;
  color: var(--terminal-muted);
  font-size: 10px;
}

.terminal-topbar strong {
  color: var(--accent);
  font-weight: 400;
}

.terminal-output {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 20px 20px 12px;
  color: var(--terminal-text);
  font: 12px/1.62 var(--mono);
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 241, 235, 0.24) transparent;
}

.terminal-output::-webkit-scrollbar {
  width: 8px;
}

.terminal-output::-webkit-scrollbar-thumb {
  background: rgba(244, 241, 235, 0.2);
  border-radius: 999px;
}

.terminal-line {
  flex: 0 0 auto;
  max-width: 100%;
  animation: terminalLine 240ms var(--ease) both;
}

.terminal-line pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: inherit;
  font: inherit;
}

.terminal-command {
  color: var(--terminal-text);
}

.terminal-command .prompt {
  color: var(--success);
}

.terminal-command .path {
  color: var(--warning);
}

.terminal-result {
  color: var(--terminal-muted);
}

.terminal-error {
  color: #ff8d83;
}

.terminal-muted {
  color: rgba(244, 241, 235, 0.48);
}

.terminal-accent {
  color: #ffafa7;
}

.terminal-success {
  color: #b7d7a4;
}

.terminal-table {
  display: grid;
  grid-template-columns: minmax(90px, 0.34fr) minmax(0, 1fr);
  gap: 4px 16px;
}

.terminal-table span:nth-child(odd) {
  color: #e5b65f;
}

.terminal-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 18px;
}

.terminal-prompt {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto auto auto auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-height: 58px;
  padding: 0 18px;
  border-top: 1px solid rgba(244, 241, 235, 0.1);
  background: rgba(0, 0, 0, 0.18);
  color: var(--terminal-muted);
  font: 12px var(--mono);
}

.terminal-prompt span {
  color: var(--success);
}

.terminal-prompt em {
  color: var(--warning);
  font-style: normal;
}

.terminal-prompt strong {
  color: var(--terminal-text);
  font-weight: 400;
}

.terminal-prompt input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--terminal-text);
  caret-color: var(--accent);
  font: inherit;
}

.stats-rail {
  max-width: 960px;
  margin: -104px auto 120px;
  padding: 0 24px;
  text-align: center;
}

.compact-hero + .stats-rail {
  margin-top: 0;
  margin-bottom: 104px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-left: 1px solid var(--line);
}

.stat-item {
  min-height: 56px;
  padding: 0 18px;
  border-right: 1px solid var(--line);
}

.stat-item strong {
  display: block;
  font: 28px var(--display);
}

.stat-item span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}

.stat-item-tier strong {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1.1;
}

.tier-dot {
  --sev: var(--sev-none);
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.4em;
  border-radius: 999px;
  background: var(--sev);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sev) 20%, transparent);
}

.tier-dot.is-low {
  --sev: var(--sev-low);
}

.tier-dot.is-medium {
  --sev: var(--sev-medium);
}

.tier-dot.is-high {
  --sev: var(--sev-high);
}

.tier-dot.is-critical {
  --sev: var(--sev-critical);
}

.tier-dot.is-exceptional {
  --sev: var(--sev-exceptional);
}

.sync-note {
  margin: 18px 0 0;
  color: var(--muted-2);
  font-size: 10px;
}

.sync-note code {
  text-transform: none;
}

.section-frame,
.page-hero {
  max-width: 1320px;
  margin: 0 auto;
  padding: 110px 48px;
}

.page-hero {
  padding-top: 170px;
  padding-bottom: 58px;
}

.contact-hero,
.work-hero {
  position: relative;
}

.contact-hero-copy,
.work-hero-copy {
  max-width: 650px;
}

.contact-hero-sketch,
.work-hero-sketch {
  display: none;
}

.compact-hero {
  max-width: 980px;
}

.page-hero h1,
.section-frame h2 {
  max-width: 760px;
  margin-bottom: 26px;
  font-family: var(--display);
  font-size: 4.2rem;
  font-weight: 400;
  line-height: 1;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.page-hero p {
  max-width: 650px;
}

@media (min-width: 851px) {
  .contact-hero,
  .work-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(320px, 0.7fr);
    gap: clamp(36px, 6vw, 92px);
    align-items: center;
  }

  .contact-hero-sketch,
  .work-hero-sketch {
    display: block;
    width: min(100%, 560px);
    justify-self: end;
    opacity: 0.9;
    mix-blend-mode: multiply;
    filter: contrast(0.95) saturate(0.82);
  }

  .work-hero-sketch {
    opacity: 0.96;
    filter: contrast(1.2) brightness(0.9) saturate(0.82);
  }
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
  gap: clamp(36px, 6vw, 104px);
  align-items: end;
  padding-bottom: 82px;
}

.about-hero-copy {
  max-width: 760px;
}

.about-dossier-card {
  justify-self: end;
  margin-bottom: -18px;
  animation: softIn 900ms var(--ease) 140ms both;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  color: var(--ink-soft);
  font-size: 12px;
}

.section-kicker i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.section-split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 86px;
  align-items: start;
}

.approach-grid,
.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.approach-grid article,
.topic-grid article {
  min-height: 210px;
  padding: 28px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-bg);
  box-shadow: var(--shadow-card);
}

.approach-grid h3,
.topic-grid h3 {
  margin-bottom: 18px;
  font: 13px var(--mono);
  text-transform: uppercase;
}

/* ---- Research route · Signal Sweep ---- */
.research-route {
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 48px 122px;
}

.route-head {
  max-width: 620px;
  margin: 0 auto 60px;
  text-align: center;
}

.route-head .section-kicker {
  justify-content: center;
}

.route-head h2 {
  margin: 14px 0 16px;
  font-family: var(--display);
  font-size: 3.4rem;
  font-weight: 400;
  line-height: 1;
}

.route-head p {
  color: var(--muted);
  line-height: 1.8;
}

.route-scope {
  --route-dur: 7s;
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 250px;
}

.route-scope::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--line);
}

.route-scope::after {
  content: "";
  position: absolute;
  left: 0;
  top: 12%;
  bottom: 12%;
  width: 1px;
  opacity: 0;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  animation: routeSweep var(--route-dur) var(--ease-in-out) infinite;
  pointer-events: none;
}

.route-tick {
  --ping-delay: calc((var(--tick-i) + 0.5) / 6 * var(--route-dur));
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--tick-x);
  width: 138px;
  transform: translateX(-50%);
}

.route-node {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  transform: translate(-50%, -50%);
  animation: routePingNode var(--route-dur) linear var(--ping-delay) infinite;
}

.route-card {
  position: absolute;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
  text-align: center;
  transform: translateX(-50%);
}

.route-tick.is-up .route-card {
  bottom: 50%;
  margin-bottom: 24px;
}

.route-tick.is-down .route-card {
  top: 50%;
  margin-top: 24px;
}

.route-card::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  height: 15px;
  background: var(--line);
  transform: translateX(-50%);
}

.route-tick.is-up .route-card::after {
  top: 100%;
}

.route-tick.is-down .route-card::after {
  bottom: 100%;
}

.route-num {
  font-family: var(--display);
  font-size: 26px;
  line-height: 1;
  color: var(--muted-2);
  animation: routePingText var(--route-dur) linear var(--ping-delay) infinite;
}

.route-icon .icon {
  width: 22px;
  height: 22px;
  color: var(--ink-soft);
  animation: routePingIcon var(--route-dur) linear var(--ping-delay) infinite;
}

.route-label {
  max-width: 132px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--muted);
  text-wrap: balance;
}

@keyframes routeSweep {
  0% { left: -1%; opacity: 0; }
  5% { opacity: 0.85; }
  95% { opacity: 0.85; }
  100% { left: 101%; opacity: 0; }
}

@keyframes routePingNode {
  0%, 100% {
    background: var(--bg-soft);
    border-color: var(--line);
    transform: translate(-50%, -50%) scale(1);
  }
  3% {
    background: var(--accent);
    border-color: var(--accent);
    transform: translate(-50%, -50%) scale(1.55);
  }
  13% {
    background: var(--bg-soft);
    border-color: var(--line);
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes routePingText {
  0%, 100% { color: var(--muted-2); }
  3% { color: var(--accent); }
  13% { color: var(--muted-2); }
}

@keyframes routePingIcon {
  0%, 100% { color: var(--ink-soft); }
  3% { color: var(--accent); }
  13% { color: var(--ink-soft); }
}

@media (max-width: 940px) {
  .route-head {
    margin-bottom: 42px;
  }

  .route-scope {
    height: auto;
    display: flex;
    flex-direction: column;
  }

  .route-scope::before {
    left: 7px;
    right: auto;
    top: 10px;
    bottom: 10px;
    width: 1px;
    height: auto;
  }

  .route-scope::after {
    display: none;
  }

  .route-tick {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    padding: 16px 0 16px 34px;
    transform: none;
  }

  .route-node {
    top: 50%;
    left: 7px;
  }

  .route-card {
    position: static;
    flex-direction: row;
    align-items: baseline;
    gap: 14px;
    width: 100%;
    text-align: left;
    margin: 0 !important;
    transform: none;
  }

  .route-card::after {
    display: none;
  }

  .route-num {
    flex: none;
    width: 30px;
    font-size: 21px;
  }

  .route-icon {
    display: none;
  }

  .route-label {
    max-width: none;
  }
}

.dossier-card {
  position: relative;
  z-index: 3;
  width: 290px;
  padding: 26px;
  border: 1px solid var(--card-border-strong);
  border-radius: 8px;
  background: var(--surface-glass);
  box-shadow: var(--shadow-soft);
}

.dossier-card > span {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 10px;
  background: var(--input-bg);
  color: var(--muted);
  font: 10px var(--mono);
  text-transform: uppercase;
}

.dossier-card img {
  display: block;
  width: 100%;
  height: 310px;
  padding: 10px 8px 0;
  border: 1px solid var(--ghost-border-soft);
  border-radius: 6px;
  background: var(--profile-image-bg);
  object-fit: contain;
  object-position: center bottom;
  filter: var(--profile-image-filter);
  margin-bottom: 18px;
}

.dossier-card h3 {
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 400;
}

.dossier-card p {
  display: inline-block;
  margin-bottom: 18px;
  padding: 5px 8px;
  background: var(--terminal);
  color: var(--terminal-text);
  font: 10px var(--mono);
  text-transform: uppercase;
}

.dossier-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
  font: 11px var(--mono);
}

.dossier-card div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 8px;
}

.dossier-card dt {
  color: var(--muted);
}

.dossier-card dd {
  margin: 0;
}


.profile-links-section,
.topic-section {
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  gap: 72px;
}

.profile-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-link-grid a,
.writing-list a {
  display: flex;
  min-height: 86px;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-bg);
  box-shadow: var(--shadow-card);
}

.profile-link-grid a.social-link-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  min-height: 64px;
  gap: 12px;
  padding: 12px 14px;
  overflow: hidden;
}

.social-link-card:hover,
.social-link-card:focus-visible {
  border-color: var(--accent-border-hover);
}

.social-link-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-bg-strong);
  color: var(--ink);
}

.social-link-icon .icon {
  width: 15px;
  height: 15px;
}

.social-link-icon img {
  width: 17px;
  height: 17px;
  object-fit: contain;
  opacity: var(--logo-opacity);
  filter: var(--logo-filter);
}

.profile-link-grid .social-link-body {
  display: grid;
  min-width: 0;
  gap: 3px;
  color: inherit;
  font: inherit;
  text-transform: none;
}

.profile-link-grid .social-link-icon {
  color: var(--ink);
  font: inherit;
  text-transform: none;
}

.profile-link-grid .social-link-body > span {
  color: var(--muted);
  font: 8px var(--mono);
  text-transform: uppercase;
}

.profile-link-grid .social-link-body strong {
  color: var(--ink-soft);
  font: 500 10px/1.45 var(--mono);
}

/* ---- Work · platform stat cards ---- */
.platform-head {
  margin-bottom: 44px;
}

.platform-head p {
  max-width: 640px;
  color: var(--muted);
  line-height: 1.8;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.platform-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 300px;
  padding: 26px 26px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-bg);
  box-shadow: var(--shadow-card);
  color: inherit;
  text-decoration: none;
  transition:
    transform var(--dur-base) var(--ease),
    box-shadow var(--dur-base) var(--ease),
    border-color var(--dur-base) var(--ease);
}

.platform-card:hover,
.platform-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent-border-strong);
  box-shadow: var(--shadow-card-hover);
}

.platform-card:active {
  transform: scale(0.99);
}

.platform-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.platform-logo {
  width: 24px;
  height: 24px;
  flex: none;
  object-fit: contain;
  opacity: var(--logo-opacity);
  filter: var(--logo-filter);
}

.platform-term {
  min-width: 0;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.platform-term b {
  color: var(--accent);
  font-weight: 500;
}

.platform-chip {
  margin-left: auto;
  flex: none;
  padding: 4px 9px;
  border: 1px solid var(--accent-border-strong);
  border-radius: 999px;
  font: 500 9.5px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.platform-hero {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.platform-hero strong {
  font-family: var(--display);
  font-size: 3.1rem;
  font-weight: 400;
  line-height: 0.9;
  color: var(--ink);
}

.platform-hero span {
  font: 10px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.platform-stats {
  display: flex;
  gap: 22px;
}

.platform-stat strong {
  display: block;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
}

.platform-stat span {
  font: 9px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.streak-gauge {
  --sev: var(--sev-none);
  display: grid;
  gap: 9px;
  padding-top: 14px;
  margin-top: 2px;
  border-top: 1px solid var(--line-soft);
}

.streak-gauge.is-low {
  --sev: var(--sev-low);
}

.streak-gauge.is-medium {
  --sev: var(--sev-medium);
}

.streak-gauge.is-high {
  --sev: var(--sev-high);
}

.streak-gauge.is-critical {
  --sev: var(--sev-critical);
}

.streak-gauge.is-exceptional {
  --sev: var(--sev-exceptional);
}

.streak-gauge-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.streak-gauge-kicker {
  font: 9px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.streak-tier-badge {
  padding: 3px 9px;
  border-radius: 999px;
  font: 600 10px var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sev);
  background: color-mix(in srgb, var(--sev) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--sev) 42%, transparent);
}

.streak-gauge-rep {
  margin-left: auto;
  font: 9.5px var(--mono);
  font-style: normal;
  letter-spacing: 0.03em;
  color: var(--muted);
  white-space: nowrap;
}

.streak-gauge-scale {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.streak-gauge-scale > i {
  height: 5px;
  border-radius: 999px;
  background: var(--line-soft);
}

.streak-gauge-scale > i.is-lit {
  background: var(--sev);
}

.platform-meters {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

.platform-meter-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font: 9.5px var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.platform-meter-row em {
  font-style: normal;
  color: var(--muted);
}

.platform-meter-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}

.platform-meter-bar > i {
  display: block;
  width: var(--fill, 0%);
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transform-origin: left;
}

.has-js .platform-meter-bar > i {
  transform: scaleX(0);
  transition: transform 1s var(--ease);
}

.has-js .platform-grid.is-filled .platform-meter-bar > i {
  transform: scaleX(1);
}

.platform-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 10px var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.platform-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.platform-sync {
  margin-top: 24px;
  font: 10px var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-2);
}

@media (max-width: 720px) {
  .platform-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .platform-head {
    margin-bottom: 32px;
  }

  .platform-card {
    min-height: 0;
    padding: 22px 20px 20px;
    gap: 16px;
  }

  .platform-card-head {
    gap: 8px;
  }

  .platform-term {
    font-size: 11px;
  }

  .platform-chip {
    padding: 4px 7px;
    font-size: 8.5px;
  }

  .platform-hero strong {
    font-size: 2.8rem;
  }

  .platform-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .platform-stat {
    min-width: 0;
  }

  .platform-stat strong {
    font-size: 1.4rem;
  }

  .platform-stat span {
    display: block;
    line-height: 1.3;
    letter-spacing: 0.04em;
  }

  .platform-meters {
    margin-top: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .has-js .platform-meter-bar > i {
    transform: scaleX(1) !important;
  }
}

.profile-link-grid span {
  color: var(--muted);
  font-size: 10px;
}

.profile-link-grid strong {
  font-weight: 500;
  overflow-wrap: anywhere;
}

.writing-list {
  display: grid;
  gap: 12px;
}

.writing-list a {
  min-height: 70px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.contact-preview {
  max-width: 860px;
  text-align: center;
}

.contact-preview h2 {
  margin-left: auto;
  margin-right: auto;
}

.contact-preview p {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.contact-page-grid {
  display: grid;
  grid-template-columns: 0.72fr 1fr;
  gap: 72px;
  align-items: start;
}

.contact-context {
  position: sticky;
  top: 120px;
}

.contact-context h2 {
  font-size: 3.4rem;
}

.contact-context ul {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
  color: var(--muted);
}

.contact-context li::before {
  content: "→";
  margin-right: 10px;
  color: var(--accent);
}

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

.contact-socials a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font: 12px var(--mono);
}

.contact-form {
  display: grid;
  gap: 22px;
  padding: 30px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-bg-strong);
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.contact-stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-stepper li {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font: 12px var(--mono);
  text-transform: uppercase;
}

.contact-stepper li::before {
  content: "";
  display: block;
  height: 2px;
  border-radius: 999px;
  background: var(--line);
}

.contact-stepper li.is-active {
  color: var(--ink);
}

.contact-stepper li.is-active::before,
.contact-stepper li.is-complete::before {
  background: var(--accent);
}

.contact-step {
  display: grid;
  gap: 26px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.contact-form.is-stepped .contact-step[hidden] {
  display: none;
}

.contact-step legend {
  margin: 0 0 24px;
  padding: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.65rem, 2.5vw, 2.1rem);
  font-weight: 400;
  line-height: 1;
}

.contact-form label {
  display: grid;
  gap: 8px;
}

.contact-form label span {
  color: var(--ink-soft);
  font: 12px var(--mono);
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--input-bg);
  padding: 14px;
  color: var(--ink);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent-border-strong);
  outline: 2px solid transparent;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
  border-color: var(--accent-border-strong);
}

.contact-form textarea {
  resize: vertical;
  min-height: 160px;
}

.contact-form small {
  font-size: 12px;
  line-height: 1.5;
}

.contact-form small:empty {
  display: none;
}

.contact-form small,
.form-error {
  color: var(--accent);
}

.form-error {
  margin: 0;
}

.form-hint {
  color: var(--muted);
}

.form-hint.is-ready {
  color: var(--success);
}

.form-status {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--success-border);
  border-radius: 6px;
  background: var(--success-bg);
  color: var(--ink-soft);
}

.contact-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.contact-controls .button-primary:only-child {
  margin-left: auto;
}

.contact-recaptcha {
  display: grid;
  gap: 8px;
  max-width: 100%;
  overflow: hidden;
}

/* Timeline — "Signal Trace": a single hairline rail, hollow nodes, a live "Now" node */
.timeline {
  --tl-gutter: 84px;                                   /* right-aligned year column (fits "Early 2021") */
  --tl-gap: 38px;                                      /* year column → content; rail lives in here */
  --tl-rowgap: 30px;
  --tl-rail: calc(var(--tl-gutter) + (var(--tl-gap) / 2));
  display: grid;
  gap: var(--tl-rowgap);
}

.timeline article {
  position: relative;
  display: grid;
  grid-template-columns: var(--tl-gutter) 1fr;
  column-gap: var(--tl-gap);
  align-items: start;
}

/* rail segment: this node → next node */
.timeline article::before {
  content: "";
  position: absolute;
  left: var(--tl-rail);
  top: 6px;
  height: calc(100% + var(--tl-rowgap));
  width: 1px;
  transform: translateX(-50%);
  background: var(--line);
}

.timeline article:last-child::before {
  display: none;
}

/* node ring on the rail */
.timeline article::after {
  content: "";
  position: absolute;
  left: var(--tl-rail);
  top: 5px;
  width: 10px;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  transition:
    border-color var(--dur-base) var(--ease),
    background-color var(--dur-base) var(--ease),
    box-shadow var(--dur-base) var(--ease);
}

.timeline span {
  grid-column: 1;
  justify-self: end;
  padding-top: 1px;
  color: var(--accent);
  font: 12px var(--mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.timeline h3 {
  grid-column: 2;
  margin: 0 0 8px;
  color: var(--ink);
  font: 13px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color var(--dur-base) var(--ease);
}

.timeline p {
  grid-column: 2;
  margin: 0;
}

/* hover lights the node + title */
.timeline article:hover::after {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline article:hover h3 {
  color: var(--accent);
}

/* the present — a live, softly pulsing node */
.timeline article:last-child::after {
  border-color: var(--accent);
  background: var(--accent);
  animation: timelinePulse 2.6s var(--ease-in-out) infinite;
}

@keyframes timelinePulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent);
  }
  70% {
    box-shadow: 0 0 0 9px color-mix(in srgb, var(--accent) 0%, transparent);
  }
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent);
  }
}

/* narrow screens: rail on the far left, year becomes an accent overline */
@media (max-width: 560px) {
  .timeline {
    --tl-rail: 6px;
    --tl-rowgap: 26px;
  }
  .timeline article {
    grid-template-columns: 1fr;
    column-gap: 0;
    padding-left: 28px;
  }
  .timeline span,
  .timeline h3,
  .timeline p {
    grid-column: 1;
  }
  .timeline span {
    justify-self: start;
    padding-top: 0;
  }
  .timeline h3 {
    margin-top: 6px;
    font-size: 12px;
  }
}

/* reduced-motion: pin the "Now" node, no pulse (also covered by the global guard) */
@media (prefers-reduced-motion: reduce) {
  .timeline article:last-child::after {
    animation: none;
  }
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  padding: 28px 48px;
  color: var(--muted);
  font: 11px var(--mono);
}

.site-footer span:nth-child(2) {
  text-align: center;
}

.site-footer nav {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  text-transform: uppercase;
}

.music-credit {
  grid-column: 1 / -1;
  margin: -6px 0 0;
  color: var(--muted-2);
  text-align: center;
  font: 10px/1.6 var(--mono);
}

.music-credit a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  display: none;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.cursor-ring {
  width: 42px;
  height: 42px;
  border: 1px solid var(--cursor-border);
  border-radius: 999px;
  transition: width 180ms var(--ease), height 180ms var(--ease), border-color 180ms var(--ease);
}

.cursor-is-link .cursor-ring {
  width: 58px;
  height: 58px;
  border-color: var(--accent-border-strong);
}

@keyframes softIn {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes bloomCard {
  to {
    opacity: 1;
    transform: translate(var(--tx), var(--ty)) scale(1);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes terminalRise {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes terminalLine {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes terminalSweep {
  0%,
  62% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

@keyframes orbitDrift {
  to {
    transform: rotate(360deg);
  }
}


@keyframes soundBars {
  50% { transform: scaleY(0.42); }
}

@media (pointer: fine) {
  .cursor-dot,
  .cursor-ring {
    display: block;
  }

  body,
  a,
  button {
    cursor: none;
  }
}

@media (max-width: 1180px) {
  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 130px;
  }

  .about-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .about-dossier-card {
    justify-self: start;
    margin-bottom: 0;
  }

  .command-bloom {
    order: 2;
    height: 620px;
    min-height: 620px;
  }

  .stats-rail {
    margin-top: 0;
  }

  .section-split,
  .profile-links-section,
  .topic-section,
  .contact-page-grid {
    grid-template-columns: 1fr;
  }

  .contact-context {
    position: static;
  }
}

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 1fr auto auto;
    gap: 4px;
    padding: 16px 20px;
  }

  .header-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .menu-toggle {
    position: relative;
    z-index: 2;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 44px;
    height: 44px;
  }

  .menu-toggle span:not(.sr-only) {
    width: 20px;
    height: 1px;
    background: var(--ink);
  }

  .site-nav {
    position: fixed;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 24px;
    background: var(--mobile-nav-bg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 240ms var(--ease), transform 240ms var(--ease), visibility 240ms var(--ease);
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav a {
    justify-self: center;
    width: max-content;
    text-align: center;
  }

  .site-nav a::after {
    left: calc(100% + 10px);
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }

  .hero-section,
  .section-frame,
  .page-hero,
  .research-route {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-identity h1,
  .page-hero h1 {
    font-size: 4.4rem;
  }

  .section-frame h2,
  .route-head h2 {
    font-size: 3rem;
  }

  .command-bloom {
    display: grid;
    height: 620px;
    min-height: 620px;
    padding: 0;
    gap: 14px;
  }

  .shell-orbit {
    display: none;
  }

  .terminal-window {
    height: 540px;
    max-height: 540px;
  }

  .terminal-output {
    padding: 18px 16px 12px;
  }

  .terminal-topbar,
  .terminal-prompt {
    padding-left: 16px;
    padding-right: 16px;
  }

  .approach-grid,
  .topic-grid,
  .profile-link-grid {
    grid-template-columns: 1fr;
  }

  .stats-rail {
    max-width: 430px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }

  .stat-item {
    min-height: 94px;
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
    border-left: 0;
    padding: 14px 10px;
    display: grid;
    align-content: center;
  }

  .stat-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .stat-item strong {
    font-size: 24px;
  }

  .stat-item span {
    margin-top: 5px;
    font-size: 9px;
    line-height: 1.35;
  }

  .sync-note {
    max-width: 100%;
    margin-top: 14px;
    padding: 0 6px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .section-split {
    gap: 42px;
  }


  .dossier-card {
    width: 100%;
  }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 28px 20px;
    text-align: center;
  }

  .site-footer span:nth-child(2),
  .site-footer nav {
    text-align: center;
    justify-content: center;
  }

  .site-footer nav {
    flex-wrap: wrap;
  }
}

@media (max-width: 420px) {
  .hero-identity h1,
  .page-hero h1 {
    font-size: clamp(3rem, 13vw, 3.25rem);
    line-height: 0.94;
  }

  .section-frame h2,
  .route-head h2,
  .contact-context h2 {
    font-size: clamp(2.2rem, 10.6vw, 2.45rem);
    line-height: 1.02;
  }

  .contact-form {
    padding: 20px;
  }

  .contact-stepper {
    gap: 6px;
  }

  .contact-stepper li {
    font-size: 10px;
  }

  .contact-controls {
    align-items: stretch;
  }

  .contact-controls .button-primary,
  .contact-controls .button-secondary {
    flex: 1 1 130px;
    justify-content: center;
  }

  .contact-recaptcha [data-recaptcha-widget] {
    min-height: 68px;
    transform: scale(0.86);
    transform-origin: left top;
  }

  .page-hero p,
  .section-split p,
  .contact-preview p,
  .bio-section p,
  .talks-section p {
    max-width: 100%;
    font-size: 15px;
    overflow-wrap: break-word;
  }

  .terminal-window {
    height: 520px;
    max-height: 520px;
  }

  .terminal-topbar {
    grid-template-columns: auto 1fr;
  }

  .terminal-topbar strong {
    display: none;
  }

  .terminal-prompt {
    grid-template-columns: auto auto auto auto;
    row-gap: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .terminal-prompt input {
    grid-column: 1 / -1;
  }

  .terminal-columns,
  .terminal-table {
    grid-template-columns: 1fr;
  }
}

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

  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }

  body,
  a,
  button {
    cursor: auto !important;
  }

  /* Never hide content behind a scroll reveal when motion is reduced. */
  .has-js .reveal-item,
  .has-js .reveal-block,
  .has-js [data-bloom-field] .bloom-field-head,
  .has-js [data-bloom-field] .bloom-card {
    opacity: 1 !important;
    transform: none !important;
  }
}
