@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600&family=Cormorant+Garamond:ital,wght@0,300;0,500;0,700;1,300;1,500&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');

:root {
  --ink: #0d0d0d;
  --ink-2: #130021;
  --neon: #8000ff;
  --pink: #ff00ff;
  --text: #e9e3f7;
  --dim: #a294bf;
  --line: rgba(128, 0, 255, 0.32);
  --line-soft: rgba(255, 0, 255, 0.14);
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --serif: "Cormorant Garamond", "Crimson Pro", Georgia, serif;
  --body: "Crimson Pro", Georgia, "Songti SC", serif;
}

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

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

body {
  margin: 0;
  padding-left: 244px;
  background: var(--ink);
  background-image: radial-gradient(900px 520px at 78% -8%, rgba(128, 0, 255, 0.22), transparent 70%),
    radial-gradient(700px 480px at 4% 100%, rgba(255, 0, 255, 0.12), transparent 72%);
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.78;
  overflow-x: hidden;
}

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

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

a {
  color: var(--text);
  text-decoration: none;
}

p {
  overflow-wrap: break-word;
}

/* ---------- 左侧固定栏 ---------- */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 244px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 26px 18px 22px;
  background: linear-gradient(180deg, #16002a 0%, #0e0216 42%, #0d0d0d 100%);
  border-right: 1px solid var(--line);
}

.rail::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 84px;
  background: var(--pink);
  box-shadow: 0 0 12px var(--pink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--serif);
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 0 16px rgba(255, 0, 255, 0.6), 0 0 34px rgba(128, 0, 255, 0.5);
}

.brand__mark {
  width: 12px;
  height: 12px;
  flex: none;
  transform: rotate(45deg);
  border: 1px solid var(--pink);
  background: rgba(255, 0, 255, 0.2);
  box-shadow: 0 0 10px var(--neon);
}

.rail__nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.rail__nav p {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}

.rail__nav p a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 10px;
  font-family: var(--mono);
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  color: var(--dim);
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}

.rail__nav p a::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: none;
  transform: rotate(45deg);
  background: var(--neon);
  box-shadow: 0 0 8px var(--pink);
  transition: background 0.2s, transform 0.2s;
}

.rail__nav p a:hover,
.rail__nav p a:focus-visible {
  color: #fff;
  border-left-color: var(--pink);
  background: rgba(128, 0, 255, 0.16);
  transform: translateX(3px);
}

.rail__nav p a:hover::before {
  background: var(--pink);
  transform: rotate(45deg) scale(1.5);
}

.cta {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 20px;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  color: #fff;
  background: rgba(128, 0, 255, 0.16);
  border: 1px solid var(--pink);
  box-shadow: 0 0 18px rgba(255, 0, 255, 0.35), inset 0 0 12px rgba(255, 0, 255, 0.16);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.cta:hover,
.cta:focus-visible {
  background: rgba(255, 0, 255, 0.28);
  box-shadow: 0 0 26px rgba(255, 0, 255, 0.6);
  transform: translateY(-2px);
}

/* ---------- 主网格 ---------- */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 262px;
  gap: 44px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 42px 40px 84px;
}

.paper {
  min-width: 0;
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 70vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 32px;
  padding: 40px 0 46px;
  overflow: hidden;
}

.ghost {
  position: absolute;
  left: -0.06em;
  bottom: 4%;
  z-index: 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 13vw, 10rem);
  line-height: 0.82;
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 0, 255, 0.24);
  pointer-events: none;
  user-select: none;
}

.hero__text {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero h1 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 5.2vw, 3.5rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 0 20px rgba(128, 0, 255, 0.85), 0 0 48px rgba(255, 0, 255, 0.4);
  animation: glitch 5.5s ease-in-out infinite;
}

.lede {
  margin: 0 auto;
  max-width: 34ch;
  font-size: 1.02rem;
  color: var(--dim);
  font-style: italic;
}

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

.hero__img {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(255, 0, 255, 0.16), 0 22px 46px -22px rgba(128, 0, 255, 0.9);
  filter: saturate(1.08) contrast(1.04);
}

/* ---------- 正文区块 ---------- */
.paper > section:not(.hero) {
  scroll-margin-top: 24px;
  padding: 34px 0 30px;
  border-top: 1px dashed var(--line-soft);
}

.paper > section:not(.hero):first-of-type {
  border-top: 0;
}

.paper small {
  display: block;
  margin-bottom: 2px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--pink);
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.6);
}

.paper h2,
.side h2 {
  margin: 0 0 0.6em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.72rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 0 16px rgba(128, 0, 255, 0.55);
}

.paper h3 {
  margin: 1.5em 0 0.4em;
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 500;
  color: #f2ecff;
}

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

.paper ul,
.paper ol {
  margin: 0 0 1.2em;
  padding-left: 1.3em;
}

.paper li {
  margin-bottom: 0.45em;
}

.paper li::marker {
  color: var(--pink);
}

.paper a {
  color: #dcc6ff;
  border-bottom: 1px solid var(--line);
}

.paper a:hover {
  color: #fff;
  border-bottom-color: var(--pink);
}

.paper blockquote {
  margin: 1.4em 0;
  padding: 12px 18px;
  border-left: 2px solid var(--pink);
  background: rgba(128, 0, 255, 0.09);
  color: #d9cff0;
  font-style: italic;
}

.paper img {
  display: block;
  margin: 1.4em 0;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.paper table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: 0.95rem;
}

.paper th,
.paper td {
  padding: 9px 12px;
  border: 1px solid rgba(128, 0, 255, 0.24);
  text-align: left;
}

.paper th {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--pink);
  background: rgba(128, 0, 255, 0.12);
}

.paper code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 1px 5px;
  background: rgba(255, 0, 255, 0.12);
  color: #ffd7ff;
}

/* ---------- 右栏 ---------- */
.side {
  position: sticky;
  top: 88px;
  align-self: start;
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.side h2 {
  font-size: 1.15rem;
  margin-bottom: 0.9em;
}

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

.side__list li {
  counter-increment: side;
  opacity: 0;
  animation: rise 0.55s ease-out forwards;
}

.side__list li:nth-child(1) { animation-delay: 0.04s; }
.side__list li:nth-child(2) { animation-delay: 0.09s; }
.side__list li:nth-child(3) { animation-delay: 0.14s; }
.side__list li:nth-child(4) { animation-delay: 0.19s; }
.side__list li:nth-child(5) { animation-delay: 0.24s; }
.side__list li:nth-child(6) { animation-delay: 0.29s; }
.side__list li:nth-child(7) { animation-delay: 0.34s; }

.side__list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--dim);
  border-bottom: 1px solid rgba(128, 0, 255, 0.12);
  transition: color 0.2s, padding-left 0.2s;
}

.side__list a::before {
  content: counter(side, decimal-leading-zero);
  font-size: 0.68rem;
  color: var(--neon);
}

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

.side__list a:hover::before {
  color: var(--pink);
}

/* ---------- 页脚 ---------- */
.foot {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(128, 0, 255, 0.08), transparent 60%);
  padding: 0 40px 34px;
}

.foot__cta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 52px 0 40px;
  border-bottom: 1px dashed var(--line-soft);
}

.foot__brand {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 6vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 0, 255, 0.55);
  text-shadow: 0 0 30px rgba(128, 0, 255, 0.55);
}

.foot__top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 22px;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: #fff;
  border: 1px solid var(--neon);
  background: rgba(128, 0, 255, 0.14);
  transition: background 0.2s, border-color 0.2s;
}

.foot__top:hover {
  background: rgba(255, 0, 255, 0.22);
  border-color: var(--pink);
}

.foot__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 40px 0 32px;
}

.foot__cols dl {
  margin: 0;
  min-width: 0;
}

.foot__cols dt {
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  color: var(--pink);
}

.foot__cols dd {
  margin: 0;
}

.foot__cols a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 0;
  font-size: 0.98rem;
  color: var(--dim);
  border-bottom: 1px solid rgba(128, 0, 255, 0.1);
  transition: color 0.2s, padding-left 0.2s;
}

.foot__cols a:hover {
  color: #fff;
  padding-left: 5px;
}

.foot__name {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: #fff;
}

.foot__desc {
  padding-top: 8px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--dim);
}

.foot__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1220px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(128, 0, 255, 0.16);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: #7d6f99;
}

.foot__bar p {
  margin: 0;
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.foot__links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 8px;
  color: var(--dim);
}

.foot__links a:hover {
  color: var(--pink);
}

/* ---------- 动效 ---------- */
@keyframes glitch {
  0%, 100% {
    transform: none;
    text-shadow: 0 0 20px rgba(128, 0, 255, 0.85), 0 0 48px rgba(255, 0, 255, 0.4);
  }
  48% {
    transform: skewX(-0.7deg) translateX(-2px);
    text-shadow: 3px 0 rgba(255, 0, 255, 0.85), -3px 0 rgba(0, 224, 255, 0.7), 0 0 30px rgba(128, 0, 255, 0.8);
  }
  52% {
    transform: skewX(0.5deg) translateX(2px);
    text-shadow: -2px 0 rgba(255, 0, 255, 0.7), 2px 0 rgba(0, 224, 255, 0.6);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

/* ---------- 断点 ---------- */
@media (max-width: 1080px) {
  .stage {
    grid-template-columns: minmax(0, 1fr) 226px;
    gap: 30px;
    padding: 34px 26px 70px;
  }
  .foot {
    padding: 0 26px 28px;
  }
}

@media (max-width: 860px) {
  body {
    padding-left: 0;
    font-size: 17px;
  }
  .rail {
    position: static;
    width: auto;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 18px;
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .rail::after {
    display: none;
  }
  .rail__nav {
    flex: 1 1 100%;
    order: 3;
  }
  .rail__nav p {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 6px;
  }
  .rail__nav p a {
    min-height: 40px;
    padding: 8px 10px;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }
  .rail__nav p a:hover {
    transform: none;
    border-left: 0;
    border-bottom-color: var(--pink);
  }
  .cta {
    position: static;
    margin-left: auto;
    clip-path: none;
    padding: 10px 16px;
  }
  .stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
    padding: 26px 18px 56px;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 22px 0 30px;
  }
  .paper > section:not(.hero) {
    scroll-margin-top: 92px;
  }
  .side {
    position: static;
    padding-left: 0;
    padding-top: 22px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .foot {
    padding: 0 18px 26px;
  }
  .foot__cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 30px 0 26px;
  }
  .foot__cta {
    padding: 36px 0 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero h1 {
    animation: none;
  }
  .side__list li {
    opacity: 1;
    animation: none;
  }
  .rail__nav p a,
  .cta,
  .foot__top {
    transition: none;
  }
}

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