/* ============================================================
   个人网站  style.css
   设计令牌 → 基础 → 布局 → 组件 → 页面 → 响应式 → 打印
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  --bg: #f6f7fb;
  --bg-alt: #edf0f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #1c2333;
  --text-2: #55607a;
  --text-3: #8a93a8;
  --border: #e4e8f0;
  --accent: #4f6ef7;
  --accent-2: #7c5cfc;
  --accent-soft: rgba(79, 110, 247, 0.1);
  --accent-gradient: linear-gradient(135deg, #4f6ef7 0%, #7c5cfc 100%);
  --code-bg: #0f1526;
  --code-text: #e2e8f0;
  --shadow: 0 4px 20px rgba(28, 35, 51, 0.06);
  --shadow-lg: 0 14px 44px rgba(28, 35, 51, 0.12);
  --header-h: 64px;
  --radius: 14px;
  --radius-sm: 9px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

[data-theme="dark"] {
  --bg: #0b0f1c;
  --bg-alt: #0e1424;
  --surface: #131a2c;
  --surface-2: #171f36;
  --text: #e8ecf5;
  --text-2: #a3adc4;
  --text-3: #6b7590;
  --border: #232c46;
  --accent: #6d86ff;
  --accent-2: #9d7cff;
  --accent-soft: rgba(109, 134, 255, 0.15);
  --code-bg: #0a0f1e;
  --code-text: #e2e8f0;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 14px 44px rgba(0, 0, 0, 0.45);
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; transition: color 0.15s ease, opacity 0.15s ease; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 { line-height: 1.35; margin: 0; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }

.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }

.container { width: min(1100px, calc(100% - 48px)); margin-inline: auto; }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow); }

.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 20px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--accent-gradient); color: #fff;
  display: grid; place-items: center; font-size: 19px; font-weight: 800;
  box-shadow: 0 4px 14px rgba(79, 110, 247, 0.35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; font-size: 15.5px; }
.brand-text small { font-size: 11.5px; font-weight: 500; color: var(--text-3); }

.site-nav { margin-left: auto; display: flex; gap: 4px; }
.nav-link {
  padding: 7px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 500;
  color: var(--text-2); transition: all 0.15s ease;
}
.nav-link:hover { color: var(--text); background: var(--accent-soft); }
.nav-link.active { color: #fff; background: var(--accent-gradient); box-shadow: 0 3px 10px rgba(79, 110, 247, 0.3); }

.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 38px; height: 38px; border: none; border-radius: 10px;
  background: transparent; color: var(--text-2);
  display: grid; place-items: center; transition: all 0.15s ease;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }

.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

.nav-burger { display: none; }
.nav-burger .icon-x { display: none; }
.nav-burger[aria-expanded="true"] .icon-menu { display: none; }
.nav-burger[aria-expanded="true"] .icon-x { display: block; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; line-height: 1.5;
  border: 1px solid transparent; transition: all 0.18s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent-gradient); color: #fff; box-shadow: 0 4px 16px rgba(79, 110, 247, 0.35); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(79, 110, 247, 0.45); }
.btn-ghost { border-color: var(--border); color: var(--text-2); background: var(--surface); }
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.btn-lg { padding: 13px 30px; font-size: 15.5px; }
.btn-block { width: 100%; justify-content: center; margin-top: 16px; }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 84px 0 70px;
  background:
    radial-gradient(640px 320px at 12% 15%, var(--accent-soft), transparent 62%),
    radial-gradient(520px 280px at 88% 85%, rgba(124, 92, 252, 0.12), transparent 62%),
    var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.4;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 40%, black 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 65% at 50% 40%, black 20%, transparent 78%);
  pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: center; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 15px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--accent);
  box-shadow: var(--shadow); margin-bottom: 20px;
}
.hero-name {
  font-size: clamp(40px, 6vw, 62px); font-weight: 800; letter-spacing: 1px;
  background: var(--accent-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-role { font-family: var(--mono); font-size: clamp(16px, 2.4vw, 21px); color: var(--text-2); margin-top: 6px; min-height: 1.6em; }
.typed-cursor { color: var(--accent); animation: blink 1s step-end infinite; font-weight: 400; }
@keyframes blink { 50% { opacity: 0; } }

.hero-intro { margin-top: 20px; max-width: 560px; color: var(--text-2); font-size: 15.5px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-social { display: flex; align-items: center; gap: 16px; margin-top: 26px; color: var(--text-3); }
.hero-social a { color: var(--text-3); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); transition: all 0.15s ease; }
.hero-social a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.hero-social-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }

/* 芯片插画 */
.hero-visual { display: grid; place-items: center; }
.chip-illustration { display: flex; align-items: center; animation: float 5s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.chip-pins { display: flex; flex-direction: column; gap: 11px; }
.chip-pins i { display: block; width: 20px; height: 4px; background: var(--accent); opacity: 0.75; border-radius: 2px; }
.chip-pins.left i { border-radius: 3px 0 0 3px; }
.chip-pins.right i { border-radius: 0 3px 3px 0; }
.chip-body {
  width: 196px; height: 196px; border-radius: 24px;
  background: var(--accent-gradient);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: #fff; box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  position: relative;
}
.chip-body::after {
  content: ""; position: absolute; inset: 14px; border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.35);
}
.chip-logo { font-size: 66px; font-weight: 800; }
.chip-sub { font-size: 12px; letter-spacing: 0.4em; opacity: 0.85; padding-left: 0.4em; }

/* ---------- 数据带 ---------- */
.stats-band { padding: 10px 0 34px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 18px; text-align: center; box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat strong { display: block; font-size: 28px; font-weight: 800; background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat span { font-size: 13px; color: var(--text-3); }

/* ---------- 区块通用 ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-kicker { font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: 0.3em; color: var(--accent); }
.section-title { font-size: clamp(24px, 3.4vw, 32px); margin-top: 8px; }
.section-sub { color: var(--text-3); margin-top: 10px; font-size: 15px; }
.section-more { text-align: center; margin-top: 40px; }

/* ---------- 技能卡 ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.skill-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.skill-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 16px;
}
.skill-card h3 { font-size: 17px; }
.skill-card p { font-size: 13.5px; color: var(--text-2); margin: 10px 0 14px; }

/* ---------- 标签 chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  padding: 3px 11px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid transparent;
}
.chips-sm .chip { font-size: 11px; padding: 2px 9px; }

/* ---------- 项目卡 ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 22px; }
.project-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.project-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.project-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.project-cat .icon { width: 15px; height: 15px; }
.project-featured {
  font-size: 11px; font-weight: 700; color: #fff;
  background: var(--accent-gradient); padding: 2px 10px; border-radius: 999px;
}
.project-title { font-size: 17.5px; line-height: 1.45; }
.project-period { font-size: 12.5px; color: var(--text-3); margin: 6px 0 12px; }
.project-period .icon { width: 13px; height: 13px; }
.project-card-desc { font-size: 13.8px; color: var(--text-2); margin-bottom: 16px; flex: none; }
.project-card .chips { margin-bottom: 18px; }
.project-more {
  margin-top: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--accent);
}
.project-more .icon { width: 15px; height: 15px; transition: transform 0.15s ease; }
.project-more:hover .icon { transform: translateX(4px); }

/* ---------- 博客列表 ---------- */
.post-list { display: flex; flex-direction: column; gap: 16px; max-width: 820px; margin-inline: auto; }
.post-row {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 26px; box-shadow: var(--shadow); transition: all 0.16s ease;
}
.post-row:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.post-row h3 { font-size: 18px; line-height: 1.5; }
.post-row h3 a { color: var(--text); }
.post-row h3 a:hover { color: var(--accent); }
.post-row-summary { font-size: 14px; color: var(--text-2); margin: 8px 0 12px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: 12.5px; color: var(--text-3); }
.post-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.post-meta .icon { width: 13px; height: 13px; }

/* ---------- CTA 带 ---------- */
.cta-band { padding: 20px 0 70px; }
.cta-inner {
  background: var(--accent-gradient); border-radius: 22px;
  padding: 46px 52px; color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  box-shadow: 0 18px 50px rgba(79, 110, 247, 0.35);
  position: relative; overflow: hidden;
}
.cta-inner::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.12);
}
.cta-inner h2 { font-size: 24px; }
.cta-inner p { opacity: 0.9; margin-top: 8px; font-size: 14.5px; }
.cta-inner .btn-primary { background: #fff; color: var(--accent); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); position: relative; z-index: 1; font-family: var(--mono); }
.cta-inner .btn-primary:hover { color: var(--accent-2); }

/* ---------- 页头（子页面） ---------- */
.page-hero {
  padding: 60px 0 40px;
  background:
    radial-gradient(520px 240px at 80% 0%, var(--accent-soft), transparent 65%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { font-size: clamp(28px, 4.4vw, 40px); font-weight: 800; }
.page-hero > .container > p { color: var(--text-2); margin-top: 12px; max-width: 640px; }
.page-hero .btn { margin-top: 22px; }
.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-3); margin-bottom: 16px; }
.breadcrumb .icon { width: 13px; height: 13px; }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- 筛选栏 ---------- */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 34px; }
.filter-chip {
  padding: 7px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  transition: all 0.15s ease;
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip.active { background: var(--accent-gradient); border-color: transparent; color: #fff; box-shadow: 0 3px 10px rgba(79, 110, 247, 0.3); }
.filter-count { margin-left: auto; font-size: 13px; color: var(--text-3); font-family: var(--mono); }

/* ---------- 博客工具栏 ---------- */
.blog-toolbar { display: flex; flex-direction: column; gap: 16px; margin-bottom: 36px; }
.blog-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 11px 20px; color: var(--text-3); max-width: 460px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.blog-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.blog-search input { border: none; outline: none; background: transparent; color: var(--text); font-size: 14.5px; width: 100%; font-family: inherit; }
.blog-empty { text-align: center; color: var(--text-3); padding: 40px 0; font-size: 14.5px; }

/* ---------- 文章排版 ---------- */
.prose { max-width: 780px; margin-inline: auto; font-size: 15.5px; }
.prose h2 { font-size: 23px; margin: 46px 0 16px; padding-left: 14px; border-left: 4px solid var(--accent); }
.prose h3 { font-size: 18px; margin: 32px 0 12px; }
.prose h4 { font-size: 16px; margin: 26px 0 10px; color: var(--text-2); }
.prose p { margin: 14px 0; color: var(--text-2); }
.prose strong { color: var(--text); }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent-soft); }
.prose ul, .prose ol { margin: 14px 0; padding-left: 24px; color: var(--text-2); }
.prose li { margin: 7px 0; }
.prose ul li::marker { color: var(--accent); }
.prose ol li::marker { color: var(--accent); font-weight: 600; font-family: var(--mono); }
.prose blockquote {
  margin: 20px 0; padding: 14px 20px;
  border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-soft); color: var(--text-2); font-size: 14.5px;
}
.prose hr { border: none; height: 1px; background: var(--border); margin: 40px 0; }

.inline-code, .prose code {
  font-family: var(--mono); font-size: 0.88em;
  background: var(--accent-soft); color: var(--accent);
  padding: 2px 7px; border-radius: 6px;
}
.code-block {
  position: relative; margin: 22px 0;
  background: var(--code-bg); border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden; box-shadow: var(--shadow);
}
.code-block .code-lang {
  position: absolute; top: 10px; right: 14px;
  font-family: var(--mono); font-size: 11px; color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.code-block pre { margin: 0; padding: 18px 20px; overflow-x: auto; }
.code-block code {
  display: block; background: none; color: var(--code-text);
  font-family: var(--mono); font-size: 13.5px; line-height: 1.75; padding: 0;
  white-space: pre;
}

.table-wrap { overflow-x: auto; margin: 22px 0; border: 1px solid var(--border); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
.prose th, .prose td { padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.prose th { background: var(--surface-2); font-weight: 600; color: var(--text); font-size: 13px; }
.prose td { color: var(--text-2); }
.prose tr:last-child td { border-bottom: none; }

/* ---------- 文章/项目导航 ---------- */
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; }
.post-nav-item {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  font-size: 14px; font-weight: 500; color: var(--text-2);
  max-width: 46%; transition: all 0.15s ease;
}
.post-nav-item:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.post-nav-item.next { margin-left: auto; text-align: right; }
.post-nav-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 项目详情 ---------- */
.project-detail { max-width: 820px; }
.project-lead {
  font-size: 16px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 24px 28px; box-shadow: var(--shadow); margin-bottom: 8px;
}
.detail-block { margin-top: 44px; }
.detail-block h2 { font-size: 21px; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.detail-block h2 .icon { color: var(--accent); }
.detail-block > p { color: var(--text-2); font-size: 15px; }
.detail-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.detail-list li {
  position: relative; padding-left: 26px; color: var(--text-2); font-size: 14.5px;
}
.detail-list li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--accent-gradient);
}

/* ---------- 关于页 ---------- */
.about-grid { display: grid; grid-template-columns: 320px 1fr; gap: 40px; align-items: start; }
.about-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 34px 28px; text-align: center; box-shadow: var(--shadow);
  position: sticky; top: calc(var(--header-h) + 24px);
}
.about-avatar {
  width: 108px; height: 108px; border-radius: 50%; margin: 0 auto 18px;
  background: var(--accent-gradient); color: #fff;
  display: grid; place-items: center; font-size: 46px; font-weight: 800;
  box-shadow: 0 10px 30px rgba(79, 110, 247, 0.35);
}
.about-card h2 { font-size: 21px; }
.about-role { color: var(--accent); font-size: 14px; font-weight: 600; margin: 4px 0 20px; }
.about-info { list-style: none; display: flex; flex-direction: column; gap: 12px; text-align: left; font-size: 13.8px; color: var(--text-2); }
.about-info li { display: flex; align-items: center; gap: 10px; }
.about-info .icon { color: var(--accent); width: 16px; height: 16px; }
.about-info a { color: var(--text-2); }
.about-info a:hover { color: var(--accent); }

.timeline { list-style: none; position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 34px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -28px; top: 7px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.timeline-item:last-child .timeline-dot { background: var(--accent-gradient); border-color: transparent; animation: pulse 2s ease infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px var(--accent-soft); } 50% { box-shadow: 0 0 0 9px var(--accent-soft); } }
.timeline-head { display: flex; align-items: center; gap: 10px; }
.timeline-date { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--accent); }
.timeline-tag { font-size: 11px; color: var(--text-3); border: 1px solid var(--border); padding: 1px 9px; border-radius: 999px; }
.timeline-item h3 { font-size: 16.5px; margin: 6px 0; }
.timeline-item p { font-size: 14px; color: var(--text-2); }

.skills-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.skills-detail-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px;
}
.skills-detail-item h3 { font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.skills-detail-item h3 .icon { color: var(--accent); width: 17px; height: 17px; }
.skills-detail-item p { font-size: 13.2px; color: var(--text-2); margin: 8px 0 12px; }

/* ---------- 简历页 ---------- */
.resume { max-width: 860px; }
.resume-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  padding-bottom: 24px; border-bottom: 2px solid var(--accent); margin-bottom: 8px;
}
.resume-head h2 { font-size: 32px; }
.resume-role { color: var(--text-2); font-weight: 600; margin-top: 4px; }
.resume-contact { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; font-size: 13.5px; color: var(--text-2); }
.resume-contact li { display: flex; align-items: center; gap: 7px; }
.resume-contact .icon { color: var(--accent); width: 15px; height: 15px; }
.resume-block { margin-top: 38px; }
.resume-block h3 {
  font-size: 17px; color: var(--accent);
  padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 14px;
}
.resume-entry { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 15px; }
.resume-date { font-family: var(--mono); font-size: 13px; color: var(--text-3); white-space: nowrap; }
.resume-sub { font-size: 13.5px; color: var(--text-2); margin-top: 2px; }
.resume-list { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 7px; }
.resume-list li { position: relative; padding-left: 18px; font-size: 14px; color: var(--text-2); }
.resume-list li::before { content: "•"; position: absolute; left: 2px; color: var(--accent); font-weight: 700; }
.resume-project { margin-bottom: 26px; }
.resume-stack { font-size: 12.8px; color: var(--text-3); margin-top: 8px; font-family: var(--mono); }
.resume-skills p { font-size: 14px; color: var(--text-2); margin: 8px 0; }
.resume-skills strong { color: var(--text); }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 110px 0; }
.notfound-code {
  font-family: var(--mono); font-size: clamp(90px, 18vw, 150px); font-weight: 800; line-height: 1;
  background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.notfound h1 { font-size: 26px; margin: 18px 0 12px; }
.notfound p { color: var(--text-2); margin-bottom: 32px; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 44px 0 34px; margin-top: 30px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand strong { font-size: 15.5px; }
.footer-brand p { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13.5px; }
.footer-nav a { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); }
.footer-nav a:hover { color: var(--accent); }
.footer-note { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 7px; padding-top: 20px; border-top: 1px dashed var(--border); }
.footer-note .icon { width: 14px; height: 14px; color: #f43f5e; }
.footer-copy { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-3); }

/* ---------- 回到顶部 ---------- */
.back-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  width: 44px; height: 44px; border: none; border-radius: 13px;
  background: var(--accent-gradient); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(79, 110, 247, 0.4);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: all 0.25s ease;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { transform: translateY(-3px); }

/* ---------- 滚动显现动画 ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .chip-illustration, .typed-cursor { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { order: -1; }
  .chip-body { width: 150px; height: 150px; }
  .chip-logo { font-size: 50px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-card { position: static; }
  .skills-detail { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .container { width: calc(100% - 36px); }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 4px; padding: 14px 18px 20px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .site-nav.open { display: flex; }
  .nav-link { padding: 11px 16px; border-radius: 10px; }
  .nav-burger { display: grid; }
  .header-actions { margin-left: auto; }
  .hide-sm { display: none; }
  .hero { padding: 56px 0 50px; }
  .section { padding: 48px 0; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .cta-inner { padding: 32px 26px; }
  .footer-inner { grid-template-columns: 1fr; }
  .post-nav-item { max-width: 100%; }
  .resume-head { flex-direction: column; align-items: flex-start; }
  .resume-contact { grid-template-columns: 1fr; }
  .filter-count { width: 100%; margin-left: 0; }
}

/* ---------- 打印（简历页） ---------- */
@media print {
  .site-header, .site-footer, .back-top, .no-print, .page-hero .btn { display: none !important; }
  body { background: #fff; color: #000; font-size: 12px; }
  .page-hero { padding: 0 0 12px; background: none; border: none; }
  .page-hero h1 { font-size: 20px; }
  .page-hero > .container > p { display: none; }
  .section { padding: 0; }
  .resume { max-width: none; }
  .resume-head h2 { font-size: 24px; }
  .resume-block { margin-top: 18px; page-break-inside: avoid; }
  .resume-project { page-break-inside: avoid; }
  .reveal { opacity: 1 !important; transform: none !important; }
  a { color: #000; text-decoration: none; }
}
