/* ==========================================================================
 * 冯若凡的个人博客 · 公共样式
 * 沿用《Agent Harness 工程入门指南》的设计系统，并扩展博客壳样式
 * ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-code: #f1f5f9;
  --text: #1f2937;
  --text-soft: #4b5563;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --primary: #2563eb;
  --primary-soft: #dbeafe;
  --accent: #0d9488;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px; line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ===== 顶栏导航 ===== */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-nav-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.site-nav-brand {
  font-family: "Source Han Serif SC", "Noto Serif SC", serif;
  font-size: 18px; font-weight: 700;
  color: #0f172a; text-decoration: none;
  letter-spacing: 0.5px;
}
.site-nav-brand .brand-dot {
  display: inline-block; width: 8px; height: 8px;
  background: var(--primary); border-radius: 50%;
  margin-right: 10px; vertical-align: middle;
}
.site-nav-links {
  display: flex; gap: 28px; align-items: center;
  font-size: 14.5px;
}
.site-nav-links a {
  color: var(--text-soft); text-decoration: none;
  padding: 6px 0; border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.site-nav-links a:hover, .site-nav-links a.active {
  color: var(--primary); border-bottom-color: var(--primary);
}

/* ===== 容器 ===== */
.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  max-width: 1280px; margin: 0 auto; gap: 48px;
  padding: 0 24px;
}
.layout-single {
  max-width: 880px; margin: 0 auto;
  padding: 0 24px;
}

.hero {
  grid-column: 1 / -1;
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.hero-single {
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.hero .eyebrow, .hero-single .eyebrow {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 13px; font-weight: 600;
  border-radius: 999px; margin-bottom: 18px;
  letter-spacing: 0.5px;
}
.hero h1, .hero-single h1 {
  font-family: "Source Han Serif SC", "Noto Serif SC", "Songti SC", serif;
  font-size: 38px; line-height: 1.25;
  margin: 0 0 16px; font-weight: 700;
  color: #0f172a; letter-spacing: -0.5px;
}
.hero .subtitle, .hero-single .subtitle {
  font-size: 18px; color: var(--text-soft);
  max-width: 720px; margin: 0 0 24px; line-height: 1.7;
}
.hero .meta, .hero-single .meta {
  display: flex; gap: 20px; font-size: 13px;
  color: var(--text-muted); flex-wrap: wrap;
  align-items: center;
}
.hero .meta strong, .hero-single .meta strong { color: var(--text); font-weight: 600; }
.hero .meta .sep, .hero-single .meta .sep {
  display: inline-block; width: 4px; height: 4px;
  background: var(--text-muted); border-radius: 50%; opacity: 0.5;
}

/* ===== 侧边目录（文章页） ===== */
.toc {
  position: sticky; top: 80px; align-self: start;
  font-size: 13.5px;
  max-height: calc(100vh - 100px); overflow-y: auto;
  padding-right: 8px;
}
.toc-title {
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: section; }
.toc li { counter-increment: section; margin: 0; }
.toc li a {
  display: block; padding: 7px 12px;
  color: var(--text-soft); text-decoration: none;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all 0.15s; line-height: 1.5;
}
.toc li a::before {
  content: counter(section, decimal) ". ";
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-right: 4px;
}
.toc li a:hover {
  background: var(--bg-soft);
  color: var(--primary);
  border-left-color: var(--primary);
}
.toc-back {
  display: block; margin-top: 18px;
  padding: 8px 12px; font-size: 12.5px;
  color: var(--text-muted); text-decoration: none;
  border: 1px dashed var(--border); border-radius: 6px;
  text-align: center;
}
.toc-back:hover { color: var(--primary); border-color: var(--primary); }

/* ===== 正文 ===== */
article { min-width: 0; padding-bottom: 96px; }
article section { padding: 24px 0 48px; }
article section + section {
  border-top: 1px solid var(--border);
  margin-top: 24px;
}
article h2 {
  font-family: "Source Han Serif SC", "Noto Serif SC", serif;
  font-size: 30px; font-weight: 700;
  color: #0f172a; margin: 0 0 8px;
  line-height: 1.3; scroll-margin-top: 96px;
}
article .ch-no {
  display: inline-block;
  font-size: 14px; letter-spacing: 4px;
  color: var(--primary); font-weight: 600;
  margin-bottom: 8px; text-transform: uppercase;
}
article h2 + .lead {
  font-size: 17px; color: var(--text-soft);
  margin: 8px 0 28px; line-height: 1.7;
}
article h3 {
  font-size: 22px; font-weight: 600;
  color: #111827; margin: 40px 0 12px;
  scroll-margin-top: 96px;
}
article h4 {
  font-size: 17px; font-weight: 600;
  color: #1f2937; margin: 28px 0 8px;
}
article p { margin: 14px 0; }
article ul, article ol { padding-left: 24px; }
article li { margin: 6px 0; }
article strong { color: #0f172a; font-weight: 600; }
article a {
  color: var(--primary); text-decoration: none;
  border-bottom: 1px solid transparent;
}
article a:hover { border-bottom-color: var(--primary); }

blockquote {
  border-left: 4px solid var(--primary);
  background: var(--primary-soft);
  margin: 24px 0; padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  color: #1e3a8a;
}
blockquote p { margin: 6px 0; }
blockquote cite {
  display: block; margin-top: 8px;
  font-size: 13px; color: var(--text-muted);
  font-style: normal;
}
code {
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px; background: var(--bg-code);
  padding: 2px 6px; border-radius: 4px;
  color: #be123c;
}
pre {
  background: #0f172a; color: #e2e8f0;
  padding: 18px 20px; border-radius: 8px;
  overflow-x: auto; font-size: 13.5px;
  line-height: 1.65; margin: 20px 0;
}
pre code { background: transparent; color: inherit; padding: 0; }

/* ===== 业务组件 ===== */
.term-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px; margin: 24px 0;
  box-shadow: var(--shadow);
}
.term-card .term-label {
  display: inline-block;
  background: var(--primary); color: white;
  font-size: 11px; font-weight: 700;
  letter-spacing: 1px; padding: 3px 10px;
  border-radius: 4px; margin-bottom: 10px;
  text-transform: uppercase;
}
.term-card .term-name {
  font-size: 18px; font-weight: 600;
  color: #0f172a; margin-bottom: 8px;
}
.term-card p { margin: 6px 0; font-size: 15px; }
.callout {
  display: flex; gap: 14px;
  padding: 16px 18px; border-radius: 8px;
  margin: 22px 0; border-left: 4px solid;
}
.callout-icon { font-size: 18px; font-weight: 700; flex-shrink: 0; line-height: 1.4; }
.callout-body { flex: 1; }
.callout-body p { margin: 0; }
.callout-body p + p { margin-top: 8px; }
.callout.info { background: #eff6ff; border-color: var(--primary); color: #1e40af; }
.callout.warn { background: var(--warn-soft); border-color: var(--warn); color: #92400e; }
.callout.tip { background: #ecfdf5; border-color: #10b981; color: #065f46; }

.table-wrap { overflow-x: auto; margin: 24px 0; }
table {
  width: 100%; border-collapse: collapse;
  font-size: 14.5px; background: white;
  border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
table thead { background: #0f172a; color: white; }
table th { text-align: left; padding: 12px 14px; font-weight: 600; font-size: 13.5px; }
table td {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  vertical-align: top; line-height: 1.6;
}
table tr:nth-child(even) { background: var(--bg-soft); }
table code { font-size: 12.5px; }

.timeline { margin: 32px 0; }
.timeline-item {
  position: relative;
  padding: 22px 24px 22px 80px;
  margin-bottom: 18px;
  background: var(--bg-soft);
  border-radius: 10px;
  border-left: 3px solid var(--primary);
}
.timeline-item .stage-no {
  position: absolute; left: 18px; top: 22px;
  width: 44px; height: 44px;
  background: white; border: 2px solid var(--primary);
  color: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: "Source Han Serif SC", serif;
  font-weight: 700; font-size: 18px;
}
.timeline-item .stage-year {
  font-size: 12px; font-weight: 700;
  color: var(--primary);
  letter-spacing: 1.5px; margin-bottom: 4px;
}
.timeline-item .stage-title { font-size: 18px; font-weight: 600; color: #0f172a; margin: 0 0 8px; }
.timeline-item p { margin: 8px 0; font-size: 15px; }
.timeline-item .stage-rep {
  display: inline-block; font-size: 12.5px;
  background: white; border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 4px;
  margin-right: 6px; margin-top: 6px;
  color: var(--text-soft);
}

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px; margin: 28px 0;
}
.pillar {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 18px;
  transition: all 0.2s;
}
.pillar:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.pillar .pillar-no {
  font-size: 13px; color: var(--primary);
  font-weight: 700; letter-spacing: 1px;
  margin-bottom: 6px;
}
.pillar h4 { margin: 0 0 6px; font-size: 16px; }
.pillar p { font-size: 13.5px; margin: 0; color: var(--text-soft); line-height: 1.6; }

.formula {
  background: linear-gradient(135deg, #f0f9ff 0%, #faf5ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 24px; margin: 22px 0;
  text-align: center;
  font-family: "Source Han Serif SC", serif;
  font-size: 22px; color: #0f172a;
  font-weight: 600; letter-spacing: 1px;
}
.formula em { color: var(--primary); font-style: normal; }

/* ===== 博客文章卡片网格（首页 / 分类页） ===== */
.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 56px 0 24px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.section-title h2 {
  font-family: "Source Han Serif SC", serif;
  font-size: 24px; font-weight: 700;
  margin: 0; color: #0f172a;
}
.section-title .more {
  font-size: 14px; color: var(--text-muted);
  text-decoration: none;
}
.section-title .more:hover { color: var(--primary); }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin: 24px 0 56px;
}
.post-card {
  display: flex; flex-direction: column;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px; text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}
.post-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px -8px rgba(37, 99, 235, 0.18);
  transform: translateY(-3px);
}
.post-card .cat-tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--primary); background: var(--primary-soft);
  padding: 3px 10px; border-radius: 999px;
  margin-bottom: 14px; align-self: flex-start;
}
.post-card .cat-tag.basics { color: #047857; background: #d1fae5; }
.post-card .cat-tag.harness { color: #6d28d9; background: #ede9fe; }
.post-card h3 {
  font-family: "Source Han Serif SC", serif;
  font-size: 18px; font-weight: 700;
  color: #0f172a; margin: 0 0 10px;
  line-height: 1.4;
}
.post-card .excerpt {
  font-size: 14px; color: var(--text-soft);
  line-height: 1.65; flex: 1;
  margin: 0 0 16px;
}
.post-card .meta {
  font-size: 12.5px; color: var(--text-muted);
  display: flex; gap: 12px;
}

/* ===== 首页 hero ===== */
.home-hero {
  padding: 96px 0 64px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.home-hero .eyebrow {
  display: inline-block; padding: 4px 12px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 13px; font-weight: 600; border-radius: 999px;
  margin-bottom: 24px; letter-spacing: 0.5px;
}
.home-hero h1 {
  font-family: "Source Han Serif SC", "Noto Serif SC", serif;
  font-size: 52px; line-height: 1.2;
  margin: 0 0 20px; font-weight: 700;
  color: #0f172a; letter-spacing: -1px;
}
.home-hero .lead {
  font-size: 19px; color: var(--text-soft);
  max-width: 680px; line-height: 1.7;
  margin: 0 0 28px;
}
.home-hero .quote {
  font-family: "Source Han Serif SC", serif;
  font-size: 17px; color: var(--text);
  border-left: 3px solid var(--primary);
  padding: 8px 16px;
  background: var(--bg-soft);
  margin: 28px 0 0; max-width: 640px;
}
.home-hero .quote em {
  display: block; margin-top: 8px;
  font-style: normal; font-size: 13px;
  color: var(--text-muted);
}

/* ===== 关于页 ===== */
.about-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 40px;
  margin: 32px 0;
}
.about-card h3 { margin-top: 0; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 32px 24px 64px;
  font-size: 13.5px; color: var(--text-muted);
  text-align: center; line-height: 1.8;
}
.footer .footer-inner { max-width: 1280px; margin: 0 auto; }
.footer a { color: var(--text-soft); text-decoration: none; }
.footer a:hover { color: var(--primary); }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
  .hero h1, .hero-single h1 { font-size: 28px; }
  .hero .subtitle, .hero-single .subtitle { font-size: 16px; }
  .home-hero h1 { font-size: 36px; }
  .home-hero .lead { font-size: 17px; }
  article h2 { font-size: 22px; }
  .site-nav-links { gap: 18px; font-size: 13.5px; }
}
@media (max-width: 600px) {
  .home-hero { padding: 56px 0 40px; }
  .home-hero h1 { font-size: 30px; }
  .post-grid { grid-template-columns: 1fr; }
}

/* ===== 术语词典 ===== */
.glossary {
  color: var(--primary);
  border-bottom: 1px dashed var(--primary);
  cursor: help;
  text-decoration: none;
  transition: all 0.15s;
  padding: 0 1px;
}
.glossary:hover {
  background: var(--primary-soft);
  border-bottom-style: solid;
  border-radius: 3px;
}
.glossary-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  z-index: 9998;
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s;
}
.glossary-overlay.show { opacity: 1; pointer-events: auto; }
.glossary-card {
  position: fixed; z-index: 9999;
  top: 50%; left: 50%;
  transform: translate(-50%, calc(-50% + 12px));
  width: min(520px, calc(100vw - 32px));
  max-height: min(72vh, 560px);
  overflow: hidden;
  background: white;
  border-radius: 14px;
  box-shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.35), 0 4px 16px rgba(15, 23, 42, 0.12);
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  display: flex; flex-direction: column;
}
.glossary-card.show {
  opacity: 1; pointer-events: auto;
  transform: translate(-50%, -50%);
}
.glossary-card-header {
  padding: 18px 24px 14px;
  background: linear-gradient(135deg, #eff6ff 0%, #faf5ff 100%);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.glossary-card-tag {
  display: inline-block;
  background: var(--primary); color: white;
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  padding: 3px 10px; border-radius: 4px;
  margin-bottom: 8px;
}
.glossary-card-title {
  font-family: "Source Han Serif SC", "Noto Serif SC", serif;
  font-size: 22px; font-weight: 700;
  color: #0f172a; margin: 0;
  line-height: 1.35; word-break: break-word;
}
.glossary-card-alias {
  font-size: 13px; color: var(--text-muted);
  margin-top: 4px;
  font-family: "JetBrains Mono", monospace;
}
.glossary-card-body {
  padding: 18px 24px 22px;
  font-size: 15px; line-height: 1.75;
  color: var(--text);
  overflow-y: auto; flex: 1;
}
.glossary-card-body p { margin: 0 0 10px; }
.glossary-card-body p:last-child { margin-bottom: 0; }
.glossary-card-body .gx-aka {
  font-size: 13px; color: var(--text-muted);
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.glossary-card-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 28px; height: 28px;
  border: none;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-soft);
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.glossary-card-close:hover {
  background: rgba(15, 23, 42, 0.12);
  color: var(--text);
}
.glossary-hint {
  position: fixed;
  bottom: 20px; right: 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--text-soft);
  box-shadow: var(--shadow);
  z-index: 100;
  max-width: 240px;
  line-height: 1.5;
  transition: opacity 0.3s;
}
.glossary-hint strong { color: var(--primary); }
.glossary-hint .gx-close-hint {
  color: var(--text-muted);
  cursor: pointer;
  margin-left: 8px;
  font-size: 14px;
}
@media (max-width: 600px) {
  .glossary-card { width: calc(100vw - 24px); max-height: 80vh; }
  .glossary-card-title { font-size: 19px; }
  .glossary-hint { display: none; }
}


/* ==========================================================================
 * Landing 首页 · 暗黑酷炫主题（仅 body.landing 生效，不影响其他页面）
 * ========================================================================== */

body.landing {
  background: #07091a;
  color: #e6e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* ----- 顶栏：暗色玻璃 ----- */
body.landing .landing-nav {
  background: rgba(7, 9, 26, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}
body.landing .landing-nav .site-nav-brand {
  color: #f5f7ff;
  font-family: "Source Han Serif SC", "Noto Serif SC", serif;
}
body.landing .landing-nav .site-nav-brand .brand-dot {
  background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.6);
}
body.landing .landing-nav .site-nav-links a {
  color: #b8c0d4;
  text-decoration: none;
  margin-left: 24px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: color 0.2s ease;
}
body.landing .landing-nav .site-nav-links a:hover { color: #fff; }
body.landing .landing-nav .site-nav-links a.active {
  color: #fff;
  position: relative;
}
body.landing .landing-nav .site-nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 2px;
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
  border-radius: 2px;
}

/* ===== HERO ===== */
.landing-hero {
  position: relative;
  min-height: calc(100vh - 60px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.landing-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.landing-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}
.landing-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: glow-float 18s ease-in-out infinite;
}
.landing-glow-a {
  width: 520px; height: 520px;
  left: -120px; top: 10%;
  background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
}
.landing-glow-b {
  width: 460px; height: 460px;
  right: -100px; top: 30%;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
  animation-delay: -6s;
}
.landing-glow-c {
  width: 380px; height: 380px;
  left: 35%; bottom: -120px;
  background: radial-gradient(circle, #f472b6 0%, transparent 70%);
  animation-delay: -12s;
  opacity: 0.35;
}
@keyframes glow-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.05); }
  66%      { transform: translate(-30px, 30px) scale(0.95); }
}

.landing-hero-inner {
  position: relative; z-index: 1;
  max-width: 1100px;
  width: 100%;
  padding: 80px 24px 120px;
  text-align: center;
}
.landing-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(124, 58, 237, 0.35);
  background: rgba(124, 58, 237, 0.1);
  border-radius: 999px;
  color: #c4b5fd;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.landing-title {
  font-family: "Source Han Serif SC", "Noto Serif SC", serif;
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 28px;
  color: #f8fafc;
  letter-spacing: -1px;
}
.landing-title .ln { display: block; }
.landing-title em {
  font-style: normal;
  background: linear-gradient(135deg, #c4b5fd 0%, #f472b6 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.landing-title .gradient {
  background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 50%, #34d399 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 24px rgba(124, 58, 237, 0.4));
}
.landing-lead {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.85;
  color: #b8c0d4;
  max-width: 720px;
  margin: 0 auto 40px;
}
.landing-lead .hl {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(transparent 60%, rgba(124, 58, 237, 0.25) 60%);
  padding: 0 4px;
  white-space: nowrap;
}
.landing-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 15px; font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  letter-spacing: 0.3px;
}
.btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  color: #fff;
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.55);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #e6e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}
.landing-stat {
  display: flex; gap: 56px;
  justify-content: center;
  flex-wrap: wrap;
}
.landing-stat > div {
  display: flex; flex-direction: column;
  align-items: center;
}
.landing-stat strong {
  font-family: "Source Han Serif SC", "Noto Serif SC", serif;
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(135deg, #c4b5fd 0%, #06b6d4 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.landing-stat span {
  font-size: 12px;
  color: #8a93ad;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: 8px;
}
.landing-scroll-hint {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 3px;
  color: #6b7390;
  animation: scroll-bounce 2.4s ease-in-out infinite;
}
@keyframes scroll-bounce {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.8; }
  50%      { transform: translate(-50%, 8px); opacity: 1; }
}

/* ===== Section 通用 ===== */
.landing-section {
  position: relative;
  padding: 120px 24px;
  background: #07091a;
}
.landing-section--dark {
  background: #050715;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.landing-section-inner {
  max-width: 1180px;
  margin: 0 auto;
}
.landing-section-eyebrow {
  display: block;
  font-size: 13px;
  letter-spacing: 3px;
  color: #06b6d4;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 600;
}
.landing-section-title {
  font-family: "Source Han Serif SC", "Noto Serif SC", serif;
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 700;
  line-height: 1.25;
  color: #f8fafc;
  margin: 0 0 24px;
  letter-spacing: -0.5px;
}
.landing-section-sub {
  font-size: 17px;
  color: #9099b5;
  margin: 0 0 56px;
  line-height: 1.75;
  max-width: 720px;
}

/* ===== STORY 卡片 ===== */
.landing-story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.landing-story-card {
  position: relative;
  padding: 36px 32px 32px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.landing-story-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.4);
}
.landing-story-card .num {
  display: inline-block;
  font-family: "Source Han Serif SC", "Noto Serif SC", serif;
  font-size: 30px;
  background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  font-weight: 700;
}
.landing-story-card h3 {
  font-size: 21px;
  font-weight: 700;
  margin: 0 0 14px;
  color: #f5f7ff;
  line-height: 1.4;
}
.landing-story-card p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.85;
  color: #b8c0d4;
}
.landing-story-card p:last-child { margin-bottom: 0; }
.landing-story-card strong {
  color: #f5f7ff;
  font-weight: 600;
}
.landing-story-card--accent {
  background: linear-gradient(135deg, rgba(124,58,237,0.18) 0%, rgba(6,182,212,0.10) 100%);
  border-color: rgba(124, 58, 237, 0.35);
}
.landing-story-card .quote-mini {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-style: italic;
  color: #c4b5fd;
  font-size: 14px;
}

/* ===== TIMELINE ===== */
.timeline {
  list-style: none;
  margin: 0; padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 110px;
  top: 12px; bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(124,58,237,0.4) 8%, rgba(6,182,212,0.4) 92%, transparent);
}
body.landing .timeline {
  list-style: none;
  margin: 0; padding: 0;
  background: transparent;
  border: none;
}
body.landing .timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 32px;
  padding: 16px 0 32px;
  margin-bottom: 0;
  align-items: flex-start;
  background: transparent;
  border: none;
  border-left: none;
  border-radius: 0;
}
body.landing .timeline-item p {
  color: #b8c0d4;
}
.timeline-dot {
  position: absolute;
  left: 102px;
  top: 22px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #07091a;
  border: 2px solid #06b6d4;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15);
  z-index: 1;
}
.timeline-item--current .timeline-dot {
  background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  border-color: #f472b6;
  box-shadow: 0 0 0 6px rgba(244, 114, 182, 0.18), 0 0 24px rgba(124, 58, 237, 0.6);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 6px rgba(244,114,182,0.18), 0 0 24px rgba(124,58,237,0.6); }
  50%      { box-shadow: 0 0 0 10px rgba(244,114,182,0.05), 0 0 32px rgba(124,58,237,0.9); }
}
.timeline-meta {
  font-family: "Source Han Serif SC", "Noto Serif SC", serif;
  font-size: 22px;
  font-weight: 700;
  color: #f5f7ff;
  text-align: right;
  padding-top: 16px;
  letter-spacing: 0.5px;
}
.timeline-item--current .timeline-meta {
  background: linear-gradient(135deg, #c4b5fd 0%, #06b6d4 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.timeline-card {
  padding: 22px 26px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.timeline-card:hover {
  transform: translateX(6px);
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.04);
}
.timeline-card h4 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #f5f7ff;
}
.timeline-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: #b8c0d4;
}
.timeline-card.landing-highlight {
  background: linear-gradient(135deg, rgba(124,58,237,0.14) 0%, rgba(6,182,212,0.08) 100%);
  border-color: rgba(124, 58, 237, 0.3);
}
.timeline-card.landing-highlight h4 { color: #fff; }

/* ===== CHAPTER 大目录卡 ===== */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.chapter-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 36px 30px 32px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 22px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.chapter-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.chapter-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,0.25);
}
.chapter-card:hover::before { opacity: 1; }
.chapter-card.chapter-basics         { color: #34d399; }
.chapter-card.chapter-harness        { color: #c4b5fd; }
.chapter-card.chapter-best-practices { color: #fbbf24; }
.chapter-card.chapter-about          { color: #06b6d4; }

.chapter-no {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: currentColor;
  font-weight: 600;
  margin-bottom: 20px;
  opacity: 0.85;
}
.chapter-card h3 {
  font-family: "Source Han Serif SC", "Noto Serif SC", serif;
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #f8fafc;
  letter-spacing: -0.3px;
}
.chapter-card .chapter-tag {
  font-size: 13px;
  color: currentColor;
  margin: 0 0 18px;
  opacity: 0.85;
  letter-spacing: 0.3px;
}
.chapter-card .chapter-desc {
  font-size: 14.5px;
  line-height: 1.85;
  color: #9099b5;
  margin: 0 0 18px;
}
.chapter-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  flex-grow: 1;
}
.chapter-list li {
  position: relative;
  padding: 8px 0 8px 18px;
  font-size: 13.5px;
  color: #b8c0d4;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
}
.chapter-list li:last-child { border-bottom: none; }
.chapter-list li::before {
  content: "›";
  position: absolute;
  left: 0; top: 7px;
  color: currentColor;
  font-weight: 700;
  font-size: 16px;
}
.chapter-go {
  margin-top: auto;
  align-self: flex-start;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: currentColor;
  border: 1px solid currentColor;
  opacity: 0.85;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.chapter-card:hover .chapter-go {
  opacity: 1;
  background: rgba(255,255,255,0.12);
}

/* ===== Outro / Footer 暗黑版 ===== */
.landing-outro {
  text-align: center;
  padding: 80px 24px 40px;
  background: #050715;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.landing-outro-quote {
  font-family: "Source Han Serif SC", "Noto Serif SC", serif;
  font-size: clamp(22px, 3vw, 32px);
  color: #f5f7ff;
  font-style: italic;
  margin: 0 0 12px;
  line-height: 1.45;
}
.landing-outro-quote em {
  font-style: italic;
  background: linear-gradient(135deg, #c4b5fd 0%, #06b6d4 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.landing-outro-by {
  font-size: 13px;
  color: #6b7390;
  letter-spacing: 0.5px;
  margin: 0;
}
body.landing .landing-footer {
  background: #050715;
  border-top: 1px solid rgba(255,255,255,0.06);
}
body.landing .landing-footer .footer-inner {
  color: #6b7390;
  font-size: 13px;
  text-align: center;
  padding: 40px 24px;
}
body.landing .landing-footer a {
  color: #b8c0d4;
}

/* ===== 响应式 ===== */
@media (max-width: 720px) {
  .timeline::before { left: 16px; }
  .timeline-item { grid-template-columns: 50px 1fr; gap: 20px; }
  .timeline-dot { left: 8px; }
  .timeline-meta { text-align: left; font-size: 16px; padding-top: 14px; }
  .landing-stat { gap: 28px; }
  .landing-stat strong { font-size: 28px; }
  .landing-section { padding: 80px 20px; }
  .landing-hero-inner { padding: 60px 20px 100px; }
}


/* ==========================================================================
 * 滚动渐入动效（IntersectionObserver 给元素加 .is-visible）
 * ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Story 卡片：从下方淡入 + 轻微缩放 */
.landing-story-card.reveal {
  transform: translateY(36px) scale(0.97);
}
.landing-story-card.reveal.is-visible {
  transform: translateY(0) scale(1);
}

/* Timeline 节点：从左淡入（移动端用上下） */
.timeline-item.reveal {
  transform: translateX(-32px);
}
.timeline-item.reveal.is-visible {
  transform: translateX(0);
}
@media (max-width: 720px) {
  .timeline-item.reveal { transform: translateY(24px); }
  .timeline-item.reveal.is-visible { transform: translateY(0); }
}

/* Section 标题区也淡入 */
.landing-section .landing-section-eyebrow.reveal,
.landing-section .landing-section-title.reveal,
.landing-section .landing-section-sub.reveal {
  transform: translateY(20px);
}

/* 章节大目录卡：从下方淡入 */
.chapter-card.reveal {
  transform: translateY(40px);
}
.chapter-card.reveal.is-visible {
  transform: translateY(0);
}

/* 尊重无障碍偏好：减少动效则不做位移/动画 */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .landing-story-card.reveal,
  .timeline-item.reveal,
  .chapter-card.reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* ===========================================
 * 对比表格（用于 basics 长文里的对比表）
 * =========================================== */
.diff-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.95rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}
.diff-table thead {
  background: #f9fafb;
}
.diff-table th,
.diff-table td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
  line-height: 1.55;
}
.diff-table th {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.92rem;
}
.diff-table tbody tr:last-child th,
.diff-table tbody tr:last-child td {
  border-bottom: none;
}
.diff-table tbody tr:hover {
  background: #fafbfc;
}
.diff-table strong {
  color: #0f172a;
}

article pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 1.2rem 0;
}
article pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}
article blockquote {
  border-left: 4px solid #34d399;
  background: #f0fdf4;
  padding: 0.9rem 1.2rem;
  margin: 1.2rem 0;
  border-radius: 0 6px 6px 0;
  color: #064e3b;
}
article blockquote strong {
  color: #065f46;
}


/* ===========================================
 * 案例文章 · 架构图（脱敏版 SVG）
 * =========================================== */
.arch-figure {
  margin: 1.8rem 0 2.2rem;
  padding: 18px;
  background: #fafbfc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-align: center;
}
.arch-figure svg {
  width: 100%;
  height: auto;
  max-width: 1080px;
  display: block;
  margin: 0 auto;
}
.arch-figure figcaption {
  margin-top: 12px;
  font-size: 0.86rem;
  color: #64748b;
  line-height: 1.6;
  text-align: center;
}
@media (max-width: 720px) {
  .arch-figure {
    padding: 8px;
  }
  .arch-figure svg {
    min-width: 720px;
  }
  .arch-figure figcaption {
    font-size: 0.8rem;
  }
}

/* ===== 代码块（pre.code-block + 内联 code） ===== */
pre.code-block {
  background: #0d1424;
  border: 1px solid #1f2a44;
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin: 1.3rem 0;
  overflow-x: auto;
  font-family: 'SF Mono', 'JetBrains Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 0.84rem;
  line-height: 1.65;
  color: #d8e1f3;
  position: relative;
}
pre.code-block code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
  white-space: pre;
}
pre.code-block::before {
  content: attr(data-lang);
  position: absolute;
  top: 8px;
  right: 14px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #6b7a99;
  text-transform: uppercase;
  font-family: inherit;
}
.code-caption {
  font-size: 0.82rem;
  color: #8a96b0;
  margin: -0.6rem 0 1.2rem 0;
  font-style: italic;
}
@media (max-width: 760px) {
  pre.code-block {
    font-size: 0.78rem;
    padding: 0.9rem 1rem;
    border-radius: 8px;
  }
}
