/* Shared portfolio typefaces and palette; scoped to Atlas routes. */
@font-face {
  font-family: Inter; font-style: normal; font-weight: 400 800;
  font-display: swap; src: url("/assets/fonts/inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 800;
  font-display: swap; src: url("/assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
}
:root {
  --bg: #0d1517;
  --panel: #111f21;
  --raised: #17282a;
  --text: #f4f7f2;
  --muted: #bfceca;
  --accent: #8bd9ca;
  --teal: #8bd9ca;
  --line: rgba(229, 238, 232, .24);
  --control: #718c86;
  --button: #8bd9ca;
  --button-text: #0d1517;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Courier New", monospace;
  --serif: var(--sans);
}
:root[data-theme=light] {
  --bg: #f5f7f8;
  --panel: #fff;
  --raised: #e5edef;
  --text: #172a32;
  --muted: #455d68;
  --accent: #8a471f;
  --teal: #126556;
  --line: #b9cbd0;
  --button: #155f54;
  --button-text: #fff;
}
*, *::before, *::after { letter-spacing: 0; }
html { scroll-padding-top: 7rem; }
.wrap { width: min(1180px, calc(100% - 3rem)); }
h1, h2, h3, p, a { word-break: normal; overflow-wrap: normal; hyphens: none; }
.hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 3rem; padding-block: 4rem; }
.hero h1 { font-size: 3.5rem; line-height: 1.13; max-width: 18ch; text-wrap: balance; }
.hero h1 em { display: inline; }
h1, h2, h3 { font-weight: 650; }
.hero h1, .document h1 { font-weight: 700; }
.hero h1 em { font-family: var(--sans); font-style: normal; font-weight: inherit; }
.card-number, .hero-proof span, .lab-equation, code { font-family: var(--mono); font-style: normal; }
.eyebrow, .figure-top, .badge { font-family: var(--mono); }
.button, .featured-card, .lab-box, .source-record { border-radius: 8px; }
.button { font-weight: 700; }
.button:active { transform: translateY(0); }
a:hover { color: var(--teal); }
.brand-mark { color: var(--teal); background: var(--raised); }
.section-intro, .hero-copy { color: var(--muted); }
h2, .contact h2 { font-size: 2.25rem; line-height: 1.2; text-wrap: balance; }
.document h1 { font-size: 3rem; line-height: 1.15; text-wrap: balance; }
.hero-copy, .identity, .section-intro, .evidence-panel p,
.evidence-panel dl, .featured-card p, .lab-copy p, .project-card p,
.research-row p, .contact p, .document dl { font-size: 1rem; line-height: 1.65; }
.evidence-panel h3 { font-size: 1.625rem; }
.small, .source-line, .source-line code, .scene-status,
.research-row .small, .footer { font-size: .875rem !important; }
.badge, .eyebrow, .card-top, .tags, .figure-top, .input-grid label { font-size: .75rem; }
.source-line { overflow-wrap: normal; }
code { overflow-wrap: normal; }
.document dd, .evidence-panel dd, .research-row > div { min-width: 0; }
.source-record code { display: block; max-width: 100%; overflow-x: auto; white-space: nowrap; }
.section { padding-block: 3.5rem; }
.featured-card { transition: transform 180ms ease, border-color 180ms ease; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .featured-card:hover { transform: translateY(-3px); border-color: var(--teal); }
}
button, .utility, .button, .chapter-nav a, .chapter-arrows button,
.filter-chips button, .figure-controls button, .hotspot { min-height: 48px; }
.hotspot { min-width: 48px; }
.button, .text-link, .figure-controls button, .utility, .filter-chips button,
.chapter-nav a, .chapter-arrows button { font-size: .875rem; }
.model-stage { aspect-ratio: 4 / 3; background: var(--bg); border-radius: 0; }
.visual { min-width: 0; width: 100%; }
.figure-top { color: var(--teal); }
.scene-ready .model-canvas { touch-action: none; cursor: grab; }
.scene-ready .model-canvas:active { cursor: grabbing; }
.model-canvas:focus-visible { outline-offset: -4px; }
.scene-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .75rem; }
.scene-toolgroup { display: inline-flex; gap: .25rem; align-items: center; }
.scene-toolbar button { min-width: 48px; min-height: 48px; border: 1px solid var(--control); border-radius: 4px; color: var(--text); background: var(--panel); padding: .5rem .75rem; }
.scene-toolbar button[aria-pressed="true"] { background: var(--button); color: var(--button-text); border-color: var(--button); }
.scene-toolbar button:hover:not(:disabled), .figure-controls button:hover:not(:disabled) { border-color: var(--teal); }
.scene-toolbar .icon-button { font-size: 1.375rem; }
.scene-toolbar select { min-height: 48px; max-width: 100%; color: var(--text); background: var(--panel); border: 1px solid var(--control); border-radius: 4px; padding: .5rem; font: inherit; }
.scene-toolbar input[type="range"] { accent-color: var(--teal); width: 100%; min-height: 48px; margin: 0; }
.scene-explode { display: grid; grid-template-columns: auto minmax(70px, 1fr); gap: .75rem; align-items: center; flex: 1 1 200px; font-size: .875rem; }
.scene-toolbar label { font-size: .875rem; }
.scene-toolbar:empty { display: none; }
[data-mode=evidence] .scene-toolbar { display: none; }
.scene-readout { color: var(--teal); font-family: var(--mono); font-size: .8125rem; min-height: 1.5em; margin: .75rem 0 0; }
.hotspot { font-family: var(--mono); border-color: var(--teal); }
.hotspot[aria-current="true"] { box-shadow: 0 0 0 4px rgba(139,217,202,.16); }
.stage-note { max-width: calc(100% - 2rem); font: .6875rem/1.4 var(--mono); pointer-events: none; }
.scene-dialog { width: min(1440px, calc(100% - 2rem)); max-width: none; max-height: calc(100dvh - 2rem); padding: 1.25rem; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; }
.scene-dialog::backdrop { background: rgba(0, 0, 0, .8); }
.scene-dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .5rem; }
.scene-dialog-heading { position: sticky; top: 0; z-index: 6; background: var(--bg); padding-bottom: .5rem; }
.scene-dialog-heading h2 { font-size: 1.25rem; margin: 0; }
.scene-dialog .visual { margin: 0; max-width: none; }
.scene-dialog .model-stage { height: min(55dvh, 640px); min-height: 220px; aspect-ratio: auto; }
.scene-dialog .figure-top { display: none; }
.scene-dialog [data-expand-scene] { display: none; }
body:has(.scene-dialog[open]) { overflow: hidden; }
.figure-top { flex-wrap: wrap; }
.hero-proof { flex-wrap: wrap; gap: 1rem; font-size: .875rem; }
.hero-proof b { font-size: .875rem; }
.hero-proof > div { flex: 1 1 8rem; }
.footer a { display: inline-flex; align-items: center; min-height: 48px; }
.atlas-local-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; padding-block: .75rem; border-bottom: 1px solid var(--line); }
.atlas-local-nav a { min-height: 48px; display: inline-flex; align-items: center; font-size: .875rem; }
/* Shared destinations, self-contained styling and a keyboard-friendly mobile disclosure. */
.site-header-inner { width: min(1380px, calc(100% - 2rem)); margin: auto; display: flex; align-items: center; gap: .75rem; min-height: 80px; }
.brand { flex-shrink: 0; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 6px; font-weight: 750; }
.brand-copy { display: none; }
@media (min-width: 1280px) {
  .brand-copy { display: grid; font-size: .875rem; line-height: 1.4; }
  .brand-copy small { color: var(--muted); font-size: .6875rem; }
  .brand { gap: .75rem; }
}
.nav { flex: 1; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; gap: .125rem; }
.nav-list li { list-style: none; position: relative; }
.nav-list a, .nav-contact { display: flex; align-items: center; padding: .6rem .7rem; min-height: 48px; text-decoration: none; font-size: .875rem; border-radius: 4px; }
.nav-list a:hover, .nav-list a:focus-visible, .nav-list a[aria-current] { color: var(--teal); background: var(--raised); }
.nav-submenu { display: none; position: absolute; top: 100%; left: 0; min-width: 14rem; padding: .5rem; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); }
.nav-item-has-submenu:hover > .nav-submenu, .nav-item-has-submenu:focus-within > .nav-submenu { display: block; }
.nav-contact { border: 1px solid var(--line); gap: .5rem; }
.nav-toggle, .nav-mobile-contact { display: none !important; }
.nav-caret, .nav-toggle-icon { display: none; }
.nav-item-has-submenu > a::after { content: "⌄"; margin-left: .4rem; color: var(--muted); }
:where(a, button, input, select, summary, [tabindex]):focus-visible { outline: 2px solid #f2c66d; outline-offset: 4px; }
@media (max-width: 1023px) {
  .site-header-inner { flex-wrap: wrap; padding-block: .5rem; }
  .site-header-inner > .utility { margin-left: auto; }
  .js .nav-toggle { display: inline-flex !important; align-items: center; padding: .5rem .875rem; min-height: 48px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
  .nav { order: 5; flex-basis: 100%; max-height: 70vh; overflow: auto; }
  .js .nav { display: none; }
  .js .site-header.is-nav-open .nav { display: block; }
  .nav-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; padding-block: .5rem; }
  .nav-submenu { display: block; position: static; min-width: 0; border: 0; padding: 0 0 0 .6rem; background: transparent; }
  .nav-submenu a { font-size: .8125rem; color: var(--muted); }
  .nav-list a { white-space: normal; }
  .hero h1 { font-size: 3rem; }
}
@media (max-width: 850px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-block: 2.5rem; }
  .visual { margin: 0 auto; }
  .section-heading { display: block; }
  .section-intro { margin-top: 1rem; max-width: 60ch; }
}
@media (max-width: 600px) {
  .scene-dialog .model-stage { height: min(42dvh, 340px); }
  .wrap { width: calc(100% - 2rem); }
  .hero h1 { font-size: 2.5rem; }
  h2, .contact h2 { font-size: 1.875rem; }
  .document h1 { font-size: 2.125rem; }
  .document .lede { font-size: 1.125rem; }
  .section { padding-block: 2.5rem; }
  .site-header-inner { gap: .5rem; }
  .nav-contact { padding-inline: .625rem; }
  .site-header-inner > .utility { font-size: .75rem; padding-inline: .5rem; }
  .research-row { grid-template-columns: minmax(0, 1fr); }
  .research-row > div:last-child { grid-column: auto; }
  .featured-card { padding: 1.25rem; }
  .evidence-panel dl, .document dl { grid-template-columns: minmax(0, 1fr); }
  .figure-controls button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .featured-card:hover { transform: none; } }
