:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f8f6f1;
  --bg-elevated: #ffffff;
  --bg-subtle: #f1ede4;
  --header-bg: rgba(248, 246, 241, 0.9);
  --text: #17191c;
  --text-secondary: #373d45;
  --muted: #555e69;
  --line: #e2ddd3;
  --line-strong: #c8c1b4;
  --accent: #a64117;
  --accent-hover: #89330f;
  --on-accent: #fbfaf7;
  --accent-soft: #f7e6dc;
  --accent-border: rgba(166, 65, 23, 0.28);
  --layer-a: #36597a;
  --layer-a-soft: rgba(54, 89, 122, 0.2);
  --layer-b-soft: rgba(166, 65, 23, 0.24);
  --excess: #949da7;
  --chart-line: #8a94a0;
  --plot-paper: #ffffff;
  --shadow-sm: 0 1px 2px rgba(23, 25, 28, 0.04);
  --shadow-md: 0 10px 28px rgba(23, 25, 28, 0.06);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Consolas, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111315;
  --bg-elevated: #171a1e;
  --bg-subtle: #1d2126;
  --header-bg: rgba(17, 19, 21, 0.88);
  --text: #f3f1ee;
  --text-secondary: #d4d8dd;
  --muted: #9aa4af;
  --line: #292f36;
  --line-strong: #3e4752;
  --accent: #e4844e;
  --accent-hover: #f09a68;
  --on-accent: #111315;
  --accent-soft: rgba(228, 132, 78, 0.16);
  --accent-border: rgba(228, 132, 78, 0.34);
  --layer-a: #6f98be;
  --layer-a-soft: rgba(111, 152, 190, 0.24);
  --layer-b-soft: rgba(228, 132, 78, 0.26);
  --excess: #5b6570;
  --chart-line: #768390;
  --plot-paper: #171a1e;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.32);
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, dl, dd, figure {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: 0.24em;
}

button, input {
  font: inherit;
}

code {
  font-family: var(--mono);
  font-size: 0.87em;
  padding: 0.08em 0.34em;
  border-radius: 0.25rem;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
}

:where(a, button, input, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 3rem, 70rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.55rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  text-decoration: none;
  transform: translateY(-220%);
  transition: transform 0.15s ease;
}

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

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 3.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  flex: none;
}

.monogram {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.42rem;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.brand-text {
  display: inline-flex;
  align-items: baseline;
  gap: 0.42rem;
}

.brand-name {
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
}

.brand-cred {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.05rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 1.8vw, 1.45rem);
}

.site-nav a {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 0.42rem;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

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

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
}

.mobile-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 0.44rem;
}

.mobile-nav-inner::-webkit-scrollbar {
  display: none;
}

.mobile-nav a {
  flex: none;
  font-size: 0.77rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 0.14rem 0;
}

.mobile-nav a:hover {
  color: var(--accent);
}

/* Shared typography & buttons */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.mono-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 1.1rem;
  border-radius: 0.45rem;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button.primary {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

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

.button.secondary {
  background: var(--bg-elevated);
  border-color: var(--line-strong);
  color: var(--text);
}

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

.copy-email.is-copied {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

.text-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Hero */
.hero {
  position: relative;
  overflow: clip;
  padding-block: clamp(2.5rem, 5vw, 4.1rem) clamp(2.15rem, 4vw, 3.35rem);
  border-bottom: 1px solid var(--line);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: var(--accent);
  overflow: hidden;
}

.hero-backdrop svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(18rem, 0.88fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: start;
}

.hero-copy h1 {
  margin-top: 0.65rem;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.credential {
  color: var(--accent);
  font-size: 0.62em;
  white-space: nowrap;
}

.role {
  margin-top: 0.9rem;
  font-size: clamp(1.08rem, 1.7vw, 1.24rem);
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
  max-width: 39ch;
}

.lede {
  margin-top: 0.75rem;
  font-size: 0.97rem;
  color: var(--muted);
  max-width: 58ch;
}

.actions {
  margin-top: 1.45rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
}

.action-links {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-left: 0.25rem;
}

/* Executive summary card */
.hero-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  padding: 1.2rem 1.35rem;
  box-shadow: var(--shadow-md);
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.pill {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.18rem 0.54rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.metric-list {
  display: grid;
}

.metric-list > div {
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.metric-list > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.metric-list dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.metric-value {
  margin-top: 0.2rem;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.metric-sub {
  margin-top: 0.12rem;
  font-size: 0.84rem;
  color: var(--muted);
}

/* Sections */
.section {
  padding-block: clamp(2.35rem, 4.5vw, 3.6rem);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.section-heading h2 {
  margin-top: 0.35rem;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.section-intro {
  max-width: 66ch;
  color: var(--muted);
  margin: -0.45rem 0 1.45rem;
  font-size: 0.95rem;
}

.tech-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.26rem 0.62rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elevated);
  color: var(--muted);
}

.tech-badge.is-illustrative {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

/* Interactive Rust/WASM Lab — Compact Analytical Exhibit */
.lab-shell {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  padding: clamp(0.75rem, 1.6vw, 1.05rem);
  box-shadow: var(--shadow-md);
}

.model-status {
  margin-bottom: 0.7rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.42rem;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.lab-controls-bar {
  padding: 0.62rem 0.85rem;
  border-radius: 0.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(14rem, 1.18fr) minmax(14rem, 0.92fr);
  gap: 0.65rem 1.5rem;
  align-items: center;
}

.range-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.mono-readout {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.tail-sigma {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

#layer-top {
  display: block;
  width: 100%;
  margin: 0.36rem 0 0.16rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.range-ends {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.control-label {
  font-size: 0.8rem;
  font-weight: 600;
}

.segmented {
  margin-top: 0.3rem;
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  width: 100%;
  padding: 0.14rem;
  border-radius: 0.4rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  gap: 0.14rem;
}

.segmented.compact {
  margin-top: 0;
  width: auto;
}

.segmented button {
  padding: 0.26rem 0.62rem;
  border: 0;
  border-radius: 0.28rem;
  background: transparent;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.segmented button:hover {
  color: var(--text);
}

.segmented button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.lab-visual-grid {
  margin-top: 0.72rem;
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(17.5rem, 0.96fr);
  gap: 0.75rem;
  align-items: stretch;
}

.chart-panel,
.ledger-panel {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.68rem 0.82rem;
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.chart-panel {
  gap: 0.35rem;
}

.chart-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.severity-chart {
  display: block;
  width: 100%;
  height: auto;
}

.chart-grid {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-baseline {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.chart-curve {
  fill: none;
  stroke: var(--chart-line);
  stroke-width: 1.3;
  stroke-dasharray: 4 4;
}

.chart-curve.is-active {
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-dasharray: none;
}

.chart-marker {
  stroke: var(--accent);
  stroke-width: 1.1;
  stroke-dasharray: 3 3;
}

.chart-marker.attachment {
  stroke: var(--layer-a);
}

.chart-dot {
  fill: var(--accent);
  stroke: var(--plot-paper);
  stroke-width: 2;
}

.chart-text {
  font-family: var(--mono);
  font-size: 10.5px;
  fill: var(--muted);
}

.chart-text.is-active {
  fill: var(--accent);
  font-weight: 600;
}

.chart-text.is-attachment {
  fill: var(--layer-a);
  font-weight: 500;
}

.area-layer-a {
  fill: var(--layer-a-soft);
}

.area-layer-b {
  fill: var(--layer-b-soft);
}

/* Analytical Layer Ledger Table */
.ledger-panel {
  gap: 0.6rem;
}

.layer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.81rem;
  font-variant-numeric: tabular-nums;
}

.layer-table th {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: left;
  padding: 0 0 0.36rem;
  border-bottom: 1px solid var(--line-strong);
}

.layer-table td {
  padding: 0.36rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.layer-table tbody tr:last-child td {
  border-bottom: 0;
  padding-bottom: 0.12rem;
}

.layer-table .num {
  text-align: right;
  font-family: var(--mono);
  font-size: 0.8rem;
  white-space: nowrap;
  padding-left: 0.55rem;
}

.layer-table .num.strong {
  font-weight: 600;
  color: var(--text);
}

.layer-table .num.muted {
  color: var(--muted);
}

.layer-name {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.layer-range {
  display: block;
  padding-left: 0.9rem;
  font-family: var(--mono);
  font-size: 0.67rem;
  color: var(--muted);
  line-height: 1.25;
}

.swatch {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  flex: none;
}

.sw-a { background: var(--layer-a); }
.sw-b { background: var(--accent); }
.sw-ex { background: var(--excess); }

.share-bar {
  display: flex;
  height: 0.38rem;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-subtle);
  gap: 2px;
}

.share-seg {
  height: 100%;
  transition: width 0.2s ease;
}

.seg-a { background: var(--layer-a); }
.seg-b { background: var(--accent); }
.seg-ex { background: var(--excess); }

/* Compact 3-Stat Analytical Strip */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  padding-top: 0.55rem;
  gap: 0.35rem;
}

.stat-cell {
  padding-left: 0.55rem;
  border-left: 1px solid var(--line);
}

.stat-cell:first-child {
  padding-left: 0;
  border-left: 0;
}

.stat-cell dt {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
}

.stat-cell dt span {
  font-family: var(--mono);
  font-size: 0.64rem;
  opacity: 0.85;
}

.stat-cell dd {
  margin-top: 0.14rem;
  font-family: var(--mono);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
}

.stat-cell.is-accent dd {
  color: var(--accent);
}

.stat-cell dd small {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
}

/* Out-of-the-way micro-footnote below the lab shell */
.lab-micro-note {
  margin-top: 0.55rem;
  padding-inline: 0.15rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  font-size: 0.74rem;
  line-height: 1.42;
  color: var(--muted);
}

.lab-micro-note p {
  max-width: 78ch;
}

.lab-micro-note strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.lab-micro-note var {
  font-family: var(--serif);
  font-style: italic;
}

.lab-meta-links {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  flex: none;
}

.lab-meta-links .text-link {
  font-size: 0.74rem;
  font-family: var(--mono);
}

/* Capability & Interest Grids */
.card-grid {
  display: grid;
  gap: 1.15rem;
}

.card-grid.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cap-card,
.interest-card,
.about-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 0.68rem;
  padding: 1.3rem 1.35rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.card-kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}

.cap-card h3,
.interest-card h3,
.about-card h3 {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.cap-card p:last-child,
.interest-card p:last-child,
.about-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.interest-tag {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--muted);
}

/* Experience Timeline */
.timeline {
  list-style: none;
  padding: 0;
  display: grid;
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(10.5rem, 14rem) minmax(0, 1fr);
  gap: 0.9rem 2.25rem;
  padding-block: 1.45rem;
  border-top: 1px solid var(--line);
}

.timeline-item:first-child {
  padding-top: 0.25rem;
  border-top: 0;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.period {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.location {
  margin-top: 0.2rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.entry-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
}

.entry-head h3 {
  font-family: var(--serif);
  font-size: 1.38rem;
  font-weight: 400;
  line-height: 1.2;
}

.entry-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.16rem 0.52rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.organization {
  margin-top: 0.2rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.impact-list {
  margin-top: 0.7rem;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.48rem;
  color: var(--muted);
  font-size: 0.93rem;
}

.impact-list strong {
  color: var(--text);
  font-weight: 600;
}

/* Background Grid */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.about-card .organization {
  margin-top: -0.15rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
}

.reference-links {
  list-style: none;
  padding: 0;
  margin-top: auto;
  padding-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.05rem;
}

/* Footer */
.site-footer {
  padding-block: clamp(2.25rem, 4.5vw, 3.25rem);
  background: var(--bg-subtle);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem 2.25rem;
}

.footer-inner h2 {
  margin-top: 0.35rem;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 400;
  line-height: 1.18;
}

.footer-meta {
  margin-top: 0.38rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

/* Subtle reveal animation (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal].is-pending {
    opacity: 0;
    transform: translateY(10px);
  }

  [data-reveal] {
    transition: opacity 0.4s ease, transform 0.4s ease;
  }
}

/* Responsive */
@media (max-width: 60rem) {
  .hero-grid,
  .lab-visual-grid,
  .card-grid.three-up,
  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .lab-controls-bar {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
  }
}

@media (max-width: 46rem) {
  html {
    scroll-padding-top: 6.5rem;
  }

  .wrap {
    width: calc(100% - 2rem);
  }

  .site-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .timeline-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
  }

  .card-grid.two-up {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 30rem) {
  .stat-cell dd {
    font-size: 0.88rem;
  }

  .stat-cell dd small {
    display: block;
    margin-top: 0.05rem;
  }

  .action-links {
    margin-left: 0;
    width: 100%;
  }
}
