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

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

:root {
  --ink: #0d0d0d;
  --ink2: #121017;
  --v: #8000ff;
  --m: #ff00ff;
  --txt: #ece6f7;
  --dim: #a697c0;
  --edge: rgba(128, 0, 255, .32);
  --edge2: rgba(255, 0, 255, .34);
  --glow: 0 0 14px rgba(255, 0, 255, .55);
  --ui: "Jost", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --disp: "Bodoni Moda", "Songti SC", "Noto Serif SC", Georgia, serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "PingFang SC", monospace;
  --pad: clamp(16px, 4vw, 56px);
}

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

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: 108px;
  overflow-x: hidden;
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(128, 0, 255, .24), transparent 62%),
    radial-gradient(760px 480px at 94% 2%, rgba(255, 0, 255, .16), transparent 60%),
    linear-gradient(180deg, #0a0810, var(--ink) 40%);
  color: var(--txt);
  font-family: var(--ui);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.78;
  letter-spacing: .01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  opacity: .45;
  mix-blend-mode: screen;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, .05) 0 1px,
    transparent 1px 4px
  );
}

a {
  color: var(--m);
  text-decoration: none;
  transition: color .22s ease, text-shadow .22s ease, background-color .22s ease;
}

a:hover { color: #fff; text-shadow: var(--glow); }

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

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

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

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 70vh;
  padding: clamp(40px, 8vw, 92px) var(--pad) clamp(58px, 11vw, 110px);
  overflow: hidden;
  text-align: center;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.art {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--edge2);
  border-radius: 28px;
  box-shadow: 0 0 46px rgba(128, 0, 255, .3), inset 0 0 0 1px rgba(255, 255, 255, .05);
  opacity: .82;
  will-change: transform;
}

.art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.85) contrast(1.08);
}

.art.a1 {
  top: 7%;
  left: 3%;
  width: min(34%, 320px);
  height: 46%;
  transform: rotate(-2.2deg);
}

.art.a2 {
  right: 4%;
  bottom: 6%;
  width: min(29%, 270px);
  height: 40%;
  transform: rotate(2.6deg);
}

.band {
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: -46px;
  height: 92px;
  background: linear-gradient(90deg, var(--v), var(--m));
  filter: blur(.4px);
  opacity: .5;
  transform: skewY(-3.4deg);
}

.hero-copy {
  position: relative;
  max-width: 44ch;
  margin: 0 auto;
  padding: 0 4px;
}

.hud {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--m);
  text-shadow: var(--glow);
}

.hero h1 {
  margin: 0 0 .34em;
  font-family: var(--disp);
  font-weight: 600;
  font-size: clamp(2rem, 6.2vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: .012em;
  color: #fff;
  text-shadow: 0 0 26px rgba(255, 0, 255, .45);
}

.hero .lede {
  margin: 0 auto;
  max-width: 42ch;
  color: var(--dim);
  font-size: clamp(1rem, 1.7vw, 1.06rem);
  line-height: 1.72;
}

@media (prefers-reduced-motion: no-preference) {
  .hero h1 { animation: glitch 7s steps(1, end) infinite; }
  .band { animation: drift 12s ease-in-out infinite alternate; }
}

@keyframes glitch {
  0%, 90%, 100% { transform: none; text-shadow: 0 0 26px rgba(255, 0, 255, .45); }
  92% { transform: skewX(-6deg) translateX(-3px); text-shadow: -3px 0 var(--v), 3px 0 var(--m); }
  94% { transform: skewX(5deg) translateX(3px); text-shadow: 3px 0 var(--m), -3px 0 var(--v); }
  96% { transform: translateY(-2px); text-shadow: -2px 0 var(--m); }
}

@keyframes drift {
  from { transform: skewY(-3.4deg) translateX(-14px); }
  to { transform: skewY(-3.4deg) translateX(14px); }
}

/* ---------- 主体骨架 ---------- */

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  align-items: start;
  gap: clamp(22px, 3.2vw, 46px);
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 74px) var(--pad);
}

.prose { min-width: 0; }

.prose > article {
  display: grid;
  gap: 18px;
}

.prose article > article {
  position: relative;
  padding: clamp(20px, 3vw, 40px);
  border: 1px solid var(--edge);
  border-bottom: 2px solid var(--m);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(128, 0, 255, .075), rgba(13, 13, 13, .68));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045);
  scroll-margin-top: 22px;
  transition: border-color .3s ease, box-shadow .3s ease, opacity .5s ease;
}

.prose article > article:hover {
  border-color: var(--edge2);
  box-shadow: 0 0 30px rgba(128, 0, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .05);
}

.prose article > article.dim { opacity: .3 !important; }

.prose article > article.hit {
  border-color: var(--m);
  box-shadow: 0 0 28px rgba(255, 0, 255, .26);
}

html.js .prose article > article {
  opacity: 0;
  transform: translateY(16px);
}

html.js .prose article > article.in {
  opacity: 1;
  transform: none;
  transition: opacity .62s ease, transform .62s ease,
    border-color .3s ease, box-shadow .3s ease;
}

@media (prefers-reduced-motion: reduce) {
  html.js .prose article > article { opacity: 1; transform: none; }
}

/* ---------- 正文排版 ---------- */

.prose h2,
.prose h3,
.rail h2 {
  font-family: var(--disp);
  font-weight: 600;
  color: #fff;
  line-height: 1.26;
  letter-spacing: .01em;
  text-shadow: 0 0 16px rgba(255, 0, 255, .28);
}

.prose h2 {
  margin: 0 0 .1em;
  font-size: clamp(1.5rem, 3.1vw, 2.05rem);
}

.prose h3 {
  margin: .2em 0 .1em;
  font-size: clamp(1.16rem, 2.1vw, 1.36rem);
}

.prose p {
  margin: .85em 0;
  color: #dcd5e9;
}

.prose strong { color: #fff; }

.prose ul,
.prose ol {
  margin: .9em 0;
  padding-left: 1.35em;
  color: #dcd5e9;
}

.prose li { margin: .4em 0; }

.prose li::marker { color: var(--m); }

.prose blockquote {
  margin: 1.2em 0;
  padding: .8em 1.1em;
  border-left: 3px solid var(--v);
  border-radius: 0 18px 18px 0;
  background: rgba(128, 0, 255, .1);
  color: #e6dff3;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .96rem;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px dashed rgba(128, 0, 255, .3);
  text-align: left;
}

.prose th { color: var(--m); font-weight: 500; }

hr {
  height: 1px;
  margin: .4em 0 1.1em;
  border: 0;
  background: linear-gradient(90deg, var(--m), var(--v), transparent 92%);
  box-shadow: 0 0 12px rgba(255, 0, 255, .45);
}

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

.rail {
  position: sticky;
  top: 24px;
  padding: 22px 20px 18px;
  border: 1px solid var(--edge);
  border-bottom: 2px solid var(--v);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(128, 0, 255, .1), rgba(13, 13, 13, .7));
  box-shadow: 0 0 34px rgba(128, 0, 255, .16);
}

.rail h2 {
  margin: 0 0 .28em;
  font-size: 1.14rem;
}

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

.rail-list a {
  display: block;
  padding: 11px 6px;
  min-height: 44px;
  font-size: .95rem;
  color: var(--txt);
  border-bottom: 1px dashed rgba(128, 0, 255, .26);
}

.rail-list li:last-child a { border-bottom: 0; }

.rail-list a:hover {
  color: #fff;
  background: rgba(255, 0, 255, .1);
  text-shadow: var(--glow);
}

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

.base {
  margin-top: clamp(40px, 7vw, 88px);
  padding: clamp(34px, 5vw, 62px) var(--pad) 22px;
  border-top: 1px solid var(--edge);
  background: linear-gradient(180deg, rgba(128, 0, 255, .1), transparent 78%);
}

.base-top {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.65fr);
  gap: clamp(24px, 4vw, 54px);
  max-width: 1100px;
  margin: 0 auto;
}

.brand-block { display: grid; align-content: start; gap: 14px; }

.brand {
  font-family: var(--disp);
  font-size: 1.42rem;
  letter-spacing: .1em;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 0, 255, .4);
}

.brand-rule {
  display: block;
  width: 74px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--m), var(--v));
  box-shadow: 0 0 14px rgba(255, 0, 255, .6);
}

.foot-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.foot-nav dl { margin: 0; }

.foot-nav dt {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: .71rem;
  letter-spacing: .24em;
  color: var(--m);
}

.foot-nav dd { margin: 0; }

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0;
  font-size: .95rem;
  color: var(--txt);
}

.base-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  max-width: 1100px;
  margin: clamp(26px, 4vw, 44px) auto 0;
  padding-top: 16px;
  border-top: 1px dashed rgba(128, 0, 255, .3);
}

.copy {
  margin: 0;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .14em;
  color: var(--dim);
}

.totop {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--edge2);
  border-radius: 999px;
  font-size: .84rem;
}

.totop:hover { border-color: var(--m); background: rgba(255, 0, 255, .12); }

/* ---------- 底部固定导航 ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px clamp(8px, 2vw, 22px);
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(10, 8, 15, .93);
  border-top: 1px solid var(--edge2);
  box-shadow: 0 -18px 42px rgba(128, 0, 255, .2);
  backdrop-filter: blur(14px);
}

.dock-side {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 0;
  min-width: 0;
}

.dock-right { justify-content: flex-end; }

.dock a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 12px;
  color: var(--txt);
  font-size: .85rem;
  white-space: nowrap;
}

.dock a:hover {
  color: #fff;
  background: rgba(128, 0, 255, .22);
}

.dock a[aria-current] {
  color: #fff;
  background: rgba(255, 0, 255, .16);
  box-shadow: inset 0 -2px 0 var(--m);
}

.ico {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  fill: var(--m);
  filter: drop-shadow(0 0 5px rgba(255, 0, 255, .7));
}

.dock-brand {
  flex: 0 0 auto;
  padding: 0 14px;
  font-family: var(--disp);
  font-size: 1.06rem;
  letter-spacing: .14em;
  color: #fff;
  white-space: nowrap;
  text-shadow: var(--glow);
}

.dock-search {
  display: flex;
  align-items: center;
  margin-left: 6px;
}

.dock-search input {
  width: 112px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: var(--txt);
  font: inherit;
  font-size: .82rem;
}

.dock-search input::placeholder { color: var(--dim); }

.dock-search input:focus {
  outline: none;
  border-color: var(--m);
  box-shadow: 0 0 0 2px rgba(255, 0, 255, .22);
}

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

@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; order: 2; }
  .base-top { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  body { padding-bottom: 168px; }

  .dock {
    flex-wrap: wrap;
    gap: 4px 2px;
    padding-inline: 6px;
  }

  .dock-brand {
    order: -2;
    flex: 1 1 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    padding: 6px 0 0;
    font-size: 1rem;
  }

  .dock-side {
    flex: 1 1 auto;
    flex-wrap: wrap;
    justify-content: center;
  }

  .dock-right { justify-content: center; }

  .dock a { font-size: .81rem; padding: 0 8px; }

  .dock-search {
    flex: 1 1 100%;
    margin: 2px 0 0;
  }

  .dock-search input {
    width: 100%;
    min-height: 40px;
  }

  .hero { min-height: 62vh; padding-top: 52px; }

  .art { opacity: .55; }

  .art.a1 { width: 44%; height: 34%; top: 3%; left: 2%; }

  .art.a2 { width: 40%; height: 30%; bottom: 4%; right: 2%; }

  .foot-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .dock a { padding: 0 6px; font-size: .78rem; }
  .ico { display: none; }
}

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