:root {
  color-scheme: dark;
  --base: #111325;
  --panel: #1a1d34;
  --edge: #353952;
  --text: #f5efe3;
  --muted: #b4b2c9;
  --gold: #ffc66e;
  --mint: #70edbe;
  --lilac: #b7acf4;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --body: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font: 16px/1.65 var(--body);
}
h1, h2, h3, p, figure { margin: 0; }
h2, h3 { line-height: 1.3; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
:focus-visible { outline: 2px dashed var(--gold); outline-offset: 5px; }
::selection { background: var(--gold); color: var(--base); }
section { scroll-margin-top: 24px; }
.shell { width: min(1120px, calc(100% - 72px)); margin-inline: auto; }
.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip { position: absolute; z-index: 5; padding: 10px 16px; color: var(--base); background: var(--gold); }

.topbar { border-bottom: 1px solid var(--edge); background: #15172b; }
.topbar-inner { min-height: 71px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; gap: 10px; align-items: center; font: 800 17px var(--mono); letter-spacing: -.05em; white-space: nowrap; }
.brand img { width: 29px; height: 29px; }
.brand-slash { color: var(--gold); padding-inline: 3px; }
nav { display: flex; gap: clamp(16px, 4vw, 44px); }
nav a { font-size: 14px; color: var(--muted); padding-block: 8px; }
nav a:hover, .footer a:hover { color: var(--gold); }
.edition, .monitor-top, .monitor-bottom, .scope-top, .tag, .eyebrow, .footer { font-family: var(--mono); }
.edition { color: var(--muted); font-size: 11px; letter-spacing: .13em; white-space: nowrap; }
.edition i, .monitor-top i, .scope-top i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  background: var(--mint);
  vertical-align: 1px;
  box-shadow: 0 0 8px #70edbe60;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(35px, 7.6vw, 106px);
  padding-block: 80px 77px;
}
main {
  background-image: radial-gradient(#a19aca27 1px, transparent 1px), linear-gradient(var(--base), #191a30);
  background-repeat: repeat, no-repeat;
  background-size: 18px 18px, 100% 545px;
  mask-image: none;
}
main > :not(.hero) { position: relative; }
.eyebrow { color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .16em; }
.eyebrow span { margin-right: 6px; }
.hero-eyebrow {
  display: inline-block;
  padding: 5px 9px 5px 8px;
  margin-bottom: 28px;
  border: 1px solid #66513d;
  background: #262134;
}
.hero h1 { font-size: inherit; }
.wordmark {
  display: block;
  width: min(100%, 388px);
  overflow: visible;
  color: var(--gold);
  filter: drop-shadow(0 5px 0 #714852);
}
.hero-title {
  display: block;
  margin-top: 24px;
  font-size: clamp(27px, 3.6vw, 45px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .035em;
  white-space: nowrap;
}
.cursor { display: inline-block; width: .32em; height: .12em; margin-left: .2em; background: var(--mint); }
.intro { max-width: 24em; margin-top: 19px; color: var(--muted); font-size: 16px; line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 8px 17px; border: 1px solid var(--edge); font-size: 14px; font-weight: 700; }
.button-primary { background: var(--gold); color: var(--base); border-color: var(--gold); box-shadow: 4px 4px 0 #8e5f42; }
.button-primary:hover { background: #ffe2a9; border-color: #ffe2a9; }
.button-primary span { font-size: 10px; }
.button-secondary { background: var(--panel); }
.button-secondary:hover { border-color: var(--mint); color: var(--mint); }

.monitor { min-width: 0; padding: 10px; border: 1px solid #626587; background: #262a46; box-shadow: 6px 6px 0 #0a0c18, 7px 7px 0 #343653; }
.monitor-top, .monitor-bottom, .scope-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; letter-spacing: .16em; }
.monitor-top { padding: 3px 4px 10px; }
.monitor-bottom { padding: 10px 4px 3px; }
.monitor-bottom span:first-child { font-family: var(--body); font-weight: 700; }
.monitor-vents { width: 36px; height: 7px; background: repeating-linear-gradient(90deg, #565978 0 3px, transparent 3px 7px); }
.monitor-screen { position: relative; overflow: hidden; border: 2px solid #0b1020; background: #101529; aspect-ratio: 520 / 306; }
.monitor-screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
.monitor-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, #090c2321 0 1px, transparent 1px 4px); }

.inventory { border-block: 1px solid var(--edge); background: #171a30; }
.inventory-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 27px; min-height: 50px; padding-block: 11px; color: var(--muted); font-size: 13px; }
.inventory-title { padding-right: 24px; border-right: 1px solid var(--edge); color: var(--text); font-weight: 700; }
.inventory b { margin-right: 4px; color: var(--mint); font: 700 14px var(--mono); }

.content-section { padding-top: 67px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 25px; }
.section-heading h2, .bench h2, .about h2 { margin-top: 8px; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: .04em; }
.section-side { margin-bottom: 4px; color: var(--muted); font-size: 13px; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.project {
  display: flex;
  flex-direction: column;
  align-items: start;
  padding: 22px;
  min-height: 236px;
  border: 1px solid var(--edge);
  border-top: 2px solid var(--accent);
  background: var(--panel);
  box-shadow: 4px 4px 0 #090a16;
}
.project-hardware { --accent: var(--mint); }
.project-code { --accent: var(--lilac); }
.project-math { --accent: var(--gold); }
.project-top { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 16px; }
.project-icon { display: grid; place-items: center; width: 43px; height: 43px; color: var(--accent); border: 1px solid var(--edge); background: #242741; }
.project-icon svg { width: 22px; height: 22px; }
.tag { color: var(--accent); font-size: 10px; letter-spacing: .12em; }
.project h3 { font-size: 19px; margin-bottom: 8px; }
.project p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.project a { margin-top: auto; color: var(--accent); font-size: 13px; font-weight: 700; }
.project a span { margin-left: 4px; }
.project a:hover { text-decoration: underline; text-underline-offset: 4px; }

.bench {
  margin-top: 71px;
  padding: 28px 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
  gap: 28px;
  align-items: center;
  border: 1px solid #3a5957;
  background: #192333;
}
.bench h2 { font-size: clamp(24px, 3vw, 33px); }
.bench p:not(.eyebrow), .about p:not(.eyebrow) { margin-top: 10px; color: var(--muted); font-size: 14px; }
.bench-caption { display: inline-block; margin-top: 15px; color: var(--mint); font-size: 11px; }
.scope { min-width: 0; padding: 11px; border: 1px solid #3a5957; background: #101b25; }
.scope-top { padding: 0 2px 8px; color: var(--mint); }
.scope-screen { display: block; width: 100%; background: #111d21; border: 1px solid #3a5957; }
.scope-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; padding-top: 9px; }
.scope-controls fieldset { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; border: 0; }
.scope-controls button {
  min-height: 31px;
  padding: 3px 7px;
  color: var(--muted);
  background: #1a2634;
  border: 1px solid #3a5957;
  font-size: 12px;
  cursor: pointer;
}
.scope-controls button[aria-pressed="true"] { background: var(--mint); color: #101b25; border-color: var(--mint); font-weight: 700; }
.scope-controls button:hover { border-color: var(--mint); }
.frequency { display: flex; gap: 6px; align-items: center; font-size: 12px; }
.frequency input { width: 86px; accent-color: var(--mint); }
.frequency output { min-width: 36px; color: var(--mint); font: 11px var(--mono); }

.note { border-top: 1px solid var(--edge); background: #15182d; }
.note:last-child { border-bottom: 1px solid var(--edge); }
.note summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  font-size: 15px;
  font-weight: 700;
}
.note summary::-webkit-details-marker { display: none; }
.note summary:hover { color: var(--gold); }
.note-kind { color: var(--lilac); font-size: 12px; }
.note-toggle { display: block; position: relative; width: 13px; height: 13px; color: var(--gold); }
.note-toggle::before, .note-toggle::after { content: ""; position: absolute; background: currentColor; }
.note-toggle::before { width: 11px; height: 1px; inset: 6px 1px auto; }
.note-toggle::after { width: 1px; height: 11px; inset: 1px auto auto 6px; }
.note[open] .note-toggle::after { content: none; }
.note p { max-width: 43em; color: var(--muted); padding: 0 18px 19px 76px; font-size: 14px; }

.about {
  margin-top: 66px;
  padding: 28px 30px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 22px;
  border: 1px solid var(--edge);
  background: var(--panel);
}
.about-avatar {
  display: block;
  width: 88px;
  height: 88px;
  object-fit: cover;
  border: 2px solid var(--gold);
  box-shadow: 3px 3px 0 #090a16;
}
.about h2 { font-size: clamp(22px, 2.5vw, 30px); }
main { padding-bottom: 65px; }
.footer { border-top: 1px solid var(--edge); color: var(--muted); font-size: 12px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 63px; }
.footer-divider { padding-inline: 3px; color: var(--gold); }

@media (max-width: 880px) {
  .shell { width: calc(100% - 48px); }
  .hero { gap: 30px; padding-block: 66px; }
  .project { padding: 16px; }
  .bench { padding-inline: 24px; }
}
@media (max-width: 680px) {
  .shell { width: calc(100% - 36px); }
  .topbar-inner { min-height: 61px; }
  .edition { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 34px; padding-block: 41px 44px; }
  .wordmark { width: min(84%, 330px); }
  .hero-eyebrow { margin-bottom: 22px; }
  .hero-title { margin-top: 19px; font-size: clamp(23px, 7vw, 39px); }
  .intro { margin-top: 13px; font-size: 15px; }
  .hero-actions { margin-top: 23px; }
  .monitor { box-shadow: 4px 4px 0 #0a0c18, 5px 5px 0 #343653; }
  .inventory-inner { column-gap: 13px; font-size: 11px; }
  .inventory-title { padding-right: 12px; }
  .inventory b { margin-right: 1px; font-size: 12px; }
  .content-section { padding-top: 48px; }
  .section-heading { margin-bottom: 19px; }
  .section-side { display: none; }
  .project-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .project { min-height: auto; }
  .project-top { margin-bottom: 12px; }
  .bench { margin-top: 48px; grid-template-columns: minmax(0, 1fr); padding: 19px; gap: 18px; }
  .about { margin-top: 48px; padding: 18px; gap: 15px; }
  .about-avatar { width: 62px; height: 62px; }
  main { padding-bottom: 43px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
