@import url('https://fonts.googleapis.com/css2?family=Didact+Gothic&family=Poiret+One&display=swap');

:root {
  --v: #8000ff;
  --m: #ff00ff;
  --ink: #0d0d0d;
  --panel: #121016;
  --line: rgba(128, 0, 255, 0.34);
  --line-soft: rgba(128, 0, 255, 0.18);
  --fg: #ece3ff;
  --dim: #a89bc4;
  --disp: "Poiret One", "Didact Gothic", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: "Didact Gothic", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 88% 4%, rgba(255, 0, 255, 0.14), transparent 46%),
    radial-gradient(circle at 4% 32%, rgba(128, 0, 255, 0.18), transparent 50%),
    linear-gradient(180deg, #0d0d0d 0%, #100c15 55%, #0d0d0d 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(200, 160, 255, 0.045) 0 1px, transparent 1px 3px);
  mix-blend-mode: screen;
  opacity: 0.7;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 59;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

::selection { background: var(--m); color: #0d0d0d; }

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

a { color: var(--m); text-decoration: none; }
a:hover { color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--disp);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.06em;
  margin: 0;
}

p { margin: 0 0 1.05em; }

hr {
  border: 0;
  height: 2px;
  margin: 12px 0 22px;
  background: linear-gradient(90deg, var(--m), var(--v) 45%, transparent);
}

h2 + hr, h3 + hr { margin-top: 8px; }

/* ---------- 顶栏 ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 8, 14, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.top-scan {
  height: 2px;
  background: linear-gradient(90deg, var(--v), var(--m), var(--v));
  opacity: 0.75;
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 22px 12px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.nav-side {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-l { justify-content: flex-start; }
.nav-r { justify-content: flex-end; }

.nav-side a {
  display: inline-block;
  padding: 10px 15px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(128, 0, 255, 0.08);
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.nav-side a:hover,
.nav-side a:focus-visible {
  color: #fff;
  border-color: var(--m);
  background: rgba(255, 0, 255, 0.14);
  box-shadow: 0 0 18px rgba(255, 0, 255, 0.45);
  outline: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  color: #fff;
  font-family: var(--disp);
  font-size: 21px;
  letter-spacing: 0.16em;
  text-shadow: 0 0 12px rgba(255, 0, 255, 0.75), 0 0 34px rgba(128, 0, 255, 0.6);
  white-space: nowrap;
}

.brand:hover .brand-txt { animation: glitch 0.5s steps(2) 2; }
.brand .mark { width: 26px; height: 26px; }

@keyframes glitch {
  0% { transform: skewX(0deg); }
  30% { transform: skewX(-7deg) translateX(2px); }
  60% { transform: skewX(5deg) translateX(-2px); }
  100% { transform: skewX(0deg); }
}

/* ---------- 主栅格 ---------- */
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 274px;
  column-gap: 46px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px 60px;
}

main > .hero { grid-column: 1 / -1; }
main > div[id] { grid-column: 1; min-width: 0; }
main > .side { grid-column: 2; grid-row: 2 / span 40; min-width: 0; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 70px 0 56px;
  overflow: hidden;
  isolation: isolate;
}

.hero-glow {
  position: absolute;
  left: -0.06em;
  bottom: -0.06em;
  z-index: 0;
  font-family: var(--disp);
  font-size: clamp(76px, 15vw, 210px);
  line-height: 0.9;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 0, 255, 0.22);
  text-shadow: 0 0 60px rgba(128, 0, 255, 0.35);
  user-select: none;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 620px;
}

.hero-copy h1 {
  font-size: clamp(34px, 5.6vw, 62px);
  color: #fff;
  letter-spacing: 0.05em;
  text-shadow: 0 0 22px rgba(255, 0, 255, 0.55), 0 0 64px rgba(128, 0, 255, 0.45);
}

.hero-copy hr {
  width: 148px;
  margin: 16px 0 18px;
}

.lead {
  color: var(--dim);
  font-size: 17px;
  max-width: 46ch;
}

.hero-fig {
  position: absolute;
  margin: 0;
  z-index: 2;
  overflow: hidden;
  background: linear-gradient(140deg, rgba(128, 0, 255, 0.4), rgba(255, 0, 255, 0.14));
  box-shadow: 0 0 0 1px var(--line), 0 0 48px rgba(128, 0, 255, 0.4);
  transition: transform 0.9s ease;
}

.hero-fig img { width: 100%; height: 100%; object-fit: cover; }

.hero-slab {
  width: 100%;
  height: 100%;
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 0, 255, 0.18) 0 2px, transparent 2px 12px),
    linear-gradient(160deg, rgba(128, 0, 255, 0.5), rgba(13, 13, 13, 0.9));
}

.hero-fig-1 { width: min(238px, 30vw); aspect-ratio: 3 / 4; right: 2%; top: 9%; transform: rotate(3deg); }
.hero-fig-2 { width: min(186px, 24vw); aspect-ratio: 4 / 5; right: 21%; bottom: 7%; transform: rotate(-4deg); }
.hero-fig-3 { width: min(140px, 18vw); aspect-ratio: 1 / 1; right: 5%; bottom: 4%; transform: rotate(6deg); }

.hero.alt .hero-fig-1 { transform: rotate(-3deg) translateY(12px); }
.hero.alt .hero-fig-2 { transform: rotate(4deg) translateY(-12px); }
.hero.alt .hero-fig-3 { transform: rotate(-6deg) translateY(-8px); }

.hero-base {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--m), var(--v), transparent);
}

/* ---------- 正文区块 ---------- */
main > div[id] {
  padding: 46px 0 34px;
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 96px;
  min-width: 0;
}

main > div[id]:first-of-type { border-top: 0; }

main > div[id] h2 {
  font-size: clamp(23px, 3.2vw, 33px);
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 0, 255, 0.45);
}

main > div[id] h3 {
  font-size: 20px;
  color: var(--m);
  margin: 26px 0 6px;
}

main > div[id] p { color: #d9cff0; }

main > div[id] ul,
main > div[id] ol {
  margin: 0 0 1.1em;
  padding-left: 1.25em;
  color: #d9cff0;
}

main > div[id] li { margin: 0.35em 0; }

main > div[id] a {
  color: var(--m);
  border-bottom: 1px solid rgba(255, 0, 255, 0.4);
  word-break: break-word;
}

main > div[id] a:hover { background: rgba(255, 0, 255, 0.12); }

main > div[id] blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  background: rgba(128, 0, 255, 0.12);
  color: #efe7ff;
}

main > div[id] strong { color: #fff; }

main > div[id] figure { margin: 1.2em 0; }
main > div[id] figcaption { color: var(--dim); font-size: 16px; padding-top: 6px; }

/* ---------- 侧栏 ---------- */
.side { padding-top: 46px; }

.rail {
  position: sticky;
  top: 100px;
  padding: 20px 18px 16px;
  background: linear-gradient(180deg, rgba(128, 0, 255, 0.16), rgba(20, 16, 26, 0.95));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
}

.rail h2 {
  font-size: 19px;
  color: #fff;
  letter-spacing: 0.22em;
  text-shadow: 0 0 12px rgba(255, 0, 255, 0.6);
}

.rail hr { margin: 8px 0 14px; }

.rail-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  counter-reset: rail;
}

.rail-list li { counter-increment: rail; }

.rail-list a {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 8px 0;
  font-size: 16px;
  color: #cfc4e8;
  border-bottom: 1px dashed rgba(128, 0, 255, 0.22);
  transition: color 0.2s, padding-left 0.2s;
}

.rail-list a::before {
  content: counter(rail, decimal-leading-zero);
  font-family: var(--disp);
  font-size: 13px;
  color: var(--m);
  letter-spacing: 0.08em;
}

.rail-list a:hover,
.rail-list a.on {
  color: #fff;
  padding-left: 4px;
  border-bottom-color: var(--m);
}

.rail-top {
  display: block;
  padding: 11px 0 4px;
  font-size: 16px;
  color: var(--dim);
  letter-spacing: 0.1em;
}

.rail-top:hover { color: var(--m); }

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(128, 0, 255, 0.14), rgba(8, 6, 12, 0.98));
  padding: 26px 22px 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 30px;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.foot-brand a {
  font-family: var(--disp);
  font-size: clamp(26px, 4.6vw, 50px);
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 0, 255, 0.55), 0 0 60px rgba(128, 0, 255, 0.45);
  line-height: 1.1;
}

.foot-nav ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
  padding: 0;
}

.foot-nav a {
  display: inline-block;
  padding: 9px 2px;
  font-size: 16px;
  color: var(--dim);
}

.foot-nav a:hover { color: var(--m); }

.foot-copy p {
  margin: 0;
  font-size: 16px;
  color: var(--dim);
  letter-spacing: 0.08em;
}

/* ---------- 动效 ---------- */
.rv { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.rv.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  main { display: block; padding-bottom: 40px; }
  .side { padding-top: 32px; }
  .rail { position: static; clip-path: none; }
  .rail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
}

@media (max-width: 860px) {
  .nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 8px;
    padding: 12px 14px 14px;
  }
  .brand { order: -1; width: 100%; justify-content: center; font-size: 20px; }
  .nav-side { justify-content: center; gap: 6px; }
  .nav-side a { padding: 10px 13px; }
}

@media (max-width: 700px) {
  body { font-size: 17px; }
  .hero {
    min-height: 0;
    padding: 34px 0 40px;
    justify-content: flex-start;
  }
  .hero-copy { padding-bottom: 138px; }
  .hero-glow { font-size: clamp(56px, 17vw, 110px); opacity: 0.7; }
  .hero-fig-1 { width: 116px; right: 0; top: auto; bottom: 8px; }
  .hero-fig-2 { width: 92px; right: 92px; bottom: 0; }
  .hero-fig-3 { width: 78px; right: 0; bottom: 138px; }
  .hero-copy hr { width: 96px; }
  main { padding-left: 16px; padding-right: 16px; }
  .foot { padding-left: 16px; padding-right: 16px; justify-content: center; text-align: center; }
  .foot-nav ol { justify-content: center; }
  .rail-list a { padding: 11px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .hero-fig, .brand:hover .brand-txt { transition: none; animation: none; }
}

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