/* ---------- Tokens ---------- */

:root {
  color-scheme: dark;
  --bg: #070b11;
  --bg-band: #0a1018;
  --surface: #0e1520;
  --surface-2: #131c29;
  --line: rgba(140, 170, 210, 0.14);
  --line-strong: rgba(140, 170, 210, 0.28);
  --ink: #e7edf5;
  --ink-2: #9aa8bb;
  --ink-3: #6b7a8f;
  --accent: #6ea8ff;
  --accent-strong: #9fc4ff;
  --accent-ink: #06101e;
  --glow: rgba(110, 168, 255, 0.16);
  --header-bg: rgba(7, 11, 17, 0.72);
  --cell: #151e2b;
  --sev-high: #ff5d5d;
  --sev-med: #ffb547;
  --sev-low: #3a4759;
  --ok: #3ddc97;
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);

  /* Shift colours, used only by the Shift Roster preview */
  --shift-m: #f2c230;
  --shift-e: #3e7fc1;
  --shift-o: #49a86f;
  --shift-l: #dd5a4e;
  --shift-c: #ec8db5;

  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 16px;
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fb;
  --bg-band: #edf1f7;
  --surface: #ffffff;
  --surface-2: #f3f6fa;
  --line: rgba(20, 40, 70, 0.12);
  --line-strong: rgba(20, 40, 70, 0.24);
  --ink: #0d1622;
  --ink-2: #4a586b;
  --ink-3: #6f7d92;
  --accent: #2257d6;
  --accent-strong: #1a45ad;
  --accent-ink: #ffffff;
  --glow: rgba(34, 87, 214, 0.1);
  --header-bg: rgba(245, 247, 251, 0.8);
  --cell: #e5eaf1;
  --sev-high: #d63b3b;
  --sev-med: #d98a14;
  --sev-low: #b7c2d1;
  --ok: #148a57;
  --shadow: 0 30px 70px -45px rgba(20, 40, 70, 0.45);
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.2em; }

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

::selection { background: var(--accent); color: var(--accent-ink); }

.wrap {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.only-light { display: none; }
:root[data-theme="light"] .only-light { display: block; }
:root[data-theme="light"] .only-dark { display: none; }

/* ---------- Buttons and links ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 200ms, transform 200ms var(--ease), box-shadow 200ms;
}
.button:hover { border-color: var(--accent); transform: translateY(-1px); }

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px -12px var(--accent);
}
.button-primary:hover { box-shadow: 0 14px 34px -10px var(--accent); }

.text-link { font-weight: 550; }

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 200ms;
}
.icon-button:hover { border-color: var(--accent); }
.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  min-width: 0;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
}
.brand-mark circle { fill: var(--sev-high); stroke: none; }

.nav-list { display: flex; gap: 2px; }

.nav-list a {
  position: relative;
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 200ms;
}
.nav-list a:hover,
.nav-list a[aria-current="true"] { color: var(--ink); }
.nav-list a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.menu-toggle { display: none; }

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--sev-high));
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
}

@media (max-width: 1023px) {
  .js .menu-toggle { display: grid; }

  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px var(--gutter) 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 220ms var(--ease), transform 220ms var(--ease), visibility 0s 220ms;
  }
  .js .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 220ms var(--ease), transform 220ms var(--ease);
  }
  .js .nav-list { flex-direction: column; }
  .js .nav-list a { padding: 13px 4px; font-size: 1.0625rem; }
  .js .nav-list a[aria-current="true"]::after { left: 4px; right: auto; width: 24px; }

  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: 8px; }
  html:not(.js) .site-nav { order: 3; width: 100%; overflow-x: auto; }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(72px, 10vw, 128px); }

.section-band {
  background: var(--bg-band);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 60ch;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head h2 {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  font-weight: 650;
  letter-spacing: -0.03em;
}
.section-head p {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
}

.sub-title {
  font-size: 1.25rem;
  margin-bottom: 20px;
}

/* Cards with a soft light that follows the pointer */
.spotlight {
  position: relative;
  isolation: isolate;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 300ms, transform 300ms var(--ease);
}
.spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--glow), transparent 45%);
  opacity: 0;
  transition: opacity 300ms;
  pointer-events: none;
}
@media (hover: hover) {
  .spotlight:hover { border-color: var(--line-strong); }
  .spotlight:hover::before { opacity: 1; }
}

/* Scroll reveal: only hides content once JavaScript is running */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease), border-color 300ms;
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 9vw, 120px) clamp(64px, 9vw, 120px);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 55% at 78% 30%, var(--glow), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: radial-gradient(90% 80% at 60% 30%, #000 30%, transparent 80%);
  mask-image: radial-gradient(90% 80% at 60% 30%, #000 30%, transparent 80%);
  opacity: 0.9;
}

.hero-grid {
  display: grid;
  gap: clamp(44px, 6vw, 72px);
  align-items: center;
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.875rem;
}

.live-dot {
  position: relative;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--ok);
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--ok);
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping {
  0% { transform: scale(0.6); opacity: 0.9; }
  80%, 100% { transform: scale(1.8); opacity: 0; }
}

.hero h1 {
  margin-top: 24px;
  font-size: clamp(2.75rem, 7vw, 5.25rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.role {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: 20px;
  font-family: var(--mono);
  font-size: clamp(0.9375rem, 1.6vw, 1.0625rem);
  color: var(--accent-strong);
}
:root[data-theme="light"] .role { color: var(--accent); }
.role-sep {
  width: 28px;
  height: 1px;
  background: var(--line-strong);
}

.lede {
  max-width: 44ch;
  margin-top: 20px;
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 1.7vw, 1.25rem);
  line-height: 1.55;
}

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

.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}
.platforms li {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

/* Detection pipeline console */

.console {
  margin: 0;
  min-width: 0;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow: var(--shadow), 0 0 0 1px var(--line) inset;
  overflow: hidden;
}

.console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.8125rem;
}
.console-title { color: var(--ink); }
.console-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
}

.pipeline { position: relative; }
.pipeline canvas {
  display: block;
  width: 100%;
  height: clamp(220px, 30vw, 320px);
}

.counters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
}
.counters div { padding: 14px 18px; }
.counters div + div { border-left: 1px solid var(--line); }
.counters dt {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.75rem;
}
.counters dd {
  margin: 2px 0 0;
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
#count-alerts { color: var(--sev-med); }
#count-incidents { color: var(--sev-high); }

.console-caption {
  padding: 12px 18px 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* ---------- Impact numbers ---------- */

.impact {
  border-block: 1px solid var(--line);
  background: var(--bg-band);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 900px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.stats li {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: clamp(24px, 4vw, 40px) clamp(12px, 2.5vw, 28px);
  border-left: 1px solid var(--line);
}
.stats li:nth-child(odd) { border-left: 0; }
@media (min-width: 900px) {
  .stats li:nth-child(odd) { border-left: 1px solid var(--line); }
  .stats li:first-child { border-left: 0; padding-left: 0; }
}
@media (max-width: 899px) {
  .stats li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stats li:nth-child(odd) { padding-left: 0; }
}

.stats strong {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.stats span:not([data-count]) {
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.45;
}

/* ---------- Experience ---------- */

.job {
  display: grid;
  gap: 24px;
  padding: clamp(22px, 3.5vw, 36px);
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-strong);
  border-radius: 20px;
}
@media (min-width: 900px) {
  .job { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; }
}

.job-main h3 { font-size: clamp(1.375rem, 2.6vw, 1.75rem); }
.job-org {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 10px;
  font-weight: 600;
}
.job-dates { color: var(--ink-2); font-weight: 400; }

.engagement-list { display: grid; gap: 12px; }
.engagement-list li {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}
.engagement-list span { color: var(--ink-2); font-size: 0.9375rem; }

.track { margin-top: clamp(56px, 8vw, 88px); }

.track-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 28px;
}
.track-head h3 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.02em; }
.track-head p { margin-top: 6px; color: var(--ink-2); max-width: 60ch; }

.track-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--accent);
}
.track-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* SOC work list with a trace that draws as you scroll */
.work-list {
  position: relative;
  display: grid;
  gap: 28px;
  padding-left: 38px;
  max-width: 860px;
}
.work-list::before,
.work-list::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
}
.work-list::before { background: var(--line); }
.work-list::after {
  background: linear-gradient(var(--accent), var(--sev-high));
  transform: scaleY(var(--trace, 1));
  transform-origin: top;
}
.js .work-list::after { transform: scaleY(var(--trace, 0)); }

.work-list li { position: relative; }
.work-list li::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.work-list h4 { font-size: 1.125rem; }
.work-list p { margin-top: 6px; color: var(--ink-2); max-width: 70ch; }

/* Engineering builds */
.build-grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 900px) {
  .build-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .build-wide { grid-column: 1 / -1; }
}

.build {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(22px, 3vw, 32px);
}
.build h4 { font-size: 1.1875rem; }
.build p { color: var(--ink-2); }
.build-metric {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink) !important;
  font-size: 0.9375rem;
}

.build-wide {
  display: grid;
  gap: 28px;
}
@media (min-width: 900px) {
  .build-wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; }
}
.build-text { display: grid; gap: 14px; align-content: start; }

/* Alert-noise chart */
.noise-readout { display: grid; margin-top: 4px; }
.noise-readout strong {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.noise-readout span { margin-top: 6px; color: var(--ink-2); font-size: 0.9375rem; }

.segmented {
  display: inline-flex;
  justify-self: start;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
}
.segmented button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 200ms, color 200ms;
}
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

.noise { margin: 0; min-width: 0; }
.noise-field {
  display: grid;
  grid-template-columns: repeat(32, minmax(0, 1fr));
  gap: 3px;
}
.noise-field i {
  aspect-ratio: 1;
  border-radius: 2px;
  background: var(--cell);
  transition: background-color 500ms ease, transform 500ms var(--ease), box-shadow 500ms;
  transition-delay: var(--d, 0ms);
}
.noise-field i.on { background: var(--sev-low); }
.noise-field i.on[data-sev="med"] { background: var(--sev-med); }
.noise-field i.on[data-sev="high"] { background: var(--sev-high); box-shadow: 0 0 10px -2px var(--sev-high); }
.noise-field i:not(.on) { transform: scale(0.5); }
@media (max-width: 600px) { .noise-field { gap: 2px; } }

.noise-caption {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 0.8125rem;
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.sev { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.sev-high { background: var(--sev-high); }
.sev-med { background: var(--sev-med); }
.sev-low { background: var(--sev-low); }

.award {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-top: 28px;
  padding: 20px 22px;
}
.award-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  background: color-mix(in srgb, var(--sev-med) 14%, transparent);
  color: var(--sev-med);
}
.award-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}
.award p { color: var(--ink-2); }
.award strong { color: var(--ink); font-weight: 600; }

/* ---------- Threats ---------- */

.threat-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 640px) { .threat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .threat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.threat {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  padding: 22px;
}
.threat h3 { font-size: 1.0625rem; font-weight: 600; }
.threat p { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.5; }

.ttp { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ttp a {
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--sev-high) 40%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--sev-high) 10%, transparent);
  color: var(--sev-high);
  font-family: var(--mono);
  font-size: 0.75rem;
  text-decoration: none;
  transition: background-color 200ms;
}
.ttp a:hover { background: color-mix(in srgb, var(--sev-high) 20%, transparent); }

.toolkit { margin-top: clamp(56px, 8vw, 88px); }

.marquee {
  overflow: hidden;
  margin-bottom: 32px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  gap: 12px;
  width: max-content;
}
.js .marquee-track { animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track li {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.875rem;
  white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(calc(-50% - 6px)); } }

.skills {
  display: grid;
  gap: 0 48px;
  margin: 0;
}
@media (min-width: 900px) { .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.skills > div {
  padding-block: 18px;
  border-top: 1px solid var(--line);
}
.skills dt { font-weight: 600; }
.skills dd { margin: 6px 0 0; color: var(--ink-2); font-size: 0.9375rem; }

/* ---------- Credentials ---------- */

.cert-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 640px) { .cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cert-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.cert {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  padding: 22px;
}
.cert-issuer { color: var(--ink-3); font-size: 0.875rem; }
.cert h3 { font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.cert-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 0.875rem;
}
.cert-meta time,
.cert-meta .in-progress { margin-left: auto; }
.cert-code {
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.75rem;
}
.cert-progress { border-style: dashed; border-color: var(--line-strong); }
.in-progress {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sev-med);
}
.in-progress::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }

.timeline {
  display: grid;
  max-width: 860px;
  margin-top: clamp(48px, 7vw, 72px);
}
.timeline li {
  position: relative;
  display: grid;
  gap: 6px 32px;
  padding: 0 0 36px 30px;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 14px -2px var(--accent);
}
.timeline li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 26px;
  bottom: 4px;
  width: 2px;
  background: var(--line);
}
.timeline li:last-child::after { display: none; }
@media (min-width: 720px) { .timeline li { grid-template-columns: 9rem minmax(0, 1fr); } }
.tl-dates { color: var(--ink-2); font-family: var(--mono); font-size: 0.9375rem; }
.timeline h3 { font-size: 1.25rem; }
.timeline h3 + p { margin-top: 6px; }
.grade { margin-top: 2px; color: var(--ink-2); }

/* ---------- Research ---------- */

.research { display: grid; gap: 20px; }
@media (min-width: 900px) { .research { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }

.paper {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: clamp(22px, 3vw, 34px);
}
.paper-kind { color: var(--accent); font-family: var(--mono); font-size: 0.8125rem; }
.paper h3 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); line-height: 1.25; }
.paper-venue { font-style: italic; }
.paper p:not(.paper-kind):not(.paper-venue) { color: var(--ink-2); max-width: 65ch; }
.paper .text-link { overflow-wrap: anywhere; }

/* ---------- Side projects ---------- */

.side-projects { display: grid; gap: 20px; }
@media (min-width: 860px) { .side-projects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.side {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}
.side-shot {
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.side-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform 700ms var(--ease);
}
@media (hover: hover) { .side:hover .side-shot img { transform: scale(1.03); } }

.side-text { display: grid; align-content: start; gap: 12px; padding: clamp(22px, 3vw, 28px); }
.side-text h3 { font-size: 1.25rem; }
.side-text p { color: var(--ink-2); }
.side-text .side-tech { color: var(--ink); font-size: 0.9375rem; }

.roster-mini { display: grid; place-items: center; padding: clamp(16px, 4vw, 32px); }
.roster {
  display: grid;
  grid-template-columns: repeat(31, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
}
.roster i { aspect-ratio: 1; border-radius: 1px; opacity: 0.9; }
.roster [data-s="m"] { background: var(--shift-m); }
.roster [data-s="e"] { background: var(--shift-e); }
.roster [data-s="o"] { background: var(--shift-o); }
.roster [data-s="l"] { background: var(--shift-l); }
.roster [data-s="c"] { background: var(--shift-c); }

/* ---------- Contact and footer ---------- */

.contact {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
}
.contact-glow {
  position: absolute;
  left: 50%;
  bottom: -40%;
  width: min(1100px, 140vw);
  aspect-ratio: 2 / 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}
.contact h2 {
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}
.contact-lede {
  max-width: 52ch;
  margin-top: 16px;
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
}
.contact-email { margin-top: 32px; }
.contact-email a {
  color: var(--ink);
  font-size: clamp(1.125rem, 4.4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent);
  overflow-wrap: anywhere;
  transition: color 200ms;
}
.contact-email a:hover { color: var(--accent); }
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}
.copy-status { color: var(--ink-2); font-size: 0.9375rem; }
.location { margin-top: 28px; color: var(--ink-3); font-size: 0.9375rem; }

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.9375rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 28px;
}
.site-footer a { color: inherit; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0ms !important;
    transition-delay: 0ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .work-list::after { transform: scaleY(1); }
  .marquee-track { flex-wrap: wrap; width: auto; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
}

/* ---------- Print ---------- */

@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #000; }
  .site-header, .skip-link, .console, .hero-bg, .contact-actions, .side-shot, .marquee, .contact-glow, .segmented, .noise { display: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .section, .hero { padding-block: 24px; }
}
