@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* ============================================================
   CSS 自定义属性
   ============================================================ */
:root {
  --c-mint: #99ffcc;
  --c-neon: #00ff41;
  --c-deep: #001e3c;
  --c-deep2: #002a55;
  --c-deep3: #003366;
  --c-text: #cce8d8;
  --c-text-dim: #7ab89a;
  --c-border: rgba(153, 255, 204, 0.25);
  --c-border-bright: rgba(0, 255, 65, 0.5);
  --nav-w: 240px;
  --radius: 4px;
  --radius-pill: 24px;
  --font-head: 'Poppins', 'Open Sans', system-ui, sans-serif;
  --font-body: 'Open Sans', system-ui, sans-serif;
  --scroll-mt: 80px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   重置与基础
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--c-deep);
  color: var(--c-text);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  background: var(--c-deep);
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: var(--c-mint);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover, a:focus-visible {
  color: var(--c-neon);
  outline: 2px solid var(--c-neon);
  outline-offset: 2px;
}

ul, ol {
  list-style: none;
}

/* ============================================================
   辅助
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   生成艺术画布（背景）
   ============================================================ */
.bio-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#bioCanvas {
  width: 100%;
  height: 100%;
  opacity: 0.18;
}

/* ============================================================
   侧边导航
   ============================================================ */
.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-w);
  height: 100vh;
  background: rgba(0, 10, 25, 0.92);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.side-nav__brand {
  padding: 28px 20px 20px;
  border-bottom: 1px solid var(--c-border);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  outline: none;
}

.brand-link:focus-visible {
  outline: 2px solid var(--c-neon);
  border-radius: var(--radius);
}

.site-logo {
  height: 36px;
  width: auto;
  border-radius: var(--radius);
}

.logo-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--c-mint);
  letter-spacing: 0.04em;
  line-height: 1.2;
  word-break: break-all;
  padding: 8px 0;
  display: block;
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* 搜索框 */
.side-nav__search {
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-border);
}

.search-input {
  width: 100%;
  background: rgba(153, 255, 204, 0.07);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 16px;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}

.search-input::placeholder {
  color: var(--c-text-dim);
}

.search-input:focus {
  border-color: var(--c-neon);
  background: rgba(0, 255, 65, 0.06);
}

/* nav > ol > li > a  （结构抽签必须） */
.nav-list {
  flex: 1;
  padding: 12px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-list li {
  width: 100%;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--c-text);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  min-height: 44px;
  width: 100%;
}

.nav-pill:hover,
.nav-pill:focus-visible {
  background: rgba(153, 255, 204, 0.1);
  border-color: var(--c-border-bright);
  color: var(--c-mint);
  outline: none;
}

.nav-num {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--c-neon);
  letter-spacing: 0.05em;
  opacity: 0.8;
  flex-shrink: 0;
  width: 22px;
}

.nav-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-nav__footer {
  padding: 14px 20px;
  border-top: 1px solid var(--c-border);
}

.nav-tagline {
  font-size: 0.72rem;
  color: var(--c-text-dim);
  letter-spacing: 0.04em;
}

/* ============================================================
   页面主体包裹
   ============================================================ */
.page-wrap {
  margin-left: var(--nav-w);
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 0 48px;
  border-bottom: 1px solid var(--c-border);
}

.hero__deco-text {
  position: absolute;
  top: 50%;
  right: -20px;
  transform: translateY(-50%);
  font-family: var(--font-head);
  font-size: clamp(120px, 20vw, 220px);
  font-weight: 700;
  color: rgba(153, 255, 204, 0.04);
  letter-spacing: -0.05em;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  white-space: nowrap;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
  max-width: 960px;
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}

.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--c-neon);
  border: 1px solid var(--c-border-bright);
  border-radius: var(--radius-pill);
  padding: 4px 14px;
}

.hero__h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  letter-spacing: -0.02em;
}

.hero__h1 strong {
  color: var(--c-mint);
}

.hero__sub {
  font-size: 1rem;
  color: var(--c-text);
  max-width: 420px;
  line-height: 1.7;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--c-neon);
  color: var(--c-deep);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  min-height: 48px;
  text-decoration: none;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--c-mint);
  color: var(--c-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 255, 65, 0.35);
  outline: none;
}

/* Hero 拼贴 */
.hero__collage {
  position: relative;
  height: 340px;
}

.collage-cell {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-border-bright);
  border-radius: var(--radius);
  overflow: hidden;
}

.collage-cell--a {
  width: 48%;
  height: 52%;
  top: 0;
  left: 0;
  background: rgba(0, 255, 65, 0.05);
}

.collage-cell--b {
  width: 48%;
  height: 60%;
  top: 12%;
  right: 0;
  background: rgba(153, 255, 204, 0.05);
}

.collage-cell--c {
  width: 60%;
  height: 36%;
  bottom: 0;
  left: 20%;
  background: rgba(0, 30, 60, 0.6);
}

.cell-blob {
  position: absolute;
  width: 80%;
  height: 80%;
  border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
  background: radial-gradient(circle at 40% 40%, rgba(0,255,65,0.15), transparent 70%);
  animation: blobMorph 6s ease-in-out infinite alternate;
}

@keyframes blobMorph {
  0%   { border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%; transform: scale(1); }
  50%  { border-radius: 60% 40% 45% 55% / 45% 55% 45% 55%; transform: scale(1.04); }
  100% { border-radius: 50% 50% 60% 40% / 55% 45% 50% 50%; transform: scale(0.97); }
}

.cell-label {
  position: relative;
  z-index: 1;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-mint);
  letter-spacing: 0.06em;
}

/* 滚动提示 */
.hero__scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.5;
}

.scroll-line {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--c-mint);
}

.scroll-txt {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--c-text-dim);
}

/* ============================================================
   内容布局（main + aside）
   ============================================================ */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
  align-items: start;
  max-width: 1200px;
  padding: 0;
}

/* main > div > article  （结构抽签必须） */
.main-content {
  padding: 56px 48px 56px 48px;
  min-width: 0;
}

.main-article {
  width: 100%;
}

.content-sections {
  width: 100%;
}

/* page.content 内部的区块样式 */
.content-sections article {
  scroll-margin-top: var(--scroll-mt);
  padding: 48px 0;
  border-bottom: 1px solid var(--c-border);
}

.content-sections article:last-child {
  border-bottom: none;
}

.content-sections h2 {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.content-sections h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--c-mint);
  margin: 28px 0 12px;
}

.content-sections p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-text);
  margin-bottom: 16px;
  max-width: 70ch;
}

.content-sections ul,
.content-sections ol {
  margin: 12px 0 20px 0;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.content-sections ul li,
.content-sections ol li {
  position: relative;
  padding-left: 20px;
  font-size: 1rem;
  color: var(--c-text);
  line-height: 1.7;
}

.content-sections ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-neon);
  opacity: 0.8;
}

.content-sections ol {
  counter-reset: ol-cnt;
}

.content-sections ol li {
  counter-increment: ol-cnt;
}

.content-sections ol li::before {
  content: counter(ol-cnt, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--c-neon);
  font-family: var(--font-head);
}

.content-sections a {
  color: var(--c-mint);
  border-bottom: 1px solid rgba(153, 255, 204, 0.3);
  transition: color var(--transition), border-color var(--transition);
}

.content-sections a:hover {
  color: var(--c-neon);
  border-color: var(--c-neon);
}

.content-sections table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.92rem;
}

.content-sections th {
  background: rgba(0, 255, 65, 0.08);
  color: var(--c-mint);
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--c-border);
}

.content-sections td {
  padding: 9px 14px;
  border: 1px solid var(--c-border);
  color: var(--c-text);
}

.content-sections tr:hover td {
  background: rgba(153, 255, 204, 0.03);
}

/* 描边卡片（正文内可能用到） */
.content-sections .card {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 20px 0;
  background: rgba(0, 30, 60, 0.4);
  transition: border-color var(--transition);
}

.content-sections .card:hover {
  border-color: var(--c-border-bright);
}

/* h2 前置 small 眉题 （结构抽签） */
.content-sections small {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--c-neon);
  margin-bottom: 8px;
  border: 1px solid rgba(0, 255, 65, 0.3);
  border-radius: var(--radius-pill);
  padding: 2px 12px;
}

/* ============================================================
   aside
   ============================================================ */
.side-aside {
  padding: 56px 32px 56px 24px;
  position: sticky;
  top: 0;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  border-left: 1px solid var(--c-border);
}

.aside-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aside-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--c-neon);
  border: 1px solid rgba(0, 255, 65, 0.3);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  width: fit-content;
}

.aside-h2 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.aside-h3 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--c-mint);
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aside-links li {
  padding-left: 0;
}

.aside-link {
  display: flex;
  align-items: center;
  font-size: 0.88rem;
  color: var(--c-text);
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  min-height: 40px;
}

.aside-link:hover,
.aside-link:focus-visible {
  background: rgba(153, 255, 204, 0.08);
  border-color: var(--c-border);
  color: var(--c-mint);
  outline: none;
}

.aside-tip {
  font-size: 0.85rem;
  color: var(--c-text-dim);
  line-height: 1.6;
}

.aside-blob {
  width: 100%;
  height: 120px;
  border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
  background: radial-gradient(ellipse at 40% 40%, rgba(0,255,65,0.12), rgba(153,255,204,0.05) 60%, transparent 100%);
  animation: blobMorph 8s ease-in-out infinite alternate;
  opacity: 0.7;
}

/* ============================================================
   页脚  footer 极简（p + small）
   ============================================================ */
.site-footer {
  padding: 28px 48px;
  border-top: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 8, 20, 0.6);
}

.footer-copy {
  font-size: 0.88rem;
  color: var(--c-text-dim);
  line-height: 1.6;
}

.footer-small {
  font-size: 0.78rem;
  color: rgba(122, 184, 154, 0.5);
}

/* ============================================================
   article 区块 scroll-margin-top（单页站）
   ============================================================ */
article {
  scroll-margin-top: var(--scroll-mt);
}

/* ============================================================
   呼吸动效（breathing pulse）
   ============================================================ */
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.018); opacity: 0.92; }
}

.bio-theme .hero__collage {
  animation: breathe 5s ease-in-out infinite;
}

/* Stagger list 入场 */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-list li {
  animation: fadeSlideUp 0.4s ease both;
}

.nav-list li:nth-child(1) { animation-delay: 0.05s; }
.nav-list li:nth-child(2) { animation-delay: 0.10s; }
.nav-list li:nth-child(3) { animation-delay: 0.15s; }
.nav-list li:nth-child(4) { animation-delay: 0.20s; }
.nav-list li:nth-child(5) { animation-delay: 0.25s; }
.nav-list li:nth-child(6) { animation-delay: 0.30s; }
.nav-list li:nth-child(7) { animation-delay: 0.35s; }

/* Parallax scroll subtle（JS 辅助） */
.hero__deco-text {
  will-change: transform;
}

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

/* ============================================================
   响应式 — 中屏
   ============================================================ */
@media (max-width: 1100px) {
  :root { --nav-w: 210px; }

  .hero__inner {
    gap: 32px;
  }

  .content-layout {
    grid-template-columns: 1fr 240px;
  }
}

@media (max-width: 900px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .side-aside {
    border-left: none;
    border-top: 1px solid var(--c-border);
    padding: 32px 40px;
    position: static;
  }
}

/* ============================================================
   响应式 — 移动端
   ============================================================ */
@media (max-width: 768px) {
  :root { --nav-w: 0px; }

  .side-nav {
    width: 100%;
    height: auto;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    flex-direction: row;
    align-items: center;
    height: 56px;
    overflow: hidden;
    border-right: none;
    border-bottom: 1px solid var(--c-border);
    z-index: 200;
  }

  .side-nav__brand {
    padding: 0 14px;
    border-bottom: none;
    border-right: 1px solid var(--c-border);
    height: 56px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }

  .logo-text {
    font-size: 0.9rem;
    min-height: 44px;
    padding: 0;
    white-space: nowrap;
  }

  .side-nav__search {
    padding: 0 10px;
    border-bottom: none;
    flex: 1;
    max-width: 160px;
  }

  .search-input {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .nav-list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 8px;
    gap: 4px;
    flex: 1;
    height: 56px;
    align-items: center;
  }

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

  .nav-pill {
    flex-direction: column;
    padding: 6px 12px;
    min-height: 44px;
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: var(--radius);
    gap: 2px;
    justify-content: center;
  }

  .nav-num {
    font-size: 0.6rem;
    width: auto;
  }

  .side-nav__footer { display: none; }

  .page-wrap {
    margin-left: 0;
    padding-top: 56px;
  }

  .hero {
    min-height: 70vh;
    padding: 40px 20px 40px;
    justify-content: flex-end;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero__collage {
    height: 180px;
    order: -1;
  }

  .hero__deco-text {
    font-size: clamp(80px, 28vw, 140px);
    right: -10px;
    top: 20%;
  }

  .hero__scroll-hint {
    left: 20px;
    bottom: 16px;
  }

  .main-content {
    padding: 32px 20px;
  }

  .side-aside {
    padding: 24px 20px;
  }

  .site-footer {
    padding: 20px 20px;
  }

  .content-sections article {
    padding: 32px 0;
  }
}

@media (max-width: 375px) {
  .hero__h1 {
    font-size: 1.6rem;
  }

  .nav-pill {
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  .btn-primary {
    font-size: 0.88rem;
    padding: 11px 20px;
  }
}
