:root {
  --bg: #05060b;
  --panel: rgba(12, 14, 22, 0.66);
  --panel-solid: #11131c;
  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.18);
  --text: #eceef4;
  --muted: #a3a9bb;
  --dim: #737a90;
  --accent: #ffb547;      /* sodium-lamp amber: tunnels */
  --accent-2: #6ec8ff;    /* star blue: orbit */
  --union: #b8243a;       /* oxblood: the Union */
  --union-gold: #d9b26a;
  --radius: 16px;
  --max: 1120px;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; }
.mono { font-family: var(--mono); }
::selection { background: var(--accent); color: #111; }

#world {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}
main, .foot, .nav { position: relative; z-index: 1; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 40px);
  background: linear-gradient(to bottom, rgba(5, 6, 11, 0.8), rgba(5, 6, 11, 0));
}
.nav-mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.06em; text-decoration: none; }
.mark-ring { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--accent); box-shadow: 0 0 14px rgba(255, 181, 71, 0.5); }
.nav nav { display: flex; gap: clamp(10px, 2.6vw, 26px); }
.nav nav a { font-size: 14px; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.nav nav a:hover { color: var(--text); }

/* ---------- altimeter HUD ---------- */
.hud {
  position: fixed; z-index: 5;
  left: clamp(10px, 1.6vw, 24px); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  font-size: 11px; color: var(--muted); letter-spacing: 0.08em;
  pointer-events: none;
}
.hud-zone { writing-mode: vertical-rl; transform: rotate(180deg); color: var(--accent); }
.hud-track { position: relative; width: 3px; height: 34vh; background: var(--line-2); border-radius: 3px; overflow: visible; }
.hud-fill { position: absolute; left: 0; top: 0; width: 100%; height: 0; background: linear-gradient(var(--accent-2), var(--accent)); border-radius: 3px; }
.hud-ground { position: absolute; left: -5px; width: 13px; height: 2px; background: #7fbf6a; top: 70%; }
.hud-read { white-space: nowrap; color: var(--text); }
@media (max-width: 1260px) { .hud { display: none; } }

/* ---------- shared ---------- */
.section, .hero { max-width: var(--max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.section { padding-top: 140px; }
.eyebrow { color: var(--accent); font-size: 13px; letter-spacing: 0.04em; margin: 0 0 10px; }
h1, h2, h3 { line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 4.5vw, 48px); font-weight: 600; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6); }
h3 { font-size: 21px; font-weight: 600; }
.section-head { margin-bottom: 40px; }
.section-sub { color: var(--muted); margin: 12px 0 0; max-width: 60ch; }
.kicker { color: var(--accent-2); font-size: 12px; margin: 0 0 8px; letter-spacing: 0.03em; }
.hl { color: var(--accent); }
.at { color: var(--muted); font-weight: 400; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 20px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04);
  color: var(--text); font: 500 15px var(--sans); text-decoration: none; cursor: pointer;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}
.btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.32); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #17110a; }
.btn.primary:hover { background: #ffc66e; }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 14px; font-size: 13px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 14px 0 0; }
.tags li { font: 12px var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; background: rgba(0, 0, 0, 0.2); }
.bullets { margin: 12px 0 0; padding-left: 18px; color: var(--muted); }
.bullets li { margin: 6px 0; }
.bullets li::marker { color: var(--accent); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .motions-track { animation: none !important; }
}

/* ---------- hero ---------- */
.hero { min-height: calc(100svh - 60px); display: flex; flex-direction: column; justify-content: center; padding-bottom: 60px; }
.hero h1 {
  font-size: clamp(60px, 12vw, 148px); font-weight: 700; letter-spacing: -0.05em; line-height: 0.92;
  background: linear-gradient(180deg, #fff 35%, #9ea6c0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: clamp(18px, 2.3vw, 23px); color: var(--muted); max-width: 42ch; margin: 26px 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, auto); gap: 16px 48px; justify-content: start; margin: 56px 0 0; font-size: 13px; }
.hero-stats dt { color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; }
.hero-stats dd { margin: 4px 0 0; }

/* ---------- paper ---------- */
.paper { display: grid; grid-template-columns: 1.35fr 1fr; gap: 10px; overflow: hidden; }
.paper-text { padding: 32px; }
.paper-text h3 { font-size: clamp(21px, 2.4vw, 27px); }
.paper-text > p { color: var(--muted); }
.authors { margin: 10px 0 0; font-size: 15px; }
.authors strong { color: var(--text); }
.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
.figures div { border-top: 1px solid var(--line-2); padding-top: 10px; }
.figures b { display: block; font-size: 26px; color: var(--accent-2); font-weight: 500; }
.figures span { font-size: 11.5px; color: var(--dim); line-height: 1.4; display: block; }
.paper-art { display: grid; place-items: center; background: radial-gradient(ellipse at 50% 30%, rgba(110, 200, 255, 0.12), transparent 70%); padding: 18px; }
.iscr { width: 100%; max-width: 320px; overflow: visible; }
.iscr .lbl { font: 10px var(--mono); fill: var(--dim); }
.iscr .layer { transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.paper.in .iscr .l1 { transform: translateY(-8px); }
.paper.in .iscr .l3 { transform: translateY(8px); }
.iscr .rays { animation: rays 3s ease-in-out infinite; }
.iscr .heat { animation: heat 2.4s ease-in-out infinite; }
@keyframes rays { 50% { opacity: 0.45; } }
@keyframes heat { 0% { transform: translateY(0); opacity: .9; } 100% { transform: translateY(10px); opacity: 0; } }

/* ---------- lab ---------- */
.lab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lab-grid.tight { margin-top: 22px; gap: 16px; }
.lab-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; text-decoration: none;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.25s, transform 0.25s;
}
.lab-card:hover { border-color: rgba(255, 181, 71, 0.45); transform: translateY(-2px); }
.lab-card.feature { grid-column: 1 / -1; flex-direction: row; }
.lab-card.feature .lab-preview { flex: 1 1 52%; min-height: 320px; border-bottom: 0; border-right: 1px solid var(--line); }
.lab-card.feature .lab-text { flex: 1 1 48%; align-self: center; }
.lab-preview { position: relative; min-height: 180px; background: radial-gradient(ellipse at center, #141826, #07080d 75%); border-bottom: 1px solid var(--line); overflow: hidden; }
.lab-text { padding: 24px 26px 26px; }
.lab-text p { color: var(--muted); margin: 10px 0 0; }
.lab-text .kicker { margin: 0 0 8px; }
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

#eg-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 22px; align-content: center; }
#eg-preview canvas { width: 100%; aspect-ratio: 1; border-radius: 6px; image-rendering: pixelated; background: #000; }

.art-deblur { display: grid; place-items: center; }
.art-deblur span {
  width: 116px; height: 116px; border-radius: 4px;
  background: repeating-conic-gradient(#eceef4 0 25%, #07080d 0 50%) 0 0 / 29px 29px;
  box-shadow: 0 0 0 8px #eceef4;
  animation: deblur 5s ease-in-out infinite;
}
@keyframes deblur { 0%, 100% { filter: blur(8px); } 45%, 62% { filter: blur(0); } }
.art-torch, .art-tbm { display: grid; place-items: center; }
.art-torch svg { width: 80%; }
.art-tbm { color: var(--accent); }
.art-tbm svg { width: 70%; max-width: 280px; }
.art-tbm .spin { transform-origin: 100px 60px; animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.art-hmi { display: grid; place-items: center; }
.hmi { display: grid; grid-template-columns: repeat(4, 34px); gap: 10px; padding: 18px; border: 1px solid var(--line-2); border-radius: 10px; background: #0b0d12; }
.hmi i { height: 22px; border-radius: 4px; background: #1d2230; border: 1px solid var(--line); }
.hmi i.on { background: #2f7d4f; box-shadow: 0 0 12px rgba(80, 220, 130, 0.5); animation: blink 2.2s infinite; }
.hmi i.warn { background: #a8741f; box-shadow: 0 0 12px rgba(255, 181, 71, 0.6); animation: blink 1.3s infinite; }
@keyframes blink { 50% { opacity: 0.45; } }

/* ---------- atmosphere / education ---------- */
.breach { max-width: var(--max); margin: 0 auto; text-align: left !important; padding-left: clamp(16px, 4vw, 40px); }
.reentry, .breach { text-align: center; color: rgba(255, 255, 255, 0.5); font-size: 12px; letter-spacing: 0.3em; padding-top: 160px; text-transform: uppercase; }
.edu { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; padding: 30px; }
.edu p { color: var(--muted); }
.awards { display: grid; gap: 10px; align-content: center; }
.award { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, 0.25); }
.award span { display: block; font-size: 10px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.12em; }
.award b { font-weight: 500; }

/* ---------- AUSTIN UNION ---------- */
.union { padding-top: 160px; }
.union-chamber {
  position: relative;
  border-radius: 22px;
  padding: clamp(28px, 5vw, 64px);
  background:
    radial-gradient(ellipse at 50% -20%, rgba(184, 36, 58, 0.35), transparent 60%),
    linear-gradient(180deg, rgba(28, 10, 14, 0.9), rgba(14, 8, 10, 0.92));
  border: 1px solid rgba(217, 178, 106, 0.35);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), inset 0 0 0 6px rgba(217, 178, 106, 0.06);
  overflow: hidden;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.union-chamber::before {
  /* a faint colonnade behind the title */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 260px; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(217, 178, 106, 0.06) 0 2px, transparent 2px 64px);
  mask-image: linear-gradient(#000, transparent);
  -webkit-mask-image: linear-gradient(#000, transparent);
}
.union-head { position: relative; text-align: center; padding-bottom: 34px; border-bottom: 1px solid rgba(217, 178, 106, 0.25); }
.union-eyebrow { color: var(--union-gold); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; margin: 0 0 18px; }
.union-title { font-family: var(--serif); font-weight: 600; font-size: clamp(46px, 8vw, 96px); letter-spacing: -0.01em; line-height: 1; color: #f6ecd9; text-shadow: none; }
.union-role { font-family: var(--serif); font-size: 22px; color: var(--union-gold); margin: 16px 0 0; }
.union-body { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; padding: 36px 0 30px; }
.union-lead p { font-family: var(--serif); font-size: 21px; line-height: 1.5; color: #e8dcc6; margin: 0 0 16px; }
.union-lead strong { color: #fff; }
.docket { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.docket li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 14px 16px; border: 1px solid rgba(217, 178, 106, 0.2); border-radius: 12px; background: rgba(0, 0, 0, 0.25); color: #cdbfa6; font-size: 15.5px; }
.docket li > span { color: var(--union-gold); font-size: 14px; padding-top: 2px; }
.docket b { color: #f6ecd9; font-weight: 600; }
.motions { position: relative; overflow: hidden; border-block: 1px solid rgba(217, 178, 106, 0.25); padding: 14px 0; margin: 4px calc(-1 * clamp(28px, 5vw, 64px)) 30px;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.motions-track { display: flex; gap: 48px; width: max-content; animation: marquee 60s linear infinite; font-family: var(--serif); font-style: italic; font-size: 22px; color: #f1e3c8; white-space: nowrap; }
.motions-track span::after { content: "✦"; color: var(--union); margin-left: 48px; font-style: normal; font-size: 14px; }
@keyframes marquee { to { transform: translateX(-50%); } }
.guest-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.guest { padding: 18px; border-radius: 12px; border: 1px solid rgba(217, 178, 106, 0.22); background: linear-gradient(180deg, rgba(184, 36, 58, 0.18), rgba(0, 0, 0, 0.2)); }
.guest span { display: block; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--union-gold); }
.guest b { display: block; font-family: var(--serif); font-size: 22px; line-height: 1.15; color: #f6ecd9; margin: 6px 0 4px; }
.guest i { font-family: var(--serif); color: #c7b79b; font-size: 16px; }
.union-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 30px; }
.union-btn { background: var(--union); border-color: var(--union); color: #fff; }
.union-btn:hover { background: #d0304a; }

/* ---------- timeline (surface) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.timeline > li { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 24px 28px; }
.tl-when { color: var(--accent); font-size: 13px; padding-top: 3px; }
.ground-spacer { height: 52vh; }

/* ---------- underground ---------- */
.job { padding: 30px; margin-bottom: 20px; }
.job-sub { color: var(--muted); max-width: 70ch; }
.job .kicker { color: var(--accent); }

.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.proj { display: flex; flex-direction: column; padding: 24px 24px 20px; text-decoration: none; transition: border-color 0.25s, transform 0.25s; }
a.proj:hover { border-color: rgba(255, 181, 71, 0.5); transform: translateY(-3px); }
.proj h3 { font-size: 20px; }
.proj > p:not(.kicker) { color: var(--muted); margin: 10px 0 0; font-size: 15.5px; }
.proj .tags { margin-top: auto; padding-top: 16px; }
.proj .kicker { color: var(--accent); }
.proj-link { font-size: 12px; color: var(--accent); margin-top: 14px; }
.proj.soon { border-style: dashed; }
.proj.soon .proj-link { color: var(--dim); }
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 24px 28px; margin-top: 20px; }
.skills p { margin: 0; color: var(--muted); font-size: 15px; }
.skills .kicker { color: var(--accent); margin-bottom: 6px; }

/* ---------- photos ---------- */
.photo-grid { columns: 3 220px; column-gap: 12px; margin-top: 24px; }
.photo-grid figure { margin: 0 0 12px; break-inside: avoid; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--panel-solid); }
.photo-grid img { display: block; width: 100%; height: auto; }
.photo-grid figcaption { font-size: 13px; color: var(--muted); padding: 8px 12px; }

/* ---------- contact / footer ---------- */
.contact { padding-bottom: 140px; }
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 14px; margin-top: 30px; }
.contact-card { padding: 20px; text-decoration: none; transition: border-color 0.2s, transform 0.2s; overflow-wrap: anywhere; }
.contact-card:hover { border-color: rgba(255, 181, 71, 0.55); transform: translateY(-2px); }
.contact-card span { display: block; font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 6px; }
.contact-card b { font-weight: 500; font-size: 15.5px; }
.ascend { margin-top: 40px; font-size: 13px; }
.ascend a { color: var(--muted); }
.foot {
  max-width: var(--max); margin: 0 auto;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 24px clamp(16px, 4vw, 40px) 40px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--dim);
}
.foot a { color: var(--muted); }

/* ---------- modal ---------- */
.modal { width: min(1400px, 96vw); height: 92vh; max-width: none; max-height: none; padding: 0; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel-solid); color: var(--text); overflow: hidden; }
.modal[open] { display: flex; flex-direction: column; }
.modal::backdrop { background: rgba(3, 4, 7, 0.8); backdrop-filter: blur(4px); }
.modal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.modal-title { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-actions { display: flex; gap: 8px; flex-shrink: 0; }
.modal iframe { flex: 1; width: 100%; border: 0; background: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .paper, .edu, .union-body { grid-template-columns: 1fr; }
  .guest-grid, .contact-grid { grid-template-columns: 1fr 1fr; }
  .proj-grid, .skills { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .lab-grid { grid-template-columns: 1fr; }
  .lab-card.feature { flex-direction: column; }
  .lab-card.feature .lab-preview { min-height: 240px; border-right: 0; border-bottom: 1px solid var(--line); }
  .timeline > li { grid-template-columns: 1fr; gap: 4px; padding: 22px; }
  .hero-stats { grid-template-columns: 1fr; gap: 14px; }
  .section { padding-top: 100px; }
  .figures { grid-template-columns: 1fr 1fr 1fr; }
  .figures b { font-size: 20px; }
}
@media (max-width: 560px) {
  .nav nav a:nth-child(1), .nav nav a:nth-child(3) { display: none; }
  .guest-grid, .contact-grid { grid-template-columns: 1fr; }
  .paper-text, .edu, .job { padding: 22px; }
  .modal { width: 100vw; height: 100svh; border-radius: 0; }
  .union-lead p { font-size: 19px; }
}
