:root {
  --ink: #1a1a2e;
  --bg: #101020;
  --red: #ff0000;
  --mag: #ff006e;
  --text: #dcd9ec;
  --dim: #a6a2c2;
  --link: #ff7a95;
  --line: rgba(255, 0, 110, 0.26);
  --glass: rgba(255, 255, 255, 0.045);
  --r: 10px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 12% -8%, rgba(255, 0, 110, 0.26), transparent 55%),
    radial-gradient(ellipse at 92% 2%, rgba(255, 0, 0, 0.2), transparent 48%),
    linear-gradient(180deg, rgba(26, 26, 46, 0.9), rgba(16, 16, 32, 1) 60%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: auto, auto, auto, 44px 44px, 44px 44px;
  background-attachment: fixed;
  font-family: "Atkinson Hyperlegible", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04) 0 1px,
    rgba(0, 0, 0, 0.05) 1px 3px
  );
  mix-blend-mode: screen;
  opacity: 0.75;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: #fff;
  text-shadow: 0 0 10px var(--mag);
}

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

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

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(16, 16, 32, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255, 0, 110, 0.16), 0 14px 34px -26px #000;
}

.mark {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--mag);
  border-radius: var(--r);
  color: #fff;
  font-family: "Crimson Pro", "Songti SC", Georgia, serif;
  font-size: 19px;
  line-height: 1;
  box-shadow: inset 0 0 14px rgba(255, 0, 110, 0.45), 0 0 14px rgba(255, 0, 110, 0.35);
}

.mark-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
}

.topbar nav {
  flex: 1 1 auto;
  min-width: 0;
}

.menu {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.menu::-webkit-scrollbar {
  display: none;
}

.menu a {
  display: block;
  padding: 11px 11px;
  min-height: 44px;
  white-space: nowrap;
  font-size: 16px;
  line-height: 22px;
  color: var(--text);
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.menu a:hover,
.menu a:focus-visible {
  color: #fff;
  background: rgba(255, 0, 110, 0.14);
  border-color: var(--line);
}

/* ---------- 骨架 ---------- */
.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  gap: 34px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

.prose {
  min-width: 0;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 0 26px;
}

.badge {
  align-self: flex-start;
  margin: 0 0 18px;
  padding: 8px 14px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.14em;
  color: #ffe3ec;
  background: rgba(255, 0, 110, 0.14);
  border: 1px solid var(--mag);
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(255, 0, 110, 0.4);
  animation: hover-badge 5.5s ease-in-out infinite;
}

@keyframes hover-badge {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50% { transform: translateY(-7px) rotate(-1.2deg); }
}

.hero h1 {
  position: relative;
  margin: 0;
  font-family: "Crimson Pro", "Songti SC", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.4rem, 7.6vw, 4.9rem);
  line-height: 1.08;
  letter-spacing: 0.005em;
  color: #fff4f7;
  text-shadow: 0 0 18px rgba(255, 0, 110, 0.7), 0 0 46px rgba(255, 0, 0, 0.42);
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.75;
}

.glitch::before {
  color: var(--mag);
  clip-path: inset(0 0 58% 0);
  animation: glitch-a 4s steps(2, end) infinite;
}

.glitch::after {
  color: var(--red);
  clip-path: inset(52% 0 0 0);
  animation: glitch-b 3.1s steps(2, end) infinite;
}

@keyframes glitch-a {
  0%, 92%, 100% { transform: translate(0, 0); }
  93% { transform: translate(-3px, -2px) skewX(-4deg); }
  96% { transform: translate(2px, 1px) skewX(3deg); }
}

@keyframes glitch-b {
  0%, 90%, 100% { transform: translate(0, 0); }
  91% { transform: translate(3px, 2px) skewX(4deg); }
  95% { transform: translate(-2px, -1px) skewX(-3deg); }
}

.hero-sub {
  margin: 20px 0 0;
  max-width: 46ch;
  font-size: 17px;
  color: var(--dim);
  border-left: 2px solid var(--red);
  padding-left: 14px;
}

/* ---------- 正文区块 ---------- */
.prose > article {
  margin: 0 0 24px;
  padding: 26px 24px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 2px solid var(--mag);
  border-radius: var(--r);
  scroll-margin-top: 92px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255, 0, 110, 0.05), 0 22px 44px -34px #000;
}

.prose > article:nth-of-type(even) {
  border-left-color: var(--red);
  background: rgba(255, 255, 255, 0.03);
}

.prose h2 {
  margin: 0 0 12px;
  font-family: "Crimson Pro", "Songti SC", Georgia, serif;
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.28;
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 0, 110, 0.45);
}

.prose h3 {
  margin: 20px 0 8px;
  font-size: 1.1rem;
  color: #ffe6ee;
}

.prose p {
  margin: 0 0 14px;
}

.prose p:last-child {
  margin-bottom: 0;
}

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

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

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 0, 110, 0.55);
}

.prose img {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.prose blockquote {
  margin: 16px 0;
  padding: 12px 18px;
  border-left: 2px solid var(--red);
  background: rgba(255, 0, 0, 0.07);
  border-radius: 0 var(--r) var(--r) 0;
}

/* ---------- 右侧栏 ---------- */
.rail {
  position: sticky;
  top: 82px;
  align-self: start;
  padding: 20px 16px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgba(255, 0, 110, 0.07);
}

.rail h2 {
  margin: 0;
  font-family: "Crimson Pro", "Songti SC", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 0, 110, 0.5);
}

.rail .subtitle {
  margin: 2px 0 14px;
  font-size: 16px;
  letter-spacing: 0.28em;
  color: var(--mag);
}

.rail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px dashed var(--line);
}

.rail-list a {
  display: block;
  padding: 10px 4px;
  min-height: 42px;
  font-size: 16px;
  line-height: 22px;
  color: var(--text);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  transition: padding-left 0.2s, color 0.2s;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  color: #fff;
  padding-left: 10px;
}

/* ---------- 页脚 ---------- */
.foot {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 0, 110, 0.08), transparent 70%);
  padding: 44px 20px 32px;
}

.brandbig {
  max-width: 1180px;
  margin: 0 auto 26px;
  font-family: "Crimson Pro", "Songti SC", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.9rem, 6.4vw, 3.6rem);
  line-height: 1.15;
  letter-spacing: 0.03em;
  color: #fff;
  text-shadow: 0 0 22px rgba(255, 0, 110, 0.5), 0 0 52px rgba(255, 0, 0, 0.28);
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
}

.foot dl {
  margin: 0;
  min-width: 0;
}

.foot dt {
  margin-bottom: 6px;
  font-size: 16px;
  letter-spacing: 0.22em;
  color: var(--mag);
}

.foot dd {
  margin: 0;
  font-size: 16px;
  color: var(--dim);
  overflow-wrap: break-word;
}

.foot dd a {
  display: inline-block;
  min-height: 40px;
  padding: 8px 0;
  line-height: 24px;
  font-size: 16px;
  color: var(--text);
}

.foot dd a:hover,
.foot dd a:focus-visible {
  color: #fff;
}

.copy {
  max-width: 1180px;
  margin: 26px auto 0;
  padding-top: 16px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 16px;
  color: var(--dim);
}

/* ---------- 滚动出现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .rail {
    position: static;
    order: 2;
  }

  .rail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 17px;
  }

  .topbar {
    padding: 8px 12px;
    gap: 10px;
  }

  .shell {
    padding: 0 14px 48px;
  }

  .hero {
    min-height: 44vh;
    padding: 48px 0 22px;
  }

  .prose > article {
    padding: 22px 16px;
  }

  .foot {
    padding: 34px 14px 26px;
  }

  .foot-grid {
    gap: 10px;
  }

  .foot dt {
    letter-spacing: 0.1em;
  }
}

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

  .badge,
  .glitch::before,
  .glitch::after {
    animation: none;
  }

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

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