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

:root {
  --neon: #87ff71;
  --ice: #01cdfe;
  --ink: #192617;
  --void: #0c130c;
  --paper: #eafff2;
  --dim: #9dbba6;
  --line: rgba(135, 255, 113, .26);
  --hair: rgba(1, 205, 254, .28);
  --ff: 'Quicksand', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --fd: 'Caveat', 'Quicksand', 'PingFang SC', cursive;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--paper);
  font-family: var(--ff);
  font-size: 17px;
  line-height: 1.78;
  font-weight: 400;
  background-color: var(--void);
  background-image:
    linear-gradient(180deg, rgba(1, 205, 254, .10), rgba(12, 19, 12, 0) 46%),
    repeating-linear-gradient(90deg, rgba(135, 255, 113, .055) 0 1px, transparent 1px 96px);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--ice); text-decoration: none; }
a:hover, a:focus-visible { color: var(--neon); }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 1.05em; }
strong { color: #ffffff; font-weight: 600; }
:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; }

/* 页头 */
.top {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: rgba(12, 19, 12, .94);
  border-bottom: 2px solid var(--neon);
}

.brand {
  font-family: var(--fd);
  font-size: 36px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--neon);
  text-shadow: 0 0 20px rgba(1, 205, 254, .8), 0 0 5px rgba(135, 255, 113, .9);
  padding: 4px 10px;
  white-space: nowrap;
}

.nav p { margin: 0; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.nav.l p { justify-content: flex-start; }
.nav.r p { justify-content: flex-end; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 4px;
  font-size: 16px;
  letter-spacing: .04em;
  color: var(--paper);
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a:focus-visible {
  color: var(--neon);
  border-bottom-color: var(--ice);
  text-shadow: 0 0 12px rgba(135, 255, 113, .85);
}

/* 粘性锚点条 */
.rail {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  background: rgba(25, 38, 23, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.rail-nav { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.rail-nav::-webkit-scrollbar { display: none; }
.rail-nav p { margin: 0; display: flex; gap: 2px; white-space: nowrap; }
.rail-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 9px;
  font-size: 16px;
  color: var(--dim);
  border-bottom: 2px solid transparent;
}
.rail-nav a:hover, .rail-nav a[aria-current] {
  color: var(--neon);
  border-bottom-color: var(--neon);
}
.contact {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  color: var(--ink);
  background: var(--neon);
  font-weight: 700;
  letter-spacing: .08em;
  box-shadow: 0 0 18px rgba(135, 255, 113, .45);
}
.contact:hover { color: var(--ink); background: var(--ice); }

/* 首屏 */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
  padding: 90px 20px 70px;
  background:
    linear-gradient(180deg, #2c0f36 0%, #102a3c 44%, #0c130c 100%);
}
.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 44%;
  width: min(62vw, 460px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, rgba(1, 205, 254, .85), rgba(135, 255, 113, .5));
  opacity: .32;
  filter: blur(1px);
}
.horizon {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 38vh;
  background-image:
    linear-gradient(90deg, rgba(135, 255, 113, .45) 1px, transparent 1px),
    linear-gradient(180deg, rgba(1, 205, 254, .45) 1px, transparent 1px);
  background-size: 64px 42px;
  transform: perspective(330px) rotateX(66deg);
  transform-origin: bottom center;
  opacity: .55;
}
.collage { position: absolute; inset: 0; pointer-events: none; }
.collage figure {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border: 2px solid rgba(1, 205, 254, .55);
  box-shadow: 0 0 42px rgba(1, 205, 254, .28);
}
.c-a { width: min(38vw, 320px); aspect-ratio: 4 / 5; left: 4%; top: 11%; transform: rotate(-4deg); }
.c-b { width: min(34vw, 288px); aspect-ratio: 3 / 4; right: 5%; bottom: 11%; transform: rotate(5deg); }
.collage img { width: 100%; height: 100%; object-fit: cover; filter: hue-rotate(-10deg) saturate(1.15); opacity: .88; }
.ghost { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(1, 205, 254, .40), rgba(135, 255, 113, .14)); }

.hero-mid { position: relative; z-index: 2; max-width: 760px; }
.hero h1 {
  margin: 0;
  font-family: var(--fd);
  font-weight: 700;
  font-size: clamp(38px, 9vw, 92px);
  line-height: 1.03;
  color: #ffffff;
  text-shadow: 0 0 26px rgba(1, 205, 254, .85), 0 0 60px rgba(135, 255, 113, .5);
}
.lede {
  margin: 20px auto 0;
  max-width: 620px;
  font-size: 18px;
  line-height: 1.7;
  color: #dcffe8;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .6);
}

/* 主体 */
.shell {
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  align-items: start;
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 22px;
}

.side {
  position: sticky;
  top: 58px;
  padding: 30px 20px 30px 0;
  border-right: 1px solid var(--line);
}
.side h2 {
  margin: 0 0 16px;
  font-family: var(--ff);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--ice);
}
.side h2 span { display: inline-block; padding-bottom: 6px; border-bottom: 2px solid var(--neon); }
.side ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.side li { counter-increment: toc; border-bottom: 2px solid rgba(135, 255, 113, .2); }
.side li a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 4px 10px 28px;
  font-size: 16px;
  color: #d3efdb;
}
.side li a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 12px;
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--ice);
}
.side li a:hover { color: var(--neon); text-shadow: 0 0 12px rgba(135, 255, 113, .7); }

main { min-width: 0; padding: 0 0 0 clamp(20px, 3vw, 46px); }

div > article {
  scroll-margin-top: 66px;
  padding: 36px 0 30px;
  border-bottom: 1px dashed rgba(135, 255, 113, .2);
}
div > article:last-child { border-bottom: 0; }

div h2 {
  margin: .1em 0 .7em;
  font-family: var(--fd);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  color: var(--neon);
  text-shadow: 0 0 18px rgba(135, 255, 113, .35);
}
div h2 span { display: inline-block; padding-bottom: 4px; border-bottom: 3px solid var(--ice); }

div h3 {
  margin: 1.5em 0 .5em;
  font-family: var(--fd);
  font-weight: 600;
  font-size: clamp(23px, 2.6vw, 30px);
  line-height: 1.25;
  color: var(--ice);
}
div h3 span { display: inline-block; border-bottom: 2px solid rgba(135, 255, 113, .5); }

div p, div li { font-size: 17px; line-height: 1.82; }
div ul, div ol { padding-left: 1.3em; margin: 0 0 1.1em; }
div li { margin-bottom: .45em; }
div ul li::marker { color: var(--neon); }
div ol li::marker { color: var(--ice); }

div a { border-bottom: 1px solid rgba(1, 205, 254, .55); }
div a:hover { border-bottom-color: var(--neon); }

div time { display: inline-block; font-size: 14px; letter-spacing: .08em; color: var(--ice); }
div figure { margin: 1.4em 0; border: 2px solid var(--hair); }
div figcaption { padding: 8px 10px; font-size: 14px; color: var(--dim); }
div blockquote {
  margin: 1.4em 0;
  padding: 14px 18px;
  border-left: 4px solid var(--neon);
  background: rgba(135, 255, 113, .06);
  color: #dff6e6;
}
div blockquote p:last-child { margin-bottom: 0; }
div table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 16px; }
div th, div td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
div th { color: var(--neon); font-weight: 600; }
div code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: .94em;
  padding: 1px 5px;
  background: rgba(1, 205, 254, .14);
  color: #d9f8ff;
}
div hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* 页脚 */
footer {
  margin-top: 64px;
  padding: 44px 22px 26px;
  border-top: 2px solid var(--neon);
  background: linear-gradient(180deg, #101a10, #080e08);
}
.fgrid {
  display: grid;
  grid-template-columns: 1.9fr 1fr 1fr 1fr;
  gap: 30px;
  max-width: 1140px;
  margin: 0 auto;
}
.fbrand {
  margin: 0;
  font-family: var(--fd);
  font-weight: 700;
  font-size: clamp(40px, 7vw, 76px);
  line-height: .92;
  color: var(--neon);
  text-shadow: 0 0 30px rgba(1, 205, 254, .5);
}
footer dl { margin: 0; }
footer dt { margin: 0 0 10px; }
footer dt h2 {
  margin: 0;
  font-family: var(--ff);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--ice);
}
footer dt h2 span { display: inline-block; padding-bottom: 5px; border-bottom: 2px solid rgba(135, 255, 113, .55); }
footer dd { margin: 0; }
footer dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0;
  font-size: 16px;
  color: #cfe9d6;
  border-bottom: 2px solid transparent;
}
footer dd a:hover { color: var(--neon); border-bottom-color: var(--neon); }
.copy {
  max-width: 1140px;
  margin: 30px auto 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--dim);
  margin-bottom: 0;
}

/* 滚动显现 */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .collage img { filter: none; }
}

/* 窄屏 */
@media (max-width: 980px) {
  .top { grid-template-columns: 1fr; gap: 2px; padding: 10px 14px 8px; }
  .brand { order: -1; text-align: center; font-size: 32px; padding: 6px 0 2px; }
  .nav.l p, .nav.r p { justify-content: center; }
  .nav a { padding: 6px 8px; }

  .shell { grid-template-columns: 1fr; padding: 0 16px; }
  .side {
    position: static;
    padding: 22px 0 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .side h2 { display: none; }
  .side ol { display: flex; flex-wrap: wrap; gap: 4px 10px; }
  .side li { border-bottom: 0; }
  .side li a {
    min-height: 40px;
    padding: 6px 12px 6px 24px;
    border: 1px solid var(--line);
    font-size: 15px;
  }
  .side li a::before { top: 8px; left: 8px; }
  main { padding: 8px 0 0; }

  .fgrid { grid-template-columns: 1fr 1fr; gap: 24px 20px; }
  .fbrand { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .hero { padding: 76px 16px 54px; }
  .c-a { width: 36vw; left: -3%; top: 8%; }
  .c-b { width: 32vw; right: -2%; bottom: 8%; }
  .collage img { opacity: .62; }
  .lede { font-size: 16px; }
  div h2 { font-size: 30px; }
  div h3 { font-size: 23px; }
  .copy { font-size: 14px; }
}

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