/* 个人开发软件及技巧分享 · 设计令牌
   [Web] 8pt 栅格 / 1.25 字阶 / 单一主色 / WCAG AA / 44px 热区 / 150-300ms 缓动 */
:root {
  --space-unit: 8px;
  --space-1: 8px;  --space-2: 16px; --space-3: 24px;
  --space-4: 32px; --space-6: 48px; --space-8: 64px; --space-12: 96px;

  --fs-xs: 12px; --fs-sm: 14px; --fs-body: 16px; --fs-lg: 18px;
  --fs-h4: 20px; --fs-h3: 24px; --fs-h2: 30px; --fs-h1: 36px; --fs-hero: 48px;
  --lh-body: 1.5; --lh-heading: 1.25;

  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-pill: 999px;

  --color-bg: #0B1020;
  --color-surface: #121A2E;
  --color-surface-2: #17223C;
  --color-on-surface: #E8EDF8;
  --color-muted: #A7B4CC;
  --color-outline: #2A3557;
  --color-primary: #6B9BFF;
  --color-on-primary: #08132B;
  --color-primary-soft: rgba(107, 155, 255, .12);
  --color-warn: #F0C074;
  --color-warn-soft: rgba(240, 192, 116, .10);
  --color-success: #7FD1A8;
  --color-success-soft: rgba(127, 209, 168, .10);

  --shadow-e1: 0 2px 8px rgba(0, 0, 0, .24);
  --shadow-e2: 0 2px 4px rgba(0, 0, 0, .20), 0 8px 24px rgba(0, 0, 0, .28);

  --min-tap: 44px;
  --motion-fast: 150ms; --motion-normal: 200ms; --motion-slow: 300ms;
  --easing: cubic-bezier(.4, 0, .2, 1);

  --max-width: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1000px 520px at 12% -8%, rgba(45, 74, 143, .28), transparent 62%),
    radial-gradient(820px 460px at 100% 0%, rgba(28, 71, 105, .22), transparent 58%),
    var(--color-bg);
  color: var(--color-on-surface);
  font-family: "Segoe UI", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; border-radius: 4px; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-3); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--color-primary); color: var(--color-on-primary);
  padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm);
}
.skip:focus { left: var(--space-2); top: var(--space-1); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11, 16, 32, .86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-outline);
}
.header-inner {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 72px;
}
.brand { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--color-on-surface); font-weight: 600; font-size: var(--fs-lg); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: var(--radius-sm); flex: none;
  background: linear-gradient(135deg, var(--color-primary), #3C6FD1);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 8px;
  border: 2px solid var(--color-on-primary); border-radius: 3px;
}
.site-nav { display: flex; align-items: center; gap: var(--space-1); margin-left: auto; flex-wrap: wrap; }
.site-nav a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--min-tap); padding: 0 var(--space-2);
  color: var(--color-muted); font-size: var(--fs-sm); border-radius: var(--radius-sm);
  transition: color var(--motion-fast) var(--easing), background var(--motion-fast) var(--easing);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--color-on-surface); background: var(--color-surface-2); text-decoration: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1);
  min-height: var(--min-tap); padding: 0 var(--space-3);
  border-radius: var(--radius-sm); font-size: var(--fs-sm); font-weight: 600;
  border: 1px solid transparent; cursor: pointer;
  transition: transform var(--motion-fast) var(--easing), background var(--motion-fast) var(--easing), border-color var(--motion-fast) var(--easing);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--color-primary); color: var(--color-on-primary); }
.btn-primary:hover { background: #85AEFF; }
.btn-ghost { border-color: var(--color-outline); color: var(--color-on-surface); background: transparent; }
.btn-ghost:hover { border-color: var(--color-primary); background: var(--color-primary-soft); }
.site-nav .btn { color: var(--color-on-primary); }
.nav-toggle {
  display: none; margin-left: auto; min-height: var(--min-tap); min-width: var(--min-tap);
  background: var(--color-surface-2); color: var(--color-on-surface);
  border: 1px solid var(--color-outline); border-radius: var(--radius-sm); cursor: pointer;
}

/* ---------- Hero ---------- */
.hero { padding: var(--space-12) 0 var(--space-8); }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font-size: var(--fs-xs); letter-spacing: .12em; color: var(--color-primary);
  background: var(--color-primary-soft); border: 1px solid rgba(107, 155, 255, .28);
  padding: 6px var(--space-2); border-radius: var(--radius-pill);
}
.hero h1 {
  margin: var(--space-3) 0 var(--space-2);
  font-size: clamp(30px, 5vw, var(--fs-hero)); line-height: var(--lh-heading);
  letter-spacing: -.01em; font-weight: 650;
}
.hero h1 .accent { color: var(--color-primary); }
.hero-sub { max-width: 720px; color: var(--color-muted); font-size: var(--fs-lg); margin: 0 0 var(--space-4); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hero-meta { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-4); }
.tag {
  font-size: var(--fs-xs); color: var(--color-muted);
  background: var(--color-surface); border: 1px solid var(--color-outline);
  padding: 6px var(--space-2); border-radius: var(--radius-pill);
}

/* ==========================================================================
   首页 Hero v4 —— 深空 HUD
   1) 不再用 90deg 线性压暗（会产生笔直的左右明暗分界），改用椭圆径向暗晕，
      边界圆滑，地球光晕可以一路扩散到整个画面。
   2) 地球不再是一张「贴图」：径向羽化 mask 让球体边缘渐隐，外面套倾斜
      轨道环、扩散光晕、扫描线与脉冲节点，视觉上长进背景。
   3) mix-blend-mode: screen 必须写在 .earth-field 容器上。容器有 z-index，
      若写在子元素上，混合会被限制在这个空容器的层叠上下文里，黑色方块
      会以普通方式盖住底色，反而出现硬边（v3 踩过这个坑）。
   4) 细线 HUD（角标 / 编号 / 坐标 / 玻璃数据条）填充版面，不靠大色块。
   ========================================================================== */
.home .container { max-width: 1320px; }

/* ---------- 首页 header ---------- */
.home .site-header {
  position: fixed; top: 0; left: 0; right: 0;
  background: transparent; border-bottom-color: transparent;
  backdrop-filter: none;
  transition: background var(--motion-normal) var(--easing), border-color var(--motion-normal) var(--easing);
}
.home.scrolled .site-header {
  background: rgba(7, 12, 26, .82);
  backdrop-filter: blur(14px);
  border-bottom-color: rgba(107, 155, 255, .12);
}
.home .header-inner { min-height: 80px; }
.home .brand-mark { box-shadow: 0 0 18px rgba(107, 155, 255, .35); }

/* ---------- 首屏容器 ---------- */
.hero-full {
  position: relative; isolation: isolate;
  display: flex; align-items: center;
  min-height: 100vh; min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 1200px 900px at 76% 46%, rgba(36, 76, 170, .24), transparent 70%),
    radial-gradient(ellipse 900px 700px at 104% 96%, rgba(74, 50, 150, .12), transparent 72%),
    linear-gradient(165deg, #050A16 0%, #060B1A 52%, var(--color-bg) 100%);
}
.hero-full::before,
.hero-full::after { content: ""; position: absolute; inset: 0; pointer-events: none; }

/* 统一材质：极淡等距网格 + 细扫描线，让整幅画面有一致的底噪 */
.hero-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(107, 155, 255, .026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107, 155, 255, .026) 1px, transparent 1px);
  background-size: 84px 84px;
  -webkit-mask-image: radial-gradient(ellipse at 62% 48%, #000 0%, transparent 76%);
  mask-image: radial-gradient(ellipse at 62% 48%, #000 0%, transparent 76%);
}
.hero-grid::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, rgba(190, 215, 255, .014) 0 1px, transparent 1px 4px);
}
.hero-full__stars {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(1px 1px at 8% 18%, rgba(196, 218, 255, .8) 99%, transparent),
    radial-gradient(1px 1px at 22% 72%, rgba(196, 218, 255, .6) 99%, transparent),
    radial-gradient(1px 1px at 36% 12%, rgba(196, 218, 255, .7) 99%, transparent),
    radial-gradient(1px 1px at 48% 84%, rgba(196, 218, 255, .5) 99%, transparent),
    radial-gradient(1.5px 1.5px at 62% 26%, rgba(150, 190, 255, .7) 99%, transparent),
    radial-gradient(1px 1px at 74% 66%, rgba(196, 218, 255, .55) 99%, transparent),
    radial-gradient(1px 1px at 88% 34%, rgba(196, 218, 255, .65) 99%, transparent),
    radial-gradient(1.5px 1.5px at 94% 78%, rgba(150, 190, 255, .6) 99%, transparent);
}
/* 唯一的压暗：椭圆径向，圆滑边界，绝不产生竖直分界 */
.hero-full::after {
  z-index: 2;
  background:
    radial-gradient(ellipse 780px 660px at 15% 50%, rgba(5, 9, 20, .78), rgba(5, 9, 20, .28) 52%, transparent 78%),
    linear-gradient(180deg, rgba(5, 9, 20, .44) 0%, transparent 16%, transparent 80%, var(--color-bg) 100%);
}

/* ---------- 地球场：光晕 / 轨道 / 羽化球体 / 扫描线 / 节点 ---------- */
.earth-field {
  position: absolute; z-index: 1;
  top: 50%; right: -15vw;
  width: clamp(760px, 90vw, 1160px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  pointer-events: none;
  mix-blend-mode: screen;
}
.earth-field__glow {
  position: absolute; inset: -22%;
  background:
    radial-gradient(circle at 50% 50%, rgba(56, 110, 215, .20) 0%, rgba(34, 72, 160, .11) 36%, transparent 66%),
    radial-gradient(circle at 62% 34%, rgba(90, 170, 240, .08), transparent 52%);
  filter: blur(54px);
}
.earth-field__orbit {
  position: absolute; left: 50%; top: 50%;
  border: 1px solid rgba(120, 170, 255, .13);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-19deg) scaleY(.46);
  -webkit-mask-image: linear-gradient(100deg, transparent 6%, #000 34%, #000 66%, transparent 94%);
  mask-image: linear-gradient(100deg, transparent 6%, #000 34%, #000 66%, transparent 94%);
}
.earth-field__orbit--1 { width: 82%; height: 82%; }
.earth-field__orbit--2 {
  width: 104%; height: 104%; border-color: rgba(120, 170, 255, .085);
  transform: translate(-50%, -50%) rotate(16deg) scaleY(.52);
}
.earth-field__orbit--3 {
  width: 126%; height: 126%; border-color: rgba(120, 170, 255, .05);
  transform: translate(-50%, -50%) rotate(-8deg) scaleY(.60);
}
.earth-field__scan {
  position: absolute; inset: 8%;
  background: linear-gradient(180deg, transparent 48%, rgba(120, 180, 255, .10) 50%, transparent 52%);
  -webkit-mask-image: radial-gradient(circle, #000 0 42%, transparent 74%);
  mask-image: radial-gradient(circle, #000 0 42%, transparent 74%);
  animation: earthScan 11s linear infinite;
}
@keyframes earthScan {
  from { transform: translateY(-38%); }
  to   { transform: translateY(38%); }
}
.earth-field__globe {
  position: absolute; inset: 0;
  /* 双层背景兜底：GIF 正常加载时不透明地盖住海报；接入商偶发把 GIF 拦成
     404 时，浏览器自动露出下层静态海报，地球不会整个消失。 */
  background-image: url("tech-earth-glow.gif"), url("tech-earth-glow-poster.png");
  background-position: center, center;
  background-size: contain, contain;
  background-repeat: no-repeat, no-repeat;
  /* 球体保持清晰，球外的轨道线与零散光点逐步羽化到背景里 */
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0 28%, rgba(0, 0, 0, .96) 44%, rgba(0, 0, 0, .52) 62%, rgba(0, 0, 0, .12) 78%, transparent 92%);
  mask-image: radial-gradient(circle at 50% 50%, #000 0 28%, rgba(0, 0, 0, .96) 44%, rgba(0, 0, 0, .52) 62%, rgba(0, 0, 0, .12) 78%, transparent 92%);
}
.earth-field__node {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: #BFE0FF; box-shadow: 0 0 12px 3px rgba(110, 175, 255, .7);
  animation: nodePulse 5s ease-in-out infinite;
}
.earth-field__node--1 { left: 16%; top: 36%; animation-delay: .4s; }
.earth-field__node--2 { right: 14%; top: 62%; animation-delay: 2.1s; }
.earth-field__node--3 { left: 42%; bottom: 14%; animation-delay: 3.4s; }
@keyframes nodePulse {
  0%, 100% { opacity: .25; transform: scale(.8); }
  50%      { opacity: 1; transform: scale(1.5); }
}

/* ---------- HUD 细线装饰 ---------- */
.hud-corner {
  position: absolute; z-index: 3; width: 20px; height: 20px;
  border: 1px solid rgba(120, 170, 255, .36); pointer-events: none;
}
.hud-corner--tl { top: 104px; left: 36px; border-right: 0; border-bottom: 0; }
.hud-corner--tr { top: 104px; right: 36px; border-left: 0; border-bottom: 0; }
.hud-corner--bl { bottom: 36px; left: 36px; border-right: 0; border-top: 0; }
.hud-corner--br { bottom: 36px; right: 36px; border-left: 0; border-top: 0; }
.hud-coord {
  position: absolute; z-index: 3; pointer-events: none;
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px; letter-spacing: .22em; color: rgba(160, 188, 235, .50);
}
.hud-coord--top { top: 108px; right: 70px; }
.hud-coord--bottom { bottom: 42px; left: 70px; }
.hud-coord--side { right: 40px; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; }
.hud-coord em { font-style: normal; color: var(--color-primary); }

/* ---------- 代码浮层：小、半透明、上下羽化，不再像贴上去的实心框 ---------- */
.code-float {
  position: absolute; z-index: 3;
  right: 4%; top: 58%;
  width: 262px;
  pointer-events: none;
  /* 只在首尾各留极薄的羽化，保证面板内容清晰可读 */
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 5%, #000 95%, transparent);
}
.code-card {
  overflow: hidden;
  border: 1px solid rgba(125, 170, 250, .26);
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(14, 24, 48, .82), rgba(8, 14, 30, .74));
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.code-card__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-bottom: 1px solid rgba(125, 170, 250, .14);
  background: rgba(20, 32, 60, .48);
  font-size: var(--fs-xs); color: #A9BCDC;
}
.code-card__pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: #6B9BFF; box-shadow: 0 0 8px 2px rgba(107, 155, 255, .6);
}
.code-card__file { font-family: Consolas, "Courier New", monospace; }
.code-card__lang { margin-left: auto; color: var(--color-primary); letter-spacing: .12em; }
.code-card__body {
  padding: 10px 0; font-family: Consolas, "Courier New", monospace;
  font-size: 11px; line-height: 1.85;
}
.code-line { display: grid; grid-template-columns: 30px minmax(0, 1fr); padding-right: 12px; white-space: pre; overflow: hidden; }
.code-line .ln { padding-right: 8px; text-align: right; color: #54678C; user-select: none; }
.code-line code { color: #DCE9FF; }
.c-key { color: #8FB6FF; }
.c-str { color: #9FC8E8; }
.c-num { color: #A8C4FF; }
.c-punc { color: #7C8CB0; }
.code-line.is-hot {
  background: linear-gradient(90deg, rgba(107, 155, 255, .18), transparent);
  box-shadow: inset 2px 0 0 #6B9BFF;
}

/* ---------- 前景内容 ---------- */
.hero-full__inner {
  position: relative; z-index: 4; width: 100%;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 116px; padding-bottom: 84px;
}
.hero-main { max-width: 720px; }
.hero-index {
  display: flex; align-items: center; gap: 12px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px; letter-spacing: .24em; color: #93AEDA;
}
.hero-index__line { display: block; width: 30px; height: 1px; background: linear-gradient(90deg, var(--color-primary), transparent); }
.hero-full h1 {
  margin: 22px 0 18px;
  font-size: clamp(40px, 5.8vw, 70px);
  line-height: 1.14; letter-spacing: -.032em; font-weight: 620;
  text-shadow: 0 4px 34px rgba(0, 0, 0, .55);
}
.hero-full h1 .hero-h1-line { display: block; }
.hero-full h1 .accent {
  background: linear-gradient(100deg, #EAF3FF 0%, #9CC0FF 44%, #6B9BFF 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--color-primary);
}
.hero-full .hero-sub {
  max-width: 600px; margin-bottom: 30px;
  font-size: clamp(15px, 1.4vw, 18px); line-height: 1.8; color: #B9C8E2;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .45);
}
.hero-actions { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.hero-full .btn { min-height: 48px; padding: 0 24px; font-size: var(--fs-body); }
.hero-full .btn-primary {
  box-shadow: 0 8px 30px rgba(107, 155, 255, .24), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-quiet {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px;
  color: #C2D3F0; font-size: var(--fs-sm);
  border-bottom: 1px solid rgba(140, 180, 245, .32);
}
.btn-quiet:hover { color: #FFFFFF; border-bottom-color: var(--color-primary); text-decoration: none; }
.hero-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.hero-full .tag {
  background: transparent; border: 1px solid rgba(107, 155, 255, .22);
  color: #9FB4D8; font-size: var(--fs-xs);
  backdrop-filter: blur(6px);
}

/* ---------- 底部玻璃数据条 ---------- */
.hero-foot {
  position: relative;
  margin-top: clamp(56px, 10vh, 112px);
  padding: 20px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  border: 1px solid rgba(107, 155, 255, .16);
  border-radius: 14px;
  background: linear-gradient(110deg, rgba(20, 32, 62, .50), rgba(10, 17, 36, .32));
  backdrop-filter: blur(16px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .26), inset 0 1px 0 rgba(255, 255, 255, .045);
}
.hero-foot::before {
  content: ""; position: absolute; left: 14%; right: 14%; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(150, 195, 255, .55), transparent);
}
.hero-stats {
  flex: 1 1 auto; min-width: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.hero-stat {
  display: flex; flex-direction: column; gap: 7px;
  padding-left: 24px; border-left: 1px solid rgba(107, 155, 255, .14);
}
.hero-stat:first-child { padding-left: 0; border-left: 0; }
.hero-stat strong { font-size: 25px; font-weight: 600; line-height: 1; color: #EAF2FF; letter-spacing: -.02em; }
.hero-stat span { font-size: var(--fs-xs); color: #90A4C6; }
.hero-scroll {
  flex: 0 0 auto;
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  color: #9FB1D0; font-size: var(--fs-xs); letter-spacing: .16em;
  min-height: var(--min-tap);
}
.hero-scroll:hover { color: #FFFFFF; text-decoration: none; }
.hero-scroll__line {
  width: 1px; height: 20px;
  background: linear-gradient(180deg, transparent, var(--color-primary));
  transform-origin: top;
  animation: heroScrollPulse 2.4s ease-in-out infinite;
}
@keyframes heroScrollPulse {
  0%, 100% { opacity: .35; transform: scaleY(.65); }
  50%      { opacity: 1; transform: scaleY(1); }
}
.hero-side {
  position: absolute; z-index: 4; top: 50%;
  font-size: 10px; letter-spacing: .26em; color: rgba(150, 175, 220, .30);
  writing-mode: vertical-rl; white-space: nowrap; pointer-events: none;
}
.hero-side--left { left: -34px; transform: translateY(-50%) rotate(180deg); }
.hero-side--right { right: -34px; transform: translateY(-50%); }

/* ---------- 响应式 ---------- */
@media (min-width: 769px) and (max-width: 1100px) {
  .earth-field { width: 860px; right: -22vw; }
  .code-float { right: 2%; top: 58%; width: 220px; }
  .hero-side, .hud-corner, .hud-coord--side { display: none; }
  .hero-stat strong { font-size: 21px; }
  .home .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .home .site-header { background: rgba(5, 9, 20, .62); }
  .home .site-nav { top: 80px; }
  .hero-full { min-height: 86vh; min-height: 86svh; align-items: stretch; }
  .earth-field { width: 150vw; right: -62%; top: 34%; opacity: .72; }
  .earth-field__orbit--3, .earth-field__scan { display: none; }
  .code-float, .hero-side, .hud-corner, .hud-coord { display: none; }
  .hero-full::after {
    background:
      radial-gradient(ellipse 620px 520px at 20% 34%, rgba(5, 9, 20, .70), rgba(5, 9, 20, .30) 58%, transparent 82%),
      linear-gradient(180deg, rgba(5, 9, 20, .40) 0%, transparent 22%, rgba(5, 9, 20, .72) 78%, var(--color-bg) 100%);
  }
  /* 末尾响应式 .container{padding:0 16px} 会重置上下 padding，用更高特异性固定 */
  .container.hero-full__inner {
    min-height: 0; justify-content: flex-start;
    padding-top: 112px; padding-bottom: 56px;
  }
  .hero-main { max-width: 100%; }
  .hero-full h1 { font-size: clamp(32px, 9vw, 46px); }
  .hero-full .hero-actions .btn { flex: 1 1 auto; }
  .hero-actions { gap: 12px; }
  .btn-quiet {
    justify-content: center; min-height: 52px;
    border: 1px solid rgba(140, 180, 245, .28); border-bottom-width: 1px;
    border-radius: var(--radius-md); background: rgba(255, 255, 255, .035);
  }
  .hero-foot {
    margin-top: 44px; padding: 18px 20px;
    flex-direction: column; align-items: stretch; gap: 16px;
  }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 0; }
  .hero-stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero-scroll { display: none; }
  .home .grid { grid-template-columns: 1fr; }
}
/* 系统开启「减少动效」：换静态海报，装饰动效全部关闭 */
@media (prefers-reduced-motion: reduce) {
  .earth-field__scan, .earth-field__node, .hero-scroll__line { animation: none; }
  .earth-field__globe { background-image: url("tech-earth-glow-poster.png"); }
}

/* ---------- Sections ---------- */
.section { padding: var(--space-6) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: var(--fs-h2); line-height: var(--lh-heading); font-weight: 600; }
.section-head p { margin: var(--space-1) 0 0; color: var(--color-muted); font-size: var(--fs-sm); }
.section-kicker { color: var(--color-primary); font-size: var(--fs-xs); letter-spacing: .14em; margin-bottom: var(--space-1); }
.text-link { font-size: var(--fs-sm); display: inline-flex; align-items: center; min-height: var(--min-tap); }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-3); }
/* 首页容器加宽后 auto-fill 会变成 4 列、最后一行空两格；固定 3 列让 6 张卡正好 3×2 满格 */
.home .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  background: linear-gradient(160deg, var(--color-surface-2), var(--color-surface));
  border: 1px solid var(--color-outline); border-radius: var(--radius-md);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform var(--motion-normal) var(--easing), border-color var(--motion-normal) var(--easing), box-shadow var(--motion-normal) var(--easing);
}
a.card:hover { transform: translateY(-4px); border-color: var(--color-primary); box-shadow: var(--shadow-e2); text-decoration: none; }
.card-media {
  aspect-ratio: 16 / 10; overflow: hidden;
  background: linear-gradient(150deg, #14203C, #0B1224);
  border-bottom: 1px solid var(--color-outline);
}
/* 偶发网络失败时不露出 alt 文字（alt 属性仍保留，辅助技术可读） */
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; color: transparent; font-size: 0; }
.card-media.is-logo { display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, rgba(107,155,255,.16), transparent 70%); }

/* 补足 3×2 网格的引导卡：卡片区最后一行不再空半边 */
.card.card-cta {
  border-style: dashed; border-color: rgba(107, 155, 255, .34);
  background:
    radial-gradient(circle at 88% 12%, rgba(107, 155, 255, .14), transparent 58%),
    linear-gradient(160deg, #101A32, #0C1224);
}
.card-cta .card-body {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  gap: 10px; padding: var(--space-4);
}
.card-cta__kicker { color: var(--color-primary); font-size: var(--fs-xs); letter-spacing: .16em; }
.card-cta .card-title, .card-cta .card-desc { margin: 0; }
.card-cta__go {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 8px;
  color: #A8C8FF; font-size: var(--fs-sm); font-weight: 600;
}
a.card-cta:hover .card-cta__go { color: #FFFFFF; }
.card-media.is-logo img { width: 96px; height: 96px; object-fit: contain; border-radius: var(--radius-md); }
.card-body { padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-1); flex: 1; }
.card-title { font-size: var(--fs-h4); font-weight: 600; margin: 0; color: var(--color-on-surface); }
.card-desc { color: var(--color-muted); font-size: var(--fs-sm); margin: 0; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--color-outline); }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.card-tags span { font-size: var(--fs-xs); color: var(--color-muted); border: 1px solid var(--color-outline); border-radius: var(--radius-pill); padding: 2px 8px; }
.card-more { font-size: var(--fs-sm); color: var(--color-primary); white-space: nowrap; }

.filter-bar { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-3); }
.search-input {
  min-height: var(--min-tap); min-width: 240px; flex: 1; max-width: 360px;
  background: var(--color-surface); border: 1px solid var(--color-outline);
  border-radius: var(--radius-sm); color: var(--color-on-surface);
  padding: 0 var(--space-2); font-size: var(--fs-sm); font-family: inherit;
}
.search-input::placeholder { color: #7E8CA8; }
.empty-state { color: var(--color-muted); font-size: var(--fs-sm); padding: var(--space-3); display: none; }

/* ---------- Link hub ---------- */
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-2); }
.hub a {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  min-height: 56px; padding: var(--space-1) var(--space-2);
  background: var(--color-surface); border: 1px solid var(--color-outline);
  border-radius: var(--radius-sm); color: var(--color-on-surface); font-size: var(--fs-sm);
  transition: border-color var(--motion-fast) var(--easing), background var(--motion-fast) var(--easing);
}
.hub a:hover { border-color: var(--color-primary); background: var(--color-surface-2); text-decoration: none; }
.hub a span { color: var(--color-muted); }

/* ---------- Article / docs ---------- */
.page-head { padding: var(--space-6) 0 var(--space-3); }
.breadcrumb { font-size: var(--fs-xs); color: var(--color-muted); margin-bottom: var(--space-2); }
.breadcrumb a { color: var(--color-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.page-head h1 { margin: 0 0 var(--space-2); font-size: clamp(28px, 4vw, var(--fs-h1)); line-height: var(--lh-heading); font-weight: 650; }
.page-head .lead { color: var(--color-muted); font-size: var(--fs-lg); margin: 0; max-width: 800px; }
.meta-row { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-3); }
.meta-chip { font-size: var(--fs-xs); color: var(--color-muted); background: var(--color-surface); border: 1px solid var(--color-outline); border-radius: var(--radius-pill); padding: 6px var(--space-2); }

.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-6); padding-bottom: var(--space-8); }
.toc { position: sticky; top: 96px; align-self: start; }
.toc-title { font-size: var(--fs-xs); letter-spacing: .12em; color: var(--color-muted); margin-bottom: var(--space-1); }
.toc a {
  display: block; min-height: var(--min-tap); padding: var(--space-1) var(--space-2);
  border-left: 2px solid var(--color-outline); color: var(--color-muted); font-size: var(--fs-sm);
  transition: color var(--motion-fast) var(--easing), border-color var(--motion-fast) var(--easing);
}
.toc a:hover { color: var(--color-on-surface); text-decoration: none; }
.toc a.active { color: var(--color-primary); border-left-color: var(--color-primary); background: var(--color-primary-soft); }

.doc h2 {
  font-size: var(--fs-h3); font-weight: 600; line-height: var(--lh-heading);
  margin: var(--space-6) 0 var(--space-3); padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--color-outline); scroll-margin-top: 96px;
}
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: var(--fs-h4); font-weight: 600; margin: var(--space-4) 0 var(--space-2); }
.doc p { color: var(--color-muted); margin: 0 0 var(--space-2); }
.doc strong { color: var(--color-on-surface); font-weight: 600; }
.doc ul, .doc ol { color: var(--color-muted); padding-left: var(--space-3); margin: 0 0 var(--space-3); }
.doc li { margin-bottom: var(--space-1); }
.doc li::marker { color: var(--color-primary); }
.doc figure { margin: var(--space-3) 0; border: 1px solid var(--color-outline); border-radius: var(--radius-md); overflow: hidden; background: var(--color-surface); }
.doc figure img { width: 100%; }
.doc figcaption { font-size: var(--fs-xs); color: var(--color-muted); padding: var(--space-1) var(--space-2); border-top: 1px solid var(--color-outline); }

.steps { display: grid; gap: var(--space-2); counter-reset: step; margin-bottom: var(--space-3); }
.step {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--space-2);
  padding: var(--space-2); background: var(--color-surface);
  border: 1px solid var(--color-outline); border-radius: var(--radius-sm);
}
.step::before {
  counter-increment: step; content: counter(step);
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--color-primary-soft); border: 1px solid rgba(107, 155, 255, .4);
  color: var(--color-primary); font-weight: 600; font-size: var(--fs-sm);
}
.step h3 { margin: 0 0 4px; font-size: var(--fs-body); color: var(--color-on-surface); font-weight: 600; }
.step p { margin: 0; font-size: var(--fs-sm); }

.feature-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-2); margin-bottom: var(--space-3); }
.feature {
  padding: var(--space-2); background: var(--color-surface);
  border: 1px solid var(--color-outline); border-radius: var(--radius-sm);
}
.feature h3 { margin: 0 0 4px; font-size: var(--fs-sm); color: var(--color-primary); font-weight: 600; }
.feature p { margin: 0; font-size: var(--fs-sm); }

.note {
  padding: var(--space-2) var(--space-3); margin: var(--space-3) 0;
  border-left: 3px solid var(--color-primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--color-primary-soft); font-size: var(--fs-sm); color: var(--color-on-surface);
}
.note.warn { border-left-color: var(--color-warn); background: var(--color-warn-soft); }
.note.success { border-left-color: var(--color-success); background: var(--color-success-soft); }
.note p { margin: 0; color: inherit; }

.code {
  background: #080D1A; border: 1px solid var(--color-outline); border-radius: var(--radius-sm);
  padding: var(--space-2); overflow-x: auto; font-size: var(--fs-sm); line-height: 1.6;
  font-family: Consolas, "Courier New", monospace; color: #CFD9F0; margin: var(--space-2) 0 var(--space-3);
}
.code code { white-space: pre; }

.table-wrap { overflow-x: auto; border: 1px solid var(--color-outline); border-radius: var(--radius-sm); margin-bottom: var(--space-3); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 520px; }
th, td { padding: var(--space-1) var(--space-2); text-align: left; border-bottom: 1px solid var(--color-outline); }
th { color: var(--color-on-surface); font-weight: 600; background: var(--color-surface-2); }
td { color: var(--color-muted); }
tr:last-child td { border-bottom: 0; }

.faq { display: grid; gap: var(--space-1); margin-bottom: var(--space-3); }
.faq details { background: var(--color-surface); border: 1px solid var(--color-outline); border-radius: var(--radius-sm); }
.faq summary { cursor: pointer; min-height: var(--min-tap); display: flex; align-items: center; padding: var(--space-1) var(--space-2); font-size: var(--fs-sm); color: var(--color-on-surface); font-weight: 600; }
.faq summary::after { content: "+"; margin-left: auto; color: var(--color-primary); font-size: var(--fs-lg); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 var(--space-2) var(--space-2); margin: 0; font-size: var(--fs-sm); }

.doc-nav { display: flex; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; padding-top: var(--space-3); border-top: 1px solid var(--color-outline); }
.doc-nav a { min-height: var(--min-tap); display: inline-flex; align-items: center; font-size: var(--fs-sm); }

/* ---------- Tips ---------- */
.tip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-3); }
.tip { padding: var(--space-3); background: var(--color-surface); border: 1px solid var(--color-outline); border-radius: var(--radius-md); }
.tip .tip-from { font-size: var(--fs-xs); color: var(--color-primary); letter-spacing: .06em; }
.tip h3 { margin: var(--space-1) 0; font-size: var(--fs-h4); font-weight: 600; }
.tip p { margin: 0; color: var(--color-muted); font-size: var(--fs-sm); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--color-outline); background: rgba(8, 12, 24, .6); margin-top: var(--space-8); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-4); padding: var(--space-6) 0 var(--space-4); }
.footer-grid h3 { font-size: var(--fs-sm); margin: 0 0 var(--space-2); color: var(--color-on-surface); font-weight: 600; }
.footer-grid p, .footer-grid a { display: block; color: var(--color-muted); font-size: var(--fs-sm); margin: 0 0 var(--space-1); }
.footer-grid a:hover { color: var(--color-primary); }
.footer-bottom {
  border-top: 1px solid var(--color-outline); padding: var(--space-3) 0;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: var(--space-2) var(--space-3); text-align: center;
  font-size: var(--fs-sm); color: var(--color-muted);
}
.footer-bottom a { color: var(--color-muted); }
.footer-bottom a:hover { color: var(--color-primary); }
.footer-note { text-align: center; color: #7E8CA8; font-size: var(--fs-xs); padding-bottom: var(--space-3); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .doc-layout { grid-template-columns: 180px minmax(0, 1fr); gap: var(--space-4); }
}
@media (max-width: 768px) {
  .container { padding: 0 var(--space-2); }
  .hero { padding: var(--space-8) 0 var(--space-6); }
  .section { padding: var(--space-4) 0; }
  .header-inner { min-height: 64px; }
  .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; padding: var(--space-2); background: var(--color-bg); border-bottom: 1px solid var(--color-outline); flex-direction: column; align-items: stretch; }
  .site-nav.open { display: flex; }
  .site-nav a { justify-content: flex-start; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .doc-layout { grid-template-columns: 1fr; gap: var(--space-3); }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 4px; padding-bottom: var(--space-2); border-bottom: 1px solid var(--color-outline); }
  .toc-title { width: 100%; }
  .toc a { border-left: 0; border-bottom: 2px solid transparent; min-height: 40px; padding: var(--space-1); }
  .toc a.active { border-left: 0; border-bottom-color: var(--color-primary); background: transparent; }
  .step { grid-template-columns: 32px minmax(0, 1fr); }
  .step::before { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}


/* ==========================================================================
   布局变体：?layout=a | b | c（默认 a）
   同一套 HTML，靠 body 上的 class 重排版式骨架，方便直接对比挑方案。
   A 松弛错落 / B 居中对称 / C 杂志网格
   ========================================================================== */
.hero-rail {
  position: absolute; z-index: 4; left: -18px; top: 16%; bottom: 22%;
  width: 1px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(107, 155, 255, .32) 18%, rgba(107, 155, 255, .10) 72%, transparent);
}
.hero-rail::before {
  content: ""; position: absolute; left: -2px; top: 0;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--color-primary); box-shadow: 0 0 10px rgba(107, 155, 255, .75);
}
.hero-software { display: none; }

/* ---------- A · 松弛错落（默认） ----------
   做减法：去掉贴边碎装饰；底部数据条右移，与标题块形成阶梯，
   不再所有元素都对齐到同一条左缘。 */
.layout-a .hero-main { max-width: 660px; }
.layout-a .hero-full h1 { font-size: clamp(38px, 5.4vw, 64px); font-weight: 600; }
.layout-a .hero-foot { margin-left: 72px; max-width: 1120px; }
.layout-a .earth-field { right: -18vw; opacity: .92; }
.layout-a .code-float { right: 6%; top: 56%; }

/* ---------- B · 居中对称 ----------
   地球退到标题正后方当环境圆，内容全部居中，视觉重心稳定。 */
/* flex 列 + margin:auto 会让块收缩到内容宽度，必须显式给宽度，否则数据条被挤窄 */
.layout-b .hero-main { margin: 0 auto; width: 840px; max-width: 100%; text-align: center; }
.layout-b .hero-index,
.layout-b .hero-actions,
.layout-b .hero-meta { justify-content: center; }
.layout-b .hero-sub { margin-left: auto; margin-right: auto; }
.layout-b .hero-foot { margin-left: auto; margin-right: auto; width: 940px; max-width: 100%; }
.layout-b .hero-full h1 { font-size: clamp(40px, 6vw, 72px); }
.layout-b .earth-field {
  left: 50%; right: auto;
  width: 1000px;
  transform: translate(-50%, -50%);
  opacity: .52;
}
.layout-b .hero-rail, .layout-b .code-float { display: none; }
.layout-b .hero-full::after {
  background:
    radial-gradient(ellipse 960px 720px at 50% 48%, rgba(5, 9, 20, .84), rgba(5, 9, 20, .36) 56%, transparent 80%),
    linear-gradient(180deg, rgba(5, 9, 20, .44) 0%, transparent 16%, transparent 80%, var(--color-bg) 100%);
}

/* ---------- C · 杂志网格 ----------
   12 栏错落：标题跨左 7 栏，右侧放真实软件速览，数据条错到第二行右半，
   用内容而不是装饰填满右侧。 */
.layout-c .hero-full__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-content: center;
  gap: 30px 20px;
}
.layout-c .hero-main { grid-column: 1 / 8; grid-row: 1; max-width: none; }
.layout-c .hero-full h1 { font-size: clamp(36px, 4.8vw, 58px); }
.layout-c .hero-sub { font-size: clamp(14px, 1.2vw, 16px); max-width: 520px; }
.layout-c .hero-meta { margin-top: 20px; }
.layout-c .hero-foot { grid-column: 6 / 13; grid-row: 2; margin-top: 0; }
.layout-c .hero-software {
  display: block; grid-column: 9 / 13; grid-row: 1; align-self: center;
  padding: 20px 22px;
  border: 1px solid rgba(107, 155, 255, .24);
  border-radius: 14px;
  /* 底色必须够实：过透会让背后的地球网格透进列表，文字发花 */
  background: linear-gradient(150deg, rgba(14, 26, 52, .92), rgba(8, 14, 30, .95));
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.layout-c .earth-field { right: -28vw; top: 47%; opacity: .42; }
.layout-c .code-float, .layout-c .hero-rail { display: none; }
.layout-c .hero-full::after {
  background:
    radial-gradient(ellipse 900px 700px at 18% 44%, rgba(5, 9, 20, .82), rgba(5, 9, 20, .28) 54%, transparent 78%),
    linear-gradient(180deg, rgba(5, 9, 20, .44) 0%, transparent 16%, transparent 80%, var(--color-bg) 100%);
}

.hero-software__title {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 12px; margin-bottom: 4px;
  border-bottom: 1px solid rgba(107, 155, 255, .34);
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px; letter-spacing: .2em; color: #C6DBFA;
}
.hero-software__title span { color: #8FB6FF; }
.hero-software a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 9px 0;
  border-bottom: 1px solid rgba(107, 155, 255, .22);
  font-size: 14px; font-weight: 500; color: #F2F7FF;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .6);
}
.hero-software a:hover { color: #FFFFFF; text-decoration: none; }
.hero-software a i { font-style: normal; color: var(--color-primary); opacity: .7; }
.hero-software a:hover i { opacity: 1; }

/* ---------- 移动端：三套统一回退到纵向单列 ---------- */
@media (max-width: 768px) {
  .layout-a .hero-foot, .layout-b .hero-foot { margin-left: 0; margin-right: 0; max-width: 100%; }
  .layout-b .hero-main { text-align: left; }
  .layout-b .hero-index, .layout-b .hero-actions, .layout-b .hero-meta { justify-content: flex-start; }
  .layout-b .hero-sub { margin-left: 0; margin-right: 0; }
  .layout-b .earth-field { left: auto; right: -62%; width: 150vw; transform: translateY(-50%); opacity: .72; }
  .layout-c .hero-full__inner { display: flex; flex-direction: column; }
  .layout-c .hero-foot { margin-top: 44px; }
  .layout-c .hero-software, .hero-software { display: none !important; }
  .layout-a .code-float, .code-float { display: none; }
  .hero-rail { display: none; }
}
