/* ============================================================
   ZQI — 个人独立博客
   设计基调：极简克制 / 大面积留白 / 沉浸式阅读
   强调色：单一低饱和蓝
   ============================================================ */

/* ---------- 1. 设计变量 ---------- */
:root {
  /* 色板 · 浅色 */
  --bg:            #ffffff;
  --bg-soft:       #f7f7f6;   /* 浅灰底，用于页面留白分区 */
  --surface:       #ffffff;
  --surface-2:     #f2f2f1;
  --text:          #2b2b2e;   /* 深灰，非纯黑 */
  --text-2:        #55555a;
  --muted:         #9a9a9e;
  --line:          rgba(0, 0, 0, .07);
  --accent:        #5b8dd6;   /* 唯一强调色 · 低饱和蓝 */
  --accent-soft:   rgba(91, 141, 214, .10);
  --accent-line:   #a9c6ec;
  --hero-text:     #ffffff;
  --shadow-sm:     0 1px 2px rgba(0,0,0,.03), 0 6px 20px rgba(0,0,0,.045);
  --shadow-md:     0 2px 6px rgba(0,0,0,.04), 0 18px 44px rgba(0,0,0,.07);
  --nav-bg:        rgba(255,255,255,.78);
  --nav-border:    rgba(0,0,0,.05);

  /* 圆角 —— 全站统一大圆角 */
  --r-sm:   12px;
  --r-md:   18px;
  --r-lg:   26px;
  --r-xl:   34px;
  --r-pill: 999px;

  /* 留白节奏 */
  --gutter:   clamp(20px, 5vw, 40px);
  --section:  clamp(76px, 11vw, 150px);
  --measure:  720px;   /* 正文窄栏宽度 */

  /* 字体 */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* 色板 · 深色 */
html[data-theme="dark"] {
  --bg:          #141517;
  --bg-soft:     #191a1c;
  --surface:     #1b1c1f;
  --surface-2:   #232427;
  --text:        #d8d8db;
  --text-2:      #a5a5aa;
  --muted:       #6f6f75;
  --line:        rgba(255,255,255,.08);
  --accent:      #7ea9e6;
  --accent-soft: rgba(126, 169, 230, .13);
  --accent-line: #3f5d8a;
  --shadow-sm:   0 1px 2px rgba(0,0,0,.25), 0 6px 20px rgba(0,0,0,.30);
  --shadow-md:   0 2px 6px rgba(0,0,0,.30), 0 18px 44px rgba(0,0,0,.40);
  --nav-bg:      rgba(26,27,30,.72);
  --nav-border:  rgba(255,255,255,.07);
}

/* ---------- 2. 基础重置 ---------- */
* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.85;
  letter-spacing: .002em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .5s var(--ease), color .5s var(--ease);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -.022em;
  line-height: 1.3;
  margin: 0;
}

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

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 3. 顶部胶囊导航 ---------- */
.nav-shell {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  display: flex;
  justify-content: center;
  padding: 18px var(--gutter) 0;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 52px;
  padding: 6px 8px 6px 20px;
  border-radius: var(--r-pill);
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 10px 34px rgba(0,0,0,.07);
  transition: background-color .45s var(--ease), border-color .45s var(--ease),
              box-shadow .45s var(--ease), height .35s var(--ease);
}

/* 页面滚过首屏后，导航加重背景，避免正文透出来干扰阅读 */
body.scrolled .nav {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 36px rgba(0,0,0,.10);
}
html[data-theme="dark"] body.scrolled .nav {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}

/* 需要更实背景的页面（无 hero 的列表 / 详情）直接给足不透明度 */
body.no-hero .nav,
body.solid-nav .nav {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
}

/* 无 hero 的页面（Blog / Tags / About）导航更紧凑，贴近顶部 */
body.no-hero .nav-shell { padding-top: 22px; }

.nav-brand {
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: .01em;
  padding-right: 12px;
  white-space: nowrap;
}
.nav-brand::before {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 3px;
  margin-right: 9px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links a {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  padding: 8px 13px;
  border-radius: var(--r-pill);
  transition: color .25s var(--ease), background-color .25s var(--ease);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: var(--accent-soft); }
.nav-links a.active { color: var(--text); font-weight: 600; }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 6px;
  margin-left: 4px;
  border-left: 1px solid var(--line);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: var(--text-2);
  transition: color .25s var(--ease), background-color .25s var(--ease),
              transform .35s var(--ease);
}
.icon-btn:hover { color: var(--accent); background: var(--accent-soft); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 18px; height: 18px; }

/* 主题图标切换 */
html[data-theme="light"] .i-moon { display: none; }
html[data-theme="dark"]  .i-sun  { display: none; }

/* 移动端菜单按钮 */
.nav-burger { display: none; }

/* ---------- 4. Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 45%;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.6s var(--ease), transform 2.4s var(--ease);
}
.hero-media img.loaded { opacity: 1; transform: scale(1); }

/* 云雾渐隐遮罩 —— 让图片与下方内容自然衔接 */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    color-mix(in srgb, var(--bg) 55%, transparent) 62%,
    var(--bg) 100%
  );
  pointer-events: none;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10,14,22,.34) 0%, rgba(10,14,22,.18) 42%, rgba(10,14,22,.30) 100%);
}

.hero-inner {
  padding: 130px 0 170px;
  max-width: 860px;
  width: 100%;
  padding-inline: var(--gutter);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 7px 16px 7px 13px;
  border-radius: var(--r-pill);
  margin-bottom: 30px;
}
.hero-badge i {
  width: 5px; height: 5px; border-radius: 50%;
  background: #9dc0ee;
  box-shadow: 0 0 0 4px rgba(157,192,238,.22);
}

.hero-title {
  font-size: clamp(58px, 13vw, 132px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .96;
  color: var(--hero-text);
  text-shadow: 0 2px 40px rgba(0,0,0,.28);
  margin: 0;
}

.hero-sub {
  max-width: 460px;
  margin: 26px auto 0;
  font-size: clamp(15.5px, 1.6vw, 18px);
  line-height: 1.72;
  color: rgba(255,255,255,.90);
  text-shadow: 0 1px 18px rgba(0,0,0,.36);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 42px;
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 50px;
  padding: 0 30px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .005em;
  transition: transform .3s var(--ease), background-color .3s var(--ease),
              color .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  will-change: transform;
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

/* 主按钮 · 强调蓝 */
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(91,141,214,.28);
}
.btn-primary:hover { background: #4f81cd; box-shadow: 0 8px 26px rgba(91,141,214,.34); }

/* 次按钮 · 玻璃质感（用于图上游离） */
.btn-glass {
  background: rgba(255,255,255,.13);
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.btn-glass:hover { background: rgba(255,255,255,.22); }

/* 次按钮 · 实体浅灰（用于白底） */
.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
}
.btn-ghost:hover { background: color-mix(in srgb, var(--surface-2) 70%, var(--accent) 30%); }

/* ---------- 6. 区块通用 ---------- */
.section { padding: var(--section) 0; }
.section-tight { padding: calc(var(--section) * .62) 0; }
.section-soft { background: var(--bg-soft); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(34px, 4.5vw, 56px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.eyebrow i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}

.section-title {
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -.03em;
}

.section-desc {
  margin: 12px 0 0;
  color: var(--text-2);
  font-size: 15.5px;
  max-width: 52ch;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  padding-bottom: 4px;
}
.link-more svg { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.link-more:hover svg { transform: translateX(4px); }

/* ---------- 7. 文章卡片 ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: clamp(24px, 3vw, 38px);
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
  border: 0;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity .9s var(--ease), transform 1.1s var(--ease);
}
.card-media img.loaded { opacity: 1; transform: scale(1); }
.card:hover .card-media img.loaded { transform: scale(1.035); }

.card-body {
  padding: 26px 28px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 15px; }

.card-title {
  font-size: 20px;
  letter-spacing: -.022em;
  line-height: 1.42;
  margin-bottom: 11px;
  transition: color .25s var(--ease);
}
.card:hover .card-title { color: var(--accent); }

.card-excerpt {
  color: var(--text-2);
  font-size: 14.8px;
  line-height: 1.78;
  margin: 0 0 22px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .01em;
}
.card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }

/* 标签胶囊 */
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
a.tag:hover { background: var(--accent); color: #fff; }

/* ---------- 8. 首页 · 精选大图区 ---------- */
.feature {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: clamp(30px, 5vw, 72px);
}
.feature.reverse { grid-template-columns: 1fr 1.25fr; }
.feature.reverse .feature-media { order: 2; }

.feature-media {
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}
.feature-media img { width: 100%; height: 100%; object-fit: cover; }

.feature-body h3 { font-size: clamp(24px, 3vw, 33px); letter-spacing: -.03em; }
.feature-body p { color: var(--text-2); margin: 18px 0 0; }
.feature-body .card-tags { margin: 22px 0 0; }

/* ---------- 9. 页面头（Blog / Tags / About） ---------- */
.page-head {
  padding: calc(var(--section) * .78 + 60px) 0 calc(var(--section) * .42);
  text-align: center;
}
.page-title {
  font-size: clamp(38px, 6.6vw, 68px);
  letter-spacing: -.04em;
  font-weight: 800;
}
.page-desc {
  max-width: 560px;
  margin: 22px auto 0;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.8;
}

/* ---------- 10. 标签筛选条 ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: clamp(34px, 4vw, 50px);
}
.filters.center { justify-content: center; }

.chip {
  font-size: 13.5px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text-2);
  transition: all .28s var(--ease);
}
.chip:hover { color: var(--text); background: color-mix(in srgb, var(--surface-2) 66%, var(--accent) 34%); }
.chip.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(91,141,214,.24);
}
.chip .count { opacity: .55; font-size: 12px; margin-left: 5px; }

/* ---------- 11. 标签云 ---------- */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-width: 780px;
  margin: 0 auto;
}
.tag-cloud a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 15px;
  font-weight: 500;
  transition: all .3s var(--ease);
}
.tag-cloud a:hover { transform: translateY(-3px); color: var(--accent); box-shadow: var(--shadow-md); }
.tag-cloud a .n { color: var(--muted); font-size: 12.5px; }

/* ---------- 12. 文章详情 ---------- */
.post-hero {
  position: relative;
  height: clamp(420px, 62vh, 680px);
  overflow: hidden;
  background: var(--surface-2);
}
.post-hero img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 48%;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1.3s var(--ease), transform 2s var(--ease);
}
.post-hero img.loaded { opacity: 1; transform: scale(1); }
.post-hero::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 46%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    color-mix(in srgb, var(--bg) 60%, transparent) 58%,
    var(--bg) 100%
  );
}

.post-wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.post-header {
  margin-top: clamp(-84px, -6vw, -46px);
  position: relative;
  z-index: 2;
  padding-bottom: clamp(38px, 5vw, 56px);
}
.post-header .card-tags { margin-bottom: 20px; }

.post-title {
  font-size: clamp(31px, 5.2vw, 52px);
  letter-spacing: -.038em;
  line-height: 1.14;
  margin: 0 0 20px;
}

.post-sub {
  color: var(--text-2);
  font-size: clamp(16px, 1.9vw, 19px);
  line-height: 1.7;
  margin: 0 0 24px;
  max-width: 92%;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--muted);
}
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }

/* 正文 */
.prose {
  font-size: 17.5px;
  line-height: 1.95;
  color: var(--text);
  padding-bottom: clamp(50px, 6vw, 76px);
}
/* 正文节奏由「元素自身间距」控制，不用全量 * + 兄弟选择器，
   否则会覆盖标题的 margin-top 造成标题与段落贴在一起 */
.prose p      { margin: 0 0 1.65em; }
.prose ul,
.prose ol     { margin: 0 0 1.65em; }
.prose figure { margin: 2.4em 0; }
.prose hr     { margin: 3.2em auto; }

.prose h2 {
  font-size: clamp(23px, 2.8vw, 29px);
  letter-spacing: -.028em;
  margin: 2.3em 0 .95em;
}
.prose h3 {
  font-size: clamp(19px, 2.2vw, 22px);
  letter-spacing: -.02em;
  margin: 1.9em 0 .8em;
}
.prose > *:first-child { margin-top: 0; }
.prose > *:last-child  { margin-bottom: 0; }
.prose strong { font-weight: 650; color: var(--text); }
.prose a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 1px;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.prose a:hover { border-color: var(--accent); }

.prose figure { margin: 0; }
.prose figure img {
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transition: opacity .9s var(--ease);
}
.prose figure img.loaded { opacity: 1; }
.prose figcaption {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
}

/* 引用 · 左侧蓝色竖线 */
.prose blockquote {
  margin: 2.1em 0;
  padding: 22px 26px 22px 26px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: linear-gradient(90deg, var(--accent-soft), transparent 72%);
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.92;
}
.prose blockquote p { margin: 0; }
.prose blockquote p + p { margin-top: .8em; }
.prose blockquote cite { display: block; margin-top: 14px; font-size: 13.5px; color: var(--muted); font-style: normal; }

.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .55em; }
.prose li::marker { color: var(--accent); }

.prose hr {
  border: 0;
  height: 1px;
  background: var(--line);
  width: 42%;
}

/* 文末 · 纯粹的分隔，不做社交互动 */
.post-end {
  padding-bottom: clamp(60px, 7vw, 90px);
}
.post-end .rule {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  color: var(--muted);
}
.post-end .rule::before, .post-end .rule::after {
  content: ""; height: 1px; width: 54px; background: var(--line);
}
.post-end .rule i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }

/* 相关文章 */
.related { padding: clamp(56px, 7vw, 96px) 0 0; border-top: 1px solid var(--line); }

/* ---------- 13. 关于页 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: clamp(36px, 6vw, 84px);
  align-items: start;
}
.about-portrait {
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 110px;
}
.about-portrait img { width: 100%; height: 100%; object-fit: cover; }

.about-body h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  letter-spacing: -.032em;
  margin-bottom: 22px;
}
.about-body p { color: var(--text-2); margin: 0 0 1.5em; font-size: 16.5px; line-height: 1.9; }
.about-body p.lead { color: var(--text); font-size: 18.5px; line-height: 1.85; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2px;
  margin: 44px 0;
  background: var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.fact { background: var(--surface); padding: 28px 26px; }
.fact dt { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.fact dd { margin: 12px 0 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }

/* ---------- 14. 空状态 ---------- */
.empty {
  text-align: center;
  padding: 80px 20px 100px;
  color: var(--muted);
  font-size: 15.5px;
}
.empty .big { font-size: 40px; color: var(--line); margin-bottom: 16px; }

/* ---------- 15. 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 62px 0 46px;
  margin-top: clamp(70px, 9vw, 120px);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}
.footer-brand { font-weight: 700; font-size: 15px; }
.footer-brand::before {
  content: ""; display: inline-block; width: 5px; height: 5px;
  border-radius: 50%; background: var(--accent);
  vertical-align: 3px; margin-right: 9px;
}
.footer-note { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.footer-links { display: flex; gap: 22px; font-size: 14px; color: var(--text-2); }
.footer-links a { transition: color .25s var(--ease); }
.footer-links a:hover { color: var(--accent); }

/* ---------- 16. 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: clamp(18px, 3vw, 34px);
  bottom: clamp(18px, 3vw, 34px);
  z-index: 80;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-2);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.9);
  transition: all .4s var(--ease);
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--accent); transform: translateY(-3px); }
.to-top svg { width: 18px; height: 18px; }

/* 阅读进度条 */
.read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  z-index: 95;
  transition: width .12s linear;
  opacity: 0;
}
.read-progress.show { opacity: 1; }

/* ---------- 17. 滚动渐入 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .95s var(--ease), transform .95s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- 18. 响应式 ---------- */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 300px 1fr; gap: 44px; }
  .feature, .feature.reverse { grid-template-columns: 1fr; gap: 34px; }
  .feature.reverse .feature-media { order: 0; }
  .about-portrait { position: static; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  :root { --measure: 100%; }

  .nav-shell { padding: 12px 14px 0; }
  .nav {
    width: 100%;
    max-width: none;
    justify-content: space-between;
    padding: 6px 8px 6px 16px;
    height: 54px;
    background: color-mix(in srgb, var(--bg) 90%, transparent);
  }
  .nav-brand { padding-right: 0; font-size: 14px; }

  /* 移动端：下拉式菜单 */
  .nav-links {
    position: absolute;
    top: 62px; left: 14px; right: 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border-radius: var(--r-lg);
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    border: 1px solid var(--nav-border);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(.98);
    transform-origin: top center;
    transition: all .32s var(--ease);
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 12px 16px; font-size: 15px; border-radius: var(--r-md); }
  .nav-links a.active::after { display: none; }
  .nav-links a.active { background: var(--accent-soft); }

  .nav-actions { border-left: 0; padding-left: 0; }
  .nav-burger { display: grid; }

  .hero-inner { padding: 118px 0 128px; }
  .hero-sub { font-size: 15px; max-width: 34ch; }
  .hero-cta { gap: 12px; margin-top: 34px; }
  .btn { height: 48px; padding: 0 24px; font-size: 14.5px; }

  .post-grid { grid-template-columns: 1fr; gap: 24px; }
  .card-body { padding: 22px 22px 24px; }
  .card-title { font-size: 18.5px; }

  .post-hero { height: 44vh; min-height: 280px; }
  .post-hero::after { height: 34%; }
  .post-header { margin-top: -34px; }
  .post-sub { max-width: 100%; }
  .prose { font-size: 16.5px; line-height: 1.92; }
  .prose blockquote { padding: 18px 20px; font-size: 16px; }

  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .facts { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .facts { grid-template-columns: 1fr; }
  .hero-title { letter-spacing: -.05em; }
}

/* ---------- 19. 无障碍 · 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-media img, .card-media img, .post-hero img, .prose figure img { opacity: 1; transform: none; }
}

/* ---------- 20. 打印 ---------- */
@media print {
  .nav-shell, .to-top, .site-footer, .read-progress { display: none !important; }
  .post-hero { height: 300px; }
}

/* ============================================================
   21. 数据加载态（对接 Supabase 后新增）
   纯追加，不影响原有任何样式。
   ============================================================ */

/* 文章还没传封面时，用带字样的浅色块占位，不留破图 */
.card-media.is-empty::after {
  content: "ZQI";
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3em;
  color: var(--muted);
  opacity: .5;
}

/* 详情页没有封面时收掉整块头图，并把标题的负边距还原 */
.post-hero.is-empty { display: none; }
.post-hero.is-empty + article .post-header { margin-top: clamp(52px, 7vw, 92px); }

/* 骨架屏 */
.card-skel { pointer-events: none; }
.card-skel:hover { transform: none; box-shadow: var(--shadow-sm); }
.card-skel .card-body { gap: 0; }

.skel {
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    var(--surface-2) 25%,
    color-mix(in srgb, var(--surface-2) 55%, var(--bg)) 37%,
    var(--surface-2) 63%
  );
  background-size: 400% 100%;
  animation: skelShimmer 1.5s ease-in-out infinite;
}
.skel-media { width: 100%; aspect-ratio: 16 / 10; border-radius: 0; }
.skel-line  { height: 13px; margin-bottom: 12px; }

@keyframes skelShimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* 加载中不参与滚动渐入的动画，避免闪烁 */
@media (prefers-reduced-motion: reduce) {
  .skel { animation: none; }
}
