/* ===== TOKENS ===== */
:root {
  --bg: #000;
  --cream: #fafaf8;
  --warm: #e8e0d0;
  --body: rgba(255, 255, 255, 0.62);
  --dim: rgba(255, 255, 255, 0.40);
  --faint: rgba(255, 255, 255, 0.22);
  --line: rgba(255, 255, 255, 0.08);
  --green: #4ade80;
  --serif: 'Playfair Display', Georgia, serif;
  --mono: 'DM Mono', 'SF Mono', Consolas, monospace;
  --sans: 'DM Sans', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-user-select: none;
  user-select: none;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: rgba(255, 255, 255, 0.18); color: #fff; }
@media (pointer: fine) { body, a, button { cursor: none; } }

/* ===== BACKDROP ===== */
#stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#intro {
  position: fixed; inset: 0; z-index: 200; background: #000; pointer-events: none;
  transition: opacity 1.1s ease 0.15s;
}
#intro.done { opacity: 0; }

#constellation-hint {
  position: fixed; z-index: 150; pointer-events: none; transform: translate(-50%, 0); white-space: nowrap;
  font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.6);
  opacity: 0; transition: opacity 0.5s ease;
}
#constellation-hint.show { opacity: 1; }

/* ===== CURSOR ===== */
#cursor-dot, #cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none; border-radius: 50%;
  transform: translate(-50%, -50%); opacity: 0;
}
#cursor-dot { width: 5px; height: 5px; background: var(--cream); }
#cursor-ring {
  width: 30px; height: 30px; border: 1px solid rgba(255, 255, 255, 0.35);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), border-color 0.25s;
}
body.cursor-on #cursor-dot, body.cursor-on #cursor-ring { opacity: 1; }
body.cursor-link #cursor-ring { width: 46px; height: 46px; border-color: rgba(255, 255, 255, 0.7); }
@media (pointer: coarse) { #cursor-dot, #cursor-ring { display: none; } }

/* ===== LAYOUT ===== */
main { position: relative; z-index: 2; }
.container { width: min(88vw, 1180px); margin: 0 auto; }
.section { padding: 9rem 0 4rem; }

/* ===== TYPE ===== */
.h2 {
  font-family: var(--serif); font-weight: 800; color: var(--cream);
  font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.08; letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
}
.lead { font-size: 1.05rem; color: var(--warm); max-width: 44rem; margin-bottom: 3rem; }
.label { font-family: var(--mono); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.15em; color: rgba(255,255,255,0.45); }
.eyebrow {
  display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem;
  font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--dim);
}
.eyebrow i { flex: 1; height: 1px; background: var(--line); }
.eyebrow.small { margin: 4rem 0 1.5rem; }

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 2rem; mix-blend-mode: difference;
}
.nav-mark { font-family: var(--serif); font-weight: 800; font-size: 1rem; color: var(--cream); letter-spacing: 0.05em; }
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-family: var(--mono); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.13em;
  color: rgba(255,255,255,0.38); transition: color 0.25s;
}
.nav-links a:hover, .nav-links a.active { color: var(--cream); }

/* ===== HERO ===== */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; position: relative; padding: 7rem 0 7rem; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 4rem; align-items: end; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 0.7rem; margin-bottom: 2rem;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; color: var(--warm);
}
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(74,222,128,0.6); animation: pulse 2s infinite; flex-shrink: 0; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,0.55); } 70% { box-shadow: 0 0 0 9px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }

.hero-name {
  font-family: var(--serif); font-weight: 800; color: var(--cream);
  font-size: clamp(4rem, 10vw, 8rem); line-height: 0.95; letter-spacing: 0.02em;
}
.hero-name .line { display: block; overflow: hidden; }
.hero-name .line span { display: block; transform: translateY(110%); animation: rise 1.1s var(--ease) forwards; }
.hero-name .line:nth-child(2) span { animation-delay: 0.12s; }
@keyframes rise { to { transform: translateY(0); } }

.hero-meta { display: flex; gap: 3rem; margin-top: 2.5rem; }
.hero-meta .label { margin-bottom: 0.35rem; }
.hero-meta .value { font-size: 0.9rem; color: var(--warm); }

.hero-actions { display: flex; align-items: center; gap: 0.5rem; margin-top: 2.5rem; }
.icon-btn {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 3px; color: rgba(255,255,255,0.6);
  transition: border-color 0.25s, color 0.25s;
}
.icon-btn:hover { border-color: rgba(255,255,255,0.4); color: var(--cream); }
.resume-btn {
  display: inline-flex; align-items: center; gap: 0.6rem; height: 38px; padding: 0 1rem;
  border: 1px solid var(--line); border-radius: 3px;
  font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.65);
  transition: border-color 0.25s, color 0.25s;
}
.resume-btn:hover, .resume.open .resume-btn { border-color: rgba(255,255,255,0.4); color: var(--cream); }
.resume-btn { background: none; font: inherit; font-family: var(--mono); font-size: 0.62rem; }
.resume-caret { margin-left: -0.15rem; opacity: 0.6; transition: transform 0.3s var(--ease); }
.resume.open .resume-caret { transform: rotate(180deg); }
.resume { position: relative; }
.resume-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 250px;
  background: rgba(8,8,10,0.96); border: 1px solid rgba(255,255,255,0.14); border-radius: 3px;
  padding: 0.35rem; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transform-origin: top left; animation: menu-in 0.22s var(--ease);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
.resume-menu-head {
  padding: 0.45rem 0.6rem 0.4rem; font-family: var(--mono); font-size: 0.55rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--dim);
  border-bottom: 1px solid var(--line); margin-bottom: 0.25rem;
}
.resume-menu a {
  display: flex; flex-direction: column; gap: 0.1rem; padding: 0.5rem 0.6rem; border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}
.resume-menu a:hover, .resume-menu a:focus-visible { background: rgba(255,255,255,0.07); outline: none; }
.resume-menu .rm-name { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.85); }
.resume-menu .rm-desc { font-size: 0.72rem; color: var(--dim); }
.resume-menu a:hover .rm-name, .resume-menu a:focus-visible .rm-name { color: var(--cream); }
.hero-motto { margin-top: 1.25rem; font-family: var(--mono); font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(255,255,255,0.45); }

/* readout */
.readout {
  border-top: 1px solid rgba(255,255,255,0.18); border-bottom: 1px solid rgba(255,255,255,0.18);
  padding: 1rem 0 0.9rem; font-family: var(--mono);
  opacity: 0; animation: fade 1s ease 0.6s forwards;
}
@keyframes fade { to { opacity: 1; } }
.readout-head { display: flex; justify-content: space-between; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--dim); margin-bottom: 1rem; }
.readout-live { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--green); }
.readout-live i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
.readout-row {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.42rem 0;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.55);
}
.readout-row::after { content: ''; flex: 1; order: 1; align-self: center; border-bottom: 1px dotted rgba(255,255,255,0.18); }
.readout-row b { order: 2; font-weight: 500; font-size: 1.05rem; line-height: 1; color: var(--cream); font-variant-numeric: tabular-nums; letter-spacing: 0; min-width: 3.4ch; text-align: right; }
.readout-foot { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; font-size: 0.56rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--dim); }

.hero-contact { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; color: rgba(255,255,255,0.6); margin-top: 0.8rem; }
.hero-contact a { color: var(--cream); text-decoration: none; border-bottom: 1px dotted rgba(255,255,255,0.35); }
.hero-contact a:hover { border-bottom-style: solid; }

.scroll-cue {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.25em; color: rgba(255,255,255,0.5);
}
.scroll-cue i { width: 1px; height: 38px; background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent); animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 4rem; }
.about-copy p { margin-bottom: 1.25rem; font-size: 0.95rem; line-height: 1.7; }
.about-copy em { font-style: normal; color: var(--warm); }
.about-facts { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.fact { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.fact .value { font-size: 0.85rem; color: var(--warm); }

.marquee { margin-top: 4rem; padding: 0.9rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; -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: 3rem; width: max-content; animation: marquee 48s linear infinite; }
.marquee-track span { font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--dim); white-space: nowrap; }
.marquee-track span::before { content: '\25AA'; margin-right: 3rem; color: rgba(255,255,255,0.25); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===== TRAJECTORY (sticky world) ===== */
.trajectory { position: relative; margin-top: 4rem; }
.trajectory-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.trajectory-head { padding-top: 5.5rem; flex-shrink: 0; }
.trajectory-head .h2 { margin-bottom: 1.5rem; }
.stage { position: relative; flex: 1; overflow: hidden; }
.world { position: absolute; top: 0; left: 0; width: 100%; }
#world-canvas { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 2; }

.grid-line { position: absolute; left: 0; right: 0; height: 1px; background: rgba(255,255,255,0.04); }
.year-tick { position: absolute; width: 11px; height: 1px; background: rgba(255,255,255,0.22); }
.year-label { position: absolute; font-family: var(--mono); font-size: 0.58rem; color: rgba(255,255,255,0.5); letter-spacing: 0.06em; transform: translateY(-50%); }
.now-label { position: absolute; font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--green); transform: translateY(-50%); }

.tcard {
  position: absolute; width: 320px; border-radius: 3px; box-sizing: border-box; overflow: hidden;
  border: 1px solid rgba(var(--c), 0.16); border-left: 2px solid rgb(var(--c));
  background: linear-gradient(rgba(var(--c), 0.055), rgba(var(--c), 0.02));
  transition: border-color 0.3s, background 0.3s;
}
.tcard:hover { border-color: rgba(var(--c), 0.35); border-left-color: rgb(var(--c)); background: linear-gradient(rgba(var(--c), 0.1), rgba(var(--c), 0.03)); }
.tcard-head { padding: 12px 14px 0; }
.tcard-row { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-bottom: 2px; }
.tcard-title { font-family: var(--sans); font-weight: 600; font-size: 0.8rem; color: var(--cream); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.tcard-date { font-family: var(--mono); font-size: 0.5rem; color: rgba(255,255,255,0.3); letter-spacing: 0.06em; white-space: nowrap; flex-shrink: 0; }
.tcard-org { display: block; font-family: var(--mono); font-size: 0.55rem; color: rgba(var(--c), 0.8); letter-spacing: 0.04em; line-height: 1.4; }
.tcard-sep { height: 1px; background: rgba(var(--c), 0.14); margin: 5px 0 9px; }
.tcard-body { padding: 0 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.tcard-body div { display: flex; gap: 6px; align-items: flex-start; }
.tcard-body div::before { content: '\25AA'; color: rgb(var(--c)); font-size: 0.42rem; margin-top: 0.3rem; opacity: 0.7; flex-shrink: 0; }
.tcard-body span { font-size: 0.8rem; line-height: 1.48; color: var(--body); text-align: justify; }
.tcard-stack { padding: 0 14px 12px; font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.32); line-height: 1.6; }

.tchip {
  position: absolute; display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px 0 7px;
  border: 1px solid rgba(var(--c), 0.25); border-radius: 2px; background: rgba(var(--c), 0.06);
  font-family: var(--mono); font-size: 0.48rem; letter-spacing: 0.03em; color: rgba(255,255,255,0.7); white-space: nowrap;
  transform: translateY(-50%);
}
.tchip::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: rgb(var(--c)); }
.tchip b { font-weight: 400; color: rgba(var(--c), 0.9); margin-right: 6px; }

.stage-marker {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 3;
  display: flex; align-items: center; gap: 10px;
}
.stage-marker i { width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px rgba(255,255,255,0.8), 0 0 24px rgba(255,255,255,0.35); }
.stage-marker span { position: absolute; left: 14px; font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.7); white-space: nowrap; }
.stage-legend {
  position: absolute; left: 0; bottom: 1rem; display: flex; gap: 1.25rem; padding-left: calc((100vw - min(88vw, 1180px)) / 2);
  font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); z-index: 3;
}
.stage-legend span { display: inline-flex; align-items: center; gap: 6px; }
.stage-legend i { width: 14px; height: 2px; display: inline-block; }

/* mobile fallback: flow layout */
.trajectory.flow .trajectory-sticky { position: relative; height: auto; overflow: visible; }
.trajectory.flow .stage { overflow: visible; }
.trajectory.flow .world { position: relative; transform: none !important; width: min(88vw, 1180px); margin: 0 auto; display: flex; flex-direction: column; gap: 14px; padding: 0 0 3rem 18px; border-left: 1px solid rgba(255,255,255,0.2); }
.trajectory.flow #world-canvas, .trajectory.flow .world::after, .trajectory.flow .grid-line, .trajectory.flow .year-tick, .trajectory.flow .now-label, .trajectory.flow .stage-marker, .trajectory.flow .stage-legend { display: none; }
.trajectory.flow .year-label { position: static; transform: none; padding: 1rem 0 0.25rem; }
.trajectory.flow .tcard, .trajectory.flow .tchip { position: static; width: 100%; transform: none; }
.trajectory.flow .tchip { height: auto; padding: 8px 10px; white-space: normal; }

/* ===== WORK ===== */
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.work-card {
  display: block; padding: 1.5rem; border: 1px solid var(--line); border-radius: 3px; background: rgba(255,255,255,0.015);
  transition: border-color 0.3s, background 0.3s, transform 0.5s var(--ease);
}
.work-card:hover { border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.03); transform: translateY(-3px); }
.work-top { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--dim); }
.work-top .idx { color: rgba(255,255,255,0.6); }
.work-top svg { margin-left: auto; color: rgba(255,255,255,0.3); transition: color 0.3s, transform 0.3s; }
.work-card:hover .work-top svg { color: var(--cream); transform: translate(2px, -2px); }
.work-media { margin: -0.4rem 0 1.1rem; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; aspect-ratio: 16 / 9; background: #0b0d10; }
.work-media img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0.92; transition: opacity 0.3s; }
.work-card:hover .work-media img { opacity: 1; }
.work-card h3 { font-family: var(--serif); font-weight: 700; font-size: 1.6rem; color: var(--cream); letter-spacing: 0.01em; margin-bottom: 0.6rem; }
.work-card p { font-size: 0.88rem; line-height: 1.6; margin-bottom: 1.2rem; }
.work-stack { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.38); }

/* ===== STACK ===== */
.graph-wrap { position: relative; height: 760px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#stack-graph { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.graph-legend {
  position: absolute; left: 0; top: 1rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; pointer-events: none;
  font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim);
}
.graph-legend span { display: inline-flex; align-items: center; gap: 6px; }
.graph-legend i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.graph-hint { position: absolute; right: 0; bottom: 0.9rem; font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.3); pointer-events: none; }

.cred { display: grid; grid-template-columns: 6rem 1fr auto 1.5rem; align-items: center; gap: 1.5rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); transition: color 0.25s; }
.cred:first-of-type { border-top: 1px solid var(--line); }
.cred-date { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.cred-name { font-size: 0.9rem; color: var(--warm); transition: color 0.25s; }
.cred-org { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.cred-arrow { color: rgba(255,255,255,0.3); text-align: right; transition: color 0.25s, transform 0.25s; }
.cred:hover .cred-name { color: var(--cream); }
.cred:hover .cred-arrow { color: var(--cream); transform: translate(2px, -2px); }

/* ===== CONTACT ===== */
.contact { padding-bottom: 8rem; }
.contact-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.contact-btn {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.05em; color: var(--cream);
  padding: 0.9rem 1.5rem; border: 1px solid rgba(255,255,255,0.3); border-radius: 3px;
  transition: background 0.3s, color 0.3s;
}
.contact-btn:hover { background: var(--cream); color: #000; }
.contact-link { font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); transition: color 0.25s; }
.contact-link:hover { color: var(--cream); }

/* ===== FOOTER ===== */
.footer {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 2rem 0 5rem;
  border-top: 1px solid var(--line); font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim);
}
.footer a { color: rgba(255,255,255,0.6); }
.footer a:hover { color: var(--cream); }

/* ===== HUD ===== */
.hud { position: fixed; z-index: 49; bottom: 1.25rem; color: #fff; font-family: var(--mono); font-size: 0.78rem; pointer-events: none; user-select: none; }
.hud-left { left: 1.25rem; display: flex; flex-direction: column; gap: 0.45rem; }
.hud-left > div, .hud-row > div { display: flex; align-items: center; gap: 0.45rem; line-height: 1; }
.hud svg { opacity: 0.7; flex-shrink: 0; }
.hud-tag { font-size: 0.62rem; letter-spacing: 0.06em; opacity: 0.75; }
.hud span { font-variant-numeric: tabular-nums; letter-spacing: 0.03em; }
.hud-right { right: 1.5rem; display: flex; flex-direction: column; align-items: flex-end; gap: 0.6rem; }
.hud-row { display: flex; align-items: center; gap: 1.25rem; }
.coords { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.7rem; }
.coords > div { display: flex; gap: 0.45rem; }
.hud-btn {
  pointer-events: auto; display: flex; align-items: center; gap: 0.45rem; background: none; border: 0; color: #fff;
  font: inherit; font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.55; transition: opacity 0.25s;
}
.hud-btn:hover, .hud-btn.on { opacity: 1; }
.hud-btn.armed-hint { opacity: 0.9; color: var(--green); animation: blink 1.6s infinite; }
.hud-btn .sfx-wave { opacity: 0; transition: opacity 0.3s; }
.hud-btn.on .sfx-wave { opacity: 1; }
.hud-btn.on .sfx-wave:last-child { animation: blink 1.6s infinite; }
.to-top {
  pointer-events: auto; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(10,10,10,0.8);
  color: rgba(255,255,255,0.55); display: flex; align-items: center; justify-content: center; position: relative;
  opacity: 0; transform: translateY(8px); transition: opacity 0.4s, transform 0.4s, color 0.2s;
}
.to-top.show { opacity: 1; transform: none; }
.to-top:hover { color: #fff; }
.to-top .ring { position: absolute; inset: 0; transform: rotate(-90deg); }

/* ===== REVEAL ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
}
@media (max-width: 900px) {
  .nav { padding: 1.1rem 1.25rem; mix-blend-mode: normal; background: linear-gradient(#000, rgba(0,0,0,0)); }
  .nav-links { gap: 1.1rem; }
  .nav-links a { font-size: 0.58rem; }
  .section { padding: 6rem 0 2rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .work-grid { grid-template-columns: 1fr; }
  .graph-wrap { height: 720px; }
  .cred { grid-template-columns: 5rem 1fr 1.25rem; }
  .cred-org { display: none; }
  .hero-meta { flex-wrap: wrap; gap: 1.5rem 2.5rem; }
  .hud { font-size: 0.66rem; }
  .hud-right .coords { display: none; }
  .trajectory-head { padding-top: 4rem; }
}
@media (max-width: 520px) {
  .nav-links a:nth-child(4) { display: none; }
  .hero-actions { flex-wrap: wrap; }
  .hud-left { bottom: 0.9rem; left: 0.9rem; }
  .hud-right { right: 0.9rem; bottom: 0.9rem; }
  .footer { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .pulse, .scroll-cue i, .readout-live i { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
