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

:root {
  --red: #ff0000;
  --pink: #ff006e;
  --ink: #1a1a2e;
  --night: #08080f;
  --night-2: #12122a;
  --paper: #f6f2e9;
  --paper-2: #eae4d7;
  --rule: rgba(255, 0, 110, .34);
  --serif: 'Libre Bodoni', Georgia, 'Times New Roman', 'Songti SC', serif;
  --sans: 'Public Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --rail: 216px;
}

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

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

body {
  margin: 0;
  background-color: var(--night);
  background-image:
    radial-gradient(circle at 84% -6%, rgba(255, 0, 110, .17), transparent 52%),
    radial-gradient(circle at -6% 104%, rgba(255, 0, 0, .13), transparent 48%),
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: auto, auto, 46px 46px, 46px 46px;
  background-attachment: fixed;
  color: #ece9f5;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.78;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .32) 0 1px, transparent 1px 3px);
  opacity: .34;
  mix-blend-mode: multiply;
}

img { max-width: 100%; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 80;
  padding: 12px 18px;
  background: var(--pink);
  color: #fff;
  text-decoration: none;
  font-size: 16px;
}

.skip:focus { left: 12px; top: 12px; }

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

.masthead {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  padding: 30px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  border-right: 1px solid var(--rule);
  background-image: linear-gradient(180deg, rgba(8, 8, 15, .97), rgba(18, 18, 42, .93));
  z-index: 40;
}

.brand {
  display: block;
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: .035em;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 0 14px rgba(255, 0, 110, .75), 0 0 40px rgba(255, 0, 0, .45);
}

.brand:hover { color: #ffd9e7; }

.rail-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  counter-reset: rail;
}

.rail-nav a {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 11px 0;
  font-size: 16px;
  color: #cec9de;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, .1);
  transition: color .18s ease, padding-left .18s ease, text-shadow .18s ease;
}

.rail-nav a::before {
  counter-increment: rail;
  content: counter(rail, decimal-leading-zero);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--pink);
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  color: #fff;
  padding-left: 5px;
  text-shadow: 0 0 12px var(--pink);
}

/* ---------- 主区 ---------- */

main { padding-left: var(--rail); }

.hero,
.stage {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: clamp(18px, 3vw, 40px);
}

.hero {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.4vw, 26px);
  min-height: 70vh;
  padding-block: clamp(26px, 5vw, 58px) 0;
  text-align: right;
  align-items: flex-end;
}

.hero-copy { width: 100%; }

.hero h1 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 6.2vw, 74px);
  line-height: 1.04;
  letter-spacing: -.012em;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 0, 110, .6), 0 0 56px rgba(255, 0, 0, .35);
}

.hero-lead {
  margin: 0 0 0 auto;
  max-width: 54ch;
  font-size: 17px;
  color: #b6b1c8;
}

.hero-band {
  width: 100%;
  height: 9px;
  background-image: linear-gradient(90deg, var(--red), var(--pink));
  clip-path: polygon(0 62%, 100% 0, 100% 100%, 0 100%);
  box-shadow: 0 0 26px rgba(255, 0, 110, .65);
}

.hero-figure {
  margin: 0;
  position: relative;
  width: 100%;
  height: clamp(170px, 33vh, 320px);
  overflow: hidden;
  border: 1px solid var(--rule);
  background-image:
    linear-gradient(rgba(255, 0, 110, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 110, .18) 1px, transparent 1px),
    linear-gradient(135deg, #16162f, #2a0a20 60%, #120c1c);
  background-size: 26px 26px, 26px 26px, auto;
  box-shadow: 0 30px 60px -34px rgba(255, 0, 110, .8);
}

.hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.15) contrast(1.06) brightness(.96);
  transition: transform .6s ease, filter .6s ease;
}

.hero-figure:hover img { transform: scale(1.02); filter: saturate(1.25) contrast(1.08); }

/* ---------- 内容区：aside 在左，正文在右 ---------- */

.stage {
  display: grid;
  grid-template-columns: minmax(0, 208px) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 40px);
  align-items: start;
  padding-top: clamp(34px, 6vw, 70px);
  padding-bottom: 84px;
}

.side {
  position: sticky;
  top: 26px;
  padding: 18px 16px 16px;
  border: 1px solid var(--rule);
  background-image: linear-gradient(180deg, #171733, #0d0d1e);
  box-shadow: 0 24px 48px -26px rgba(255, 0, 110, .75);
}

.side h2 {
  margin: 0 0 7px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 0, 0, .6);
}

.side .subtitle {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  font-size: 15px;
  line-height: 1.6;
  color: #a6a0bb;
}

.side-index {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
}

.side-index a {
  display: block;
  padding: 8px 0;
  color: #c7c2d7;
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 255, 255, .12);
  transition: color .18s ease, transform .18s ease;
}

.side-index a:hover,
.side-index a:focus-visible { color: var(--pink); transform: translateX(3px); }

/* ---------- 正文纸面 ---------- */

.prose {
  counter-reset: sec;
  padding: clamp(20px, 3.4vw, 46px);
  background: var(--paper);
  color: #1c1c2c;
  border: 1px solid #d8d1c2;
  box-shadow: 0 34px 74px -34px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 0, 110, .14);
  font-size: 17px;
  line-height: 1.82;
}

.prose > article {
  counter-increment: sec;
  padding: clamp(24px, 4vw, 46px) 0;
  border-top: 1px solid #ded6c6;
  scroll-margin-top: 26px;
}

.prose > article:first-child { border-top: 0; padding-top: 0; }
.prose > article:last-child { padding-bottom: 0; }

.prose > article > h2:first-child::before {
  content: counter(sec, decimal-leading-zero);
  display: block;
  margin-bottom: 9px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .34em;
  color: var(--pink);
}

.prose h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(23px, 3.2vw, 32px);
  line-height: 1.22;
  color: var(--ink);
}

.prose h3 {
  margin: 1.5em 0 .6em;
  font-family: var(--serif);
  font-size: clamp(19px, 2.2vw, 22px);
  line-height: 1.35;
  color: #2c2242;
}

.prose p { margin: 0 0 1.05em; }

.prose .subtitle,
.prose .subhead,
.prose .desc,
.prose .lead {
  margin-bottom: 1.15em;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.6;
  color: #6d6280;
}

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

.prose a:hover { color: var(--pink); background: rgba(255, 0, 110, .07); }

.prose ul,
.prose ol { margin: 0 0 1.15em; padding-left: 1.35em; }

.prose li { margin-bottom: .45em; }

.prose strong { color: #14141f; }

.prose blockquote {
  margin: 1.5em 0;
  padding: 6px 0 6px 18px;
  border-left: 4px solid var(--pink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  color: #40335a;
}

.prose figure { margin: 1.5em 0; }

.prose img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #cfc7b6;
}

.prose hr { border: 0; border-top: 1px dashed #cbc3b2; margin: 2em 0; }

.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }

.prose th,
.prose td { border: 1px solid #cfc7b6; padding: 9px 11px; text-align: left; }

.prose th { background: var(--paper-2); }

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

footer {
  margin-left: var(--rail);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 26px;
  align-items: start;
  padding: clamp(30px, 5vw, 58px) clamp(18px, 3vw, 40px) 24px;
  border-top: 1px solid var(--rule);
  background-image: linear-gradient(180deg, #0a0a16, #131329);
}

.footer-brand {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 28px);
  color: #fff;
  text-shadow: 0 0 16px rgba(255, 0, 110, .6);
}

.footer-desc {
  margin: 0;
  max-width: 46ch;
  font-size: 16px;
  color: #9c96b2;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 18px;
  font-size: 16px;
}

.footer-nav a {
  display: block;
  padding: 9px 0;
  min-height: 40px;
  color: #cac5da;
  text-decoration: none;
  transition: color .18s ease, text-shadow .18s ease;
}

.footer-nav a:hover,
.footer-nav a:focus-visible { color: var(--pink); text-shadow: 0 0 12px var(--pink); }

.colophon {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .11);
  font-size: 14px;
  color: #8b86a0;
}

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

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

/* ---------- 动效 ---------- */

[data-rv] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s cubic-bezier(.2, .7, .3, 1), transform .8s cubic-bezier(.2, .7, .3, 1);
}

[data-rv].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  .hero h1 { animation: glitch 7s steps(1) infinite; }
}

@keyframes glitch {
  0%, 91%, 100% { transform: none; }
  92% { transform: skewX(-1.6deg) translateX(-2px); }
  94% { transform: skewX(1.1deg) translateX(3px); }
  96% { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-figure img { transition: none; }
}

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

@media (max-width: 860px) {
  .masthead {
    position: sticky;
    inset: auto;
    top: 0;
    width: auto;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px 0;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .brand { font-size: 18px; padding: 4px 0; }

  .rail-nav { overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }

  .rail-nav ol { flex-direction: row; gap: 2px; }

  .rail-nav a {
    align-items: center;
    white-space: nowrap;
    min-height: 44px;
    padding: 10px 11px;
    border-bottom: 2px solid transparent;
  }

  .rail-nav a:hover { padding-left: 11px; }

  main { padding-left: 0; }

  .hero { min-height: 0; padding-block: 22px 0; }

  .stage {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 28px;
    padding-bottom: 56px;
  }

  .side { position: static; }

  .side-index { columns: 2; column-gap: 18px; }

  .prose > article { scroll-margin-top: 118px; }

  footer { margin-left: 0; grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }

  .hero h1 { font-size: clamp(29px, 8.6vw, 40px); }

  .prose { padding: 20px 16px; font-size: 16px; }

  .footer-nav ul { columns: 1; }

  .hero-figure { height: 168px; }
}

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