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

/* ===== CSS 自定义属性 ===== */
:root {
  --c-primary: #99ffcc;
  --c-accent: #00ff41;
  --c-dark: #001e3c;
  --c-dark-80: rgba(0,30,60,0.82);
  --c-dark-60: rgba(0,30,60,0.6);
  --c-dark-20: rgba(0,30,60,0.2);
  --c-text: #e8fff4;
  --c-text-muted: #8bbfa8;
  --c-border: rgba(153,255,204,0.22);
  --c-card-bg: rgba(0,30,60,0.55);
  --radius: 18px;
  --radius-sm: 10px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --header-h: 64px;
  --sticky-h: 44px;
  --transition: 0.32s cubic-bezier(0.4,0,0.2,1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sticky-h) + 12px);
  font-size: 18px;
  background: var(--c-dark);
  color: var(--c-text);
}

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

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

a { color: var(--c-primary); text-decoration: none; transition: color var(--transition); }
a:hover, a:focus-visible { color: var(--c-accent); }
a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; border-radius: 4px; }

h1,h2,h3,h4,h5,h6 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--c-primary);
}

p { margin-bottom: 1em; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.3em; }

hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 1rem 0;
}

/* ===== 全站包裹 ===== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== 顶部导航 ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 200;
  background: rgba(0,30,60,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-border);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--c-primary);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  min-height: 40px;
}
.brand-link:hover { color: var(--c-accent); }

.brand-logo-img { width: 36px; height: 36px; border-radius: 8px; object-fit: contain; }
.brand-name { letter-spacing: 0.02em; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.nav-link {
  color: var(--c-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-link:hover, .nav-link:focus-visible {
  color: var(--c-accent);
  background: rgba(0,255,65,0.08);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  cursor: pointer;
  padding: 0.5rem;
  flex-shrink: 0;
}
.toggle-bar {
  width: 20px;
  height: 2px;
  background: var(--c-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ===== 粘性锚点条 ===== */
.sticky-anchors {
  position: sticky;
  top: var(--header-h);
  z-index: 150;
  height: var(--sticky-h);
  background: rgba(0,20,46,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-border);
  overflow-x: auto;
  scrollbar-width: none;
}
.sticky-anchors::-webkit-scrollbar { display: none; }

.sticky-anchors-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 0;
  padding: 0 1rem;
  max-width: 1280px;
  margin: 0 auto;
}

.anchor-link {
  color: var(--c-text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0 0.75rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--c-border);
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}
.anchor-link:first-child { border-left: 1px solid var(--c-border); }
.anchor-link:hover, .anchor-link:focus-visible {
  color: var(--c-accent);
  background: rgba(0,255,65,0.07);
}

/* ===== Hero ===== */
.hero-section {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-top: calc(var(--header-h) + var(--sticky-h));
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-media--gradient {
  background: linear-gradient(135deg, #001e3c 0%, #00381a 50%, #001e3c 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(0,30,60,0.45) 0%,
    rgba(0,255,65,0.12) 40%,
    rgba(153,255,204,0.18) 70%,
    rgba(0,30,60,0.72) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3.5rem;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.hero-badge {
  display: inline-block;
  background: rgba(0,255,65,0.15);
  border: 1px solid var(--c-accent);
  color: var(--c-accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 0.3em 0.9em;
  border-radius: 999px;
  margin-bottom: 1rem;
  backdrop-filter: blur(6px);
}

.hero-h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1.15;
  max-width: 700px;
  margin-bottom: 1rem;
  text-shadow: 0 2px 24px rgba(0,30,60,0.7);
}

.hero-desc {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--c-text);
  max-width: 520px;
  margin-bottom: 0;
  opacity: 0.9;
  line-height: 1.7;
}

/* 有机气泡装饰 */
.hero-orbs {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.18;
  animation: orb-breathe 8s ease-in-out infinite;
}
.orb-1 {
  width: 380px; height: 320px;
  background: radial-gradient(ellipse, #00ff41 0%, transparent 70%);
  top: -60px; left: 5%;
  animation-duration: 9s;
}
.orb-2 {
  width: 260px; height: 300px;
  background: radial-gradient(ellipse, #99ffcc 0%, transparent 70%);
  bottom: 20px; right: 8%;
  animation-duration: 7s;
  animation-delay: -3s;
}
.orb-3 {
  width: 200px; height: 200px;
  background: radial-gradient(ellipse, #00ff41 0%, transparent 70%);
  top: 40%; left: 40%;
  animation-duration: 11s;
  animation-delay: -5s;
}

@keyframes orb-breathe {
  0%, 100% { transform: scale(1) translateY(0); opacity: 0.18; }
  50% { transform: scale(1.18) translateY(-12px); opacity: 0.28; }
}

/* ===== 主内容区 ===== */
.site-main {
  flex: 1;
  padding: 2.5rem 0 3rem;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== 内容区：两栏（aside 左 + section 右） ===== */
.content-section {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
}

/* ===== aside ===== */
.content-aside {
  position: sticky;
  top: calc(var(--header-h) + var(--sticky-h) + 16px);
}

.aside-inner {
  background: var(--c-card-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem;
  backdrop-filter: blur(8px);
  overflow: hidden;
  position: relative;
}

.aside-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-primary);
  margin-bottom: 0.5rem;
}

.aside-list {
  list-style: none;
  padding: 0;
  margin-top: 0.75rem;
}
.aside-list li { margin-bottom: 0; }

.aside-link {
  display: block;
  color: var(--c-text-muted);
  font-size: 0.82rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: color var(--transition), background var(--transition);
  border-left: 2px solid transparent;
}
.aside-link:hover, .aside-link:focus-visible {
  color: var(--c-accent);
  background: rgba(0,255,65,0.08);
  border-left-color: var(--c-accent);
}

.aside-deco {
  position: absolute;
  bottom: -20px;
  right: -20px;
  opacity: 0.5;
  pointer-events: none;
}

/* ===== section / page.content 区 ===== */
.content-article {
  min-width: 0;
}

/* 正文内 article（由 page.content 提供） */
.content-article article {
  margin-bottom: 3.5rem;
  scroll-margin-top: calc(var(--header-h) + var(--sticky-h) + 16px);
}

.content-article h2 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--c-primary);
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.content-article h2 + hr {
  border-color: rgba(0,255,65,0.3);
  margin-bottom: 1.2rem;
}

.content-article h3 {
  font-size: 1.15rem;
  color: var(--c-text);
  margin: 1.4rem 0 0.6rem;
  font-weight: 600;
}

.content-article h3 + hr {
  border-color: var(--c-border);
  margin-bottom: 0.8rem;
}

.content-article p {
  color: var(--c-text);
  font-size: 1rem;
  line-height: 1.8;
}

.content-article ul, .content-article ol {
  color: var(--c-text);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1em;
}

.content-article a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.content-article a:hover { color: var(--c-primary); }

/* 卡片：描边无阴影，18px 圆角 */
.content-article .card,
.content-article section,
.content-article .entry {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  background: var(--c-card-bg);
  backdrop-filter: blur(6px);
  margin-bottom: 1rem;
  transition: border-color var(--transition);
}
.content-article .card:hover,
.content-article section:hover,
.content-article .entry:hover {
  border-color: rgba(0,255,65,0.45);
}

/* table */
.content-article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  font-size: 0.92rem;
}
.content-article th, .content-article td {
  padding: 0.65rem 1rem;
  border: 1px solid var(--c-border);
  text-align: left;
}
.content-article th {
  background: rgba(153,255,204,0.08);
  color: var(--c-primary);
  font-weight: 600;
}

/* blockquote */
.content-article blockquote {
  border-left: 3px solid var(--c-accent);
  padding: 0.75rem 1.25rem;
  margin: 1.2em 0;
  background: rgba(0,255,65,0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--c-text-muted);
  font-style: italic;
}

/* ===== 页脚 ===== */
.site-footer {
  background: rgba(0,10,28,0.97);
  border-top: 1px solid var(--c-border);
  padding: 0;
}

/* footer > article 1: 联系 */
.footer-contact {
  padding: 2.5rem 1.5rem 2rem;
  border-bottom: 1px solid var(--c-border);
}
.footer-contact-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.footer-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-primary);
  margin-bottom: 0.5rem;
}
.footer-contact-text {
  font-size: 0.88rem;
  color: var(--c-text-muted);
  margin-bottom: 0;
}
.footer-email {
  color: var(--c-accent);
  margin-left: 0.3em;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* footer > article 2: 导航 */
.footer-nav-section {
  padding: 1.5rem 1.5rem;
  border-bottom: 1px solid var(--c-border);
}
.footer-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.footer-nav-dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0;
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav-dl dt,
.footer-nav-dl dd {
  margin: 0;
}
.footer-nav-dl dt a,
.footer-nav-dl dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.35rem 0.85rem;
  color: var(--c-text-muted);
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.footer-nav-dl dt a {
  color: var(--c-primary);
  font-weight: 600;
}
.footer-nav-dl dt a:hover,
.footer-nav-dl dd a:hover,
.footer-nav-dl dt a:focus-visible,
.footer-nav-dl dd a:focus-visible {
  color: var(--c-accent);
  border-color: var(--c-border);
  background: rgba(0,255,65,0.06);
}

/* footer > article 3: 底栏版权 */
.footer-bottom {
  padding: 1.4rem 1.5rem;
  text-align: center;
}
.footer-bottom-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.footer-copy {
  font-size: 0.8rem;
  color: var(--c-text-muted);
  margin-bottom: 0.4rem;
}
.footer-disclaimer {
  font-size: 0.75rem;
  color: rgba(139,191,168,0.55);
  margin-bottom: 0;
  line-height: 1.5;
}

/* ===== Scroll Reveal 动效 ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .content-section {
    grid-template-columns: 1fr;
  }
  .content-aside {
    position: static;
  }
  .aside-deco { display: none; }
}

@media (max-width: 700px) {
  html { font-size: 16px; }

  .main-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(0,18,40,0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--c-border);
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.25rem;
    z-index: 180;
  }
  .main-nav.open { display: flex; }
  .nav-link {
    width: 100%;
    font-size: 1rem;
    padding: 0.65rem 1rem;
    min-height: 48px;
  }

  .nav-toggle { display: flex; }

  .hero-section {
    height: 60vh;
    min-height: 340px;
  }
  .hero-content {
    text-align: left;
    align-items: flex-start;
    padding: 2rem 1.25rem 2.5rem;
  }
  .hero-desc { max-width: 100%; }

  .sticky-anchors-inner { padding: 0 0.5rem; }
  .anchor-link { padding: 0 0.55rem; font-size: 0.75rem; }

  .footer-nav-dl { flex-direction: column; gap: 0; }
  .footer-nav-dl dt a,
  .footer-nav-dl dd a {
    width: 100%;
    min-height: 48px;
    padding: 0.5rem 1rem;
  }

  .wrap { padding: 0 1rem; }
  .content-section { gap: 1.5rem; }
  .footer-contact,
  .footer-nav-section,
  .footer-bottom { padding-left: 1rem; padding-right: 1rem; }
}

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

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