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

:root {
  --ink: #26171f;
  --ink-deep: #180c12;
  --pink: #ff0080;
  --magenta: #ff00ff;
  --paper: #fdf6fa;
  --text: #eaddE6;
  --muted: #c3aebd;
  --rail: 232px;
  --radius: 18px;
  --display: 'Playfair Display', Georgia, 'Songti SC', serif;
  --serif: 'Source Serif 4', Georgia, 'Songti SC', serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.78;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: -22% -12%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(46% 40% at 14% 8%, rgba(255, 0, 128, .55), transparent 62%),
    radial-gradient(40% 44% at 82% 6%, rgba(255, 0, 255, .42), transparent 64%),
    radial-gradient(52% 48% at 64% 82%, rgba(255, 0, 128, .28), transparent 66%),
    radial-gradient(38% 38% at 30% 60%, rgba(255, 0, 255, .22), transparent 68%),
    conic-gradient(from 210deg at 42% 32%, rgba(255, 0, 255, .28), rgba(255, 0, 128, .16), rgba(38, 23, 31, 0) 58%);
  filter: blur(34px) saturate(125%);
  mix-blend-mode: screen;
  animation: aurora 28s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, rgba(24, 12, 18, 0) 30%, rgba(24, 12, 18, .78) 100%);
}

@keyframes aurora {
  0% { transform: translate3d(0, 0, 0) scale(1.04); }
  50% { transform: translate3d(-2.5%, 2%, 0) scale(1.16); }
  100% { transform: translate3d(2.5%, -2%, 0) scale(1.08); }
}

a { color: inherit; }
img { max-width: 100%; }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 3px;
}

.rail,
.stage { position: relative; z-index: 1; }

/* 左侧固定竖排导航 */
.rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 16px 30px 22px;
  background: linear-gradient(180deg, rgba(24, 12, 18, .94), rgba(24, 12, 18, .72));
  border-right: 1px solid rgba(255, 0, 128, .22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow-y: auto;
  z-index: 6;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 0 18px;
  text-decoration: none;
  color: var(--paper);
  font-family: var(--display);
  font-size: 21px;
  letter-spacing: .03em;
  line-height: 1.2;
}

.brand-dot,
.mark {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  object-fit: cover;
  background: conic-gradient(from 140deg, #ff0080, #ff00ff, #26171f, #ff0080);
  box-shadow: 0 0 24px rgba(255, 0, 255, .45);
}

.brand-txt {
  background: linear-gradient(100deg, #ffffff, #ffbfe0 60%, #ff8ec4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
}

.rail-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 8px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.4;
  transition: color .25s ease, background-color .25s ease, transform .25s ease;
}

.rail-link .dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--pink), var(--magenta));
  opacity: .55;
  transition: opacity .25s ease, box-shadow .25s ease;
}

.rail-link:hover,
.rail-link:focus-visible,
.rail-link.is-active {
  color: var(--paper);
  background: rgba(255, 0, 128, .12);
  transform: translateX(2px);
}

.rail-link:hover .dot,
.rail-link.is-active .dot {
  opacity: 1;
  box-shadow: 0 0 12px rgba(255, 0, 255, .8);
}

/* 舞台 */
.stage { margin-left: var(--rail); }

/* 首屏 */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 88px clamp(20px, 6vw, 80px) 78px;
  overflow: hidden;
  text-align: right;
  border-radius: 0 0 44% 44% / 0 0 10% 10%;
  background:
    linear-gradient(215deg, rgba(255, 0, 255, .3), rgba(38, 23, 31, .1) 45%, rgba(24, 12, 18, .8)),
    conic-gradient(from 160deg at 70% 20%, rgba(255, 0, 128, .55), rgba(255, 0, 255, .3), rgba(24, 12, 18, .9));
}

.hero-img {
  position: absolute;
  inset: -6% 0 0;
  width: 100%;
  height: 112%;
  object-fit: cover;
  z-index: 0;
  opacity: .78;
  will-change: transform;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(200deg, rgba(24, 12, 18, .35) 10%, rgba(24, 12, 18, .88) 92%);
}

.ghost {
  position: absolute;
  right: -.05em;
  top: .04em;
  z-index: 1;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(56px, 15vw, 210px);
  line-height: .84;
  letter-spacing: -.05em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(253, 246, 250, .26);
  pointer-events: none;
  user-select: none;
}

.hero-in { position: relative; z-index: 2; max-width: 15em; }

.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 5vw, 62px);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--paper);
  text-shadow: 0 2px 34px rgba(24, 12, 18, .7);
}

/* 内容网格 */
.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 258px;
  gap: clamp(22px, 4vw, 62px);
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(38px, 6vw, 82px) clamp(20px, 5vw, 56px) 20px;
  align-items: start;
}

.chapter { margin-bottom: clamp(22px, 3vw, 34px); }

.chapter h2 {
  margin: 0 0 .28em;
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.2;
  color: var(--paper);
  letter-spacing: -.01em;
}

.subtitle {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.7;
  padding-left: 16px;
  border-left: 2px solid rgba(255, 0, 128, .55);
}

article { max-width: 72ch; }

.body > *:first-child { margin-top: 0; }

.body p { margin: 0 0 1.15em; }

.body h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(25px, 3.2vw, 38px);
  line-height: 1.2;
  letter-spacing: -.015em;
  color: var(--paper);
  margin: 2.1em 0 .55em;
}

.body h2:first-child { margin-top: 0; }

.body h3 {
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.35;
  margin: 1.9em 0 .4em;
  color: #ffd9ec;
}

.body a { color: #ff9ac9; text-underline-offset: 3px; }
.body a:hover { color: var(--paper); }

.body ul,
.body ol { margin: 0 0 1.25em; padding-left: 1.25em; }
.body li { margin: .4em 0; }
.body li::marker { color: var(--pink); }

.body blockquote {
  margin: 1.7em 0;
  padding: 14px 22px;
  border-left: 2px solid var(--pink);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(255, 0, 128, .09);
  color: #ffe3f2;
}

.body figure { margin: 1.9em 0; }
.body img { display: block; height: auto; border-radius: var(--radius); box-shadow: 0 18px 46px rgba(0, 0, 0, .38); }

.body table { width: 100%; border-collapse: collapse; font-size: 16px; margin: 1.6em 0; }
.body th,
.body td { text-align: left; padding: 11px 10px; border-bottom: 1px solid rgba(255, 0, 255, .18); }
.body th { color: #ffd9ec; font-weight: 600; }

.body hr {
  border: 0;
  height: 1px;
  margin: 2.4em 0;
  background: linear-gradient(90deg, rgba(255, 0, 128, .6), rgba(255, 0, 255, .18), transparent);
}

.body div { scroll-margin-top: 96px; }

.body div + div,
.body div ~ div {
  margin-top: 2.3em;
  padding-top: 2.1em;
  border-top: 1px solid rgba(255, 0, 255, .16);
}

/* 右侧栏 */
.side {
  position: sticky;
  top: 28px;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 0, 128, .22);
}

.side-h {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: .2em;
  color: var(--muted);
}

.side-list { list-style: none; margin: 0; padding: 0; }

.side-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 6px;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  transition: color .22s ease, padding-left .22s ease;
}

.side-list a:hover,
.side-list a:focus-visible,
.side-list a.is-active {
  color: var(--paper);
  padding-left: 12px;
  background: linear-gradient(90deg, rgba(255, 0, 128, .16), transparent);
}

/* 页脚 */
.colophon {
  margin-top: clamp(30px, 5vw, 56px);
  padding: clamp(34px, 5vw, 60px) clamp(20px, 5vw, 56px) 26px;
  border-top: 1px solid rgba(255, 0, 255, .24);
  background:
    radial-gradient(70% 90% at 12% 0%, rgba(255, 0, 128, .18), transparent 70%),
    linear-gradient(180deg, rgba(24, 12, 18, .3), rgba(24, 12, 18, .92));
}

.foot-top {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: clamp(22px, 4vw, 46px);
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
}

.foot-brand { padding-bottom: 10px; font-size: 19px; }

.colophon address {
  font-style: normal;
  font-size: 16px;
  color: var(--muted);
  letter-spacing: .04em;
}

.lbl {
  display: block;
  margin-bottom: 10px;
  font-size: 16px;
  color: var(--muted);
  letter-spacing: .12em;
}

.sub-row { display: flex; gap: 8px; flex-wrap: wrap; }

.sub-row input {
  flex: 1 1 130px;
  min-height: 44px;
  padding: 10px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--paper);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 0, 255, .3);
  border-radius: 12px;
}

.sub-row input::placeholder { color: rgba(253, 246, 250, .5); }

.sub-row button {
  min-height: 44px;
  padding: 10px 20px;
  font: inherit;
  font-size: 16px;
  color: #1a0e14;
  background: linear-gradient(120deg, var(--pink), var(--magenta));
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: filter .2s ease, transform .2s ease;
}

.sub-row button:hover { filter: brightness(1.12); transform: translateY(-1px); }

.foot-nav dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 14px;
}

.foot-nav dt {
  grid-column: 1 / -1;
  font-size: 16px;
  color: var(--muted);
  letter-spacing: .12em;
  margin-bottom: 8px;
}

.foot-nav dd { margin: 0; }

.foot-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
  color: var(--text);
}

.foot-nav a:hover { color: #ff9ac9; }

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: clamp(26px, 4vw, 44px) auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.foot-bottom p { margin: 0; font-size: 16px; color: var(--muted); }

.foot-bottom ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.foot-bottom a:hover { color: #ff9ac9; }

/* 逐段浮现 */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .7s ease, transform .7s ease;
}

@media (max-width: 980px) {
  .rail {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 0, 128, .26);
  }

  .brand { padding: 0; flex: 0 0 auto; font-size: 17px; min-height: 44px; }
  .brand-dot, .mark { width: 24px; height: 24px; border-radius: 7px; }

  .rail-nav { flex-direction: row; gap: 2px; margin: 0; }
  .rail-link { min-height: 44px; padding: 8px 10px; white-space: nowrap; }
  .rail-link:hover, .rail-link.is-active { transform: none; }

  .stage { margin-left: 0; }

  .page-grid { grid-template-columns: minmax(0, 1fr); }

  .side {
    position: static;
    order: 2;
    padding: 20px 0 0;
    border-left: 0;
    border-top: 1px solid rgba(255, 0, 128, .22);
  }

  .hero {
    min-height: 58vh;
    padding: 66px clamp(18px, 5vw, 40px) 52px;
    border-radius: 0 0 26% 26% / 0 0 6% 6%;
  }

  .hero-in { max-width: 100%; }

  .foot-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot-col:last-child { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .foot-top { grid-template-columns: minmax(0, 1fr); }
  .foot-col:last-child { grid-column: auto; }
  .hero h1 { font-size: clamp(28px, 8vw, 40px); }
  .chapter h2 { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { animation: none; }
  .reveal { opacity: 1; transform: none; }
  .rail-link, .side-list a, .sub-row button { transition: none; }
}

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