:root {
  --pink: #ff0080;
  --mag: #ff00ff;
  --ink: #26171f;
  --ink-deep: #170d13;
  --paper: #f8edf4;
  --mute: #ffc0e2;
  --line: rgba(255, 0, 255, 0.26);
  --line-soft: rgba(255, 0, 128, 0.18);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --r: 28px;
  --pad: clamp(18px, 4vw, 44px);
  --maxw: 1320px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  color: var(--paper);
  background: var(--ink-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: -32vmax;
  z-index: -2;
  pointer-events: none;
  opacity: 0.6;
  background:
    radial-gradient(38% 42% at 20% 16%, rgba(255, 0, 128, 0.62), transparent 62%),
    radial-gradient(34% 40% at 80% 24%, rgba(255, 0, 255, 0.5), transparent 64%),
    radial-gradient(48% 50% at 62% 84%, rgba(112, 18, 118, 0.55), transparent 66%),
    radial-gradient(40% 42% at 10% 90%, rgba(255, 0, 96, 0.42), transparent 68%);
  filter: blur(58px) saturate(1.2);
  animation: auroraFlow 26s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
  mix-blend-mode: screen;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.055) 0 2px, transparent 2px 24px);
}

@keyframes auroraFlow {
  0% { transform: rotate(0deg) scale(1) translate3d(0, 0, 0); }
  50% { transform: rotate(7deg) scale(1.12) translate3d(-3%, 2%, 0); }
  100% { transform: rotate(-6deg) scale(1.05) translate3d(3%, -2%, 0); }
}

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

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

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

.skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 120;
  transform: translateY(-180%);
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.25s ease;
}

.skip:focus-visible { transform: none; }

/* ---- 底部固定条 ---- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  background: rgba(28, 16, 23, 0.86);
  border-top: 1px solid var(--line-soft);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.dock-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 66px;
}

.dock-side {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0;
  min-width: 0;
}

.dock-side--end { justify-content: flex-end; }

.dock-side a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 11px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.02em;
  color: #efd8e8;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.dock-side a:hover { color: #fff; background: rgba(255, 0, 128, 0.18); }

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-decoration: none;
  background: linear-gradient(100deg, #ffffff, #ff8ec8 55%, var(--mag));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.burger {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 0, 128, 0.14);
  color: #fff;
  font-family: var(--mono);
  font-size: 15px;
  cursor: pointer;
}

.burger:hover { background: rgba(255, 0, 255, 0.26); }

/* ---- 全屏遮罩菜单 ---- */
.veil {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 64px 20px;
  overflow-y: auto;
  background:
    radial-gradient(60% 60% at 30% 10%, rgba(255, 0, 128, 0.45), transparent 70%),
    radial-gradient(60% 60% at 80% 90%, rgba(255, 0, 255, 0.35), transparent 70%),
    #140a10;
}

.veil[hidden] { display: none; }

.veil-x {
  position: absolute;
  top: 16px;
  right: 16px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: var(--mono);
  font-size: 16px;
  cursor: pointer;
}

.veil-links {
  display: grid;
  gap: 2px;
  width: min(460px, 100%);
}

.veil-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--mono);
  font-size: 19px;
  letter-spacing: 0.04em;
  color: #ffe4f3;
  text-decoration: none;
}

.veil-links a:hover { color: #fff; background: rgba(255, 0, 128, 0.16); }

/* ---- 首屏 ---- */
.hero {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  min-height: 100vh;
  min-height: 100svh;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 76px) var(--pad) 116px;
}

.hero-copy { text-align: center; }

.hero-h1 {
  margin: 0;
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.95rem, 5.2vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  background: linear-gradient(96deg, #ffffff 6%, #ff9ad0 46%, var(--mag) 94%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  margin: 18px auto 0;
  max-width: 36ch;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.7;
  color: var(--mute);
}

.hero-fig {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  max-height: 74vh;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: #1d1018;
  will-change: transform;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prism {
  position: absolute;
  inset: -16%;
  background: conic-gradient(from 40deg, var(--pink), var(--mag), #3a1b4a, #7b1f6a, var(--pink));
  filter: blur(26px) saturate(1.35);
  animation: prismSpin 22s linear infinite;
}

@keyframes prismSpin { to { transform: rotate(1turn); } }

/* ---- 主体：左侧索引 + 正文 ---- */
.board {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 44px);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad) 64px;
}

.rail {
  position: sticky;
  top: 24px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(158deg, rgba(255, 0, 128, 0.14), rgba(38, 23, 31, 0.62));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.rail-title {
  margin: 0;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.rail .subtitle {
  margin: 6px 0 16px;
  max-width: none;
  font-size: 16px;
  color: var(--mute);
}

.rail-list {
  list-style: none;
  counter-reset: railc;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
}

.rail-list li { counter-increment: railc; }

.rail-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 6px 8px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
  font-size: 16px;
  color: #ecd6e5;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.rail-list a::before {
  content: counter(railc, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--mag);
  opacity: 0.85;
}

.rail-list a:hover { color: #fff; background: rgba(255, 0, 255, 0.12); }

.stream { min-width: 0; }

.stream > div {
  margin: 0 0 clamp(18px, 3vw, 32px);
  padding: clamp(20px, 3vw, 40px);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  scroll-margin-top: 90px;
}

.stream > div:last-child { margin-bottom: 0; }

.stream h2 {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(1.28rem, 2.4vw, 1.85rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #fff;
}

.stream h3 {
  margin: 28px 0 10px;
  font-family: var(--mono);
  font-size: 1.06rem;
  font-weight: 600;
  color: #ffd1ea;
}

.stream h2 + p,
.stream h2 + p.subtitle,
.stream h2 + p.subhead,
.stream p.lead {
  color: var(--mute);
  font-family: var(--mono);
  font-size: 16px;
}

.stream p { margin: 0 0 16px; color: #e8d7e3; }
.stream p:last-child { margin-bottom: 0; }

.stream ul,
.stream ol { margin: 0 0 18px; padding-left: 22px; }
.stream li { margin: 0 0 8px; }

.stream a {
  color: #ff9ad0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.stream a:hover { color: #fff; }

.stream strong { color: #fff; font-weight: 600; }

.stream blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 2px solid var(--pink);
  border-radius: 0 16px 16px 0;
  background: rgba(255, 0, 128, 0.1);
  color: #f3dcea;
}

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

.stream figure {
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.stream figure img { width: 100%; height: auto; }

.stream figcaption {
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--mute);
}

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

.stream th,
.stream td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
}

.stream th { font-family: var(--mono); color: #ffd1ea; }

.stream code {
  font-family: var(--mono);
  font-size: 15px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 0, 255, 0.14);
}

/* ---- 页脚 ---- */
.foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 26px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 42px var(--pad) 132px;
  border-top: 1px solid var(--line-soft);
}

.foot-brand {
  grid-column: 1;
  margin: 0;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.7;
  color: #d9c3d2;
}

.foot-brand strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
  letter-spacing: 0.12em;
  color: #fff;
}

.foot-links {
  grid-column: 2;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px 14px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  color: #eddaе8;
  color: #eddae8;
  text-decoration: none;
}

.foot-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

.foot-subs {
  grid-column: 1;
  margin: 4px 0 0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.foot-subs input {
  flex: 1 1 auto;
  max-width: 260px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-family: var(--sans);
  font-size: 16px;
}

.foot-subs input::placeholder { color: #b79cae; }

.foot-subs button {
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(255, 0, 128, 0.6);
  border-radius: 999px;
  background: linear-gradient(120deg, var(--pink), var(--mag));
  color: #fff;
  font-family: var(--mono);
  font-size: 16px;
  cursor: pointer;
}

.foot-copy {
  grid-column: 1;
  align-self: center;
  font-size: 16px;
  color: #b79cae;
}

.foot-top {
  grid-column: 2;
  align-self: center;
  text-align: right;
  font-size: 16px;
}

.foot-top a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #d9c3d2;
  text-decoration: none;
}

.foot-top a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* ---- 滚动出现 ---- */
.rv {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition: opacity 0.7s ease, transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.rv.in { opacity: 1; transform: none; }

/* ---- 断点 ---- */
@media (max-width: 1080px) {
  .board { grid-template-columns: 1fr; }
  .rail { position: static; }
  .rail-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
}

@media (max-width: 900px) {
  .dock-side { display: none; }
  .dock-nav { grid-template-columns: 1fr; padding: 10px 66px; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 46px; }
  .hero-fig { aspect-ratio: 16 / 12; order: 2; }
  .hero-copy { order: 1; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .rail-list { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr; padding-bottom: 124px; }
  .foot-brand,
  .foot-links,
  .foot-subs,
  .foot-copy,
  .foot-top { grid-column: 1; }
  .foot-links { justify-content: flex-start; }
  .foot-top { text-align: left; }
  .foot-subs input { max-width: none; }
  .stream > div { border-radius: 22px; }
  .hero-h1 { letter-spacing: -0.01em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .rv { opacity: 1; transform: none; }
}

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