@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400&family=Playfair+Display:ital@1&display=swap');

:root {
  --magenta: #ff0080;
  --violet: #ff00ff;
  --ink: #26171f;
  --bg: #08030a;
  --fg: #f8eff5;
  --muted: rgba(248, 239, 245, .68);
  --line: rgba(255, 255, 255, .12);
  --glass: linear-gradient(160deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .022));
  --shadow: 0 26px 62px -30px rgba(255, 0, 128, .62);
  --radius: 10px;
  --edge: clamp(14px, 2.4vw, 36px);
  --rail: 272px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.76;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -22%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(closest-side at 18% 24%, rgba(255, 0, 128, .58), transparent 72%),
    radial-gradient(closest-side at 80% 14%, rgba(255, 0, 255, .48), transparent 70%),
    radial-gradient(closest-side at 66% 78%, rgba(126, 0, 255, .46), transparent 74%),
    radial-gradient(closest-side at 10% 84%, rgba(0, 214, 255, .26), transparent 72%),
    linear-gradient(180deg, #0b040d, #14060f 60%, #0a0409);
  filter: blur(46px) saturate(1.15);
  animation: drift 28s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 82%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 82%);
}

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1) hue-rotate(0deg); }
  50%  { transform: translate3d(-3%, 2%, 0) scale(1.08) hue-rotate(-14deg); }
  100% { transform: translate3d(3%, -3%, 0) scale(1.12) hue-rotate(12deg); }
}

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

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

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: 0 clamp(18px, 3vw, 48px);
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--edge);
}

/* ---------- 侧栏（左侧） ---------- */
.rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 0 24px;
  overflow: auto;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .22);
  background: conic-gradient(from 210deg, var(--magenta), var(--violet), #7a2bff, var(--magenta));
  color: #12040c;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 28px -14px rgba(255, 0, 128, .9);
  overflow: hidden;
  transition: transform .3s ease;
}

.mark img { width: 44px; height: 44px; object-fit: cover; }
.mark:hover, .mark:focus-visible { transform: rotate(-8deg) scale(1.06); }

.rail small,
.cta small {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 14px;
  letter-spacing: .34em;
  color: var(--magenta);
  text-transform: uppercase;
}

.rail h2 {
  margin: 0 0 6px;
  font-size: clamp(22px, 2vw, 27px);
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 800;
  background: linear-gradient(100deg, #fff, #ffb0d8 45%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.rail-nav ul,
.subbar ul,
.chips,
.fbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rail-nav ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: step;
}

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .045);
  color: var(--fg);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.rail-nav a::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, .45);
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  border-color: var(--magenta);
  background: rgba(255, 0, 128, .16);
  transform: translateX(4px);
}

/* ---------- 二级粘性锚点条 ---------- */
main { min-width: 0; padding-bottom: 40px; }

.subbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 12px 0 10px;
  background: linear-gradient(rgba(8, 3, 10, .94), rgba(8, 3, 10, 0));
  backdrop-filter: blur(10px);
}

.subbar ul {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.subbar ul::-webkit-scrollbar { display: none; }

.subbar a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 15px;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(18, 6, 16, .72);
  color: rgba(248, 239, 245, .86);
  font-size: 15px;
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease;
}

.subbar a:hover,
.subbar a:focus-visible {
  color: #fff;
  border-color: var(--violet);
}

/* ---------- 首屏海报 ---------- */
.poster {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  min-height: 100vh;
  padding: 120px clamp(6px, 2.4vw, 34px) 88px;
  margin-bottom: clamp(28px, 4.5vw, 56px);
  border-radius: 0 0 140px 140px;
  overflow: hidden;
  text-align: right;
}

.poster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(200deg, rgba(8, 3, 10, .18), rgba(8, 3, 10, .82) 70%),
    radial-gradient(90% 70% at 82% 12%, rgba(255, 0, 255, .38), transparent 70%);
}

.stage { position: absolute; inset: 0; z-index: -2; }

.stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.3s ease, transform 9s linear;
}

.stage img.on { opacity: .5; }

.poster-in { width: 100%; max-width: 900px; }

.poster h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6.4vw, 82px);
  line-height: 1.05;
  letter-spacing: -.028em;
  font-weight: 800;
  background: linear-gradient(100deg, #fff 0%, #ffb3d9 38%, var(--magenta) 68%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 12px 34px rgba(0, 0, 0, .62));
}

.lede {
  margin: 0 0 26px auto;
  max-width: 44ch;
  font-size: 17px;
  line-height: 1.8;
  color: var(--muted);
}

.jump {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 30px;
  border-radius: 999px;
  background: linear-gradient(96deg, var(--magenta), var(--violet));
  color: #12040c;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  box-shadow: 0 18px 42px -20px rgba(255, 0, 255, .95);
  transition: transform .25s ease, box-shadow .25s ease;
}

.jump:hover,
.jump:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 24px 52px -20px rgba(255, 0, 255, 1);
}

/* ---------- 正文卡片 ---------- */
section > article:not(.poster) {
  scroll-margin-top: 96px;
  margin: 0 0 22px;
  padding: clamp(22px, 3vw, 38px);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .1);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

section > article:not(.poster) h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 3.2vw, 32px);
  line-height: 1.25;
  letter-spacing: -.02em;
  font-weight: 800;
  background: linear-gradient(96deg, #fff, #ffa8d4 55%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

section > article:not(.poster) h3 {
  margin: 26px 0 10px;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 700;
  color: #ffd7ea;
}

section > article:not(.poster) p { margin: 0 0 16px; }
section > article:not(.poster) p:last-child { margin-bottom: 0; }

section a {
  color: #ff8dc0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

section ul,
section ol { margin: 0 0 16px; padding-left: 1.35em; }
section li { margin-bottom: 8px; }

section blockquote {
  margin: 22px 0;
  padding: 14px 20px;
  border-left: 3px solid var(--violet);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(255, 0, 255, .08);
  color: #ffdcee;
}

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

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

section th,
section td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

section th { color: #ffd7ea; font-weight: 700; }
section code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 15px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .1);
}

/* ---------- 滚动显现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.2, .7, .3, 1), transform .7s cubic-bezier(.2, .7, .3, 1);
}

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

/* ---------- 页脚 ---------- */
footer {
  margin-top: clamp(38px, 6vw, 82px);
  padding-top: clamp(26px, 3.5vw, 44px);
  border-top: 1px solid var(--line);
}

.cta {
  padding: clamp(24px, 3.4vw, 44px);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 0, 128, .3);
  background:
    radial-gradient(120% 140% at 90% 0%, rgba(255, 0, 255, .3), transparent 62%),
    linear-gradient(160deg, rgba(255, 0, 128, .2), rgba(38, 23, 31, .6));
  box-shadow: 0 34px 70px -38px rgba(255, 0, 128, .95);
}

.cta h2 {
  margin: 8px 0 20px;
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 800;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chips a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 17px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(8, 3, 10, .42);
  color: var(--fg);
  font-size: 16px;
  text-decoration: none;
  transition: background .22s ease, border-color .22s ease;
}

.chips a:hover,
.chips a:focus-visible {
  background: rgba(255, 0, 128, .3);
  border-color: var(--violet);
}

.fbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 22px;
  padding: 22px 0 36px;
}

.fbar ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.fbar a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--muted);
  font-size: 16px;
  text-decoration: none;
}

.fbar nav a:hover,
.fbar nav a:focus-visible { color: #fff; }

.copy {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
}

/* ---------- 移动端 ---------- */
@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .rail {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 16px 0 6px;
    overflow: visible;
  }

  .rail h2 { margin: 0; font-size: 20px; }
  .rail small { letter-spacing: .22em; }

  .rail-nav {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    margin-top: 2px;
  }

  .rail-nav::-webkit-scrollbar { display: none; }

  .rail-nav ul {
    flex-direction: row;
    gap: 8px;
    padding-bottom: 6px;
  }

  .rail-nav a {
    white-space: nowrap;
    min-height: 42px;
    padding: 9px 15px;
  }

  .rail-nav a:hover { transform: none; }

  .poster {
    min-height: 88vh;
    padding: 80px 4px 56px;
    border-radius: 0 0 76px 76px;
    justify-content: center;
    text-align: right;
  }

  .poster h1 { font-size: clamp(30px, 9vw, 52px); }

  .lede { margin-left: auto; font-size: 16px; }

  .subbar { padding: 10px 0 8px; }

  .fbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .copy { font-size: 15px; }
}

@media (max-width: 560px) {
  .poster { min-height: 82vh; }
  .cta h2 { font-size: 22px; }
  section > article:not(.poster) { padding: 20px 18px; }
}

@media (hover: none) {
  .rail-nav a:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { animation: none; }
  .stage img { transition: opacity .2s linear; transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .jump, .mark, .rail-nav a, .chips a { transition: none; }
}

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