/* =========================================================================
 *  styles.css — 暖意亲和风设计系统
 *  琥珀暖橙主色 · OKLCH 色彩 · Fraunces 衬线标题 · 圆润边角 · 深色模式
 * ========================================================================= */

/* ---------- 设计 Token ---------- */
:root {
  /* 字体 */
  --font-display: 'Fraunces', 'Noto Serif SC', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', 'Noto Sans SC', system-ui, -apple-system, sans-serif;

  /* 色彩 — 浅色模式（暖灰中性 + 琥珀强调，无纯黑纯白） */
  --bg: oklch(98% 0.008 75);
  --bg-soft: oklch(96% 0.012 75);
  --surface: oklch(99.6% 0.005 75);
  --surface-2: oklch(95% 0.014 72);
  --text: oklch(28% 0.012 65);
  --text-muted: oklch(48% 0.012 65);
  --text-subtle: oklch(60% 0.01 65);
  --border: oklch(90% 0.012 70);
  --border-strong: oklch(82% 0.014 70);
  --accent: oklch(66% 0.16 55);
  --accent-hover: oklch(60% 0.16 55);
  --accent-press: oklch(54% 0.15 55);
  --accent-soft: oklch(94% 0.045 60);
  --accent-text: oklch(42% 0.14 55);
  --shadow-color: 55 35 25;

  /* 间距 — 4pt 基础，语义命名 */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* 圆角 — 圆润亲和 */
  --radius-sm: 0.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;
  --radius-full: 999px;

  /* 阴影 — 克制，暖色基调 */
  --shadow-sm: 0 1px 2px rgb(var(--shadow-color) / 0.06);
  --shadow-md: 0 4px 16px -4px rgb(var(--shadow-color) / 0.10), 0 2px 4px -2px rgb(var(--shadow-color) / 0.06);
  --shadow-lg: 0 18px 48px -12px rgb(var(--shadow-color) / 0.18), 0 6px 12px -6px rgb(var(--shadow-color) / 0.08);

  /* 排版 scale — 标题流体 clamp，正文固定 rem */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: clamp(1.4rem, 1.2rem + 0.8vw, 1.85rem);
  --text-2xl: clamp(1.9rem, 1.4rem + 1.8vw, 2.75rem);
  --text-hero: clamp(2.4rem, 1.6rem + 3.2vw, 4.25rem);

  --content-max: 1180px;
  --reading-max: 68ch;
  --nav-h: 4.25rem;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 深色模式 — surface 提升而非阴影，强调色略提亮降饱 */
:root[data-theme="dark"] {
  --bg: oklch(17% 0.008 65);
  --bg-soft: oklch(20% 0.01 65);
  --surface: oklch(20.5% 0.009 65);
  --surface-2: oklch(25% 0.012 65);
  --text: oklch(90% 0.008 70);
  --text-muted: oklch(70% 0.01 70);
  --text-subtle: oklch(56% 0.012 70);
  --border: oklch(29% 0.012 65);
  --border-strong: oklch(38% 0.014 65);
  --accent: oklch(76% 0.135 60);
  --accent-hover: oklch(81% 0.125 60);
  --accent-press: oklch(71% 0.13 60);
  --accent-soft: oklch(30% 0.055 60);
  --accent-text: oklch(82% 0.11 60);
  --shadow-color: 0 0 0;
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

::selection { background: var(--accent-soft); color: var(--accent-text); }

/* ---------- 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section-tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

/* ---------- 章节标题 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-text);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}
.eyebrow::before {
  content: '';
  width: 1.75rem;
  height: 2px;
  background: var(--accent);
  border-radius: var(--radius-full);
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  max-width: 20ch;
}
.section-title em {
  font-style: italic;
  color: var(--accent-text);
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.section-lead {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 52ch;
  margin-top: var(--space-3);
  line-height: 1.5;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  flex-wrap: wrap;
}
.section-head .more-link {
  flex-shrink: 0;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: var(--accent-press); }
.btn-ghost {
  border: 1.5px solid var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.btn-lg { padding: 1rem 1.85rem; font-size: var(--text-lg); }

/* 文字链接带下划线动画 */
.link {
  color: var(--accent-text);
  font-weight: 600;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}
.link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.link:hover::after { transform: scaleX(1); }
.link .arrow { transition: transform 0.3s var(--ease); }
.link:hover .arrow { transform: translateX(3px); }

/* ---------- 导航栏 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
  font-variation-settings: "SOFT" 80;
}
.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.7rem;
  background: linear-gradient(145deg, var(--accent), var(--accent-press));
  color: white;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1.75rem);
}
.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-full);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active { color: var(--accent-text); background: var(--accent-soft); }
.nav-actions { display: flex; align-items: center; gap: var(--space-2); }

/* 主题切换 */
.theme-toggle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.4s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent-text); transform: rotate(15deg); }
.theme-toggle svg { width: 1.15rem; height: 1.15rem; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* 汉堡菜单按钮 */
.menu-toggle { display: none; width: 2.5rem; height: 2.5rem; border-radius: var(--radius-full); border: 1.5px solid var(--border); place-items: center; color: var(--text); }
.menu-toggle svg { width: 1.25rem; height: 1.25rem; }

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(2.5rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 50rem;
  height: 50rem;
  background: radial-gradient(circle, var(--accent-soft), transparent 65%);
  filter: blur(20px);
  z-index: -1;
  opacity: 0.9;
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-5);
}
.hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-variation-settings: "SOFT" 50, "WONK" 0;
}
.hero-title em {
  font-style: italic;
  color: var(--accent-text);
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.hero-sub {
  font-size: var(--text-lg);
  color: var(--text-muted);
  margin-top: var(--space-5);
  max-width: 42ch;
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.hero-meta {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.hero-meta-item .num { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; color: var(--text); font-variation-settings: "SOFT" 60; }
.hero-meta-item .label { font-size: var(--text-sm); color: var(--text-subtle); margin-top: 2px; }

/* Hero 头像卡 */
.hero-portrait {
  display: flex;
  justify-content: center;
}
.portrait-card {
  width: clamp(15rem, 24vw, 20rem);
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, var(--accent-soft), var(--surface-2));
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.portrait-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, color-mix(in oklch, var(--accent) 30%, transparent), transparent 60%);
}
.portrait-initial {
  font-family: var(--font-display);
  font-size: 6rem;
  font-weight: 500;
  color: var(--accent-text);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  position: relative;
}
.portrait-card img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.portrait-tag {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  background: color-mix(in oklch, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  z-index: 2;
}
.portrait-tag .name { font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); }
.portrait-tag .role { font-size: var(--text-sm); color: var(--text-muted); }

/* ---------- 作品 / 文章网格卡片 ---------- */
.grid {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}
.grid-works { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-articles { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.grid-home-works { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* 作品卡 */
.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease), border-color 0.3s var(--ease), box-shadow 0.35s var(--ease);
  cursor: pointer;
}
.work-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.work-thumb {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.work-thumb .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--accent-soft), var(--surface-2));
}
.work-thumb .placeholder .ph-mark {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 500;
  color: var(--accent-text);
  opacity: 0.5;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.work-thumb img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.work-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.work-top { display: flex; align-items: center; gap: var(--space-2); }
.badge {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent-text);
  letter-spacing: 0.02em;
}
.badge-neutral { background: var(--surface-2); color: var(--text-muted); }
.work-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variation-settings: "SOFT" 60;
}
.work-summary { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.55; flex: 1; }
.work-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: auto; }
.tag {
  font-size: var(--text-xs);
  color: var(--text-subtle);
  background: var(--bg-soft);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}
.work-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  margin-top: var(--space-2);
}
.work-date { font-size: var(--text-sm); color: var(--text-subtle); }
.work-cta { font-size: var(--text-sm); font-weight: 600; color: var(--accent-text); display: inline-flex; align-items: center; gap: 0.3em; }
.work-cta .arrow { transition: transform 0.3s var(--ease); }
.work-card:hover .work-cta .arrow { transform: translateX(3px); }

/* 文章卡 */
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease), border-color 0.3s var(--ease), box-shadow 0.35s var(--ease);
}
.article-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.article-cover { aspect-ratio: 16 / 9; position: relative; overflow: hidden; display: grid; place-items: center; }
.article-cover .placeholder { position: absolute; inset: 0; display: grid; place-items: center; }
.article-cover .ph-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 500;
  color: white;
  opacity: 0.85;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  position: relative;
  z-index: 1;
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.article-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.article-meta { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--text-subtle); }
.article-meta .sep { opacity: 0.5; }
.article-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-variation-settings: "SOFT" 60;
  color: var(--text);
}
.article-card:hover .article-title { color: var(--accent-text); }
.article-summary { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.55; flex: 1; }

/* 分类色（文章封面占位用） */
.cat-efficiency { background: linear-gradient(140deg, oklch(70% 0.14 55), oklch(60% 0.12 50)); }
.cat-tech { background: linear-gradient(140deg, oklch(62% 0.11 250), oklch(50% 0.10 260)); }
.cat-product { background: linear-gradient(140deg, oklch(66% 0.13 145), oklch(54% 0.11 150)); }
.cat-life { background: linear-gradient(140deg, oklch(68% 0.12 320), oklch(56% 0.11 310)); }

/* ---------- 模态弹窗（作品详情） ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in oklch, var(--bg) 60%, transparent);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 56rem;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.4s var(--ease);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: sticky;
  top: var(--space-4);
  float: right;
  margin: var(--space-4) var(--space-4) 0 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background: color-mix(in oklch, var(--surface) 80%, transparent);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  z-index: 5;
  backdrop-filter: blur(6px);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.modal-close:hover { color: var(--text); border-color: var(--border-strong); }
.modal-hero {
  aspect-ratio: 21 / 9;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-hero .placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(140deg, var(--accent-soft), var(--surface-2)); }
.modal-hero .placeholder .ph-mark { font-family: var(--font-display); font-size: 5rem; font-weight: 500; color: var(--accent-text); opacity: 0.4; font-variation-settings: "SOFT" 100, "WONK" 1; }
.modal-hero img { width: 100%; height: 100%; object-fit: cover; }
.modal-content { padding: clamp(1.5rem, 4vw, 2.75rem); }
.modal-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.modal-name { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 600; letter-spacing: -0.02em; font-variation-settings: "SOFT" 60; line-height: 1.15; }
.modal-summary { font-size: var(--text-lg); color: var(--text-muted); margin-top: var(--space-3); line-height: 1.5; }
.modal-section { margin-top: var(--space-6); }
.modal-section h3 { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; margin-bottom: var(--space-3); display: flex; align-items: center; gap: var(--space-2); font-variation-settings: "SOFT" 60; }
.modal-section h3::before { content: ''; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); }
.modal-desc { color: var(--text-muted); line-height: 1.7; max-width: var(--reading-max); }
.modal-steps { display: flex; flex-direction: column; gap: var(--space-3); }
.modal-steps li { display: flex; gap: var(--space-3); color: var(--text-muted); line-height: 1.6; }
.modal-steps .step-num { flex-shrink: 0; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-size: var(--text-sm); font-weight: 700; font-family: var(--font-display); }
.modal-tech { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.modal-tech .tag { background: var(--surface-2); color: var(--text-muted); font-weight: 500; }
.modal-cta { margin-top: var(--space-7); display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* ---------- 筛选器（文章页 / 作品页） ---------- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}
.filters {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.filter-chip {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s var(--ease);
}
.filter-chip:hover { border-color: var(--border-strong); color: var(--text); }
.filter-chip.active { background: var(--accent); border-color: var(--accent); color: white; }
.sort-select {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.sort-select select {
  font: inherit;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.4rem 0.85rem;
  cursor: pointer;
}

/* ---------- 个人介绍页 ---------- */
.about-hero { padding-block: clamp(3rem, 7vw, 5rem); }
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about-bio p { color: var(--text-muted); line-height: 1.75; max-width: var(--reading-max); }
.about-bio p + p { margin-top: var(--space-4); }
.about-bio p:first-child::first-letter {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 600;
  float: left;
  line-height: 0.85;
  margin: 0.15rem 0.6rem 0 0;
  color: var(--accent-text);
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.about-side {
  position: sticky;
  top: calc(var(--nav-h) + var(--space-5));
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.info-card h4 { font-family: var(--font-display); font-size: var(--text-base); font-weight: 600; color: var(--text-subtle); margin-bottom: var(--space-3); letter-spacing: 0.02em; text-transform: uppercase; font-size: var(--text-xs); font-variation-settings: "SOFT" 60; }
.info-list { display: flex; flex-direction: column; gap: var(--space-3); }
.info-item { display: flex; align-items: center; gap: var(--space-3); }
.info-item .ico { width: 1.75rem; height: 1.75rem; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex-shrink: 0; }
.info-item .ico svg { width: 1rem; height: 1rem; }
.info-item .val { font-size: var(--text-sm); color: var(--text); word-break: break-all; }
.info-item .val.muted { color: var(--text-muted); }

/* 技能栈 */
.skills-wrap { display: grid; gap: var(--space-5); }
.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.skill-group .cat { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; margin-bottom: var(--space-4); display: flex; align-items: center; gap: var(--space-3); font-variation-settings: "SOFT" 60; }
.skill-group .cat::before { content: ''; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--accent); }
.skill-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.skill-chip {
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.2s var(--ease);
}
.skill-chip:hover { color: var(--accent-text); border-color: var(--accent); background: var(--accent-soft); }

/* 公众号卡 */
.official-card {
  background: linear-gradient(150deg, var(--accent-soft), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.official-card .qr {
  width: 6rem; height: 6rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--text-subtle);
  font-size: var(--text-xs);
  text-align: center;
  flex-shrink: 0;
}
.official-card .qr img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-md); }
.official-info .label { font-size: var(--text-sm); color: var(--text-muted); }
.official-info .name { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; margin: 2px 0 var(--space-2); font-variation-settings: "SOFT" 60; }
.official-info .desc { font-size: var(--text-sm); color: var(--text-muted); }

/* ---------- 空状态 ---------- */
.empty-state {
  text-align: center;
  padding: var(--space-9) var(--space-5);
  color: var(--text-subtle);
}
.empty-state .icon { font-size: 2.5rem; margin-bottom: var(--space-3); opacity: 0.5; }
.empty-state p { font-size: var(--text-base); }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding-block: clamp(2.5rem, 5vw, 4rem);
  margin-top: var(--space-8);
  background: var(--bg-soft);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.footer-left .brand { margin-bottom: var(--space-2); }
.footer-tag { font-size: var(--text-sm); color: var(--text-subtle); max-width: 36ch; }
.footer-social { display: flex; gap: var(--space-2); }
.social-link {
  width: 2.5rem; height: 2.5rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  display: grid; place-items: center;
  color: var(--text-muted);
  transition: all 0.2s var(--ease);
}
.social-link:hover { color: var(--accent-text); border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.social-link svg { width: 1.1rem; height: 1.1rem; }
.footer-bottom {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--text-subtle);
}

/* ---------- 滚动入场动画 ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; }
  .portrait-card { width: clamp(11rem, 40vw, 14rem); }
  .about-grid { grid-template-columns: 1fr; }
  .about-side { position: static; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-4) clamp(1.25rem, 4vw, 2.5rem);
    gap: var(--space-1);
    transform: translateY(-110%);
    transition: transform 0.4s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-link { padding: var(--space-3) var(--space-4); font-size: var(--text-base); border-radius: var(--radius-md); }
  .menu-toggle { display: grid; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .hero-meta { gap: var(--space-5); }
  .modal { max-height: 92vh; border-radius: var(--radius-lg); }
  .official-card { flex-direction: column; text-align: center; align-items: center; }
}

@media (max-width: 420px) {
  .grid-works, .grid-articles, .grid-home-works { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1; }
}
