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

/* =============================================
   CSS 变量 & 基础重置
   ============================================= */
:root {
  --c-primary: #99ffcc;
  --c-accent: #00ff41;
  --c-dark: #001e3c;
  --c-dark-mid: #002a52;
  --c-dark-card: #00244a;
  --c-dark-border: rgba(153,255,204,0.12);
  --c-text: rgba(153,255,204,0.92);
  --c-text-dim: rgba(153,255,204,0.55);
  --c-text-bright: #ffffff;
  --nav-w: 220px;
  --nav-w-collapsed: 64px;
  --radius-card: 18px;
  --radius-sm: 10px;
  --font-main: 'Outfit', 'Work Sans', system-ui, sans-serif;
  --scroll-offset: 80px;
  --transition-base: 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-dark);
  color: var(--c-text);
}

body.body-root {
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.7;
  background: var(--c-dark);
  color: var(--c-text);
  overflow-x: hidden;
  min-height: 100vh;
}

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

/* =============================================
   页面骨架：左侧固定导航 + 右侧内容
   ============================================= */
.page-shell {
  display: flex;
  min-height: 100vh;
}

.content-shell {
  flex: 1 1 auto;
  margin-left: var(--nav-w);
  min-width: 0;
}

/* =============================================
   左侧竖排导航
   ============================================= */
.sidenav {
  position: fixed;
  top: 0; left: 0;
  width: var(--nav-w);
  height: 100vh;
  background: rgba(0,22,50,0.97);
  border-right: 1px solid var(--c-dark-border);
  backdrop-filter: blur(16px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-details {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.nav-details[open] > summary::marker,
.nav-details > summary::marker,
.nav-details > summary::-webkit-details-marker {
  display: none;
  content: '';
}

.nav-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 12px 16px;
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid var(--c-dark-border);
  min-height: 72px;
  flex-shrink: 0;
}

.brand-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  object-fit: contain;
}

.brand-glyph {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-accent), var(--c-primary));
  color: var(--c-dark);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 18px rgba(0,255,65,0.4);
  animation: breathe-brand 4s ease-in-out infinite;
}

/* 搜索框 */
.nav-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--c-dark-border);
  flex-shrink: 0;
}

.nav-search {
  flex: 1;
  background: rgba(153,255,204,0.06);
  border: 1px solid var(--c-dark-border);
  border-radius: var(--radius-sm);
  color: var(--c-text);
  font-family: var(--font-main);
  font-size: 0.82rem;
  padding: 8px 10px;
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  min-width: 0;
}

.nav-search::placeholder { color: var(--c-text-dim); }
.nav-search:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 2px rgba(0,255,65,0.18);
}

.nav-search-btn {
  background: rgba(0,255,65,0.12);
  border: 1px solid var(--c-dark-border);
  border-radius: 8px;
  color: var(--c-primary);
  cursor: pointer;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition-base), color var(--transition-base);
  min-width: 40px;
  min-height: 40px;
}

.nav-search-btn:hover {
  background: rgba(0,255,65,0.28);
  color: var(--c-accent);
}

/* 菜单 */
.nav-menu {
  list-style: none;
  padding: 10px 0;
  flex: 1;
}

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

.nav-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  color: var(--c-text-dim);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color var(--transition-base), background var(--transition-base);
  border-radius: 0;
  position: relative;
  min-height: 44px;
}

.nav-menu li a::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--c-accent);
  border-radius: 0 2px 2px 0;
  transform: scaleY(0);
  transition: transform var(--transition-base);
}

.nav-menu li a:hover,
.nav-menu li a:focus-visible {
  color: var(--c-primary);
  background: rgba(153,255,204,0.06);
}

.nav-menu li a:hover::before { transform: scaleY(1); }

.nav-menu li a svg {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--transition-base);
}

.nav-menu li a:hover svg { opacity: 1; }

/* =============================================
   Hero 区
   ============================================= */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 60px 64px 60px 56px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 80% at 70% 50%, rgba(0,255,65,0.06) 0%, transparent 65%),
              radial-gradient(ellipse 60% 60% at 30% 30%, rgba(153,255,204,0.04) 0%, transparent 60%),
              var(--c-dark);
}

.hero-text {
  z-index: 2;
  position: relative;
}

.hero-h1 {
  font-family: var(--font-main);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-text-bright);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-h1 em {
  font-style: normal;
  color: var(--c-accent);
}

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  color: var(--c-text-dim);
  max-width: 460px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--c-accent), var(--c-primary));
  color: var(--c-dark);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  box-shadow: 0 0 24px rgba(0,255,65,0.3);
  min-height: 48px;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(0,255,65,0.5);
}

/* Hero 视觉 */
.hero-visual {
  position: relative;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual svg.bio-grid {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.bio-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  animation: orb-breathe 6s ease-in-out infinite;
}

.orb-1 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0,255,65,0.22) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 0s;
}

.orb-2 {
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(153,255,204,0.18) 0%, transparent 70%);
  top: 20%; left: 60%;
  animation-delay: 2s;
  animation-duration: 5s;
}

.orb-3 {
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(0,255,65,0.28) 0%, transparent 70%);
  bottom: 20%; left: 30%;
  animation-delay: 1s;
  animation-duration: 4s;
}

@keyframes orb-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.orb-2 { animation: orb-breathe-2 5s ease-in-out infinite 2s; }
.orb-3 { animation: orb-breathe-3 4s ease-in-out infinite 1s; }

@keyframes orb-breathe-2 {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
}

@keyframes orb-breathe-3 {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 0.9; }
}

@keyframes breathe-brand {
  0%, 100% { box-shadow: 0 0 18px rgba(0,255,65,0.4); }
  50% { box-shadow: 0 0 32px rgba(0,255,65,0.7), 0 0 60px rgba(153,255,204,0.3); }
}

/* =============================================
   主内容 main > section > div
   ============================================= */
.main-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 0;
  min-height: 60vh;
  background: var(--c-dark);
}

/* aside 在内容左侧 */
.content-aside {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  padding: 40px 20px 40px 32px;
  border-right: 1px solid var(--c-dark-border);
  min-height: 60vh;
}

.content-aside small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--c-accent);
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 600;
}

.aside-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aside-nav li a {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  color: var(--c-text-dim);
  text-decoration: none;
  font-size: 0.84rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-base), background var(--transition-base);
  min-height: 40px;
}

.aside-nav li a:hover {
  color: var(--c-primary);
  background: rgba(153,255,204,0.07);
}

.content-article {
  flex: 1;
  min-width: 0;
  padding: 56px 56px 72px;
}

.content-section {
  width: 100%;
}

/* =============================================
   正文内容区（page.content 内部样式）
   ============================================= */
.content-section h2,
.content-article h2 {
  font-family: var(--font-main);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--c-text-bright);
  margin: 2.5em 0 0.7em;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.content-section h3,
.content-article h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--c-primary);
  margin: 2em 0 0.6em;
}

.content-section h4,
.content-article h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 1.5em 0 0.5em;
}

.content-section p,
.content-article p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-text);
  margin-bottom: 1.2em;
}

.content-section ul,
.content-section ol,
.content-article ul,
.content-article ol {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
  color: var(--c-text);
}

.content-section li,
.content-article li {
  margin-bottom: 0.5em;
  line-height: 1.7;
}

.content-section a,
.content-article a {
  color: var(--c-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-base);
}

.content-section a:hover,
.content-article a:hover {
  color: var(--c-accent);
}

.content-section strong,
.content-article strong {
  color: var(--c-text-bright);
  font-weight: 600;
}

.content-section div {
  scroll-margin-top: var(--scroll-offset);
  padding: 48px 0;
  border-bottom: 1px solid var(--c-dark-border);
}

.content-section div:last-child {
  border-bottom: none;
}

/* 液态光晕分割线 */
.content-section div + div::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-accent), var(--c-primary), transparent);
  margin-bottom: 48px;
  opacity: 0.4;
}

/* 卡片 */
.content-section .card,
.content-article .card {
  background: var(--c-dark-card);
  border-radius: var(--radius-card);
  padding: 28px;
  margin-bottom: 20px;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  border: 1px solid var(--c-dark-border);
}

.content-section .card:hover,
.content-article .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,255,65,0.12);
}

/* =============================================
   小眉题 small 紧邻 h2/h3
   ============================================= */
small + h2,
small + h3 {
  margin-top: 0.3em;
}

.content-section small,
.content-article small,
.footer-nav-section small,
.footer-info-section small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--c-accent);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}

/* =============================================
   页脚：footer > div×n + article.footer-bottom
   ============================================= */
.site-footer {
  background: rgba(0,10,28,0.98);
  border-top: 1px solid var(--c-dark-border);
  padding: 64px 56px 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0 40px;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-accent), var(--c-primary), transparent);
  opacity: 0.5;
}

.footer-brand-section {
  grid-column: 1 / 2;
  padding-bottom: 40px;
}

.footer-mega-brand {
  font-family: var(--font-main);
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: transparent;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 60%, rgba(153,255,204,0.4) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  line-height: 1;
  margin-bottom: 14px;
  user-select: none;
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--c-text-dim);
  line-height: 1.6;
  max-width: 260px;
}

.footer-nav-section,
.footer-info-section {
  padding-bottom: 40px;
}

.footer-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 16px;
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav-list li a {
  color: var(--c-text-dim);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color var(--transition-base);
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0;
}

.footer-nav-list li a:hover { color: var(--c-primary); }

.footer-info-text {
  font-size: 0.84rem;
  color: var(--c-text-dim);
  line-height: 1.65;
}

.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid var(--c-dark-border);
  padding: 20px 0;
  font-size: 0.8rem;
  color: var(--c-text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =============================================
   Stagger 动效（纯 CSS + JS 配合）
   ============================================= */
.nav-menu li {
  opacity: 0;
  transform: translateX(-12px);
  animation: stagger-in 0.4s ease forwards;
}

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

@keyframes stagger-in {
  to { opacity: 1; transform: translateX(0); }
}

/* div 内容渐入 */
.content-section div {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.content-section div.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   Scroll margin（固定导航偏移）
   ============================================= */
div[id] {
  scroll-margin-top: var(--scroll-offset);
}

/* =============================================
   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; }
}

/* =============================================
   响应式断点
   ============================================= */

/* 平板 */
@media (max-width: 1024px) {
  :root { --nav-w: 180px; }

  .hero {
    padding: 60px 40px;
  }

  .site-footer {
    padding: 48px 40px 0;
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand-section {
    grid-column: 1 / -1;
  }

  .content-article {
    padding: 40px 40px 56px;
  }

  .content-aside {
    width: 180px;
    padding: 32px 14px 32px 20px;
  }
}

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

  .content-shell {
    margin-left: 0;
  }

  /* 导航变顶部抽屉 */
  .sidenav {
    width: 100%;
    height: auto;
    position: fixed;
    top: 0; left: 0; right: 0;
    flex-direction: row;
    z-index: 200;
    border-right: none;
    border-bottom: 1px solid var(--c-dark-border);
    overflow: visible;
  }

  .nav-details {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    height: auto;
  }

  .nav-brand {
    padding: 8px 16px;
    border-bottom: none;
    border-right: 1px solid var(--c-dark-border);
    min-height: 56px;
  }

  .nav-search-wrap {
    flex: 1;
    border-bottom: none;
    border-right: 1px solid var(--c-dark-border);
    padding: 8px 12px;
  }

  .nav-search-btn {
    min-width: 40px;
    min-height: 40px;
    padding: 10px;
  }

  /* 折叠菜单 */
  .nav-details[open] .nav-menu,
  .nav-details:not([open]) .nav-menu {
    display: none;
  }

  .nav-details[open] .nav-menu {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
    width: 100%;
    background: rgba(0,22,50,0.99);
    border-top: 1px solid var(--c-dark-border);
    padding: 8px 0;
  }

  .nav-menu li a {
    padding: 10px 14px;
    font-size: 0.82rem;
    min-height: 44px;
  }

  /* Hero 单列 */
  .hero {
    grid-template-columns: 1fr;
    padding: 100px 24px 48px;
    min-height: 100svh;
    text-align: left;
  }

  .hero-visual {
    display: none;
  }

  .hero-h1 {
    font-size: clamp(1.8rem, 8vw, 2.8rem);
  }

  /* 主内容 */
  .main-wrap {
    flex-direction: column;
  }

  .content-aside {
    width: 100%;
    position: static;
    padding: 24px 24px 16px;
    border-right: none;
    border-bottom: 1px solid var(--c-dark-border);
    min-height: auto;
  }

  .aside-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .aside-nav li a {
    padding: 10px 14px;
    background: rgba(153,255,204,0.06);
    border-radius: 20px;
    font-size: 0.8rem;
    min-height: 40px;
  }

  .content-article {
    padding: 32px 24px 48px;
  }

  /* 页脚 */
  .site-footer {
    grid-template-columns: 1fr;
    padding: 40px 24px 0;
    gap: 0;
  }

  .footer-brand-section,
  .footer-nav-section,
  .footer-info-section {
    padding-bottom: 32px;
    border-bottom: 1px solid var(--c-dark-border);
    margin-bottom: 8px;
  }

  .footer-mega-brand {
    font-size: clamp(2rem, 12vw, 3.5rem);
  }

  .footer-nav-list li a {
    min-height: 44px;
    padding: 6px 0;
  }
}

/* 小屏微调 */
@media (max-width: 375px) {
  .hero-h1 { font-size: 1.7rem; }
  .hero-cta { padding: 12px 24px; font-size: 0.95rem; }
  .content-article { padding: 24px 16px 40px; }
  .site-footer { padding: 32px 16px 0; }
}
