:root {
  --night: #07121f;
  --deep: #0b1c2d;
  --panel: #10283b;
  --line: #24465c;
  --mist: #dcecf2;
  --muted: #8ba9b8;
  --cyan: #7de4ed;
  --blue: #78a9ff;
  --amber: #ffca72;
  --rose: #ff8199;
}

* { box-sizing: border-box; }
html { color-scheme: dark; background: var(--night); }
body {
  margin: 0;
  min-width: 320px;
  color: var(--mist);
  background:
    radial-gradient(circle at 72% -20%, rgba(69, 145, 181, .24), transparent 42rem),
    linear-gradient(180deg, #091827 0, var(--night) 45rem);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image: linear-gradient(rgba(125,228,237,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(125,228,237,.12) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

.masthead, main, footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.masthead { height: 86px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 13px; color: inherit; text-decoration: none; letter-spacing: .08em; }
.brand span:last-child { display: grid; }
.brand b { font: 600 14px "Avenir Next", Avenir, sans-serif; }
.brand small { color: var(--muted); font: 500 9px "SFMono-Regular", Consolas, monospace; letter-spacing: .2em; }
.brand-moon { width: 29px; height: 29px; border: 1px solid var(--cyan); border-radius: 50%; box-shadow: inset -7px 2px 0 -3px var(--cyan), 0 0 20px rgba(125,228,237,.18); transform: rotate(-15deg); }
.live { display: flex; align-items: center; gap: 9px; color: var(--muted); font: 500 11px "SFMono-Regular", Consolas, monospace; text-transform: uppercase; letter-spacing: .08em; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 5px rgba(125,228,237,.09); animation: pulse 2.4s ease-in-out infinite; }

.hero { min-height: 365px; padding: 80px 0 54px; display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.hero-copy { max-width: 780px; }
.eyebrow { margin: 0 0 14px; color: var(--cyan); font: 500 10px "SFMono-Regular", Consolas, monospace; letter-spacing: .16em; text-transform: uppercase; }
h1, h2 { margin: 0; font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif; }
h1 { max-width: 760px; font-size: clamp(3.2rem, 7vw, 6.7rem); font-weight: 500; line-height: .91; letter-spacing: -.065em; text-wrap: balance; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 500; letter-spacing: -.035em; }
.lede { max-width: 590px; margin: 30px 0 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.window-picker { display: flex; flex: none; border: 1px solid var(--line); padding: 4px; background: rgba(7,18,31,.5); }
.window-picker button { border: 0; padding: 10px 12px; color: var(--muted); background: none; cursor: pointer; font: 500 10px "SFMono-Regular", Consolas, monospace; }
.window-picker button:hover, .window-picker button:focus-visible { color: var(--mist); }
.window-picker button.active { color: var(--night); background: var(--cyan); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.orbit-panel, .project-section, .crash-section { border-top: 1px solid var(--line); padding: 33px 0 58px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 38px; }
.section-heading > p { margin: 0; color: var(--muted); font: 400 10px "SFMono-Regular", Consolas, monospace; text-transform: uppercase; letter-spacing: .06em; }
.chart { min-height: 300px; border: 1px solid var(--line); background: rgba(11,28,45,.72); overflow: hidden; }
.chart svg { display: block; width: 100%; height: 300px; }
.grid-line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 8; }
.axis-label { fill: var(--muted); font: 9px "SFMono-Regular", Consolas, monospace; }
.signal-line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.signal-area { opacity: .075; }
.signal-dot { stroke: var(--night); stroke-width: 2; }
.legend { display: flex; gap: 24px; margin-top: 16px; color: var(--muted); font: 10px "SFMono-Regular", Consolas, monospace; text-transform: uppercase; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 18px; height: 2px; background: var(--signal); }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.project-card { position: relative; min-height: 235px; padding: 27px; border-right: 1px solid var(--line); overflow: hidden; }
.project-card:last-child { border-right: 0; }
.project-card.helios, .legend .helios { --signal: var(--amber); }
.project-card.selene, .legend .selene { --signal: var(--cyan); }
.project-card.moonlight-os, .legend .moonlight-os { --signal: var(--blue); }
.project-card::after { content: ""; position: absolute; width: 130px; height: 130px; right: -66px; bottom: -66px; border: 1px solid var(--signal); border-radius: 50%; opacity: .28; box-shadow: 0 0 0 22px rgba(125,228,237,.025), 0 0 0 44px rgba(125,228,237,.018); }
.project-name { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font: 500 11px "SFMono-Regular", Consolas, monospace; text-transform: uppercase; }
.project-name i { width: 8px; height: 8px; background: var(--signal); border-radius: 50%; box-shadow: 0 0 14px var(--signal); }
.project-count { margin-top: 40px; font: 500 clamp(2.8rem, 5vw, 4.7rem)/1 "Avenir Next", Avenir, sans-serif; letter-spacing: -.06em; }
.project-meta { display: flex; gap: 22px; margin-top: 18px; color: var(--muted); font: 10px "SFMono-Regular", Consolas, monospace; }
.project-meta b { color: var(--mist); font-weight: 500; }

.crash-table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th { padding: 13px 18px; color: var(--muted); background: rgba(16,40,59,.7); text-align: left; font: 500 9px "SFMono-Regular", Consolas, monospace; text-transform: uppercase; letter-spacing: .08em; }
td { padding: 18px; border-top: 1px solid var(--line); color: var(--muted); font: 11px "SFMono-Regular", Consolas, monospace; }
td:first-child, td:last-child { color: var(--mist); }
.fingerprint { color: var(--rose); }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); font: 12px "SFMono-Regular", Consolas, monospace; }
.error { color: var(--rose); }

footer { display: flex; justify-content: space-between; padding: 32px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font: 10px "SFMono-Regular", Consolas, monospace; text-transform: uppercase; letter-spacing: .08em; }
footer p { margin: 0; }

@keyframes pulse { 50% { opacity: .45; box-shadow: 0 0 0 9px rgba(125,228,237,0); } }
@media (max-width: 760px) {
  .masthead, main, footer { width: min(100% - 26px, 1180px); }
  .hero { min-height: 400px; padding-top: 58px; flex-direction: column; align-items: flex-start; justify-content: flex-end; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .project-card:last-child { border-bottom: 0; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  footer { gap: 20px; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
