@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Fira+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #000000;
  --layer: #121212;
  --layer-2: #0b0b0b;
  --line: #232323;
  --line-soft: #191919;
  --ink: #e9e9e9;
  --dim: #8f8f8f;
  --neon: #7ff0cd;
  --neon-2: #8fb8ff;
  --radius: 4px;
  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(--ink);
  font-family: 'Fira Sans', 'Noto Sans SC', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

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

a {
  color: var(--neon);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
}

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

::selection {
  background: rgba(127, 240, 205, 0.28);
  color: #ffffff;
}

/* ---------- 顶部细条 ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  background: #070707;
  border-bottom: 1px solid var(--line-soft);
  z-index: 60;
}

.ticker {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fira Code', ui-monospace, monospace;
  font-size: 12.5px;
  letter-spacing: 0.26em;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 10px rgba(127, 240, 205, 0.75);
}

/* ---------- 左侧竖排导航 ---------- */
.rail {
  position: fixed;
  left: 0;
  top: 40px;
  bottom: 0;
  width: 222px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 16px 28px;
  background: #000000;
  border-right: 1px solid var(--line-soft);
  overflow-y: auto;
}

.mark {
  align-self: flex-start;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--layer-2);
  color: var(--neon);
  font-family: 'Fira Code', ui-monospace, monospace;
  font-size: 17px;
  font-weight: 600;
  overflow: hidden;
}

.mark:hover {
  border-color: var(--neon);
  text-decoration: none;
  box-shadow: 0 0 16px rgba(127, 240, 205, 0.22);
}

.mark img {
  width: 26px;
  height: 26px;
}

.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.rail ol li a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--dim);
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rail ol li a .n {
  font-family: 'Fira Code', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  opacity: 0.62;
}

.rail ol li a:hover,
.rail ol li a[aria-current='page'] {
  color: #06110d;
  background: var(--neon);
  border-color: var(--neon);
  box-shadow: 0 0 18px rgba(127, 240, 205, 0.22);
  text-decoration: none;
}

.rail ol li a:hover .n,
.rail ol li a[aria-current='page'] .n {
  opacity: 0.8;
}

/* ---------- 主框架 ---------- */
.frame {
  padding-left: 222px;
  padding-top: 40px;
}

main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 32px 72px;
}

/* ---------- 首屏 ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 44px;
  align-items: center;
  min-height: 70vh;
  padding: 56px 0 52px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 16px;
  font-family: 'Fira Code', ui-monospace, monospace;
  font-size: 12.5px;
  letter-spacing: 0.3em;
  color: var(--neon);
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: '';
  width: 34px;
  height: 1px;
  background: var(--neon);
  opacity: 0.7;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 4.6vw, 3.35rem);
  line-height: 1.16;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #ffffff;
  text-shadow: 0 0 26px rgba(127, 240, 205, 0.16);
}

.lede {
  margin: 0 0 30px;
  max-width: 46ch;
  color: var(--dim);
  font-size: 17px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 24px;
  border: 1px solid var(--neon);
  border-radius: 999px;
  background: var(--neon);
  color: #06110d;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 0 22px rgba(127, 240, 205, 0.35);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn.ghost:hover {
  color: var(--neon);
  border-color: var(--neon);
  box-shadow: 0 0 18px rgba(127, 240, 205, 0.18);
}

.hero-fig {
  margin: 0;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: #0a0a0a;
  background-image:
    radial-gradient(circle at 28% 18%, rgba(127, 240, 205, 0.14), transparent 58%),
    repeating-linear-gradient(0deg, #0e0e0e 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, #0e0e0e 0 1px, transparent 1px 24px);
  border-bottom-color: rgba(127, 240, 205, 0.5);
}

.hero-fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 正文 + 侧栏 ---------- */
.read {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 258px;
  gap: 52px;
  padding: 56px 0 0;
  align-items: start;
}

.prose {
  max-width: 74ch;
  min-width: 0;
}

.prose div {
  scroll-margin-top: 88px;
}

.prose div + div {
  margin-top: 46px;
  padding-top: 44px;
  border-top: 1px solid var(--line-soft);
}

.prose small {
  display: block;
  margin-bottom: 10px;
  font-family: 'Fira Code', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--neon);
  opacity: 0.85;
}

.prose h2 {
  margin: 0 0 18px;
  font-size: clamp(1.35rem, 2.2vw, 1.72rem);
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.prose h3 {
  margin: 30px 0 12px;
  font-size: 1.12rem;
  font-weight: 600;
  color: #ffffff;
}

.prose p {
  margin: 0 0 18px;
}

.prose ul,
.prose ol {
  margin: 0 0 20px;
  padding-left: 1.25em;
}

.prose li {
  margin-bottom: 8px;
}

.prose li::marker {
  color: var(--neon);
}

.prose strong {
  color: #ffffff;
  font-weight: 600;
}

.prose figure,
.prose blockquote {
  margin: 26px 0;
  padding: 18px 20px;
  background: var(--layer);
  border: 1px solid var(--line);
  border-bottom: 2px solid rgba(127, 240, 205, 0.55);
  border-radius: var(--radius);
}

.prose blockquote {
  color: var(--dim);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose code {
  font-family: 'Fira Code', ui-monospace, monospace;
  font-size: 0.92em;
  background: #101010;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--neon-2);
}

.prose img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

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

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

.prose th {
  background: var(--layer);
  color: #ffffff;
}

/* ---------- 侧栏 ---------- */
.side {
  position: sticky;
  top: 84px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-bottom: 2px solid rgba(127, 240, 205, 0.5);
  background: var(--layer-2);
}

.side small {
  display: block;
  font-family: 'Fira Code', ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.3em;
  color: var(--neon);
}

.side h3 {
  margin: 8px 0 16px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.side ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.side ol a {
  display: block;
  padding: 9px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  color: var(--dim);
  font-size: 15px;
  border-bottom-color: rgba(127, 240, 205, 0.28);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.side ol a:hover {
  color: #ffffff;
  background: #101010;
  border-color: var(--line);
  border-bottom-color: var(--neon);
  text-decoration: none;
}

/* ---------- 页脚 ---------- */
.foot {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #000000 0%, #080808 100%);
  padding: 60px 32px 26px;
}

.giant {
  margin: 0 0 44px;
  font-family: 'Fira Code', ui-monospace, monospace;
  font-size: clamp(2.1rem, 7vw, 4.8rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  word-break: break-word;
  text-shadow: 0 0 46px rgba(127, 240, 205, 0.12);
  opacity: 0.92;
}

.fcols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
  padding-top: 30px;
  border-top: 1px solid var(--line-soft);
}

.fcols dl {
  margin: 0;
}

.fcols dt {
  margin-bottom: 10px;
  font-family: 'Fira Code', ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.26em;
  color: var(--neon);
  opacity: 0.85;
}

.fcols dd {
  margin: 0;
  font-size: 15px;
  color: var(--dim);
}

.fcols dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--dim);
  border-bottom: 1px solid transparent;
}

.fcols dd a:hover {
  color: #ffffff;
  border-bottom-color: var(--neon);
  text-decoration: none;
}

.fbase {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-family: 'Fira Code', ui-monospace, monospace;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: #6d6d6d;
}

.fbase p {
  margin: 0;
}

.flinks {
  display: flex;
  gap: 8px;
}

.flinks a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 8px;
  color: #8a8a8a;
}

.flinks a:hover {
  color: var(--neon);
  text-decoration: none;
}

/* ---------- 滚动出现 ---------- */
.js-anim .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.js-anim .reveal.is-in {
  opacity: 1;
  transform: none;
}

.js-anim .hero-fig.reveal {
  transition-delay: 0.1s;
}

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

  .js-anim .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover {
    transform: none;
  }
}

/* ---------- 平板 ---------- */
@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 30px;
  }

  .hero-fig {
    aspect-ratio: 16 / 10;
  }

  .read {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }

  .side {
    position: static;
    order: 2;
  }
}

/* ---------- 手机 ---------- */
@media (max-width: 900px) {
  body {
    font-size: 16.5px;
  }

  .topbar {
    position: static;
    height: 38px;
    padding: 0 14px;
  }

  .rail {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: #000000;
    overflow-x: auto;
    overflow-y: hidden;
    z-index: 70;
  }

  .mark {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
  }

  .rail ol {
    flex-direction: row;
    gap: 8px;
  }

  .rail ol li a {
    min-height: 40px;
    padding: 8px 14px;
    white-space: nowrap;
    font-size: 14.5px;
  }

  .frame {
    padding-left: 0;
    padding-top: 0;
  }

  main {
    padding: 0 16px 52px;
  }

  .hero {
    padding: 34px 0 36px;
  }

  .hero-fig {
    aspect-ratio: 4 / 3;
  }

  .prose div {
    scroll-margin-top: 76px;
  }

  .fcols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .foot {
    padding: 44px 16px 22px;
  }
}

@media (max-width: 420px) {
  .giant {
    font-size: 1.9rem;
  }

  .actions .btn {
    width: 100%;
  }
}

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