/* ==========================================================================
   个人网站前台样式 · 明亮编辑风（Bright Editorial）
   --------------------------------------------------------------------------
   设计依据：对 10 个全球顶级产品经理 / 独立开发者个人网站的实测调研
   （simonwillison.net、overreacted.io、tylermcginnis.com、jvns.ca、swyx.io、
    sindresorhus.com、joshwcomeau.com、kentcdodds.com 等）。

   提炼出的共性：
     · 背景近白或暖白（#fdfdfd / white / #f9f4da），不是灰
     · 正文近黑（#000 / #222 / #231f20），对比强
     · 层次靠 1px 浅边框，而不是重阴影
     · 单一强调色克制使用
     · Hero 极简：一句话介绍完立刻进入内容
     · 亮/暗主题切换是标配
   因此本主题：
     · 暖白底 #fcfcfa + 纯白卡片，用明度差制造层次
     · 墨黑正文 + 暖灰次级
     · 紫罗兰强调色（比通用蓝更高级、更有辨识度）+ 琥珀金数字高亮
     · 编号章节眉标（01 / 02 / 03）
     · 默认亮色，可切暗色

   约束：零外部资源（无 CDN / 无外部字体），图标内联 SVG，支持 reduced-motion。
   ========================================================================== */

/* ---------------------------------------------------------------- 设计令牌 */

:root {
  color-scheme: light;

  /* 表面：暖白 → 纯白，用明度差而非阴影做层次 */
  --bg: #fcfcfa;
  --bg-subtle: #f7f7f5;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-inset: #f4f4f1;
  --bg-code: #f6f7f9;

  /* 墨色文字：对比强烈（对齐 #000/#222/#231f20 一档） */
  --text: #1a1a1f;
  --text-strong: #0d0d10;
  --text-soft: #55555f;
  --text-dim: #8a8a94;

  /* 边框：层次的主要手段 */
  --line: #e6e6e1;
  --line-soft: #efefea;
  --line-strong: #d5d5ce;

  /* 强调：紫罗兰 + 琥珀金 */
  --accent: #6d4aff;
  --accent-ink: #5b34f0;
  --accent-soft: #f0ecff;
  --accent-line: #d8cfff;
  --gold: #b06d00;
  --gold-soft: #fff4e0;

  /* 语义色（采集来源标记等） */
  --wechat: #12805c;
  --wechat-soft: #e6f5ef;
  --external: #1a6fb8;
  --external-soft: #e7f1fb;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --wrap: 1140px;
  --wrap-narrow: 720px;   /* 阅读栏宽：对齐 700–760px 的行业惯例 */

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: ui-serif, Georgia, Cambria, "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-sm: 0 1px 2px rgba(16, 16, 24, 0.04);
  --shadow: 0 4px 16px -6px rgba(16, 16, 24, 0.1), 0 1px 3px rgba(16, 16, 24, 0.04);
  --shadow-lg: 0 20px 44px -22px rgba(16, 16, 24, 0.22), 0 2px 6px rgba(16, 16, 24, 0.05);
}

/* 暗色主题：同一套令牌换值，布局与组件代码完全复用 */
:root[data-theme='dark'] {
  color-scheme: dark;

  --bg: #131317;
  --bg-subtle: #17171c;
  --bg-card: #1b1b21;
  --bg-card-hover: #212127;
  --bg-inset: #101014;
  --bg-code: #16161b;

  --text: #e9e9ee;
  --text-strong: #ffffff;
  --text-soft: #a8a8b4;
  --text-dim: #74747f;

  --line: #2a2a31;
  --line-soft: #232329;
  --line-strong: #3a3a43;

  --accent: #9d84ff;
  --accent-ink: #b3a0ff;
  --accent-soft: #241f3d;
  --accent-line: #3d3466;
  --gold: #e0a63c;
  --gold-soft: #2e2413;

  --wechat: #4ade80;
  --wechat-soft: #14261c;
  --external: #60a5fa;
  --external-soft: #14202e;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 16px -6px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 44px -22px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* ---------------------------------------------------------------- 基础 */

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.75;
  letter-spacing: 0.002em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: var(--wrap-narrow); }

.ico { width: 20px; height: 20px; flex: none; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--accent); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* 顶部柔和的强调色氛围：替代原来的深色光晕，提亮但不刺眼 */
.ambient {
  position: absolute; inset: 0 0 auto 0; height: 620px; z-index: 0;
  overflow: hidden; pointer-events: none;
}
.ambient::before {
  content: ''; position: absolute; top: -260px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 74, 255, 0.11), transparent 66%);
  filter: blur(60px);
}
.ambient::after {
  content: ''; position: absolute; top: -180px; right: 8%; width: 460px; height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 176, 65, 0.1), transparent 68%);
  filter: blur(70px);
}
:root[data-theme='dark'] .ambient::before { background: radial-gradient(circle, rgba(157, 132, 255, 0.16), transparent 66%); }
:root[data-theme='dark'] .ambient::after { background: radial-gradient(circle, rgba(224, 166, 60, 0.09), transparent 68%); }

/* 极细网格，仅首屏可见，增加"编辑部"质感 */
.ambient-grid {
  position: absolute; inset: 0 0 auto 0; height: 560px; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 10%, transparent 72%);
  opacity: 0.6;
}

/* ---------------------------------------------------------------- 顶部导航 */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-nav { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 18px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -0.015em; }
.brand-mark {
  display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px;
  background: var(--accent); color: #fff;
  box-shadow: var(--shadow-sm);
}
.brand-ico { width: 17px; height: 17px; }
.brand-text { font-size: 15.5px; color: var(--text-strong); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  position: relative; padding: 8px 13px; border-radius: 8px;
  color: var(--text-soft); font-size: 14.5px; font-weight: 500;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.nav-link:hover { color: var(--text-strong); background: var(--bg-inset); }
.nav-link.is-active { color: var(--text-strong); font-weight: 600; }
.nav-link.is-active::after {
  content: ''; position: absolute; left: 13px; right: 13px; bottom: 1px; height: 2px;
  background: var(--accent); border-radius: 2px;
}

.nav-cta {
  margin-left: 8px; padding: 8px 17px; border-radius: 9px;
  background: var(--text-strong); color: var(--bg);
  font-size: 14px; font-weight: 600;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), opacity 0.18s var(--ease);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow); opacity: 0.92; }

/* 主题切换 */
.theme-toggle {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  margin-left: 6px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-card); color: var(--text-soft);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.theme-toggle:hover { color: var(--text-strong); border-color: var(--line-strong); }
.theme-toggle .ico { width: 17px; height: 17px; }
.theme-toggle .ico-moon { display: none; }
:root[data-theme='dark'] .theme-toggle .ico-sun { display: none; }
:root[data-theme='dark'] .theme-toggle .ico-moon { display: block; }

.nav-toggle {
  display: none; width: 38px; height: 38px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg-card); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav-toggle span { display: block; width: 16px; height: 1.5px; background: var(--text-soft); transition: 0.2s var(--ease); }

.site-main { flex: 1; position: relative; z-index: 1; }

/* ---------------------------------------------------------------- 区块与眉标 */

.section { padding: 84px 0; border-top: 1px solid var(--line-soft); }
.section:first-of-type { border-top: none; }
.section-highlights { padding: 0; border-top: none; }

.section-head { margin-bottom: 42px; max-width: 700px; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; max-width: none; gap: 20px; }

/* 编号眉标：01 — 方向（顶级作品集常见手法） */
.section-eyebrow {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 14px; font-size: 12.5px; font-weight: 650;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
}
.section-eyebrow .idx {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  color: var(--text-dim); letter-spacing: 0.04em;
}
.section-eyebrow .rule {
  flex: 1; height: 1px; background: var(--line); max-width: 40px;
}

.section-title {
  margin: 0; font-size: clamp(26px, 3.5vw, 37px); line-height: 1.22;
  letter-spacing: -0.028em; font-weight: 700; color: var(--text-strong);
}
.section-title-sm { font-size: 21px; margin-bottom: 24px; letter-spacing: -0.02em; }
.section-desc { margin: 15px 0 0; color: var(--text-soft); font-size: 16.5px; line-height: 1.8; }

.link-more {
  display: inline-flex; align-items: center; gap: 7px; color: var(--accent);
  font-size: 14.5px; font-weight: 600; white-space: nowrap;
  padding-bottom: 2px; border-bottom: 1px solid transparent;
  transition: gap 0.18s var(--ease), border-color 0.18s var(--ease);
}
.link-more:hover { gap: 11px; border-bottom-color: var(--accent-line); }
.link-ico { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- 按钮 */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
              background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.btn-ico { width: 17px; height: 17px; }
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 14px -6px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--accent) 85%, transparent); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: var(--bg-card); }
.btn-ghost:hover { background: var(--bg-inset); border-color: var(--text-dim); transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* ---------------------------------------------------------------- Hero */

.hero { padding: 86px 0 68px; position: relative; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 56px; align-items: start; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 20px;
  font-size: 12px; font-weight: 650; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-dim);
}
.eyebrow-line { display: block; width: 26px; height: 2px; background: var(--accent); border-radius: 2px; }

.hero-title { margin: 0 0 18px; display: flex; flex-direction: column; gap: 4px; }
/* 姓名用大字号紧字距，靠字重与色深建立权威感（对齐顶级作品集做法） */
.hero-name {
  font-size: clamp(40px, 6vw, 64px); line-height: 1.04; font-weight: 800;
  letter-spacing: -0.042em; color: var(--text-strong);
}
.hero-headline {
  font-size: clamp(17px, 2vw, 21px); font-weight: 500; color: var(--text-soft);
  letter-spacing: -0.008em; line-height: 1.5;
}
.hero-tagline {
  margin: 0 0 24px; font-size: 18px; color: var(--text-soft);
  max-width: 33em; line-height: 1.78;
}

.hero-keywords { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 32px; }
.kw-chip {
  padding: 7px 15px; border-radius: 999px; font-size: 14px; font-weight: 600;
  color: var(--accent-ink); border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease);
}
.kw-chip:hover { transform: translateY(-2px); border-color: var(--accent); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }

.hero-roles { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-dim); }
.role-sep { opacity: 0.45; }

/* 右侧：头像 + "当前在做" 状态卡（独立开发者站点标配） */
.hero-side { display: flex; flex-direction: column; gap: 16px; }
.hero-avatar {
  width: 104px; height: 104px; border-radius: 26px; overflow: hidden;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  font-size: 40px; font-weight: 700;
  box-shadow: var(--shadow-lg);
}
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; }

.hero-card {
  padding: 20px 22px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--bg-card); box-shadow: var(--shadow-sm);
}
.hero-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex: none;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
}
.hero-card-label {
  margin: 0; font-size: 11.5px; font-weight: 650; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--text-dim);
}
.hero-card-value { margin: 0 0 14px; font-size: 15px; color: var(--text); line-height: 1.72; }
.hero-card-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding-top: 13px; border-top: 1px solid var(--line-soft);
  font-size: 13px; color: var(--text-dim);
}
.hero-card-meta .ico { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- 数据亮点 */

.hl-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}
.hl-item {
  padding: 28px 24px; background: var(--bg-card);
  border-right: 1px solid var(--line);
  transition: background 0.22s var(--ease);
}
.hl-item:last-child { border-right: none; }
.hl-item:hover { background: var(--bg-subtle); }
.hl-metric { display: flex; align-items: baseline; gap: 3px; margin-bottom: 7px; }
/* 数字用琥珀金提亮，制造明快的视觉节奏 */
.hl-num {
  font-size: 34px; font-weight: 750; letter-spacing: -0.035em; line-height: 1;
  color: var(--gold); font-variant-numeric: tabular-nums;
}
.hl-unit { font-size: 15px; font-weight: 650; color: var(--gold); opacity: 0.75; }
.hl-label { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--text-strong); }
.hl-note { margin: 5px 0 0; font-size: 12.5px; color: var(--text-dim); }
.hl-item-sm { padding: 14px 0; background: transparent; border-right: none; }
.hl-item-sm .hl-num { font-size: 23px; }
.hl-item-sm .hl-label { font-size: 13px; color: var(--text-soft); font-weight: 500; }

/* ---------------------------------------------------------------- 三大方向 */

.focus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.focus-card {
  position: relative; padding: 30px 26px; border-radius: var(--radius-lg);
  border: 1px solid var(--line); background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  overflow: hidden;
}
.focus-card:hover {
  transform: translateY(-3px); border-color: var(--accent-line);
  box-shadow: var(--shadow-lg);
}
.focus-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: var(--accent); opacity: 0; transition: opacity 0.25s var(--ease);
}
.focus-card:hover::before { opacity: 1; }

/* 卡片编号 01/02/03 */
.focus-num {
  position: absolute; top: 22px; right: 24px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--text-dim); opacity: 0.5; letter-spacing: 0.06em;
}
.focus-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent);
  margin-bottom: 18px;
}
.focus-ico { width: 21px; height: 21px; }
.focus-title { margin: 0 0 11px; font-size: 19px; font-weight: 680; letter-spacing: -0.018em; color: var(--text-strong); }
.focus-desc { margin: 0 0 18px; font-size: 14.8px; color: var(--text-soft); line-height: 1.82; }
.focus-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  padding: 4px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 500;
  color: var(--text-soft); background: var(--bg-inset);
  border: 1px solid var(--line); transition: 0.18s var(--ease);
}
.chip-sm { font-size: 12px; padding: 3px 9px; }
.chip-link:hover { color: var(--accent-ink); border-color: var(--accent-line); background: var(--accent-soft); }
.chip-link.is-on { color: #fff; background: var(--accent); border-color: var(--accent); }
.chip-n { margin-left: 6px; opacity: 0.6; font-size: 11.5px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

/* ---------------------------------------------------------------- 文章卡片 */

.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

.post-card {
  display: flex; flex-direction: column; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg-card);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.post-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-lg); }

.card-cover { aspect-ratio: 16 / 8; overflow: hidden; background: var(--bg-inset); border-bottom: 1px solid var(--line-soft); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.post-card:hover .card-cover img { transform: scale(1.035); }

.card-body { padding: 24px 24px 20px; display: flex; flex-direction: column; flex: 1; }
.card-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-dim); margin-bottom: 12px;
}
.dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.card-cat { color: var(--accent); font-weight: 650; }

.src-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px;
  border-radius: 5px; font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--line); color: var(--text-dim); background: var(--bg-inset);
}
.src-badge .ico { width: 12px; height: 12px; }
.src-wechat { color: var(--wechat); border-color: color-mix(in srgb, var(--wechat) 30%, transparent); background: var(--wechat-soft); }
.src-external { color: var(--external); border-color: color-mix(in srgb, var(--external) 30%, transparent); background: var(--external-soft); }

.card-title { margin: 0 0 11px; font-size: 18.5px; line-height: 1.45; font-weight: 660; letter-spacing: -0.018em; color: var(--text-strong); }
.card-title a { transition: color 0.18s var(--ease); }
.post-card:hover .card-title a { color: var(--accent); }
.card-summary {
  margin: 0 0 18px; font-size: 14.5px; color: var(--text-soft); line-height: 1.8;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.card-more {
  display: inline-flex; align-items: center; gap: 5px; font-size: 13px;
  color: var(--text-dim); font-weight: 600; white-space: nowrap;
  transition: color 0.18s var(--ease), gap 0.18s var(--ease);
}
.post-card:hover .card-more { color: var(--accent); gap: 9px; }
.card-more .ico { width: 15px; height: 15px; }

.tag {
  font-size: 12.5px; color: var(--text-soft); padding: 3px 9px; border-radius: 5px;
  border: 1px solid var(--line); background: var(--bg-inset);
  transition: 0.18s var(--ease);
}
.tag:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

/* 精选大卡 */
.featured-wrap { margin-bottom: 18px; }
.post-card.is-featured { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr); }
.post-card.is-featured .card-body { padding: 36px 38px; justify-content: center; }
.post-card.is-featured .card-title { font-size: clamp(21px, 2.5vw, 26px); }
.post-card.is-featured .card-summary { -webkit-line-clamp: 3; font-size: 15.5px; }
.post-card.is-featured .card-cover { aspect-ratio: auto; height: 100%; min-height: 250px; border-bottom: none; border-right: 1px solid var(--line-soft); }

.featured-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold);
}
.featured-badge::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
}

/* ---------------------------------------------------------------- 时间线 */

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 1px;
  background: var(--line-strong);
}
.tl-item { position: relative; padding: 0 0 34px 36px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: 0; top: 7px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 11px; margin-bottom: 9px; }
.tl-period { font-size: 13px; font-weight: 650; color: var(--accent); letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.tl-role { margin: 0; font-size: 17.5px; font-weight: 665; letter-spacing: -0.018em; color: var(--text-strong); }
.tl-org { font-size: 14.5px; color: var(--text-dim); }
.tl-org::before { content: '· '; opacity: 0.6; }
.tl-desc { margin: 0 0 13px; font-size: 15px; color: var(--text-soft); line-height: 1.82; max-width: 66em; }
.tl-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------------------------------------------------------------- 技能 */

.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill-group {
  padding: 24px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--bg-card); box-shadow: var(--shadow-sm);
}
.skill-title {
  margin: 0 0 15px; font-size: 13px; font-weight: 680; color: var(--accent);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.skill-items { display: flex; flex-wrap: wrap; gap: 7px; }
.skill-item {
  padding: 6px 12px; border-radius: 7px; font-size: 13.5px; color: var(--text-soft);
  background: var(--bg-inset); border: 1px solid var(--line);
  transition: 0.18s var(--ease);
}
.skill-item:hover { color: var(--text-strong); border-color: var(--accent-line); background: var(--accent-soft); transform: translateY(-1px); }

/* ---------------------------------------------------------------- CTA */

.section-cta { padding-bottom: 96px; }
.cta-box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 26px;
  padding: 40px 42px; border-radius: var(--radius-xl);
  border: 1px solid var(--accent-line);
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-card) 62%);
  box-shadow: var(--shadow-sm);
}
.cta-title { margin: 0 0 9px; font-size: clamp(20px, 2.4vw, 25px); font-weight: 700; letter-spacing: -0.025em; color: var(--text-strong); }
.cta-desc { margin: 0; font-size: 15px; color: var(--text-soft); max-width: 44em; line-height: 1.8; }
.cta-actions { display: flex; gap: 11px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- 页头 / 列表 */

.page-head { padding: 62px 0 30px; }
.page-head-about { padding-bottom: 18px; }
.page-title { margin: 0 0 13px; font-size: clamp(31px, 4.3vw, 45px); font-weight: 780; letter-spacing: -0.035em; line-height: 1.16; color: var(--text-strong); }
.title-en { display: block; margin-top: 5px; font-size: 16px; font-weight: 500; color: var(--text-dim); letter-spacing: 0.01em; }
.page-sub { margin: 0; font-size: 16.5px; color: var(--text-soft); max-width: 42em; line-height: 1.8; }

.search-bar { display: flex; gap: 9px; margin-top: 24px; max-width: 500px; }
.search-bar input {
  flex: 1; padding: 11px 15px; border-radius: 10px; font-size: 14.5px;
  background: var(--bg-card); border: 1px solid var(--line-strong); color: var(--text);
  font-family: inherit;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.search-bar input::placeholder { color: var(--text-dim); }
.search-bar input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }

.filter-bar { display: flex; align-items: center; gap: 9px; margin-top: 18px; }
.filter-label { font-size: 13px; color: var(--text-dim); }
.filter-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 7px;
  font-size: 13.5px; color: var(--accent-ink); background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}
.filter-x { color: var(--text-soft); font-size: 16px; line-height: 1; }
.filter-x:hover { color: var(--text-strong); }

.section-list { padding-top: 10px; }
.post-grid-list { gap: 16px; }

.empty-state { text-align: center; padding: 66px 20px; color: var(--text-dim); }
.empty-mark {
  display: grid; place-items: center; margin: 0 auto 15px;
  width: 50px; height: 50px; border-radius: 14px;
  background: var(--bg-card); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.empty-ico { width: 23px; height: 23px; opacity: 0.55; }
.empty-state p { margin: 0; font-size: 15px; }

/* 分页 */
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 44px; flex-wrap: wrap; }
.page-nums { display: flex; align-items: center; gap: 5px; }
.page-btn {
  min-width: 37px; height: 37px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 14px; color: var(--text-soft);
  border: 1px solid var(--line); background: var(--bg-card);
  transition: 0.18s var(--ease);
}
.page-btn:hover { color: var(--text-strong); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.page-btn.is-on { color: #fff; background: var(--accent); border-color: var(--accent); font-weight: 600; }
.page-btn.is-disabled { opacity: 0.35; pointer-events: none; }
.page-gap { color: var(--text-dim); padding: 0 2px; }

/* ---------------------------------------------------------------- 文章详情 */

.post-head { padding: 56px 0 30px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); margin-bottom: 20px; }
.crumbs a { transition: color 0.18s var(--ease); }
.crumbs a:hover { color: var(--accent); }
.crumbs span { opacity: 0.45; }
.post-title { margin: 0 0 17px; font-size: clamp(29px, 4.1vw, 43px); font-weight: 780; letter-spacing: -0.035em; line-height: 1.2; color: var(--text-strong); }
.post-summary { margin: 0 0 20px; font-size: 17.5px; color: var(--text-soft); line-height: 1.78; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-dim); }
.post-meta .meta-ico { width: 15px; height: 15px; vertical-align: -3px; }

.post-cover { margin: 0 auto 40px; max-width: var(--wrap); padding: 0 28px; }
.post-cover img { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow); }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.post-layout:has(.post-aside) { grid-template-columns: 200px minmax(0, 1fr); }
.post-content-wrap { min-width: 0; max-width: var(--wrap-narrow); }

.post-aside { position: relative; }
.toc { position: sticky; top: 90px; padding-left: 15px; border-left: 1px solid var(--line); }
.toc-title {
  margin: 0 0 11px; font-size: 11.5px; font-weight: 650;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-dim);
}
.toc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.toc-list a { font-size: 13.5px; color: var(--text-dim); line-height: 1.5; display: block; transition: color 0.18s var(--ease); }
.toc-list a:hover { color: var(--accent); }
.toc-list a.is-current { color: var(--accent); font-weight: 600; }
.toc-l3 { padding-left: 11px; }
.toc-l3 a { font-size: 12.8px; }

.source-box {
  display: flex; gap: 13px; margin-top: 36px; padding: 17px 19px;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--bg-subtle);
}
.source-icon { color: var(--accent); flex: none; }
.source-icon .ico { width: 19px; height: 19px; }
.source-text { min-width: 0; }
.source-line { margin: 0 0 5px; font-size: 14px; color: var(--text-soft); }
.source-line strong { color: var(--text-strong); }
.source-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; color: var(--accent); font-weight: 600; }
.source-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.post-end { text-align: center; margin: 42px 0 32px; color: var(--text-dim); font-size: 12.5px; letter-spacing: 0.3em; }

.post-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.pn-item {
  display: flex; flex-direction: column; gap: 5px; padding: 18px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition: 0.22s var(--ease);
}
.pn-item:hover { border-color: var(--accent-line); transform: translateY(-2px); box-shadow: var(--shadow); }
.pn-next { text-align: right; }
.pn-label { font-size: 12px; color: var(--text-dim); letter-spacing: 0.06em; }
.pn-title { font-size: 14.5px; font-weight: 600; line-height: 1.5; color: var(--text-strong); }

.section-related { padding-top: 0; }

/* 阅读进度条 */
.read-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------------------------------------------------------------- 正文排版 */

.prose { font-size: 17px; line-height: 1.92; color: var(--text); }
.prose > *:first-child { margin-top: 0; }
.prose h2 {
  margin: 50px 0 16px; padding-top: 6px; font-size: 25px; font-weight: 700;
  letter-spacing: -0.025em; line-height: 1.34; color: var(--text-strong);
  scroll-margin-top: 88px;
}
.prose h3 { margin: 36px 0 13px; font-size: 20px; font-weight: 665; letter-spacing: -0.018em; color: var(--text-strong); scroll-margin-top: 88px; }
.prose h4 { margin: 28px 0 11px; font-size: 17px; font-weight: 650; color: var(--text-strong); }
.prose p { margin: 0 0 21px; }
.prose a {
  color: var(--accent); text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.18s var(--ease);
}
.prose a:hover { text-decoration-color: var(--accent); }
.prose strong { color: var(--text-strong); font-weight: 670; }
.prose em { color: var(--text-soft); }
.prose ul, .prose ol { margin: 0 0 21px; padding-left: 24px; }
.prose li { margin-bottom: 9px; }
.prose li::marker { color: var(--accent); }
.prose blockquote {
  margin: 26px 0; padding: 16px 22px; border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text); font-style: normal;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code {
  font-family: var(--font-mono); font-size: 0.88em;
  padding: 2.5px 7px; border-radius: 5px;
  background: var(--bg-code); color: var(--accent-ink);
  border: 1px solid var(--line);
}
.prose pre {
  margin: 24px 0; padding: 18px 20px; border-radius: var(--radius-sm);
  background: var(--bg-code); border: 1px solid var(--line); overflow-x: auto;
  line-height: 1.7;
}
.prose pre code { background: none; border: none; padding: 0; color: var(--text); font-size: 13.5px; }
.prose hr { margin: 42px 0; border: none; border-top: 1px solid var(--line); }
.prose img { margin: 28px auto; border-radius: var(--radius-sm); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.prose table {
  width: 100%; margin: 26px 0; border-collapse: collapse; font-size: 14.5px;
  display: block; overflow-x: auto;
}
.prose thead { background: var(--bg-subtle); }
.prose th, .prose td { padding: 10px 14px; border: 1px solid var(--line); text-align: left; }
.prose th { font-weight: 665; color: var(--text-strong); white-space: nowrap; }
.prose tbody tr:hover { background: var(--bg-subtle); }

.about-bio { font-size: 16.5px; }
.about-bio p { margin: 0 0 21px; }

/* ---------------------------------------------------------------- 关于页 */

.about-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 52px; align-items: start; }
.about-side { position: sticky; top: 90px; }
.about-card {
  padding: 28px; border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: var(--bg-card); box-shadow: var(--shadow-sm); text-align: center;
}
.about-avatar {
  width: 72px; height: 72px; margin: 0 auto 15px; border-radius: 20px;
  display: grid; place-items: center; font-size: 28px; font-weight: 700; color: #fff;
  background: var(--accent); box-shadow: var(--shadow);
}
.about-name { margin: 0 0 4px; font-size: 18px; font-weight: 690; color: var(--text-strong); }
.about-role { margin: 0 0 15px; font-size: 13.5px; color: var(--text-soft); line-height: 1.6; }
.about-meta { display: flex; justify-content: center; gap: 13px; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.about-meta .ico { width: 15px; height: 15px; vertical-align: -3px; }
.about-highlights {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px;
  margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line); text-align: left;
}

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); gap: 13px; }
.contact-item {
  display: flex; align-items: center; gap: 11px; padding: 17px 19px;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition: 0.22s var(--ease);
}
.contact-item:hover { border-color: var(--accent-line); transform: translateY(-2px); box-shadow: var(--shadow); }
.contact-item .ico { color: var(--accent); flex: none; }
.ci-label { font-size: 13px; color: var(--text-dim); }
.ci-value {
  margin-left: auto; font-size: 13.5px; font-weight: 600; color: var(--text-strong);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 58%;
}

/* ---------------------------------------------------------------- 页脚 */

.site-footer {
  margin-top: 56px; border-top: 1px solid var(--line);
  background: var(--bg-subtle); padding: 52px 0 28px;
}
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 36px; padding-bottom: 32px; }
.foot-title { margin: 0 0 7px; font-size: 18.5px; font-weight: 710; letter-spacing: -0.02em; color: var(--text-strong); }
.foot-desc { margin: 0 0 16px; font-size: 14.5px; color: var(--text-soft); }
.foot-contact { margin: 0; display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; color: var(--text-soft); }
.foot-contact a, .foot-wx { display: inline-flex; align-items: center; gap: 7px; }
.foot-contact a:hover { color: var(--accent); }
.foot-contact .ico { width: 17px; height: 17px; color: var(--accent); }

.foot-side { display: flex; flex-direction: column; gap: 15px; align-items: flex-start; }
.foot-socials { display: flex; flex-wrap: wrap; gap: 9px; }
.social {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px;
  border-radius: 8px; font-size: 13.5px; color: var(--text-soft);
  border: 1px solid var(--line); background: var(--bg-card);
  transition: 0.18s var(--ease);
}
.social:hover { color: var(--text-strong); border-color: var(--accent-line); transform: translateY(-2px); }
.social .ico { width: 16px; height: 16px; }
.foot-rss { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-dim); }
.foot-rss:hover { color: var(--accent); }
.foot-rss .ico { width: 16px; height: 16px; }

.foot-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 11px;
  padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--text-dim);
}
.foot-note { opacity: 0.85; }

/* ---------------------------------------------------------------- 动效 */

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; }
.reveal.is-in { animation: riseIn 0.58s var(--ease) forwards; }
.reveal[style*='--i'] { animation-delay: calc(var(--i) * 65ms); }

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

/* ---------------------------------------------------------------- 响应式 */

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-side { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .hero-avatar { width: 88px; height: 88px; font-size: 34px; border-radius: 22px; }
  .hero-card { flex: 1; min-width: 260px; }
  .hl-grid { grid-template-columns: repeat(2, 1fr); }
  .hl-item:nth-child(2) { border-right: none; }
  .hl-item:nth-child(1), .hl-item:nth-child(2) { border-bottom: 1px solid var(--line); }
  .focus-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 34px; }
  .about-side { position: static; }
  .post-layout:has(.post-aside) { grid-template-columns: 1fr; }
  .post-aside { display: none; }
}

@media (max-width: 780px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .section { padding: 58px 0; }
  .hero { padding: 58px 0 48px; }
  .post-grid { grid-template-columns: 1fr; }
  .post-card.is-featured { grid-template-columns: 1fr; }
  .post-card.is-featured .card-cover { min-height: 0; aspect-ratio: 16 / 8; border-right: none; border-bottom: 1px solid var(--line-soft); }
  .post-card.is-featured .card-body { padding: 24px; }
  .skills-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
  .post-nav { grid-template-columns: 1fr; }
  .pn-next { text-align: left; }
  .cta-box { padding: 30px 24px; }
  .post-cover { padding: 0 20px; }
  .prose { font-size: 16.5px; }
  .prose h2 { font-size: 22px; margin-top: 40px; }
  .prose h3 { font-size: 18.5px; }
  .about-highlights { grid-template-columns: 1fr 1fr; }
  .hero-tagline { font-size: 16.5px; }

  /* 移动端导航 */
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 3px;
    padding: 12px 20px 18px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: 0.2s var(--ease);
  }
  .nav-links.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-link { padding: 11px 13px; font-size: 15px; }
  .nav-link.is-active::after { display: none; }
  .nav-link.is-active { background: var(--accent-soft); }
  .nav-cta { margin: 7px 0 0; text-align: center; }
  .theme-toggle { margin: 7px 0 0; justify-self: start; }
  .nav-toggle[aria-expanded='true'] span:first-child { transform: translateY(3px) rotate(45deg); }
  .nav-toggle[aria-expanded='true'] span:last-child { transform: translateY(-2.5px) rotate(-45deg); }
}

@media (max-width: 480px) {
  .hl-grid { grid-template-columns: 1fr; }
  .hl-item { border-right: none; border-bottom: 1px solid var(--line); }
  .hl-item:last-child { border-bottom: none; }
  .hero-actions .btn { flex: 1; }
  .about-highlights { grid-template-columns: 1fr; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
}

/* 打印：浅色、去掉装饰 */
@media print {
  .site-header, .site-footer, .hero-actions, .post-nav, .section-cta,
  .ambient, .ambient-grid, .read-progress, .theme-toggle, .post-aside { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .prose { color: #000; }
  .post-card, .focus-card, .skill-group { box-shadow: none; border-color: #ccc; }
}

/* 语言切换按钮 */
.lang-switch {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 10px; margin-left: 6px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--bg-card); 
  color: var(--text-soft); font-size: 13px; font-weight: 600;
  text-decoration: none; cursor: pointer; letter-spacing: 0.02em;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.lang-switch:hover { 
  color: var(--text-strong); 
  border-color: var(--line-strong);
}
.lang-switch .lang-text {
  font-size: 13px;
  font-weight: 600;
}
