@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,600;0,700;0,800;1,400&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --neon: #00ff80;
  --blue: #0000ff;
  --mut: #a8a8a8;
  --line: #262626;
  --panel: #05050d;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: #f3f3f3;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(0, 255, 128, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,255,128, 0.055) 1px, transparent 1px);
  background-size: 96px 96px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--neon);
}

:focus-visible {
  outline: 3px solid var(--neon);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 顶部固定左栏 ---------- */
.topbar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 30;
  width: clamp(240px, 20vw, 300px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 20px;
  background: var(--ink);
  border-right: 3px solid var(--neon);
}

.brand {
  display: block;
  padding: 10px 12px;
  min-height: 50px;
  border: 3px solid var(--neon);
  color: #fff;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-decoration: none;
  word-break: break-word;
}

.brand:hover,
.brand:focus-visible {
  background: var(--neon);
  color: #000;
}

.nav {
  margin-top: 4px;
}

.nav p {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav a {
  display: block;
  padding: 11px 12px;
  min-height: 44px;
  border: 2px solid var(--line);
  color: #e8e8e8;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  background: var(--neon);
  border-color: var(--neon);
  color: #000;
}

.cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 12px;
  background: var(--blue);
  border: 3px solid var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.cta:hover,
.cta:focus-visible {
  background: var(--ink);
  border-color: var(--neon);
  color: var(--neon);
}

/* ---------- 主区网格 ---------- */
main {
  position: relative;
  z-index: 1;
  margin-left: clamp(240px, 20vw, 300px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px;
  align-items: start;
}

.hero {
  grid-column: 1 / -1;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  border-bottom: 4px solid var(--neon);
  scroll-margin-top: 22px;
}

.hero-copy {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 88px 26px 36px;
}

.badge {
  position: absolute;
  top: 28px;
  right: 26px;
  margin: 0;
  padding: 8px 14px;
  background: var(--neon);
  border: 3px solid #000;
  color: #000;
  font-size: 16px;
  font-weight: 800;
  transform: rotate(-4deg);
}

h1 {
  margin: 0;
  max-width: 17ch;
  color: #fff;
  font-size: clamp(38px, 6.6vw, 90px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.lead {
  margin: 24px 0 0;
  max-width: 54ch;
  color: var(--mut);
  font-size: 17px;
}

.hero-fig {
  flex: 0 0 auto;
  margin: 0;
  height: min(42vh, 360px);
  overflow: hidden;
  background: #070707;
  border-top: 4px solid var(--blue);
}

.hero-fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.06);
  will-change: transform;
}

/* ---------- 正文 ---------- */
.body {
  grid-column: 1;
  min-width: 0;
}

.body > div {
  padding: 52px 44px;
  border-bottom: 2px solid var(--line);
  scroll-margin-top: 22px;
}

.body > div:nth-of-type(even) {
  background: var(--panel);
}

.body h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(23px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.body h2::before {
  content: '';
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 12px;
  background: var(--neon);
  vertical-align: baseline;
}

.body h3 {
  margin: 30px 0 12px;
  color: var(--neon);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.4;
}

.body p {
  margin: 0 0 18px;
  max-width: 70ch;
}

.body a {
  color: var(--neon);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.body strong,
.body b {
  color: #fff;
  font-weight: 800;
}

.body ul,
.body ol {
  margin: 0 0 18px;
  padding-left: 24px;
  max-width: 70ch;
}

.body li {
  margin: 0 0 10px;
}

.body blockquote {
  margin: 24px 0;
  padding: 14px 20px;
  background: var(--panel);
  border-left: 6px solid var(--blue);
  color: #dcdcdc;
}

.body hr {
  margin: 26px 0;
  border: 0;
  border-top: 2px solid var(--line);
}

.body img {
  margin: 20px 0;
  border: 3px solid var(--line);
}

.body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 16px;
}

.body th,
.body td {
  padding: 10px 12px;
  border: 2px solid var(--line);
  text-align: left;
}

.body code {
  padding: 1px 5px;
  background: #111;
  color: var(--neon);
  font-size: 15px;
}

/* ---------- 右侧栏 ---------- */
.aside {
  grid-column: 2;
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow: auto;
  padding: 26px 20px;
  background: #04040a;
  border-left: 3px solid var(--blue);
}

.aside-title {
  margin: 0 0 10px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.aside hr {
  margin: 0 0 14px;
  border: 0;
  border-top: 2px solid var(--neon);
}

.toc {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  color: #dcdcdc;
  font-size: 16px;
  line-height: 1.35;
  text-decoration: none;
}

.toc a span {
  color: var(--neon);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.toc a:hover,
.toc a:focus-visible {
  background: var(--neon);
  color: #000;
}

.toc a:hover span,
.toc a:focus-visible span {
  color: #000;
}

.aside-key {
  margin: 16px 0 0;
  color: var(--mut);
  font-size: 16px;
}

/* ---------- 页脚 ---------- */
.foot {
  position: relative;
  z-index: 1;
  margin-left: clamp(240px, 20vw, 300px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 4px solid var(--neon);
}

.foot > div {
  padding: 30px 24px;
  border-right: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}

.foot-sub {
  grid-column: 1 / -1;
  background: var(--panel);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.foot h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.foot hr {
  margin: 0 0 12px;
  border: 0;
  border-top: 2px solid var(--neon);
}

.foot p {
  margin: 0 0 8px;
  color: var(--mut);
  font-size: 16px;
}

.foot-links a {
  display: block;
  padding: 9px 0;
  min-height: 42px;
  color: #e6e6e6;
  font-size: 16px;
  text-decoration: none;
}

.foot-links a:hover,
.foot-links a:focus-visible {
  color: var(--neon);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.subform {
  display: flex;
  flex: 1 1 260px;
  flex-wrap: wrap;
  gap: 10px;
}

.subform input {
  flex: 1 1 200px;
  min-height: 50px;
  padding: 10px 14px;
  background: #000;
  border: 3px solid var(--neon);
  color: #fff;
  font: inherit;
  font-size: 16px;
}

.subform input::placeholder {
  color: #7d7d7d;
}

.subform button {
  min-height: 50px;
  padding: 10px 28px;
  background: var(--neon);
  border: 3px solid var(--neon);
  color: #000;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.subform button:hover,
.subform button:focus-visible {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.foot-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 24px;
  padding: 14px 24px;
  background: #000;
  border-top: 2px solid var(--line);
}

.foot-bottom p {
  margin: 0;
  font-size: 16px;
}

.foot-bottom a {
  display: inline-block;
  padding: 10px 0;
  min-height: 44px;
  color: var(--neon);
  font-weight: 700;
  text-decoration: none;
}

.foot-bottom a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* ---------- 动效（瞬时） ---------- */
.body.js > div {
  opacity: 0;
}

.body.js > div.in {
  opacity: 1;
  transition: opacity 0s;
  transition-delay: calc(var(--i, 0) * 70ms);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .body.js > div {
    opacity: 1;
    transition-delay: 0s;
  }
}

/* ---------- 断点 ---------- */
@media (max-width: 1080px) {
  main {
    grid-template-columns: minmax(0, 1fr);
  }

  .aside {
    grid-column: 1;
    position: static;
    max-height: none;
    border-left: 0;
    border-top: 3px solid var(--blue);
  }

  .foot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .topbar {
    position: sticky;
    top: 0;
    bottom: auto;
    width: auto;
    padding: 14px 16px;
    gap: 12px;
    border-right: 0;
    border-bottom: 3px solid var(--neon);
  }

  .brand {
    font-size: 20px;
  }

  .nav p {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .nav a {
    padding: 10px 12px;
    min-height: 44px;
    font-size: 16px;
  }

  .cta {
    margin-top: 2px;
    min-height: 48px;
  }

  main,
  .foot {
    margin-left: 0;
  }

  .hero-copy {
    padding: 64px 18px 30px;
  }

  .hero,
  .body > div {
    scroll-margin-top: 210px;
  }

  .body > div {
    padding: 34px 18px;
  }

  .foot {
    grid-template-columns: minmax(0, 1fr);
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
