@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=Nunito:ital,wght@0,700;0,800;0,900;1,700&display=swap');

:root {
  --ink: #0d0d0d;
  --purple: #8000ff;
  --magenta: #ff00ff;
  --paper: #e9e3f6;
  --dim: #a99dbd;
  --line: #2a1e3f;
  --panel: #130c1e;
  --r: 4px;
}

* { box-sizing: border-box; }

html {
  background: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 0 96px;
  background:
    radial-gradient(circle at 12% -10%, rgba(128, 0, 255, .22), transparent 46%),
    radial-gradient(circle at 92% 4%, rgba(255, 0, 255, .16), transparent 42%),
    var(--ink);
  color: var(--paper);
  font: 400 17px/1.7 "DM Sans", Nunito, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow-wrap: break-word;
}

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

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

/* 底部固定条 */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(13, 13, 13, .95);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 26px rgba(128, 0, 255, .18);
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: #fff;
  text-decoration: none;
  font: 800 17px/1.1 Nunito, "DM Sans", sans-serif;
  letter-spacing: .02em;
  text-shadow: 0 0 12px rgba(255, 0, 255, .55);
}

.brand-txt { white-space: nowrap; }

.mark {
  border-radius: var(--r);
  border: 1px solid var(--magenta);
  flex: none;
}

.burger {
  flex: none;
  min-height: 44px;
  min-width: 72px;
  padding: 0 16px;
  border: 1px solid var(--magenta);
  border-radius: var(--r);
  background: #180a26;
  color: #fff;
  font: 700 16px/1 Nunito, "DM Sans", sans-serif;
  letter-spacing: .14em;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(255, 0, 255, .35);
}

.burger:hover,
.burger:focus-visible {
  background: #2a0f42;
  box-shadow: 0 0 20px rgba(255, 0, 255, .6);
}

/* 全屏遮罩菜单 */
.veil {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 20px 110px;
  background:
    repeating-linear-gradient(180deg, rgba(128, 0, 255, .06) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 50% 16%, #1f0a36, #0a0a0a 72%);
  opacity: 0;
  visibility: hidden;
  transition: opacity .26s ease, visibility .26s ease;
}

.veil.open { opacity: 1; visibility: visible; }

.veil-nav {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  gap: 6px;
}

.veil-nav a {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 6px 14px;
  border-left: 2px solid var(--purple);
  border-radius: 0 var(--r) var(--r) 0;
  color: #fff;
  text-decoration: none;
  font: 800 20px/1.3 Nunito, "DM Sans", sans-serif;
  transition: background .18s ease, border-color .18s ease;
}

.veil-nav a:hover,
.veil-nav a:focus-visible {
  background: #1d0e2e;
  border-left-color: var(--magenta);
  text-shadow: 0 0 12px var(--magenta);
}

/* 首屏 */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 30px;
  min-height: 70vh;
  max-width: 1160px;
  margin: 0 auto;
  padding: 68px 20px 46px;
  text-align: center;
}

.hero-copy {
  flex: 1 1 320px;
  max-width: 640px;
  min-width: 0;
}

h1 {
  margin: 0 0 18px;
  font: 900 clamp(30px, 6vw, 54px)/1.12 Nunito, "DM Sans", sans-serif;
  color: #fff;
  letter-spacing: .01em;
  text-shadow:
    0 0 20px rgba(180, 60, 255, .8),
    3px 0 rgba(255, 0, 255, .55),
    -3px 0 rgba(90, 190, 255, .4);
  animation: glitch 6s steps(1) infinite;
}

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

.hero-desc {
  margin: 0 auto;
  max-width: 40em;
  color: var(--dim);
  font-size: 17px;
}

.hero-art {
  flex: 1 1 260px;
  max-width: 520px;
  margin: 0;
  min-width: 0;
}

.hero-img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 0 30px rgba(128, 0, 255, .38);
}

/* 正文区 */
.stage {
  max-width: 1160px;
  margin: 0 auto;
  padding: 12px 20px 76px;
  display: grid;
  gap: 28px;
}

@media (min-width: 900px) {
  .stage { grid-template-columns: 232px minmax(0, 1fr); gap: 40px; }
}

.rail {
  align-self: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--purple);
  border-radius: var(--r);
  background: var(--panel);
  order: -1;
}

@media (min-width: 900px) {
  .rail { position: sticky; top: 20px; }
}

.rail small {
  display: block;
  color: var(--magenta);
  font: 700 13px/1.2 "DM Sans", sans-serif;
  letter-spacing: .3em;
}

.rail h2 {
  margin: 6px 0 12px;
  font: 800 18px/1.3 Nunito, "DM Sans", sans-serif;
  color: #fff;
  border: 0;
  padding: 0;
  text-shadow: 0 0 10px rgba(128, 0, 255, .7);
}

.rail-nav { display: grid; gap: 2px; }

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 10px;
  border-left: 2px solid transparent;
  color: var(--dim);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.35;
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  color: #fff;
  border-left-color: var(--magenta);
  background: #1b0e2c;
}

.prose { min-width: 0; max-width: 780px; }

.prose article { scroll-margin-top: 22px; }

.prose article + article {
  margin-top: 46px;
  padding-top: 34px;
  border-top: 1px dashed var(--line);
}

.prose h1 { animation: none; font-size: 32px; }

.prose h2 {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--magenta);
  font: 900 clamp(22px, 3.4vw, 27px)/1.32 Nunito, "DM Sans", sans-serif;
  color: #fff;
  text-shadow: 0 0 12px rgba(128, 0, 255, .65);
}

.prose h3 {
  margin: 26px 0 10px;
  font: 800 20px/1.4 Nunito, "DM Sans", sans-serif;
  color: #f2ecff;
}

.prose p { margin: 0 0 16px; color: #d9d2e7; }

.prose ul,
.prose ol { margin: 0 0 18px; padding-left: 22px; }

.prose li { margin: 0 0 8px; }

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

.prose strong { color: #fff; }

.prose blockquote,
.prose figure {
  margin: 22px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--purple);
  border-radius: var(--r);
  background: #150d22;
}

.prose blockquote { color: #e4dcf3; }
.prose blockquote > :last-child { margin-bottom: 0; }

.prose figure img { border-radius: var(--r); margin: 0 0 10px; }

.prose figcaption {
  color: var(--dim);
  font-size: 16px;
}

.prose aside {
  margin: 22px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--magenta);
  border-radius: var(--r);
  background: #180d24;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 16px;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.prose th { color: #fff; background: #170d24; }

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .95em;
  background: #1c1130;
  padding: 1px 5px;
  border-radius: var(--r);
}

/* 页脚 */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 30px 20px 40px;
  border-top: 1px solid var(--line);
}

.foot-brand a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: #fff;
  text-decoration: none;
  font: 800 16px/1.2 Nunito, "DM Sans", sans-serif;
  text-shadow: 0 0 10px rgba(255, 0, 255, .45);
}

.foot nav { flex: 1 1 300px; min-width: 0; }

.foot dl {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  margin: 0;
}

.foot dt { margin: 0; }

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

.foot dt a:hover,
.foot dt a:focus-visible { color: var(--magenta); }

.foot-copy {
  color: #7d7390;
  font-size: 16px;
}

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

@media (max-width: 560px) {
  .hero { min-height: auto; padding: 54px 16px 38px; }
  .stage { padding: 10px 16px 64px; }
  .veil-nav a { font-size: 19px; }
  .foot { padding: 26px 16px 34px; }
  .foot-copy { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

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