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

:root {
  --ink: #0d0d0d;
  --p: #8000ff;
  --f: #ff00ff;
  --hud: #57ffb0;
  --txt: #ece5f6;
  --dim: #a795bf;
  --line: rgba(160, 80, 255, 0.28);
  --rail: 80px;
  --top: 36px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-left: var(--rail);
  padding-top: var(--top);
  background: var(--ink);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 92;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.032) 0 1px, transparent 1px 3px);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(62vw 52vh at 82% -8%, rgba(128, 0, 255, 0.24), transparent 62%),
    radial-gradient(52vw 42vh at 4% 102%, rgba(255, 0, 255, 0.14), transparent 66%);
}

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

a { color: #e6c8ff; text-decoration: none; }
a:hover { color: var(--f); }

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

p { margin: 0 0 1.1em; }

[id] { scroll-margin-top: 96px; }

/* 顶部细条 */
.topline {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--top);
  z-index: 88;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 0 calc(var(--rail) + 14px);
  background: #090410;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
}

.top-dot {
  width: 7px;
  height: 7px;
  flex: none;
  background: var(--hud);
  box-shadow: 0 0 10px var(--hud);
  transform: rotate(45deg);
}

.top-brand { color: #d6c6ea; }

.top-slit {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 0, 255, 0.55), transparent);
}

/* 左侧竖栏 */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 86;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 22px;
  background: linear-gradient(180deg, #0a0512, #07040c);
  border-right: 1px solid var(--line);
}

.rail-brand {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.34em;
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 0, 255, 0.72);
  padding: 10px 0;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.burger {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(128, 0, 255, 0.12);
  color: var(--txt);
  width: 52px;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  padding: 10px 0;
}

.burger:hover { border-color: var(--f); color: var(--f); }

.burger-bars { display: flex; flex-direction: column; gap: 4px; }

.burger-bars i {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--f);
  box-shadow: 0 0 8px var(--f);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

body.nav-open .burger-bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .burger-bars i:nth-child(2) { opacity: 0; }
body.nav-open .burger-bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.burger-word { writing-mode: vertical-rl; }

/* 全屏遮罩导航 */
.hud-nav {
  position: fixed;
  top: var(--top);
  left: var(--rail);
  right: 0;
  bottom: 0;
  z-index: 80;
  overflow-y: auto;
  padding: 40px clamp(22px, 6vw, 80px) 60px;
  background:
    repeating-linear-gradient(90deg, rgba(128, 0, 255, 0.06) 0 1px, transparent 1px 70px),
    rgba(9, 4, 15, 0.975);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
}

body.nav-open .hud-nav { visibility: visible; opacity: 1; transform: none; }
body.nav-open { overflow: hidden; }

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 880px;
}

.nav-list li { border-bottom: 1px solid rgba(255, 0, 255, 0.16); }

.nav-list a {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  min-height: 66px;
  padding: 12px 4px;
  color: var(--txt);
  font-size: clamp(1.12rem, 3.1vw, 1.7rem);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.nav-list a:hover { color: #fff; text-shadow: 0 0 16px var(--f); }

.nav-no {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--f);
  min-width: 2.4em;
}

/* 首屏 */
.hero {
  position: relative;
  min-height: calc(100svh - var(--top));
  display: flex;
  align-items: center;
  padding: clamp(76px, 13vh, 150px) clamp(22px, 6vw, 96px) clamp(96px, 12vh, 130px);
  overflow: hidden;
}

.hero-fig {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 0;
  background:
    linear-gradient(135deg, rgba(128, 0, 255, 0.32), rgba(13, 13, 13, 0.92)),
    linear-gradient(45deg, #180a28, #07030c);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.15) contrast(1.06);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 3, 14, 0.95) 0%, rgba(8, 3, 14, 0.6) 56%, rgba(8, 3, 14, 0.34) 100%),
    linear-gradient(180deg, rgba(8, 3, 14, 0.72), transparent 42%, rgba(8, 3, 14, 0.88));
}

.hero-copy { position: relative; z-index: 2; max-width: 940px; }

.hero h1 {
  margin: 0 0 32px;
  font-size: clamp(1.85rem, 6.2vw, 4.3rem);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #fff;
  overflow-wrap: anywhere;
  text-shadow: 2px 0 rgba(255, 0, 255, 0.5), -2px 0 rgba(128, 0, 255, 0.6), 0 0 30px rgba(128, 0, 255, 0.35);
  animation: glitch 7s steps(1) infinite;
}

@keyframes glitch {
  0%, 92%, 100% { transform: none; }
  93% { transform: skewX(-1.6deg) translateX(-2px); }
  95% { transform: skewX(1.4deg) translateX(3px); }
  97% { transform: none; }
}

.hero-jump {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--f);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--f);
  background: rgba(255, 0, 255, 0.07);
  box-shadow: inset 0 0 16px rgba(255, 0, 255, 0.28);
}

.hero-jump:hover { background: var(--f); color: #12001a; }

.jump-bar {
  width: 18px;
  height: 8px;
  border-bottom: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg) translate(-3px, -3px);
}

.hero-slash {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 16px;
  z-index: 3;
  background: linear-gradient(90deg, var(--p), var(--f) 55%, rgba(13, 13, 13, 0));
  clip-path: polygon(0 46%, 100% 0, 100% 100%, 0 100%);
  box-shadow: 0 0 24px rgba(255, 0, 255, 0.45);
}

/* 正文 */
.read {
  display: grid;
  grid-template-columns: minmax(188px, 246px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 62px);
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 92px) clamp(20px, 4vw, 44px);
  align-items: start;
}

.side {
  position: sticky;
  top: calc(var(--top) + 24px);
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.side-h {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--f);
}

.side-h span { display: inline-block; }

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.side-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  border-bottom: 1px dotted rgba(160, 80, 255, 0.24);
  font-size: 15px;
  line-height: 1.45;
  color: var(--dim);
  transition: padding-left 0.2s ease, color 0.2s ease;
}

.side-list a:hover { color: #fff; padding-left: 6px; }

.article { max-width: 76ch; min-width: 0; }

.page-h1 {
  margin: 0 0 28px;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.24;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 0, 255, 0.35);
}

.article > section {
  position: relative;
  padding: 0 0 clamp(34px, 5vw, 56px);
  margin-bottom: clamp(34px, 5vw, 56px);
  border-bottom: 1px solid rgba(128, 0, 255, 0.16);
}

.article > section:last-of-type { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

.article > section::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 66px;
  height: 1px;
  background: var(--f);
  box-shadow: 0 0 10px var(--f);
}

.article h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 20px;
  font-size: clamp(1.32rem, 2.6vw, 1.7rem);
  line-height: 1.36;
  font-weight: 600;
  color: #fff;
}

.article h2::before {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  background: linear-gradient(135deg, var(--p), var(--f));
  transform: rotate(45deg) translateY(-2px);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.6);
}

.article h2 span,
.article h3 span { text-shadow: 0 0 14px rgba(255, 0, 255, 0.42); }

.article h3 {
  margin: 1.6em 0 0.7em;
  font-size: 1.16rem;
  font-weight: 600;
  color: #f4ecff;
}

.article p { color: #d9cfe8; }

.article ul,
.article ol { margin: 0 0 1.2em; padding-left: 1.35em; }

.article li { margin-bottom: 0.45em; color: #d9cfe8; }
.article li::marker { color: var(--f); }

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

.article a {
  color: #f0b6ff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 0, 255, 0.45);
  text-underline-offset: 3px;
}

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

.article figure {
  margin: 1.4em 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: #100818;
}

.article figure img { width: 100%; }

.article figcaption { padding: 10px 12px; font-size: 15px; color: var(--dim); }

.article blockquote {
  margin: 1.4em 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--f);
  color: #efe4ff;
}

.article aside {
  margin: 1.4em 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--p);
  border-radius: 4px;
  background: #0f0818;
  font-size: 16px;
}

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

.article th,
.article td {
  border: 1px solid rgba(128, 0, 255, 0.26);
  padding: 9px 11px;
  text-align: left;
  vertical-align: top;
}

.article th { background: rgba(128, 0, 255, 0.14); color: #fff; font-weight: 600; }

.article pre {
  overflow-x: auto;
  padding: 14px;
  background: #08040e;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 14px;
}

/* 页脚 */
.foot {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #0f0718, #08040d);
}

.foot-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 80px) clamp(20px, 4vw, 44px) clamp(32px, 4vw, 46px);
}

.cta-h {
  margin: 0;
  font-size: clamp(1.9rem, 6.6vw, 3.8rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 0 26px rgba(255, 0, 255, 0.5), 3px 0 rgba(128, 0, 255, 0.5);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid var(--f);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--f);
  background: rgba(255, 0, 255, 0.08);
}

.cta-btn:hover { background: var(--f); color: #12001a; }

.foot-body {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 2.2fr);
  gap: clamp(26px, 5vw, 70px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 44px) clamp(38px, 5vw, 56px);
}

.foot-logo {
  display: inline-block;
  padding: 8px 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #fff;
  text-shadow: 0 0 14px rgba(128, 0, 255, 0.8);
}

.foot-mark { display: flex; gap: 5px; margin-top: 12px; }

.foot-mark i {
  width: 10px;
  height: 2px;
  background: linear-gradient(90deg, var(--p), var(--f));
}

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

.foot-cols dl { margin: 0; }

.foot-cols dt {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--f);
}

.foot-cols dd { margin: 0; }

.foot-cols dd a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--dim);
}

.foot-cols dd a:hover { color: #fff; }

.foot-base {
  padding: 16px clamp(20px, 4vw, 44px);
  border-top: 1px solid rgba(128, 0, 255, 0.18);
}

.foot-base p {
  max-width: 1240px;
  margin: 0 auto;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--dim);
}

/* 进场 */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.js .article.reveal > section:nth-child(2) { transition-delay: 60ms; }
.js .article.reveal > section:nth-child(3) { transition-delay: 120ms; }
.js .article.reveal > section:nth-child(4) { transition-delay: 180ms; }
.js .article.reveal > section:nth-child(n+5) { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero h1 { animation: none; }
  .js .reveal,
  .js .article.reveal > section {
    opacity: 1;
    transform: none;
    transition: none;
    transition-delay: 0ms;
  }
  .hud-nav, .burger-bars i, .side-list a { transition: none; }
}

/* 移动端 */
@media (max-width: 940px) {
  :root { --rail: 62px; }
  body { font-size: 16px; }
  .rail-brand { font-size: 17px; }
  .burger { width: 44px; min-height: 76px; }
  .read { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .side-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .foot-body { grid-template-columns: minmax(0, 1fr); }
  .foot-cols { gap: 14px; }
  .foot-cols dd a { font-size: 14px; }
}

@media (max-width: 560px) {
  :root { --rail: 56px; --top: 32px; }
  .topline { font-size: 11px; letter-spacing: 0.18em; }
  .hero { padding-left: 20px; padding-right: 22px; }
  .hero h1 { font-size: clamp(1.72rem, 8.2vw, 2.5rem); }
  .read { padding-left: 18px; padding-right: 20px; }
  .foot-cols { grid-template-columns: minmax(0, 1fr); }
  .foot-cols dl {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: start;
    border-top: 1px solid rgba(128, 0, 255, 0.18);
  }
  .foot-cols dt { border-bottom: 0; padding-top: 12px; }
  .foot-cols dd { display: flex; flex-wrap: wrap; gap: 0 18px; }
  .nav-list a { min-height: 58px; }
}

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