@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Crimson+Pro:wght@400;500;600;700&display=swap');

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

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

body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
  background: #140b0b;
  color: #f5ebec;
  font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

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

a { color: inherit; }

main { display: block; }

/* ---------- 背景光层 ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(58% 48% at 10% 6%, rgba(255, 0, 0, 0.42), transparent 70%),
    radial-gradient(52% 52% at 92% 20%, rgba(139, 0, 255, 0.46), transparent 72%),
    radial-gradient(90% 62% at 45% 104%, rgba(139, 0, 255, 0.26), transparent 74%),
    linear-gradient(180deg, #1c0f10 0%, #140b0b 60%, #100808 100%);
}

.bg .blob {
  position: absolute;
  display: block;
  width: 46vmax;
  height: 46vmax;
  filter: blur(70px);
  opacity: 0.5;
  mix-blend-mode: screen;
}

.bg .a {
  top: -14vmax;
  left: -10vmax;
  background: radial-gradient(circle, rgba(255, 0, 0, 0.85), transparent 65%);
  animation: drift 24s ease-in-out infinite alternate;
}

.bg .b {
  top: 22vh;
  right: -16vmax;
  background: radial-gradient(circle, rgba(139, 0, 255, 0.85), transparent 65%);
  animation: drift 30s ease-in-out infinite alternate-reverse;
}

.bg .c {
  bottom: -20vmax;
  left: 26vw;
  background: radial-gradient(circle, rgba(255, 0, 0, 0.6), transparent 68%);
  animation: drift 36s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4vw, 6vh, 0) scale(1.14); }
}

/* ---------- 骨架 ---------- */

.wrap {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  text-align: right;
  padding: 16vh 0 7vh;
  isolation: isolate;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.2px),
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px, 100px 100px, 100px 100px;
  -webkit-mask-image: linear-gradient(190deg, #000 12%, transparent 88%);
  mask-image: linear-gradient(190deg, #000 12%, transparent 88%);
  pointer-events: none;
}

.hero-title {
  margin: 0;
  font-family: 'Crimson Pro', 'Songti SC', Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.5rem, 8.4vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: #ffffff;
  text-shadow: 0 18px 46px rgba(0, 0, 0, 0.55);
}

.hero-title::after {
  content: '';
  display: block;
  width: 88px;
  height: 4px;
  margin: 22px 0 0 auto;
  background: linear-gradient(90deg, #ff0000, #8b00ff);
}

.hero-lede {
  margin: 20px 0 0;
  max-width: 46ch;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.8);
}

/* ---------- 目次 / 正文容器 ---------- */

.entry {
  position: relative;
  padding: 4px 0 8px;
}

.eyebrow {
  display: block;
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 15px;
  letter-spacing: 0.42em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 6px;
}

.entry-title {
  margin: 0 0 30px;
  padding-bottom: 14px;
  font-family: 'Crimson Pro', 'Songti SC', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.45rem, 3.6vw, 1.9rem);
  line-height: 1.3;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.prose { counter-reset: sec; }

.prose section {
  counter-increment: sec;
  position: relative;
  margin: 0 0 24px;
  padding: 30px 28px 26px;
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.045));
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  scroll-margin-top: 96px;
  scroll-margin-bottom: 120px;
}

.prose section:nth-child(even) {
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.09), rgba(139, 0, 255, 0.08));
}

.prose section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 64px;
  background: linear-gradient(180deg, #ff0000, #8b00ff);
}

.prose h2 {
  margin: 0 0 16px;
  font-family: 'Crimson Pro', 'Songti SC', Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.35rem, 3.4vw, 1.72rem);
  line-height: 1.32;
  color: #ffffff;
}

.prose h2::before {
  content: counter(sec, decimal-leading-zero);
  display: inline-block;
  margin-right: 0.7em;
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 0.72em;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.42);
  vertical-align: 0.12em;
}

.prose h3 {
  margin: 26px 0 12px;
  font-family: 'Crimson Pro', 'Songti SC', Georgia, serif;
  font-weight: 600;
  font-size: 1.16rem;
  color: #ffd9d9;
}

.prose p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.9);
}

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

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 1.35em;
}

.prose li { margin-bottom: 8px; }

.prose a {
  color: #ffb3b3;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose a:hover { color: #ffffff; }

.prose strong { color: #ffffff; }

.prose blockquote {
  margin: 0 0 16px;
  padding: 12px 18px;
  border-left: 2px solid rgba(255, 0, 0, 0.7);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
}

/* ---------- 页脚 ---------- */

.foot {
  max-width: 940px;
  margin: 44px auto 0;
  padding: 0 20px calc(124px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px 18px;
}

.foot-cta {
  grid-column: 1 / -1;
  margin: 0;
}

.foot-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 18px 22px;
  font-family: 'Crimson Pro', 'Songti SC', Georgia, serif;
  font-size: 1.22rem;
  letter-spacing: 0.24em;
  color: #ffffff;
  text-decoration: none;
  background: linear-gradient(104deg, rgba(255, 0, 0, 0.4), rgba(139, 0, 255, 0.4));
  border: 1px solid rgba(255, 255, 255, 0.26);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: filter 0.25s ease, transform 0.25s ease;
}

.foot-cta a:hover {
  filter: brightness(1.22);
  transform: translateY(-2px);
}

.foot-copy {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.08em;
}

.foot-link {
  justify-self: end;
  font-size: 15px;
}

.foot-link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.foot-link a:hover { color: #ffffff; }

/* ---------- 底部固定条 ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(30, 16, 17, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 -18px 44px rgba(0, 0, 0, 0.42);
}

.dock-nav {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.dock-nav::-webkit-scrollbar { display: none; }

.dock-list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dock-list.left { justify-content: flex-end; }
.dock-list.right { justify-content: flex-start; }

.dock-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 11px;
  font-size: 16px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.dock-list a:hover,
.dock-list a:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
}

.dock-brand {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-family: 'Crimson Pro', 'Songti SC', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

.dock-btn {
  flex: none;
  min-height: 44px;
  min-width: 62px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 16px;
  color: #ffffff;
  background: linear-gradient(104deg, rgba(255, 0, 0, 0.42), rgba(139, 0, 255, 0.42));
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: filter 0.2s ease;
}

.dock-btn:hover { filter: brightness(1.2); }

/* 全屏遮罩菜单 */
.dock.open {
  inset: 0;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 36px 20px calc(36px + env(safe-area-inset-bottom));
  overflow-y: auto;
  background: rgba(18, 10, 11, 0.9);
  border-top: none;
}

.dock.open .dock-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  gap: 6px;
  overflow: visible;
}

.dock.open .dock-list {
  flex-direction: column;
  align-items: stretch;
}

.dock.open .dock-list a {
  justify-content: center;
  min-height: 52px;
  font-size: 18px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.dock.open .dock-brand {
  order: -1;
  justify-content: center;
  font-size: 1.5rem;
  min-height: 56px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  margin-bottom: 8px;
}

.dock.open .dock-btn {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 52px;
}

/* ---------- 动效 ---------- */

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

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

/* ---------- 移动端 ---------- */

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

  .dock-nav {
    display: flex;
    align-items: center;
    gap: 2px;
  }

  .dock-list.left,
  .dock-list.right { justify-content: flex-start; }

  .dock-brand {
    order: -1;
    padding: 0 10px;
    font-size: 1rem;
    letter-spacing: 0.06em;
    border-left: none;
  }

  .dock-list a { padding: 0 10px; font-size: 16px; }

  .wrap { padding: 0 16px; }

  .hero {
    padding: 12vh 0 6vh;
    min-height: 45vh;
  }

  .hero-title { font-size: clamp(2.3rem, 10.5vw, 3.4rem); }

  .hero-lede { font-size: 16px; }

  .prose section {
    padding: 24px 18px 22px;
    margin-bottom: 18px;
  }

  .foot { padding: 0 16px calc(118px + env(safe-area-inset-bottom)); }

  .foot-cta a { font-size: 1.08rem; letter-spacing: 0.16em; }
}

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

  .bg .blob { animation: none; }

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

  .foot-cta a:hover { transform: none; }
}

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