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

:root {
  --mint: #87ff71;
  --cyan: #01cdfe;
  --ink: #192617;
  --pink: #ff71ce;
  --violet: #b967ff;
  --bg: #0b120e;
  --line: #2b4633;
  --txt: #d8ffdf;
  --serif: "Newsreader", Georgia, "Songti SC", serif;
  --sans: "Roboto", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  color: var(--txt);
  background:
    radial-gradient(120% 55% at 50% 0%, rgba(255, 113, 206, .18), rgba(255, 113, 206, 0) 62%),
    radial-gradient(95% 45% at 50% 10%, rgba(1, 205, 254, .16), rgba(1, 205, 254, 0) 60%),
    linear-gradient(180deg, #0e1b13 0%, var(--bg) 46%);
  background-attachment: fixed;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: screen;
  background: repeating-linear-gradient(180deg,
    rgba(255, 255, 255, .05) 0 1px,
    rgba(0, 0, 0, 0) 1px 3px);
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

/* ---------- 顶栏 ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--mint);
  color: var(--mint);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
  letter-spacing: 0;
  transition: filter .25s, background .2s;
}

.mark:hover {
  background: rgba(135, 255, 113, .12);
  filter: hue-rotate(35deg);
}

.contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-size: 16px;
  text-decoration: none;
  letter-spacing: .12em;
  transition: color .2s, background .2s;
}

.contact:hover {
  color: var(--ink);
  background: var(--cyan);
}

/* ---------- 粘性锚点条 ---------- */
.rail {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  overflow-x: auto;
  background: rgba(11, 18, 14, .94);
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.rail-a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  color: var(--txt);
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  animation: rise .5s both;
  transition: background .2s, color .2s, padding-left .2s;
}

.rail-a:last-child { border-right: 0; }

.rail-a:hover {
  color: var(--mint);
  background: rgba(135, 255, 113, .08);
  padding-left: 20px;
  text-shadow: 0 0 12px rgba(135, 255, 113, .7);
}

.rail-a:nth-child(1) { animation-delay: .02s; }
.rail-a:nth-child(2) { animation-delay: .06s; }
.rail-a:nth-child(3) { animation-delay: .1s; }
.rail-a:nth-child(4) { animation-delay: .14s; }
.rail-a:nth-child(5) { animation-delay: .18s; }
.rail-a:nth-child(6) { animation-delay: .22s; }
.rail-a:nth-child(7) { animation-delay: .26s; }

.num {
  font-family: var(--serif);
  font-style: normal;
  font-size: 16px;
  color: var(--mint);
  opacity: .85;
}

/* ---------- 首屏 ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  min-height: 45vh;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 113, 206, .1), rgba(1, 205, 254, .12) 60%, rgba(1, 205, 254, 0)),
    repeating-linear-gradient(90deg, rgba(135, 255, 113, .09) 0 1px, rgba(0, 0, 0, 0) 1px 56px),
    repeating-linear-gradient(0deg, rgba(135, 255, 113, .07) 0 1px, rgba(0, 0, 0, 0) 1px 56px);
}

.hero-fig {
  margin: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: var(--ink);
}

.hero-fig img,
.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
  transition: filter .4s;
}

.hero-fig:hover img { filter: saturate(1.2) hue-rotate(-18deg); }

.hero-txt {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 34px 20px;
  text-align: center;
}

.badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  border: 1px solid var(--pink);
  color: var(--pink);
  font-size: 16px;
  letter-spacing: .1em;
  background: rgba(11, 18, 14, .72);
  transform: rotate(2deg);
}

.hero h1 {
  margin: 0;
  max-width: 22ch;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(27px, 4.6vw, 44px);
  line-height: 1.22;
  color: #f2fff5;
  text-shadow: 2px 0 var(--cyan), -2px 0 var(--pink), 0 0 22px rgba(135, 255, 113, .45);
  animation: glitch 7s steps(1) infinite;
}

.lead {
  margin: 0;
  max-width: 46ch;
  color: var(--mint);
  font-size: 16px;
}

/* ---------- 主体 ---------- */
main { display: block; }

.wrap {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  max-width: 1180px;
  margin: 0 auto;
}

.side {
  align-self: start;
  position: sticky;
  top: 52px;
  padding: 24px 16px 30px;
  border-right: 1px solid var(--line);
  background: rgba(25, 38, 23, .5);
}

.side-h {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--mint);
  letter-spacing: .02em;
}

.subtitle {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 16px;
  letter-spacing: .22em;
}

.toc {
  margin: 0;
  padding: 0;
  list-style: none;
  animation: rise .5s both;
}

.toc a {
  display: block;
  min-height: 44px;
  padding: 11px 6px;
  border-top: 1px solid var(--line);
  color: var(--txt);
  font-size: 16px;
  text-decoration: none;
  transition: padding-left .2s, color .2s, background .2s;
}

.toc a:hover {
  padding-left: 12px;
  color: var(--mint);
  background: rgba(135, 255, 113, .07);
}

.toc .num { margin-right: 8px; }

.stream {
  padding: 10px 20px 48px;
}

.doc {
  max-width: 72ch;
  font-size: 17px;
}

.doc section {
  padding: 20px 0;
  border-top: 1px dashed var(--line);
  scroll-margin-top: 72px;
}

.doc section:first-child { border-top: 0; }

.doc :is(h2, h3) {
  font-family: var(--serif);
  color: var(--mint);
  line-height: 1.3;
}

.doc h2 {
  margin: 26px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--cyan);
  font-size: clamp(22px, 3vw, 29px);
}

.doc h3 {
  margin: 22px 0 8px;
  font-size: 20px;
  color: var(--cyan);
}

.doc p,
.doc li { font-size: 17px; }

.doc ul,
.doc ol { padding-left: 1.3em; }

.doc li { margin: .35em 0; }

.doc a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.doc a:hover {
  color: var(--mint);
  text-shadow: 0 0 10px rgba(135, 255, 113, .6);
}

.doc img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
}

.doc blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--pink);
  color: #eafff0;
}

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

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

.doc th {
  color: var(--mint);
  background: rgba(135, 255, 113, .07);
}

.doc strong { color: #f4fff7; }

.doc hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}

/* ---------- 页脚 ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 28px 18px 0;
  background: linear-gradient(180deg, rgba(185, 103, 255, .12), rgba(11, 18, 14, 0) 70%);
}

.giant {
  margin: 0 0 24px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(42px, 12.5vw, 118px);
  line-height: .92;
  letter-spacing: -.02em;
  text-align: center;
  color: var(--mint);
}

@supports (-webkit-text-stroke: 1px #000) {
  .giant {
    color: transparent;
    -webkit-text-stroke: 1px var(--mint);
  }
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 26px;
  max-width: 1000px;
  margin: 0 auto 18px;
}

.foot-cols dl { margin: 0; }

.foot-cols dt {
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  color: var(--cyan);
  font-size: 16px;
  letter-spacing: .14em;
}

.foot-cols dd {
  margin: 0;
  font-size: 16px;
}

.foot-cols dd a {
  display: block;
  min-height: 40px;
  padding: 8px 0;
  color: var(--txt);
  text-decoration: none;
  transition: color .2s, padding-left .2s;
}

.foot-cols dd a:hover {
  color: var(--mint);
  padding-left: 6px;
}

.cr {
  margin: 0;
  padding: 16px 0 26px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--mint);
  font-size: 16px;
}

/* ---------- 动效 ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes glitch {
  0%, 91%, 100% {
    transform: none;
    text-shadow: 2px 0 var(--cyan), -2px 0 var(--pink), 0 0 22px rgba(135, 255, 113, .45);
  }
  92% { transform: translate(-2px, 1px); text-shadow: -3px 0 var(--cyan), 3px 0 var(--pink); }
  94% { transform: translate(2px, -1px); text-shadow: 3px 0 var(--mint), -3px 0 var(--cyan); }
  96% { transform: none; }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 780px) {
  body { background-attachment: scroll; }

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

  .hero-fig {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    height: 190px;
  }

  .hero-txt { padding: 30px 16px 26px; }

  .badge { top: 10px; right: 10px; }

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

  .side {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 20px 16px 22px;
  }

  .stream { padding: 6px 14px 40px; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

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