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

/* ===== 基础变量 ===== */
:root {
  --mint: #99ffcc;
  --neon: #00ff41;
  --deep: #001e3c;
  --deep-mid: #002a52;
  --deep-light: #003a6e;
  --mint-dim: rgba(153,255,204,0.12);
  --mint-glow: rgba(153,255,204,0.35);
  --neon-glow: rgba(0,255,65,0.25);
  --text-main: #d4f5e9;
  --text-muted: rgba(153,255,204,0.55);
  --radius-cell: 60% 40% 55% 45% / 45% 55% 40% 60%;
  --radius-card: 18px 42px 22px 38px / 38px 22px 42px 18px;
  --font: 'Atkinson Hyperlegible', 'Trebuchet MS', system-ui, sans-serif;
  --nav-h: 64px;
  --anchor-h: 40px;
  --header-total: calc(var(--nav-h) + 28px + var(--anchor-h));
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 17px;
  background: var(--deep);
  color: var(--text-main);
  font-family: var(--font);
  line-height: 1.7;
}
body { min-height: 100vh; overflow-x: hidden; position: relative; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mint); text-decoration: none; }
a:hover { color: var(--neon); }
ul, menu { list-style: none; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }

/* ===== 生物发光背景 ===== */
.bio-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
#bioCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.18;
}
.blob {
  position: absolute;
  border-radius: var(--radius-cell);
  filter: blur(60px);
  opacity: 0.22;
  animation: breathe 8s ease-in-out infinite;
}
.blob-1 {
  width: 520px; height: 420px;
  background: radial-gradient(ellipse, var(--mint) 0%, transparent 70%);
  top: -100px; left: -120px;
  animation-duration: 9s;
}
.blob-2 {
  width: 380px; height: 480px;
  background: radial-gradient(ellipse, var(--neon) 0%, transparent 70%);
  bottom: 10%; right: -80px;
  animation-duration: 11s; animation-delay: -3s;
}
.blob-3 {
  width: 300px; height: 300px;
  background: radial-gradient(ellipse, var(--mint) 0%, transparent 70%);
  top: 45%; left: 38%;
  animation-duration: 13s; animation-delay: -6s;
}
@keyframes breathe {
  0%, 100% { transform: scale(1) translate(0,0); border-radius: var(--radius-cell); }
  33% { transform: scale(1.08) translate(15px,-10px); border-radius: 40% 60% 45% 55% / 55% 40% 60% 45%; }
  66% { transform: scale(0.94) translate(-10px,12px); border-radius: 55% 45% 60% 40% / 40% 60% 45% 55%; }
}

/* ===== 公告条 ===== */
.announce-bar {
  background: linear-gradient(90deg, var(--neon) 0%, var(--mint) 100%);
  color: var(--deep);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  height: 28px;
  line-height: 28px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 0 1rem;
}

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0,30,60,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(153,255,204,0.15);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}
.brand-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 10;
}
.logo-mark { width: 40px; height: 40px; object-fit: contain; border-radius: 50%; }
.logo-text-mark {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--neon), var(--mint));
  color: var(--deep);
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 50%;
  border: 2px solid var(--mint);
}

/* 桌面导航 */
.nav-desktop {
  display: flex; gap: 0.25rem; align-items: center;
}
.nav-link {
  display: inline-flex; align-items: center;
  padding: 0.55rem 0.85rem;
  min-height: 40px;
  color: var(--text-main);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav-link:hover {
  background: var(--mint-dim);
  color: var(--mint);
}

/* 移动端 details/summary 导航 */
.nav-details { position: relative; }
.nav-toggle {
  display: none;
  cursor: pointer;
  list-style: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid rgba(153,255,204,0.25);
  background: transparent;
}
.nav-toggle::-webkit-details-marker { display: none; }
.hamburger-line {
  display: block; width: 22px; height: 2px;
  background: var(--mint);
  border-radius: 2px;
  transition: transform 0.25s;
}
.nav-details[open] .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-details[open] .hamburger-line:nth-child(2) { opacity: 0; }
.nav-details[open] .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(0,30,60,0.97);
  border: 1px solid rgba(153,255,204,0.2);
  border-radius: 12px;
  padding: 0.5rem;
  min-width: 200px;
  backdrop-filter: blur(12px);
}
.nav-details[open] .nav-menu { display: block; }
.nav-menu li a {
  display: block;
  padding: 0.65rem 1rem;
  min-height: 44px;
  line-height: 1.4;
  color: var(--text-main);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: background 0.18s, color 0.18s;
}
.nav-menu li a:hover { background: var(--mint-dim); color: var(--mint); }

/* 粘性锚点条 */
.sticky-anchors {
  display: flex;
  overflow-x: auto;
  gap: 0.15rem;
  padding: 0 1rem;
  height: var(--anchor-h);
  align-items: center;
  border-top: 1px solid rgba(153,255,204,0.08);
  scrollbar-width: none;
}
.sticky-anchors::-webkit-scrollbar { display: none; }
.anchor-link {
  display: inline-flex;
  align-items: center;
  padding: 0 0.75rem;
  height: 32px;
  min-height: 32px;
  white-space: nowrap;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-radius: 20px;
  border: 1px solid transparent;
  letter-spacing: 0.04em;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.anchor-link:hover {
  color: var(--neon);
  border-color: var(--neon);
  background: var(--neon-glow);
}

/* 各 article 的 scroll-margin-top */
article[id] { scroll-margin-top: var(--header-total); }

/* ===== Hero ===== */
.hero-section {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  align-items: center;
  gap: 0;
  overflow: hidden;
}
.hero-figure {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.75) saturate(1.2);
}
.hero-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--deep-mid) 0%, var(--deep-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cell-pattern {
  width: 300px;
  height: 300px;
  border-radius: var(--radius-cell);
  background: linear-gradient(135deg, var(--neon) 0%, var(--mint) 100%);
  opacity: 0.18;
  animation: breathe 7s ease-in-out infinite;
}
.hero-badge {
  position: absolute;
  bottom: 2rem;
  left: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,30,60,0.75);
  border: 1px solid var(--neon);
  border-radius: 24px;
  padding: 0.4rem 1rem;
  font-size: 0.78rem;
  color: var(--neon);
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
}
.badge-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--neon);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,255,65,0.6); }
  50% { box-shadow: 0 0 0 6px rgba(0,255,65,0); }
}
.hero-aside {
  padding: 4rem 3rem 4rem 2.5rem;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.25rem;
}
.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neon);
  border: 1px solid var(--neon);
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}
.hero-aside h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  background: linear-gradient(135deg, #fff 0%, var(--mint) 60%, var(--neon) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
}
.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 380px;
  line-height: 1.65;
}
.hero-cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

/* ===== 按钮 ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.75rem;
  min-height: 44px;
  background: linear-gradient(135deg, var(--neon) 0%, var(--mint) 100%);
  color: var(--deep);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 30px;
  letter-spacing: 0.06em;
  transition: box-shadow 0.25s, transform 0.2s;
  box-shadow: 0 0 20px var(--neon-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(0,255,65,0.45);
  color: var(--deep);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.5rem;
  min-height: 44px;
  border: 1px solid var(--mint);
  color: var(--mint);
  font-size: 0.95rem;
  border-radius: 30px;
  letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s;
}
.btn-ghost:hover { background: var(--mint-dim); color: var(--mint); }

/* ===== 内容区 ===== */
.content-sections {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

/* 侧边栏 (left) */
.content-aside {
  position: sticky;
  top: var(--header-total);
  align-self: start;
  height: fit-content;
  padding-right: 2rem;
}
.aside-inner {
  background: rgba(0,42,82,0.6);
  border: 1px solid rgba(153,255,204,0.12);
  border-radius: var(--radius-card);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.aside-title {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--neon);
  text-transform: uppercase;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(153,255,204,0.15);
}
.aside-link {
  display: block;
  padding: 0.45rem 0.5rem;
  min-height: 40px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-radius: 8px;
  transition: color 0.18s, background 0.18s;
}
.aside-link:hover { color: var(--mint); background: var(--mint-dim); }
.aside-tag {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(153,255,204,0.1);
  padding-top: 0.6rem;
  letter-spacing: 0.08em;
}
.tag-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--mint);
  border-radius: 50%;
  animation: pulse-dot 3s ease-in-out infinite;
}

/* ===== 正文内容（page.content 插入处）===== */
.content-body {
  min-width: 0;
}
.content-body article {
  scroll-margin-top: var(--header-total);
  padding: 3rem 0;
  border-bottom: 1px solid rgba(153,255,204,0.08);
  position: relative;
}
.content-body article:last-child { border-bottom: none; }
.content-body h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--mint);
  margin-bottom: 0.5rem;
  position: relative;
}
.content-body h2::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--neon);
  border-radius: 50%;
  margin-right: 0.65rem;
  vertical-align: middle;
  box-shadow: 0 0 10px var(--neon);
}
.content-body h3 {
  font-size: 1.15rem;
  color: var(--mint);
  margin: 1.5rem 0 0.5rem;
}
.content-body p {
  margin-bottom: 1rem;
  color: var(--text-main);
  line-height: 1.8;
}
.content-body ul, .content-body ol {
  margin: 0.75rem 0 1rem 1.25rem;
  list-style: disc;
}
.content-body ol { list-style: decimal; }
.content-body li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}
.content-body a { color: var(--mint); border-bottom: 1px solid rgba(153,255,204,0.3); }
.content-body a:hover { color: var(--neon); border-color: var(--neon); }
.content-body figure {
  margin: 1.5rem 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid rgba(153,255,204,0.12);
  background: rgba(0,42,82,0.4);
}
.content-body aside {
  background: rgba(0,42,82,0.55);
  border-left: 3px solid var(--neon);
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}
/* 卡片式细胞膜质感 */
.content-body .card, .content-body [class*="card"] {
  background: rgba(0,42,82,0.6);
  border: 1px solid rgba(153,255,204,0.12);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 0 0 1px rgba(153,255,204,0.05);
  transition: transform 0.25s, box-shadow 0.25s;
  margin: 1rem 0;
}
.content-body .card:hover, .content-body [class*="card"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3), 0 0 20px rgba(153,255,204,0.08);
}
/* subtitle/副标题类 */
.subtitle, .subhead, .desc, .lead {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.65;
}
/* h2 + .subtitle 组合 */
.content-body h2 + .subtitle,
.content-body h2 + .subhead,
.content-body h2 + .desc,
.content-body h2 + .lead {
  margin-top: -0.25rem;
}

/* ===== 滚动揭示动画 ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ===== 页脚 ===== */
.site-footer {
  position: relative;
  z-index: 1;
  background: rgba(0,15,30,0.95);
  border-top: 1px solid rgba(153,255,204,0.12);
}
.footer-cta {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  background: linear-gradient(180deg, rgba(0,255,65,0.04) 0%, transparent 100%);
  border-bottom: 1px solid rgba(153,255,204,0.08);
}
.footer-cta h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--mint);
  margin-bottom: 0.5rem;
}
.footer-cta .subtitle {
  margin-bottom: 1.5rem;
}
.footer-cols {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 2.5rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.footer-dl { flex: 1; min-width: 140px; }
.footer-dl dt {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--neon);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(153,255,204,0.12);
}
.footer-dl dd {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  line-height: 1.5;
}
.footer-dl dd a {
  color: var(--text-muted);
  transition: color 0.18s;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}
.footer-dl dd a:hover { color: var(--mint); }
.footer-bottom {
  text-align: center;
  padding: 1.5rem 1rem;
  border-top: 1px solid rgba(153,255,204,0.08);
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.8;
}
.footer-note { font-size: 0.72rem; opacity: 0.65; }

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .content-sections {
    grid-template-columns: 1fr;
    padding: 2rem 1rem 3rem;
  }
  .content-aside {
    position: relative;
    top: auto;
    padding-right: 0;
    margin-bottom: 2rem;
  }
  .aside-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
  }
  .aside-title { width: 100%; }
  .aside-tag { margin-left: auto; }
}

@media (max-width: 768px) {
  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-figure {
    height: 45vh;
    min-height: 260px;
  }
  .hero-aside {
    padding: 2.5rem 1.25rem;
    text-align: right;
  }
  .nav-desktop { display: none; }
  .nav-toggle { display: flex; }
  .footer-cols {
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 2rem 1.25rem;
  }
  .footer-dl { width: 100%; }
}

@media (max-width: 480px) {
  :root { --nav-h: 56px; }
  .hero-aside h1 { font-size: 1.7rem; }
  .sticky-anchors { padding: 0 0.5rem; }
  .anchor-link { padding: 0 0.5rem; font-size: 0.72rem; }
  .hero-cta-group { gap: 0.6rem; }
  .btn-primary, .btn-ghost { padding: 0.6rem 1.2rem; font-size: 0.88rem; }
}

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

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