@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Space+Grotesk:wght@500;600;700&display=swap');

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

:root {
  --red: #ff0000;
  --purple: #8b00ff;
  --ink: #261717;
  --fg: #f4ecec;
  --dim: #c6b6b6;
  --line: rgba(255, 255, 255, 0.14);
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.11);
  --blur: blur(16px) saturate(140%);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'Inter', 'Space Grotesk', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --disp: 'Space Grotesk', 'Inter', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

body {
  margin: 0;
  min-height: 100%;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
  background:
    radial-gradient(900px 620px at 12% -8%, rgba(255, 0, 0, 0.22), transparent 62%),
    radial-gradient(760px 560px at 88% 6%, rgba(139, 0, 255, 0.24), transparent 64%),
    radial-gradient(900px 700px at 50% 108%, rgba(139, 0, 255, 0.14), transparent 68%),
    linear-gradient(180deg, #1b0e0e 0%, #120a0b 46%, #0c0708 100%);
  background-attachment: fixed;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; }

:focus-visible {
  outline: 2px solid rgba(255, 0, 0, 0.7);
  outline-offset: 3px;
}

.aura {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.aura span {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.5;
}
.aura span:nth-child(1) {
  width: 420px; height: 420px;
  background: var(--red);
  top: -100px; left: -90px;
  animation: drift 19s ease-in-out infinite;
}
.aura span:nth-child(2) {
  width: 380px; height: 380px;
  background: var(--purple);
  top: 32%; right: -130px;
  animation: drift 24s ease-in-out infinite reverse;
}
.aura span:nth-child(3) {
  width: 300px; height: 300px;
  background: #ff2b6d;
  bottom: -80px; left: 36%;
  animation: drift 27s ease-in-out infinite;
}
@keyframes drift {
  50% { transform: translate3d(42px, -32px, 0) scale(1.12); }
}

/* 首屏 */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 88px 24px 128px;
}
.hero-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 44px;
  align-items: center;
}
.hero-copy { min-width: 0; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 24px;
  padding: 8px 15px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--glass-2);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.48);
  transform: rotate(-1.6deg);
}
.badge .pip {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px var(--red);
  flex: none;
}
.hero h1 {
  margin: 0;
  font-family: var(--disp);
  font-size: clamp(2rem, 5.4vw, 3.85rem);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
}
.hero h1::after {
  content: '';
  display: block;
  width: 92px; height: 3px;
  margin-top: 28px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--red), var(--purple));
}
.hero-art-wrap { min-width: 0; }
.art-frame {
  padding: 13px;
  border-radius: 6px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-bottom: 2px solid rgba(255, 0, 0, 0.55);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.55);
  transform: rotate(1.4deg);
}
.art-frame img { width: 100%; border-radius: 4px; aspect-ratio: 3 / 4; object-fit: cover; }
.glyph { width: 100%; height: auto; color: var(--red); }

/* 主区 */
main { position: relative; z-index: 1; }
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 40px;
  align-items: start;
}
.doc { min-width: 0; }
.prose { max-width: 760px; }

.prose > article {
  position: relative;
  margin: 0 0 24px;
  padding: 30px 26px 34px;
  border-radius: 4px;
  overflow-x: auto;
  scroll-margin-top: 24px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-bottom: 2px solid rgba(255, 0, 0, 0.5);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease;
}
.prose > article:hover {
  transform: translateY(-3px);
  border-bottom-color: rgba(139, 0, 255, 0.85);
  box-shadow: 0 26px 62px rgba(0, 0, 0, 0.48);
}
.prose > article:last-child { margin-bottom: 0; }

.prose small {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--red);
}
.prose h2 {
  margin: 0 0 14px;
  font-family: var(--disp);
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  line-height: 1.32;
  letter-spacing: -0.01em;
}
.prose h3 {
  margin: 26px 0 10px;
  font-size: 1.2rem;
  line-height: 1.4;
}
.prose p { margin: 0 0 16px; }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 1.3em; }
.prose li { margin: 0 0 8px; }
.prose li::marker { color: var(--red); }
.prose strong { color: #fff; }
.prose a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 0, 0, 0.6);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.prose a:hover { color: var(--red); border-bottom-color: var(--purple); }
.prose blockquote {
  margin: 0 0 18px;
  padding: 14px 18px;
  border-left: 2px solid var(--purple);
  border-radius: 0 4px 4px 0;
  background: rgba(139, 0, 255, 0.09);
  color: var(--dim);
}
.prose img {
  margin: 0 0 18px;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 16px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; }
.prose th { background: rgba(255, 255, 255, 0.07); font-weight: 600; }

/* 右侧索引 */
.rail {
  position: sticky;
  top: 36px;
  padding: 22px 20px;
  border-radius: 4px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-bottom: 2px solid rgba(139, 0, 255, 0.55);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.rail small {
  display: block;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.22em;
  color: var(--red);
}
.rail h2 {
  margin: 6px 0 14px;
  font-family: var(--mono);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.rail-list { list-style: none; margin: 0; padding: 0; counter-reset: rail; }
.rail-list li { counter-increment: rail; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.rail-list li:first-child { border-top: 0; }
.rail-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 0;
  font-size: 16px;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.rail-list a::before {
  content: counter(rail, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--red);
}
.rail-list a:hover { color: #fff; padding-left: 4px; }

/* 页脚 */
footer {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  padding: 48px 24px 124px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.foot-inner { max-width: 1120px; margin: 0 auto; }
.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 0 0 30px;
}
.foot-cols dl { margin: 0; }
.foot-cols dt {
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--red);
}
.foot-cols dd { margin: 0; font-size: 16px; color: var(--dim); }
.foot-cols dd a {
  display: flex;
  align-items: center;
  min-height: 40px;
  color: var(--dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.foot-cols dd a:hover { color: #fff; border-bottom-color: var(--red); }

.foot-form {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 0 30px;
  padding: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}
.foot-form input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 16px;
}
.foot-form input::placeholder { color: rgba(198, 182, 182, 0.75); }
.foot-form button {
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--red), var(--purple));
  color: #fff;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.15s ease;
}
.foot-form button:hover { filter: brightness(1.16); }
.foot-form button:active { transform: translateY(1px); }

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 18px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 16px;
  color: var(--dim);
  text-align: center;
}
.foot-bottom p { margin: 0; }

/* 底部固定导航 */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: rgba(24, 12, 12, 0.66);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.45);
}
.dock .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 8px;
  color: var(--fg);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.mark {
  width: 13px; height: 13px;
  flex: none;
  border-radius: 2px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--red), var(--purple));
  box-shadow: 0 0 16px rgba(255, 0, 0, 0.65);
}
.dock-nav { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.dock-nav::-webkit-scrollbar { display: none; }
.dock-nav ul { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dock-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--dim);
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.dock-nav a:hover, .dock-nav a.on {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--line);
}
.ico {
  width: 8px; height: 8px;
  flex: none;
  border: 1px solid currentColor;
  border-radius: 1px;
  transform: rotate(45deg);
  opacity: 0.8;
}

/* 滚动显现 */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .rail { position: static; order: 2; }
  .rail-list { columns: 2; column-gap: 20px; }
  .rail-list li { break-inside: avoid; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .hero { padding: 78px 20px 118px; }
  .hero-art-wrap { max-width: 260px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px 64px; }
  .hero { padding: 68px 18px 112px; }
  .prose > article { padding: 26px 18px 30px; }
  .foot-cols { grid-template-columns: 1fr; gap: 20px; }
  .foot-form { max-width: none; }
  .foot-bottom { font-size: 15px; }
  .rail-list { columns: 1; }
  .badge { font-size: 13px; }
  .hero-art-wrap { max-width: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

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