@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Libre+Baskerville:wght@400;700&display=swap');

:root {
  --ink: #001e3c;
  --ink-deep: #001429;
  --ink-soft: #013058;
  --mint: #99ffcc;
  --neon: #00ff41;
  --paper: #eafff5;
  --line: rgba(153, 255, 204, .22);
  --line-soft: rgba(153, 255, 204, .12);
  --serif: 'Cormorant Garamond', 'Libre Baskerville', "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --body: 'Libre Baskerville', 'Cormorant Garamond', "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --head-pad: clamp(20px, 5vw, 64px);
}

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

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.85;
  color: rgba(234, 255, 245, .9);
  background-color: var(--ink);
  background-image:
    radial-gradient(70% 45% at 8% 0%, rgba(0, 255, 65, .10), transparent 62%),
    radial-gradient(58% 52% at 94% 20%, rgba(153, 255, 204, .12), transparent 68%),
    linear-gradient(180deg, #001e3c 0%, #00162d 56%, #001e3c 100%);
  background-repeat: no-repeat;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .65;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(153, 255, 204, .14) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 65%, rgba(0, 255, 65, .12) 0 1px, transparent 2px);
  background-size: 180px 180px, 260px 260px;
}

img { max-width: 100%; height: auto; }
iframe, video, svg { max-width: 100%; }

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

main, .foot { position: relative; z-index: 1; }

/* ---------- 页头 ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(0, 30, 60, .88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
}

.strip {
  padding: 9px var(--head-pad);
  font-size: 14px;
  letter-spacing: .16em;
  text-align: center;
  color: var(--neon);
  background: rgba(0, 255, 65, .06);
  border-bottom: 1px solid rgba(0, 255, 65, .18);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brandline {
  padding: 12px var(--head-pad) 4px;
  text-align: center;
}

.brand {
  display: inline-block;
  padding: 6px 4px;
  font-family: var(--serif);
  font-size: clamp(25px, 4vw, 34px);
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--paper);
  text-decoration: none;
  text-shadow: 0 0 26px rgba(0, 255, 65, .25);
}

.brand:hover { color: var(--mint); }

.site-head nav {
  padding: 4px var(--head-pad) 14px;
}

.site-head nav p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

.site-head nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 17px;
  font-size: 16px;
  line-height: 1.3;
  color: var(--mint);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(153, 255, 204, .04);
  transition: color .25s ease, border-color .25s ease, background .25s ease, transform .25s ease;
}

.site-head nav a:hover,
.site-head nav a:focus-visible {
  color: var(--paper);
  border-color: var(--neon);
  background: rgba(0, 255, 65, .16);
  transform: translateY(-2px);
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(26px, 4vw, 52px) var(--head-pad);
  min-height: 74vh;
  min-height: calc(100svh - 196px);
}

.hero-art {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 4 / 5;
  max-height: 66vh;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 52% 48% 44% 56% / 46% 52% 48% 54%;
  background: radial-gradient(120% 120% at 30% 18%, #01406c, #001429 72%);
  animation: morph 19s ease-in-out infinite;
}

.hero-art::after {
  content: '';
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(0, 255, 65, .22), transparent 62%);
  filter: blur(26px);
  animation: breathe 9s ease-in-out infinite;
}

.hero-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  display: block;
  opacity: .95;
}

.cell {
  position: absolute;
  z-index: 2;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 65, .9), rgba(0, 255, 65, 0) 72%);
  filter: blur(.5px);
  animation-name: pulse;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  pointer-events: none;
}

.hero-text { text-align: center; min-width: 0; }

.hero-text h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(34px, 5.4vw, 62px);
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: .02em;
  color: var(--paper);
  text-wrap: balance;
  overflow-wrap: break-word;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

.ghost {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 22px;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: .06em;
  color: var(--mint);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: color .25s ease, border-color .25s ease, background .25s ease;
}

.ghost-on {
  color: var(--ink-deep);
  background: var(--neon);
  border-color: var(--neon);
}

.ghost:hover { color: var(--ink-deep); background: var(--mint); border-color: var(--mint); }

/* ---------- 主体 ---------- */

.wrap {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px var(--head-pad) 84px;
  border-top: 1px solid var(--line);
}

.rail {
  position: sticky;
  top: 186px;
  align-self: start;
  min-width: 0;
}

.rail h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--mint);
}

.rail .subtitle {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(234, 255, 245, .6);
  overflow-wrap: break-word;
}

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

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px 8px 14px;
  font-size: 16px;
  line-height: 1.4;
  color: rgba(234, 255, 245, .82);
  text-decoration: none;
  border-left: 1px solid var(--line);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.rail-list a:hover {
  color: var(--neon);
  border-left-color: var(--neon);
  background: linear-gradient(90deg, rgba(0, 255, 65, .12), transparent);
}

.body { min-width: 0; }

.prose {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.prose section {
  padding: clamp(30px, 4vw, 52px) 0;
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 178px;
  animation: rise .8s cubic-bezier(.2, .7, .3, 1) both;
}

.prose section:first-child { border-top: 0; padding-top: 0; }
.prose section:nth-child(2) { animation-delay: .06s; }
.prose section:nth-child(3) { animation-delay: .12s; }
.prose section:nth-child(4) { animation-delay: .18s; }
.prose section:nth-child(5) { animation-delay: .24s; }
.prose section:nth-child(6) { animation-delay: .3s; }
.prose section:nth-child(7) { animation-delay: .36s; }

.prose h2 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 33px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .015em;
  color: var(--paper);
}

.prose h2::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  margin-bottom: 14px;
  background: var(--neon);
  box-shadow: 0 0 12px rgba(0, 255, 65, .7);
}

.prose h3 {
  margin: 30px 0 10px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--mint);
}

.prose p {
  margin: 0 0 18px;
  font-size: 17px;
  line-height: 1.95;
  color: rgba(234, 255, 245, .88);
}

.prose ul, .prose ol { margin: 0 0 20px; padding-left: 24px; }
.prose li { margin-bottom: 10px; line-height: 1.9; }

.prose strong, .prose em { color: var(--mint); font-style: normal; font-weight: 700; }

.prose blockquote {
  margin: 26px 0;
  padding: 8px 0 8px 22px;
  border-left: 2px solid var(--neon);
  color: var(--mint);
}

.prose blockquote p { color: inherit; margin-bottom: 8px; }

.prose figure { margin: 26px 0; max-width: 100%; }
.prose figure img { width: 100%; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; }
.prose figcaption { margin-top: 10px; font-size: 16px; color: rgba(234, 255, 245, .6); }

.prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0 0 22px;
  font-size: 16px;
}
.prose th, .prose td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.prose th { color: var(--mint); font-weight: 600; }

.prose pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: rgba(0, 20, 41, .6);
  font-size: 16px;
  line-height: 1.7;
}

.prose code { overflow-wrap: anywhere; }

.prose time { font-size: 16px; color: var(--mint); letter-spacing: .04em; }

.prose a { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }

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

.foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 52px);
  padding: clamp(36px, 5vw, 64px) var(--head-pad) 26px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0, 255, 65, .06), transparent 55%), var(--ink-deep);
}

.foot-brand .b {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 23px;
  letter-spacing: .16em;
  color: var(--paper);
}

.foot-brand .k {
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  color: rgba(234, 255, 245, .58);
  overflow-wrap: break-word;
}

.foot-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 15px;
  font-size: 16px;
  color: var(--mint);
  text-decoration: none;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  transition: border-color .25s ease, color .25s ease;
}

.foot-links a:hover { color: var(--paper); border-color: var(--neon); }

.foot-cta {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: clamp(26px, 4vw, 44px);
  border: 1px solid var(--neon);
  border-radius: 4px;
  background: radial-gradient(80% 150% at 50% 0%, rgba(0, 255, 65, .16), transparent 72%);
}

.foot-cta a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: .24em;
  color: var(--neon);
  text-decoration: none;
  transition: text-shadow .3s ease, color .3s ease;
}

.foot-cta a:hover { color: var(--paper); text-shadow: 0 0 22px rgba(0, 255, 65, .8); }

.foot-base {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
}

.foot-base p { margin: 0; font-size: 16px; color: rgba(234, 255, 245, .55); }

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

@keyframes morph {
  0%, 100% { border-radius: 52% 48% 44% 56% / 46% 52% 48% 54%; }
  35% { border-radius: 42% 58% 56% 44% / 58% 42% 58% 42%; }
  70% { border-radius: 58% 42% 48% 52% / 44% 58% 42% 56%; }
}

@keyframes breathe {
  0%, 100% { transform: scale(.94); opacity: .7; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(.65); opacity: .3; }
  50% { transform: scale(1.35); opacity: .95; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    min-height: 0;
    padding-top: 26px;
    overflow-x: hidden;
  }

  .hero-text { order: 1; }
  .hero-art { order: 2; aspect-ratio: 16 / 10; max-height: none; }

  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding-bottom: 56px;
    overflow-x: hidden;
  }

  .rail { position: static; }
  .rail .subtitle { margin-bottom: 12px; }

  .rail-list {
    display: flex;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .rail-list::-webkit-scrollbar { display: none; }
  .rail-list li { flex: 0 0 auto; }

  .rail-list a {
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    padding: 8px 14px;
    white-space: nowrap;
  }

  .prose section { scroll-margin-top: 250px; }

  .foot { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .site-head nav a { padding: 8px 13px; }
  .strip { letter-spacing: .1em; }
  .hero { padding-left: 18px; padding-right: 18px; }
  .wrap, .foot { padding-left: 18px; padding-right: 18px; }
  .prose th, .prose td { padding: 9px 10px; font-size: 15px; }
  .prose blockquote { padding-left: 16px; }
}

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

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