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

:root {
  --ink: #0d0d0d;
  --ink-2: #121016;
  --grape: #8000ff;
  --magenta: #ff00ff;
  --text: #ece6f7;
  --dim: #a99fc0;
  --line: rgba(128, 0, 255, 0.34);
  --line-2: rgba(255, 0, 255, 0.28);
  --radius: 18px;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

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

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

body {
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(760px 420px at 82% -8%, rgba(255, 0, 255, 0.16), transparent 62%),
    radial-gradient(680px 420px at 8% 6%, rgba(128, 0, 255, 0.2), transparent 66%),
    var(--ink);
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.035) 0 1px,
    transparent 1px 3px
  );
}

a {
  color: var(--magenta);
}

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

/* ---------- 顶栏 ---------- */
.site-head {
  position: relative;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 13, 13, 0.72);
}

.mark {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 46px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--magenta);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  text-shadow: 0 0 12px rgba(255, 0, 255, 0.7);
  background: rgba(20, 10, 30, 0.7);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mark:hover {
  border-color: var(--magenta);
  box-shadow: 0 0 18px rgba(255, 0, 255, 0.35);
}

.mark img {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.drawer {
  position: relative;
  z-index: 3;
}

.drawer summary {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  background: rgba(20, 10, 30, 0.7);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.drawer summary::-webkit-details-marker {
  display: none;
}

.drawer summary:hover {
  border-color: var(--magenta);
  color: var(--magenta);
}

.burger {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--magenta);
  box-shadow: 0 -6px 0 var(--magenta), 0 6px 0 var(--magenta);
}

.drawer[open] .lbl {
  color: var(--magenta);
}

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

.drawer[open] .drawer-list {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 92px 20px 40px;
  overflow-y: auto;
  background: rgba(9, 7, 13, 0.97);
  backdrop-filter: blur(7px);
}

.drawer-list {
  counter-reset: d;
}

.drawer-list li {
  counter-increment: d;
  border-bottom: 1px solid rgba(128, 0, 255, 0.2);
}

.drawer-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 8px 4px;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}

.drawer-list a::before {
  content: counter(d, decimal-leading-zero);
  font-size: 16px;
  color: var(--grape);
  text-shadow: 0 0 10px rgba(128, 0, 255, 0.8);
}

.drawer-list a:hover {
  color: var(--magenta);
  transform: translateX(4px);
}

/* ---------- 锚点条 ---------- */
.subbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 13, 13, 0.94);
  backdrop-filter: blur(8px);
}

.subbar ul {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0;
  padding: 7px 12px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.subbar ul::-webkit-scrollbar {
  display: none;
}

.subbar a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 16px;
  color: var(--dim);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease, border-color 0.18s ease, text-shadow 0.18s ease;
}

.subbar a:hover {
  color: var(--magenta);
  border-color: var(--line-2);
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.6);
}

/* ---------- 头图 ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  min-height: 45vh;
  padding: 26px 16px 0;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.badge {
  align-self: center;
  margin: 0;
  padding: 5px 15px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.14em;
  color: var(--magenta);
  background: rgba(255, 0, 255, 0.08);
  text-shadow: 0 0 12px rgba(255, 0, 255, 0.55);
  animation: floatbadge 4.6s ease-in-out infinite;
}

@keyframes floatbadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hero h1 {
  margin: 0;
  font-size: clamp(26px, 7.2vw, 46px);
  line-height: 1.24;
  letter-spacing: 0.005em;
  color: #ffffff;
  text-shadow: 0 0 16px rgba(128, 0, 255, 0.9), 0 0 44px rgba(255, 0, 255, 0.42);
  animation: glitch 7s steps(1, end) infinite;
}

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

.lede {
  margin: 0 auto;
  max-width: 56ch;
  color: var(--dim);
  font-size: 17px;
}

.hero-visual {
  position: relative;
  margin: 14px auto 0;
  width: 100%;
  max-width: 980px;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(120deg, #17091f, #2a0740 46%, #100020);
}

.hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 28% 30%, rgba(255, 0, 255, 0.42), transparent 58%),
    radial-gradient(circle at 76% 72%, rgba(128, 0, 255, 0.5), transparent 60%);
}

/* ---------- 主体 ---------- */
.shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 14px 38px;
}

.rail {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 10px;
  background: linear-gradient(158deg, rgba(128, 0, 255, 0.13), rgba(13, 13, 13, 0.65));
}

.eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.2em;
  color: var(--magenta);
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.45);
}

.rail-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.4;
  color: #fff;
}

.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: r;
}

.rail li {
  counter-increment: r;
  border-top: 1px dashed rgba(128, 0, 255, 0.26);
}

.rail li a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 5px 0;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  transition: color 0.18s ease;
}

.rail li a::before {
  content: counter(r, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 16px;
  color: var(--grape);
}

.rail li a:hover {
  color: var(--magenta);
}

.stream {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.stream > article {
  position: relative;
  padding: 20px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 16, 22, 0.66);
  scroll-margin-top: 74px;
}

.stream > article::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 17px;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--grape), var(--magenta));
  box-shadow: 0 0 12px rgba(255, 0, 255, 0.6);
}

.stream h2 {
  margin: 0 0 12px;
  font-size: clamp(20px, 4.8vw, 26px);
  line-height: 1.34;
  color: #fff;
  text-shadow: 0 0 14px rgba(128, 0, 255, 0.45);
}

.stream h3 {
  margin: 18px 0 8px;
  font-size: 18px;
  line-height: 1.45;
  color: #fff;
}

.stream p {
  margin: 0 0 12px;
  color: #d9d2e7;
}

.stream ul,
.stream ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

.stream li {
  margin: 6px 0;
}

.stream img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.stream strong {
  color: #fff;
}

.stream blockquote {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-left: 2px solid var(--magenta);
  background: rgba(255, 0, 255, 0.07);
}

.stream a {
  color: var(--magenta);
  text-underline-offset: 3px;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.52s ease, transform 0.52s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- 页脚 ---------- */
.site-foot {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 30px;
  border-top: 1px solid var(--line);
}

.site-foot p {
  margin: 0;
}

.foot-intro {
  font-family: var(--mono);
  font-size: 17px;
  letter-spacing: 0.08em;
  color: var(--magenta);
  text-shadow: 0 0 14px rgba(255, 0, 255, 0.5);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.18s ease;
}

.foot-links a:hover {
  color: var(--magenta);
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.6);
}

.site-foot small {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px dashed rgba(128, 0, 255, 0.24);
  text-align: center;
  font-size: 16px;
  color: #847b98;
}

/* ---------- 断点 ---------- */
@media (min-width: 760px) {
  .site-head {
    padding: 12px 22px;
  }

  .hero {
    padding: 34px 24px 0;
  }

  .shell {
    padding: 26px 22px 46px;
  }

  .stream > article {
    padding: 26px 26px;
  }

  .site-foot {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    padding: 28px 22px 34px;
  }

  .foot-links {
    justify-content: flex-end;
  }
}

@media (min-width: 980px) {
  .shell {
    grid-template-columns: 252px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
  }

  .rail {
    position: sticky;
    top: 78px;
  }

  .stream > article {
    padding: 28px 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .badge,
  .hero h1 {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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