/* =========================================================
   NIU · WebGIS 个人品牌主页 — 设计系统
   Style: Dark Spatial Tech / Editorial HUD
   ========================================================= */
:root {
  /* 色彩：深空底 + 科技强调色 */
  --bg: #04060c;
  --bg-2: #070b15;
  --surface: rgba(255, 255, 255, 0.028);
  --surface-2: rgba(255, 255, 255, 0.055);
  --line: rgba(140, 180, 225, 0.11);
  --line-2: rgba(140, 180, 225, 0.22);

  --ink: #eef3fb;          /* 主文本 ≈ 15:1 */
  --ink-soft: #aab6c9;     /* 次要文本 ≈ 8:1 */
  --ink-dim: #8b95a8;      /* 辅助文本 ≈ 6:1 */

  --cy: #5fe9dc;           /* 主强调：空间青 */
  --blu: #4c8dff;          /* 次强调：数据蓝 */
  --grn: #7ef0b2;          /* 端点绿 */

  /* 尺寸 / 节奏（4-8 基准） */
  --max: 1180px;
  --nav-h: 58px;
  --ui-h: 52px;
  --radius: 14px;
  --radius-lg: 20px;

  /* 动效（150–300ms，ease-out） */
  --dur-fast: 160ms;
  --dur: 240ms;
  --dur-slow: 420ms;
  --ease: cubic-bezier(0.16, 0.84, 0.44, 1);

  /* 层级阴影 */
  --sh-1: 0 2px 10px -4px rgba(0, 0, 0, 0.7);
  --sh-2: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
  --glow-cy: 0 0 0 1px rgba(95, 233, 220, 0.35), 0 12px 40px -18px rgba(95, 233, 220, 0.35);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-num: "SFMono-Regular", ui-monospace, "JetBrains Mono", Consolas, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(90% 70% at 12% 0%, rgba(76, 141, 255, 0.10), transparent 60%),
    radial-gradient(80% 70% at 92% 100%, rgba(95, 233, 220, 0.08), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.72;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.22; font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
canvas { display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

::selection { background: rgba(95, 233, 220, 0.3); color: #fff; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 28px; }

:focus-visible { outline: 2px solid var(--cy); outline-offset: 3px; border-radius: 6px; }

/* ---------- 滚动条：深色 HUD 风格（与页面同一套色板） ---------- */
html, body, .slide, .index-panel {
  scrollbar-width: thin;                                  /* Firefox */
  scrollbar-color: rgba(95, 233, 220, 0.34) transparent;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.slide::-webkit-scrollbar,
.index-panel::-webkit-scrollbar { width: 9px; height: 9px; background: transparent; }

::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-track {
  background: linear-gradient(90deg, rgba(140, 180, 225, 0.06), rgba(140, 180, 225, 0.02));
  border-left: 1px solid var(--line);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb {
  background-clip: padding-box;
  border: 2px solid transparent;
  border-radius: 999px;
  background-color: rgba(140, 180, 225, 0.26);
  transition: background-color var(--dur) var(--ease);
}
.slide:hover::-webkit-scrollbar-thumb,
.index-panel:hover::-webkit-scrollbar-thumb { background-color: rgba(140, 180, 225, 0.4); }
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(95, 233, 220, 0.62);
  box-shadow: 0 0 12px -2px rgba(95, 233, 220, 0.55);
}
::-webkit-scrollbar-thumb:active { background-color: rgba(95, 233, 220, 0.85); }
/* 键盘焦点可达，保证可访问性 */
.slide:focus-visible::-webkit-scrollbar-thumb,
.index-panel:focus-visible::-webkit-scrollbar-thumb { background-color: rgba(95, 233, 220, 0.62); }

/* ---------- 背景层 ---------- */
#bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.bg-veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(4, 6, 12, 0) 0%, rgba(4, 6, 12, 0.78) 72%),
    linear-gradient(180deg, rgba(4, 6, 12, 0.15) 0%, rgba(4, 6, 12, 0.55) 100%);
}
/* 细网格：坐标纸质感 */
.bg-grid {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(140, 180, 225, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(140, 180, 225, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(120% 90% at 50% 40%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 40%, #000 25%, transparent 78%);
}

.topbar, .deck, .deck-ui, .dots, .index-panel { position: relative; z-index: 5; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  height: var(--nav-h);
  backdrop-filter: blur(16px);
  background: linear-gradient(180deg, rgba(4, 6, 12, 0.85), rgba(4, 6, 12, 0.45));
  border-bottom: 1px solid var(--line);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(95, 233, 220, 0.45), rgba(76, 141, 255, 0.35), transparent);
}
.topbar-inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--cy);
  box-shadow: 0 0 0 4px rgba(95, 233, 220, 0.12), 0 0 18px rgba(95, 233, 220, 0.55);
}
.brand-text { font-size: 15px; font-weight: 600; display: flex; align-items: baseline; gap: 8px; }
.brand-text em { font-style: normal; font-family: var(--font-num); font-size: 10px; letter-spacing: 0.2em; color: var(--ink-dim); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.current-chapter {
  font-family: var(--font-num); font-size: 11px; letter-spacing: 0.18em;
  color: var(--cy); text-transform: uppercase;
}
.index-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 36px; padding: 0 14px; border-radius: 8px;
  font-size: 12px; letter-spacing: 0.08em; color: var(--ink-soft);
  border: 1px solid var(--line); background: var(--surface);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.index-btn:hover { color: #fff; border-color: var(--line-2); background: var(--surface-2); }
.index-btn:active { transform: scale(0.97); }
.index-ico { position: relative; width: 12px; height: 8px; }
.index-ico::before, .index-ico::after {
  content: ""; position: absolute; left: 0; width: 12px; height: 1px; background: currentColor; opacity: 0.85;
}
.index-ico::before { top: 1px; }
.index-ico::after { bottom: 1px; }

.index-panel {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 29;
  backdrop-filter: blur(18px);
  background: rgba(5, 8, 15, 0.92);
  border-bottom: 1px solid var(--line);
  padding: 20px 0 24px;
  max-height: calc(100svh - var(--nav-h) - var(--ui-h));
  overflow-y: auto;
}
.index-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.index-list button {
  width: 100%; min-height: 44px; text-align: left; display: flex; align-items: center; gap: 14px;
  padding: 8px 14px; border-radius: 10px; border: 1px solid transparent;
  color: var(--ink-soft); font-size: 14px;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.index-list button:hover { background: var(--surface-2); color: #fff; }
.index-list button.is-current { border-color: rgba(95, 233, 220, 0.4); color: var(--cy); background: rgba(95, 233, 220, 0.06); }
.index-list i { font-style: normal; font-family: var(--font-num); font-size: 11px; color: var(--ink-dim); }

/* ---------- Deck ---------- */
.deck { position: fixed; inset: 0; overflow: hidden; counter-reset: slide; }
.slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 28px) 0 calc(var(--ui-h) + 28px);
  overflow-y: auto;
  opacity: 0; visibility: hidden;
  transform: translate3d(72px, 0, 0);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease), visibility var(--dur-slow);
  overscroll-behavior: contain;
  counter-increment: slide;
}
.slide.is-prev { transform: translate3d(-72px, 0, 0); }
.slide.is-active { opacity: 1; visibility: visible; transform: none; }
/* 每屏右下巨型编号水印 */
.slide::after {
  content: counter(slide, decimal-leading-zero);
  position: absolute; right: 4%; bottom: 2%;
  font-family: var(--font-num); font-size: clamp(90px, 16vw, 220px); font-weight: 700;
  line-height: 1; color: transparent;
  -webkit-text-stroke: 1px rgba(140, 180, 225, 0.16);
  pointer-events: none; user-select: none;
}
.slide-accent::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(70% 100% at 15% 0%, rgba(76, 141, 255, 0.10), transparent 60%),
    radial-gradient(60% 100% at 90% 100%, rgba(95, 233, 220, 0.09), transparent 60%);
}

/* ---------- 通用排版 ---------- */
.section-head { position: relative; margin-bottom: 34px; padding-bottom: 18px; }
.section-head::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: linear-gradient(90deg, rgba(95, 233, 220, 0.4), rgba(140, 180, 225, 0.12) 45%, transparent);
}
.section-index {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-num); font-size: 11px; letter-spacing: 0.22em;
  color: var(--cy); margin-bottom: 12px;
}
.section-index::before { content: ""; width: 20px; height: 1px; background: var(--cy); }
.section-title { font-size: clamp(26px, 3.6vw, 42px); letter-spacing: -0.02em; }
.section-sub { margin: 10px 0 0; color: var(--ink-soft); max-width: 720px; font-size: 15px; }
.lead { color: var(--ink-soft); font-size: 16px; max-width: 760px; margin-top: 22px; }
.mono { font-family: var(--font-num); }

/* ---------- 按钮 ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 24px; border-radius: 999px;
  font-size: 14px; font-weight: 500; letter-spacing: 0.01em;
  border: 1px solid var(--line-2); overflow: hidden;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity var(--dur) var(--ease);
  background: radial-gradient(120% 140% at 50% 0%, rgba(95, 233, 220, 0.28), rgba(76, 141, 255, 0.14));
}
.btn > * { position: relative; z-index: 1; }
.btn:hover { transform: translateY(-1px); border-color: rgba(95, 233, 220, 0.6); box-shadow: 0 12px 34px -18px rgba(95, 233, 220, 0.5); }
.btn:active { transform: scale(0.975); }
.btn-primary { border-color: rgba(95, 233, 220, 0.4); color: #eafffd; }
.btn-primary::before { opacity: 1; }
.btn-primary:hover::before { opacity: 0.85; }
.btn-ghost { color: var(--ink-soft); background: var(--surface); }
.btn-ghost:hover { color: #fff; background: var(--surface-2); }

code { font-family: var(--font-num); font-size: 0.86em; padding: 2px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.06); color: var(--cy); }
.placeholder { color: var(--ink-dim); font-size: 13px; margin-top: 10px; }
.placeholder-tag {
  display: inline-block; font-family: var(--font-num); font-size: 11px; letter-spacing: 0.12em;
  color: var(--blu); border: 1px dashed rgba(76, 141, 255, 0.45); padding: 1px 8px; border-radius: 999px; margin-right: 8px;
}

.reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
/* 星系节点使用绝对定位 transform，入场动画只做透明度与缩放，避免覆盖定位 */
.starmap-nodes .cluster.reveal { transform: translate(-50%, -50%) translate(var(--x, 0), var(--y, 0)) scale(0.94); }
.starmap-nodes .cluster.reveal.is-in { opacity: 1; transform: translate(-50%, -50%) translate(var(--x, 0), var(--y, 0)) scale(1); }
.starmap-hub.reveal { transform: translate(-50%, -50%) scale(0.94); }
.starmap-hub.reveal.is-in { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ---------- 卡片基座（HUD 角标） ---------- */
.hud {
  position: relative;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  box-shadow: var(--sh-1);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.hud::before, .hud::after {
  content: ""; position: absolute; width: 12px; height: 12px; pointer-events: none;
  border-color: rgba(95, 233, 220, 0.45); opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.hud::before { top: -1px; left: -1px; border-top: 1px solid; border-left: 1px solid; border-top-left-radius: var(--radius); }
.hud::after { bottom: -1px; right: -1px; border-bottom: 1px solid; border-right: 1px solid; border-bottom-right-radius: var(--radius); }
.hud:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--sh-2), var(--glow-cy); }
.hud:hover::before, .hud:hover::after { opacity: 1; }

/* ---------- 01 Hero ---------- */
.hero-inner { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-num); font-size: 11px; letter-spacing: 0.18em;
  color: var(--ink-dim); margin-bottom: 24px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cy); box-shadow: 0 0 12px rgba(95, 233, 220, 0.9); }
.hero-name {
  font-size: clamp(56px, 11vw, 124px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.02;
  background: linear-gradient(180deg, #ffffff 10%, #9fb0cc 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-name-sub { margin: 6px 0 0; color: var(--ink-dim); font-size: 13px; letter-spacing: 0.22em; }
.hero-role { margin-top: 26px; font-size: clamp(20px, 2.8vw, 32px); font-weight: 500; color: var(--cy); letter-spacing: 0.01em; }
.hero-claim {
  margin-top: 14px; font-size: 17px; color: var(--ink-soft); max-width: 580px; line-height: 1.7;
  border-left: 2px solid rgba(95, 233, 220, 0.45); padding-left: 18px;
}
.hero-chips { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 0; }
.hero-chips li {
  position: relative; min-width: 132px; padding: 12px 16px 12px 18px; border-radius: 10px;
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  backdrop-filter: blur(6px);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.hero-chips li::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--cy), transparent);
}
.hero-chips li:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--sh-2); }
.hero-chips strong { display: block; font-family: var(--font-num); font-size: 24px; color: #fff; line-height: 1.15; font-variant-numeric: tabular-nums; }
.hero-chips span { display: block; font-size: 11px; letter-spacing: 0.12em; color: var(--ink-dim); text-transform: uppercase; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* ---------- 02 Numbers ---------- */
.stats {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  box-shadow: var(--sh-2);
}
.stat {
  padding: 30px 22px; border-right: 1px solid var(--line);
  border-top: 1px solid transparent; transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.stat:last-child { border-right: none; }
.stat:hover { background: linear-gradient(180deg, rgba(95, 233, 220, 0.08), transparent); border-top-color: rgba(95, 233, 220, 0.45); }
.stat-num {
  font-family: var(--font-num); font-size: clamp(28px, 3.4vw, 44px); color: #fff;
  letter-spacing: -0.03em; line-height: 1.08; font-variant-numeric: tabular-nums;
}
.stat-label { margin-top: 8px; font-size: 11px; letter-spacing: 0.16em; color: var(--cy); text-transform: uppercase; }
.stat-cn { font-size: 13px; color: var(--ink-dim); }
.stats-note { margin: 16px 0 0; font-size: 12px; color: var(--ink-dim); }

/* ---------- 03 About ---------- */
.tag-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tag-card { padding: 22px 20px; }
.tag-no { font-family: var(--font-num); font-size: 11px; color: var(--cy); letter-spacing: 0.2em; }
.tag-card h3 { margin: 10px 0 8px; font-size: 16px; }
.tag-card p { margin: 0; font-size: 13px; color: var(--ink-dim); line-height: 1.7; }
.story { position: relative; margin-top: 34px; max-width: 800px; padding-left: 26px; }
.story::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(180deg, var(--cy), rgba(76, 141, 255, 0.2), transparent); }
.story p { color: var(--ink-soft); font-size: 16.5px; margin-bottom: 10px; }
.story p:last-child { margin-bottom: 0; color: var(--ink); }

/* ---------- 04 Journey ---------- */
.journey { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 26px; }
.journey-item { position: relative; padding: 16px 24px 16px 0; border-top: 1px solid var(--line); transition: border-color var(--dur) var(--ease); }
.journey-item::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 0; height: 1px;
  background: linear-gradient(90deg, var(--cy), transparent); transition: width var(--dur-slow) var(--ease);
}
.journey-item:hover::before { width: 100%; }
.journey-node { position: absolute; top: -4px; right: 0; width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); }
.journey-item.is-future .journey-node { background: var(--cy); box-shadow: 0 0 0 4px rgba(95, 233, 220, 0.14), 0 0 16px rgba(95, 233, 220, 0.7); }
.journey-item h3 { font-size: 18px; }
.journey-item.is-future h3 { color: var(--cy); }
.journey-item p { margin: 6px 0 0; font-size: 13px; color: var(--ink-dim); line-height: 1.65; }

/* ---------- 05 Expertise：空间技术星系图 ---------- */
.starmap {
  position: relative;
  height: 600px;
  margin: 0 auto;
  max-width: 1040px;
}
.techmap-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }

/* 轨道环 */
.orbit {
  position: absolute; top: 50%; left: 50%; border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(140, 180, 225, 0.10);
  pointer-events: none;
}
.orbit-1 { width: 240px; height: 240px; }
.orbit-2 { width: 460px; height: 460px; border-style: dashed; border-color: rgba(140, 180, 225, 0.14); animation: orbitSpin 120s linear infinite; }
.orbit-3 { width: 680px; height: 680px; border-style: dashed; border-color: rgba(95, 233, 220, 0.12); animation: orbitSpin 200s linear infinite reverse; }
@keyframes orbitSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* 中心核 */
.starmap-hub {
  position: absolute; top: 50%; left: 50%; z-index: 3;
  transform: translate(-50%, -50%);
  width: 186px; height: 186px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1px solid rgba(95, 233, 220, 0.45);
  background:
    radial-gradient(120% 120% at 50% 15%, rgba(95, 233, 220, 0.22), rgba(76, 141, 255, 0.10) 55%, rgba(4, 6, 12, 0.9));
  box-shadow: 0 0 60px -12px rgba(95, 233, 220, 0.55), inset 0 0 40px -10px rgba(95, 233, 220, 0.35);
  animation: hubPulse 5s var(--ease) infinite;
}
.hub-core {
  position: absolute; inset: -18px; border-radius: 50%;
  border: 1px solid rgba(95, 233, 220, 0.18);
  animation: hubRing 5s var(--ease) infinite;
}
@keyframes hubPulse {
  0%, 100% { box-shadow: 0 0 50px -14px rgba(95, 233, 220, 0.45), inset 0 0 40px -10px rgba(95, 233, 220, 0.3); }
  50% { box-shadow: 0 0 76px -10px rgba(95, 233, 220, 0.75), inset 0 0 46px -8px rgba(95, 233, 220, 0.45); }
}
@keyframes hubRing {
  0% { transform: scale(0.94); opacity: 0.9; }
  50% { transform: scale(1.04); opacity: 0.35; }
  100% { transform: scale(0.94); opacity: 0.9; }
}
.starmap-hub h3 { font-size: 26px; color: #fff; letter-spacing: 0.02em; }
.starmap-hub p { margin: 0; font-family: var(--font-num); font-size: 10px; color: var(--cy); letter-spacing: 0.24em; text-transform: uppercase; }

/* 卫星节点（五边形分布） */
.starmap-nodes { position: absolute; inset: 0; z-index: 2; }
.starmap-nodes .cluster {
  position: absolute; top: 50%; left: 50%;
  width: 212px; padding: 14px 16px 12px;
  transform: translate(-50%, -50%) translate(var(--x, 0), var(--y, 0));
  transform-style: preserve-3d;
}
.starmap-nodes .cluster:nth-child(1) { --x: 0px; --y: -238px; }
.starmap-nodes .cluster:nth-child(2) { --x: 226px; --y: -74px; }
.starmap-nodes .cluster:nth-child(3) { --x: 140px; --y: 192px; }
.starmap-nodes .cluster:nth-child(4) { --x: -140px; --y: 192px; }
.starmap-nodes .cluster:nth-child(5) { --x: -226px; --y: -74px; }
.cluster-no {
  position: absolute; top: 10px; right: 12px;
  font-family: var(--font-num); font-size: 10px; letter-spacing: 0.16em; color: rgba(140, 180, 225, 0.5);
}
.cluster h4 {
  font-family: var(--font-num); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--blu);
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.cluster ul { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.cluster li {
  font-size: 12px; color: var(--ink-soft); padding: 4px 10px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line);
}

/* ---------- 08 Knowledge Base ---------- */
.kb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.kb-card {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 20px 20px 16px; border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  box-shadow: var(--sh-1);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.kb-card::after {
  content: ""; position: absolute; left: 20px; right: 20px; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cy), transparent);
  opacity: 0; transition: opacity var(--dur) var(--ease);
}
.kb-card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--sh-2), var(--glow-cy); }
.kb-card:hover::after { opacity: 0.7; }
.kb-no {
  font-family: var(--font-num); font-size: 10px; letter-spacing: 0.2em;
  color: rgba(140, 180, 225, 0.55);
}
.kb-tag {
  align-self: flex-start; margin-top: 2px;
  font-family: var(--font-num); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cy); padding: 2px 8px; border-radius: 999px;
  border: 1px solid rgba(95, 233, 220, 0.3); background: rgba(95, 233, 220, 0.07);
}
.kb-tag.is-cook { color: var(--grn); border-color: rgba(126, 240, 178, 0.35); background: rgba(126, 240, 178, 0.07); }
.kb-card h3 { margin-top: 6px; font-size: 19px; letter-spacing: 0.01em; }
.kb-card p { margin: 0 0 10px; font-size: 13px; color: var(--ink-dim); line-height: 1.65; }
.kb-card a {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border-radius: 8px; font-size: 12.5px; color: var(--ink-soft);
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.kb-card a:hover { color: #fff; border-color: rgba(95, 233, 220, 0.5); background: rgba(95, 233, 220, 0.08); }
.kb-card a:active { transform: scale(0.97); }
.kb-note { margin: 22px 0 0; font-size: 13px; color: var(--ink-dim); }
.kb-note a { color: var(--cy); border-bottom: 1px solid rgba(95, 233, 220, 0.3); }

/* ---------- 06 Book ---------- */
.book-layout { display: grid; grid-template-columns: 300px 1fr; gap: 52px; align-items: center; }
.book-stage { position: relative; perspective: 1400px; }
.book {
  position: relative; width: 230px; margin: 0 auto;
  transform-style: preserve-3d; transform: rotateY(-16deg) rotateX(4deg);
  transition: transform var(--dur-slow) var(--ease);
}
.book:hover { transform: rotateY(-6deg) rotateX(2deg) translateY(-8px) scale(1.035); }
.book-face {
  position: relative; border-radius: 4px 10px 10px 4px; overflow: hidden;
  box-shadow: 0 40px 70px -26px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 60px -20px rgba(95, 233, 220, 0.35);
  background: #0b1020; aspect-ratio: 3 / 4;
}
.book-face img { width: 100%; height: 100%; object-fit: cover; }
.book-fallback { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--ink-dim); font-size: 13px; text-align: center; padding: 20px; }
.book-spine {
  position: absolute; top: 0; left: 0; width: 18px; height: 100%;
  transform: translateX(-18px) rotateY(-90deg); transform-origin: right center;
  background: linear-gradient(90deg, #0a0f1d, #17213c); border-radius: 3px 0 0 3px;
}
.book-shine {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0) 64%, rgba(255, 255, 255, 0.1) 100%);
}
.book-stage::after {
  content: ""; position: absolute; left: 50%; bottom: -14px; width: 190px; height: 22px;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.5), transparent 70%);
  filter: blur(6px);
}
.book-title { font-size: clamp(22px, 2.8vw, 32px); }
.book-meta { margin: 6px 0; color: var(--ink-dim); font-size: 14px; }
.book-quote {
  margin: 20px 0; padding: 14px 18px; border-left: 2px solid var(--cy);
  color: var(--ink); font-size: 16.5px; background: linear-gradient(90deg, rgba(95, 233, 220, 0.08), transparent);
}
.book-desc { color: var(--ink-soft); max-width: 640px; }
.btn-buy { margin-top: 10px; }

/* ---------- 07 Writing ---------- */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.flow-step {
  font-size: 14px; padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  color: var(--ink-soft);
}
.flow-step.is-end { border-color: rgba(95, 233, 220, 0.45); color: var(--cy); box-shadow: 0 0 24px -10px rgba(95, 233, 220, 0.6); }
.flow-arrow { width: 28px; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); position: relative; }
.flow-arrow::after {
  content: ""; position: absolute; right: 0; top: -2px; width: 5px; height: 5px;
  border-top: 1px solid var(--line-2); border-right: 1px solid var(--line-2); transform: rotate(45deg);
}
.topics { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.topics li {
  font-size: 12.5px; color: var(--ink-soft); padding: 5px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.topics li:hover { color: #fff; border-color: rgba(95, 233, 220, 0.45); transform: translateY(-2px); }
.archive {
  position: relative; margin-top: 28px; padding: 20px 22px;
  border: 1px dashed var(--line-2); border-radius: var(--radius); background: rgba(255, 255, 255, 0.015);
}
.archive h3 { font-size: 14px; letter-spacing: 0.12em; color: var(--ink); text-transform: uppercase; font-family: var(--font-num); }
.archive p { margin: 8px 0 0; font-size: 13px; color: var(--ink-dim); }
.archive a { color: var(--cy); border-bottom: 1px solid rgba(95, 233, 220, 0.3); }

/* ---------- 08 Philosophy ---------- */
.philosophy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.philosophy li { padding: 20px; }
.philosophy h3 { font-size: 17px; margin-bottom: 6px; }
.philosophy p { margin: 0; font-size: 13px; color: var(--ink-dim); }

/* ---------- 09 Agentic ---------- */
.chain {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px;
  padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  box-shadow: var(--sh-1);
}
.chain-node {
  font-family: var(--font-num); font-size: 13px; color: var(--ink-soft);
  padding: 8px 15px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04);
}
.chain-node.is-key {
  color: #04231f; background: linear-gradient(120deg, var(--cy), #7ff0e4);
  border-color: transparent; font-weight: 600; box-shadow: 0 0 28px -8px rgba(95, 233, 220, 0.8);
}
.chain-node.is-end { color: var(--grn); border-color: rgba(126, 240, 178, 0.45); }
.chain-arrow { color: var(--ink-dim); font-size: 14px; }
.chain-formula { margin: 22px 0 0; font-family: var(--font-num); font-size: clamp(15px, 2vw, 20px); color: #fff; letter-spacing: 0.02em; }

/* ---------- 10 Spatial ---------- */
.card-grid { display: grid; gap: 14px; }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.mini-card { padding: 18px; }
.mini-card h3 { font-size: 15px; margin-bottom: 5px; }
.mini-card p { margin: 0; font-size: 12.5px; color: var(--ink-dim); line-height: 1.65; }
.closing {
  position: relative; margin: 32px 0 0; text-align: center; font-size: clamp(17px, 2.2vw, 24px); color: var(--ink);
  border-top: 1px solid var(--line); padding-top: 28px;
}
.closing::before {
  content: ""; position: absolute; top: -1px; left: 50%; transform: translateX(-50%); width: 120px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cy), transparent);
}
.closing-end { border-top: none; padding-top: 0; }

/* ---------- 11 Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.contact-row {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.contact-row:hover { border-color: var(--line-2); box-shadow: var(--sh-2), 0 0 0 1px rgba(95, 233, 220, 0.12); transform: translateY(-2px); }
.c-icon {
  flex: 0 0 42px; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; color: var(--cy);
  border: 1px solid rgba(95, 233, 220, 0.22); background: rgba(95, 233, 220, 0.07);
}
.c-text { display: flex; flex-direction: column; min-width: 0; }
.c-text em { font-style: normal; font-family: var(--font-num); font-size: 10.5px; letter-spacing: 0.2em; color: var(--ink-dim); text-transform: uppercase; }
.c-text b { font-weight: 500; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.c-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.c-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border-radius: 8px; font-size: 12px; color: var(--ink-soft);
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.c-chip:hover { color: #fff; border-color: rgba(95, 233, 220, 0.5); background: rgba(95, 233, 220, 0.08); }
.c-chip:active { transform: scale(0.97); }
.c-chip.is-copied { color: var(--grn); border-color: rgba(126, 240, 178, 0.5); }

/* ---------- Deck UI ---------- */
.deck-ui {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  backdrop-filter: blur(16px);
  background: linear-gradient(0deg, rgba(4, 6, 12, 0.9), rgba(4, 6, 12, 0.45));
  border-top: 1px solid var(--line);
}
.progress { position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: var(--line); }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cy), var(--blu)); box-shadow: 0 0 12px rgba(95, 233, 220, 0.6); transition: width var(--dur-slow) var(--ease); }
.deck-bar { height: var(--ui-h); display: flex; align-items: center; gap: 12px; }
.deck-tag {
  font-family: var(--font-num); font-size: 11px; letter-spacing: 0.2em; color: var(--ink-dim);
  text-transform: uppercase; padding-left: 4px;
}
.nav-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--line); color: var(--ink-soft); background: var(--surface);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.nav-btn:hover { color: #fff; border-color: rgba(95, 233, 220, 0.55); background: rgba(95, 233, 220, 0.1); }
.nav-btn:active { transform: scale(0.94); }
.nav-btn[disabled] { opacity: 0.32; cursor: not-allowed; }
.nav-btn[disabled]:hover { border-color: var(--line); background: var(--surface); color: var(--ink-soft); }
.deck-bar .nav-btn:last-of-type { margin-left: auto; }

.dots { position: fixed; right: 24px; top: 50%; transform: translateY(-50%); z-index: 30; display: flex; flex-direction: column; gap: 12px; }
.dots button { display: flex; align-items: center; gap: 10px; flex-direction: row-reverse; min-height: 24px; }
.dots button span {
  width: 22px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.22);
  transition: all var(--dur) var(--ease);
}
.dots button:hover span { background: rgba(255, 255, 255, 0.5); width: 30px; }
.dots button em {
  font-style: normal; font-family: var(--font-num); font-size: 10px; letter-spacing: 0.16em; color: var(--ink-dim);
  text-transform: uppercase; opacity: 0; transform: translateX(6px);
  transition: all var(--dur) var(--ease); white-space: nowrap;
}
.dots button:hover em { opacity: 1; transform: none; }
.dots button.is-active span { width: 34px; background: var(--cy); box-shadow: 0 0 14px rgba(95, 233, 220, 0.8); }
.dots button.is-active em { opacity: 1; transform: none; color: var(--ink); }

/* ---------- 卡片类统一挂载 HUD 视觉 ---------- */
.tag-card, .cluster, .mini-card, .philosophy li, .contact-row, .archive { position: relative; }
.tag-card::before, .cluster::before, .mini-card::before, .philosophy li::before,
.tag-card::after, .cluster::after, .mini-card::after, .philosophy li::after {
  content: ""; position: absolute; width: 10px; height: 10px; pointer-events: none;
  border-color: rgba(95, 233, 220, 0.4); opacity: 0; transition: opacity var(--dur) var(--ease);
}
.tag-card::before, .cluster::before, .mini-card::before, .philosophy li::before {
  top: -1px; left: -1px; border-top: 1px solid; border-left: 1px solid; border-top-left-radius: var(--radius);
}
.tag-card::after, .cluster::after, .mini-card::after, .philosophy li::after {
  bottom: -1px; right: -1px; border-bottom: 1px solid; border-right: 1px solid; border-bottom-right-radius: var(--radius);
}
.tag-card:hover::before, .cluster:hover::before, .mini-card:hover::before, .philosophy li:hover::before,
.tag-card:hover::after, .cluster:hover::after, .mini-card:hover::after, .philosophy li:hover::after { opacity: 1; }
.tag-card, .cluster, .mini-card, .philosophy li {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.042), rgba(255, 255, 255, 0.012));
  box-shadow: var(--sh-1);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.tag-card:hover, .cluster:hover, .mini-card:hover, .philosophy li:hover {
  transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--sh-2), var(--glow-cy);
}
/* 星系节点：hover 抬升需保留径向定位 */
.starmap-nodes .cluster:hover {
  transform: translate(-50%, -50%) translate(var(--x, 0), var(--y, 0)) translateY(-4px);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
  .dots { right: 14px; }
  .dots button em { display: none; }
}
/* 星系图：中等屏缩小半径 */
@media (max-width: 1120px) and (min-width: 1001px) {
  .starmap { height: 540px; }
  .starmap-nodes .cluster { width: 186px; }
  .starmap-nodes .cluster:nth-child(1) { --x: 0px; --y: -206px; }
  .starmap-nodes .cluster:nth-child(2) { --x: 196px; --y: -64px; }
  .starmap-nodes .cluster:nth-child(3) { --x: 121px; --y: 167px; }
  .starmap-nodes .cluster:nth-child(4) { --x: -121px; --y: 167px; }
  .starmap-nodes .cluster:nth-child(5) { --x: -196px; --y: -64px; }
  .orbit-1 { width: 220px; height: 220px; }
  .orbit-2 { width: 400px; height: 400px; }
  .orbit-3 { width: 580px; height: 580px; }
}

/* 星系图：小屏退化为网格（保证可读与可用性） */
@media (max-width: 1000px) {
  .starmap { height: auto; }
  .orbit, .hub-core { display: none; }
  .starmap-hub {
    position: static; transform: none; width: auto; height: auto; border-radius: 999px;
    margin: 0 auto 22px; padding: 14px 32px; flex-direction: row; align-items: baseline; gap: 12px;
  }
  .starmap-hub.reveal, .starmap-hub.reveal.is-in { transform: none; }
  .starmap-nodes { position: static; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .starmap-nodes .cluster,
  .starmap-nodes .cluster.reveal,
  .starmap-nodes .cluster.reveal.is-in,
  .starmap-nodes .cluster:hover { position: static; width: auto; transform: none; }
}

@media (max-width: 1024px) {
  .wrap { padding: 0 22px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .tag-grid { grid-template-columns: repeat(2, 1fr); }
  .philosophy, .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .kb-grid { grid-template-columns: repeat(2, 1fr); }
  .book-layout { grid-template-columns: 240px 1fr; gap: 36px; }
  .index-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  body { font-size: 15px; }
  .wrap { padding: 0 18px; }
  .dots { display: none; }
  .slide { padding: calc(var(--nav-h) + 16px) 0 calc(var(--ui-h) + 16px); align-items: flex-start; }
  .slide::after { font-size: 96px; right: 6%; bottom: 1%; opacity: 0.7; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-right: none; border-bottom: 1px solid var(--line); padding: 20px 18px; }
  .tag-grid, .journey, .philosophy, .card-grid-3, .starmap-nodes, .kb-grid, .contact-grid { grid-template-columns: 1fr; }
  .index-list { grid-template-columns: 1fr; }
  .book-layout { grid-template-columns: 1fr; gap: 26px; }
  .book-stage { perspective: none; }
  .book { transform: none; width: 180px; }
  .book:hover { transform: translateY(-4px); }
  .story { padding-left: 18px; }
  .contact-row { flex-wrap: wrap; gap: 12px; }
  .c-actions { margin-left: 0; width: 100%; }
  .c-chip { min-height: 44px; }
  .current-chapter { display: none; }
  .closing { margin-top: 24px; }
}
@media (max-width: 420px) {
  .hero-chips li { flex: 1 1 100%; }
  .btn { width: 100%; }
  .hero-actions { width: 100%; }
  .brand-text em { display: none; }
}

/* 矮屏压缩（1366x768 等） */
@media (max-height: 820px) and (min-width: 769px) {
  .slide { padding-top: calc(var(--nav-h) + 8px); padding-bottom: calc(var(--ui-h) + 8px); }
  .section-head { margin-bottom: 22px; padding-bottom: 14px; }
  .section-title { font-size: clamp(24px, 2.6vw, 32px); }
  .hero-chips li { padding: 9px 14px 9px 16px; }
  .hero-chips strong { font-size: 21px; }
  .hero-actions { margin-top: 22px; }
  .stat { padding: 20px 18px; }
  .tag-card, .cluster, .mini-card, .philosophy li { padding: 16px; }
  .journey-item { padding: 12px 20px 12px 0; }
  .story { margin-top: 22px; }
  .story p { font-size: 15px; margin-bottom: 6px; }
  .starmap { height: 520px; }
  .starmap-nodes .cluster:nth-child(1) { --x: 0px; --y: -209px; }
  .starmap-nodes .cluster:nth-child(2) { --x: 199px; --y: -65px; }
  .starmap-nodes .cluster:nth-child(3) { --x: 123px; --y: 169px; }
  .starmap-nodes .cluster:nth-child(4) { --x: -123px; --y: 169px; }
  .starmap-nodes .cluster:nth-child(5) { --x: -199px; --y: -65px; }
  .orbit-2 { width: 410px; height: 410px; }
  .orbit-3 { width: 600px; height: 600px; }
  .starmap-hub { width: 156px; height: 156px; }
  .starmap-hub h3 { font-size: 22px; }
  .starmap-nodes .cluster { padding: 12px 14px 10px; }
  .kb-card { padding: 16px 16px 14px; }
  .kb-card h3 { font-size: 17px; }
  .kb-note { margin-top: 16px; }
  .book { width: 190px; }
  .topics li { font-size: 12px; padding: 4px 11px; }
  .archive { margin-top: 18px; padding: 14px 16px; }
  .contact-row { padding: 14px 16px; }
  .closing { margin-top: 22px; padding-top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .slide { transform: none; }
  .reveal { opacity: 1; transform: none; }
}
