@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Orbitron:wght@700;900&display=swap');

:root {
  --red: #ff0000;
  --pink: #ff006e;
  --ink: #1a1a2e;
  --void: #08080f;
  --text: #ece9f6;
  --dim: #a49dbb;
  --line: rgba(255, 0, 110, 0.32);
  --rail: 92px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --disp: "Orbitron", "JetBrains Mono", ui-monospace, monospace;
}

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

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

body {
  margin: 0;
  padding-left: var(--rail);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 88% -12%, rgba(255, 0, 110, 0.2), transparent 62%),
    radial-gradient(900px 520px at -8% 34%, rgba(255, 0, 0, 0.15), transparent 60%),
    var(--ink);
  background-attachment: fixed;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.32) 0 1px,
    rgba(255, 255, 255, 0.018) 1px 3px
  );
  opacity: 0.6;
}

a { color: var(--pink); }
a:hover { color: #fff; }

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

h1, h2, h3 {
  font-family: var(--disp);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

hr {
  height: 2px;
  border: 0;
  margin: 0 0 1.5rem;
  background: linear-gradient(90deg, var(--pink), var(--red), transparent);
  box-shadow: 0 0 12px rgba(255, 0, 110, 0.55);
}

/* ---------- 左侧固定竖排导航 ---------- */

.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 0.45rem;
  background: rgba(8, 8, 15, 0.92);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.mark {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  text-decoration: none;
  font-family: var(--disp);
  font-weight: 900;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  color: #0b0b16;
  background: linear-gradient(145deg, var(--red), var(--pink));
  box-shadow: 0 0 18px rgba(255, 0, 110, 0.65);
}

.mark span { pointer-events: none; }

.rail nav {
  flex: 1;
  width: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.rail nav p {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  padding: 0.35rem 0;
}

.rail nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.45rem 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.76rem;
  line-height: 1.25;
  text-align: center;
  color: var(--text);
  text-decoration: none;
  word-break: break-all;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.rail nav a:hover,
.rail nav a:focus-visible {
  color: #0b0b16;
  background: var(--pink);
  box-shadow: 0 0 16px rgba(255, 0, 110, 0.8);
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.3rem;
  border-radius: 999px;
  font-size: 0.76rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  color: #0b0b16;
  background: var(--red);
  box-shadow: 0 0 18px rgba(255, 0, 0, 0.7);
  word-break: break-all;
}

.cta:hover { color: #0b0b16; background: #fff; box-shadow: 0 0 22px #fff; }

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: 5rem clamp(1.1rem, 4vw, 3rem) 3.5rem;
  border-bottom: 1px solid var(--line);
}

.hero-ghost {
  position: absolute;
  left: -0.04em;
  top: 10%;
  z-index: 0;
  font-family: var(--disp);
  font-weight: 900;
  font-size: clamp(3rem, 13vw, 10rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: rgba(255, 0, 110, 0.14);
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 44px rgba(255, 0, 110, 0.35);
  will-change: transform;
}

.hero-ghost > span {
  display: inline-block;
  animation: glitch 7s steps(1) infinite;
}

@keyframes glitch {
  0%, 91%, 100% { transform: none; }
  92% { transform: translate(-5px, 2px) skewX(-7deg); }
  94% { transform: translate(6px, -3px) skewX(6deg); }
  96% { transform: translate(-3px, 1px) skewX(-3deg); }
  98% { transform: translate(2px, 0) skewX(2deg); }
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 44rem;
  text-align: left;
}

.hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 6vw, 3.4rem);
  color: #fff;
  text-shadow:
    0 0 8px var(--red),
    0 0 30px rgba(255, 0, 110, 0.75);
}

.hero-desc {
  margin: 0 0 1.5rem;
  max-width: 36ch;
  color: var(--dim);
  font-size: 0.98rem;
}

.hero-cue {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.32em;
  color: var(--pink);
}

.hero-cue::after {
  content: "";
  display: block;
  width: 1px;
  height: 34px;
  margin-top: 0.5rem;
  background: linear-gradient(var(--pink), transparent);
}

.hero-art {
  position: relative;
  z-index: 1;
  margin: 0;
}

.hero-img,
.hero-art img {
  display: block;
  width: 100%;
  max-height: 42vh;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 0 34px rgba(255, 0, 110, 0.35);
  filter: saturate(1.15) contrast(1.05);
}

/* ---------- 正文骨架 ---------- */

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem clamp(1.1rem, 4vw, 3rem);
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 2.4rem;
  align-items: start;
}

.prose {
  min-width: 0;
  counter-reset: sec;
}

.prose > section {
  counter-increment: sec;
  position: relative;
  padding: 3rem 0 1rem;
  border-top: 1px dashed var(--line);
  scroll-margin-top: 1.5rem;
}

.prose > section:first-child { border-top: 1px solid var(--pink); }

.prose > section::before {
  content: counter(sec, decimal-leading-zero);
  position: absolute;
  top: 0.35rem;
  right: 0;
  font-family: var(--disp);
  font-weight: 900;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 1;
  color: rgba(255, 0, 110, 0.22);
  text-shadow: 0 0 24px rgba(255, 0, 110, 0.35);
  pointer-events: none;
}

.prose h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.3rem, 3.4vw, 2rem);
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 0, 110, 0.6);
}

.prose h3 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.02rem, 2.4vw, 1.25rem);
  color: var(--pink);
}

.prose p { margin: 0 0 1.1em; }
.prose ul,
.prose ol { margin: 0 0 1.2em; padding-left: 1.25em; }
.prose li { margin-bottom: 0.5em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

.prose blockquote {
  margin: 0 0 1.2em;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--pink);
  border-radius: 0 10px 10px 0;
  background: rgba(255, 0, 110, 0.1);
  color: var(--text);
}

.prose strong { color: #fff; }

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* ---------- 侧栏 ---------- */

.side {
  position: sticky;
  top: 1.5rem;
  padding: 1.15rem 1.1rem 1.35rem;
  border-radius: 10px;
  background: rgba(11, 11, 22, 0.78);
  box-shadow: 0 0 0 1px var(--line), 0 0 26px rgba(255, 0, 110, 0.18);
}

.side h2 {
  margin: 0 0 0.7rem;
  font-size: 0.92rem;
  letter-spacing: 0.14em;
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 0, 110, 0.7);
}

.side hr { margin-bottom: 0.9rem; }

.side ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.side a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text);
  text-decoration: none;
}

.side a:hover,
.side a:focus-visible {
  color: #0b0b16;
  background: var(--pink);
  box-shadow: 0 0 14px rgba(255, 0, 110, 0.75);
}

/* ---------- 页脚 ---------- */

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 2rem;
  padding: 2.6rem clamp(1.1rem, 4vw, 3rem) 2rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(255, 0, 110, 0.09));
}

footer p {
  margin: 0;
  font-family: var(--disp);
  font-weight: 900;
  font-size: clamp(1.8rem, 8vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: rgba(255, 0, 110, 0.32);
  -webkit-text-stroke: 1px var(--pink);
  text-shadow: 0 0 28px rgba(255, 0, 110, 0.45);
}

footer small {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--dim);
}

/* ---------- 滚动入场 ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
}

.js [data-reveal].in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ---------- 断点 ---------- */

@media (max-width: 980px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .side ul { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 900px) {
  body { padding-left: 0; padding-top: 64px; }
  .rail {
    right: 0;
    bottom: auto;
    width: auto;
    height: 64px;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
  }
  .rail nav {
    flex: 1;
    width: auto;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .rail nav p {
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    padding: 0;
  }
  .rail nav a {
    white-space: nowrap;
    padding: 0.45rem 0.8rem;
    min-height: 44px;
    font-size: 0.82rem;
    word-break: normal;
  }
  .cta { display: none; }
  .prose > section { scroll-margin-top: 5rem; }
  .hero { padding-top: 3rem; min-height: auto; }
  .hero-ghost { font-size: clamp(2.6rem, 16vw, 5rem); top: 6%; }
  .hero-img,
  .hero-art img { max-height: 32vh; }
}

@media (max-width: 520px) {
  .wrap { padding: 1.6rem 1.05rem; }
  .prose > section { padding-top: 2.4rem; }
  footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-ghost > span { animation: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

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