/* ==========================================================================
   寒江笔记 — site.css · v2
   纸与墨 × 现代编辑设计：暖纸底、墨色字、朱砂点缀、克制的层次与微动效。
   无框架、无 webfont CDN（衬线字体自托管子集）、无构建依赖。
   ========================================================================== */

@font-face {
  font-family: "HanJiang Serif";
  src: url("/assets/fonts/noto-serif-sc-sub.woff2?v=1") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --serif: "HanJiang Serif", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* 页面左右留白：任何同时带 .wrap 的区块，写 padding 简写时必须用它 */
  --gutter: 28px;

  --bg: #f6f1e7;
  --bg-raise: #fdfaf3;
  --bg-dim: #ede6d6;
  --ink: #262119;
  --ink-soft: #4a4335;
  --muted: #857a63;
  --accent: #b03a2e;
  --accent-deep: #8c2d24;
  --accent-soft: rgba(176, 58, 46, 0.09);
  --line: #ddd3bd;
  --line-soft: #e8e0cd;
  --code-bg: #241f16;
  --code-ink: #ece3cd;
  --shadow-sm: 0 1px 2px rgba(70, 55, 25, 0.06), 0 4px 12px rgba(70, 55, 25, 0.05);
  --shadow: 0 2px 4px rgba(70, 55, 25, 0.05), 0 16px 40px rgba(70, 55, 25, 0.1);
  --shadow-lg: 0 4px 8px rgba(70, 55, 25, 0.06), 0 24px 64px rgba(70, 55, 25, 0.14);
  --texture-opacity: 0.04;
  --texture-blend: multiply;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html.dark {
  --bg: #151210;
  --bg-raise: #1e1a15;
  --bg-dim: #272119;
  --ink: #eae2cf;
  --ink-soft: #cfc5ad;
  --muted: #96896f;
  --accent: #d9664f;
  --accent-deep: #e5856e;
  --accent-soft: rgba(217, 102, 79, 0.13);
  --line: #373024;
  --line-soft: #2a231a;
  --code-bg: #0f0c08;
  --code-ink: #ddd3ba;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.4), 0 24px 64px rgba(0, 0, 0, 0.5);
  --texture-opacity: 0.06;
  --texture-blend: soft-light;
}

* { box-sizing: border-box; }

html { color-scheme: light dark; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}

/* 纸张噪点纹理 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  pointer-events: none;
  opacity: var(--texture-opacity);
  mix-blend-mode: var(--texture-blend);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.narrow { max-width: 780px; }

/* ---------------------------------------------------------- 主题切换扩散动画 */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ------------------------------------------------------------------ 进度条 */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

/* ------------------------------------------------------------------ 顶栏 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line-soft);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }

.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #f8f2e6;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.05;
  writing-mode: vertical-rl;
  transform: rotate(-4deg);
  box-shadow: inset 0 0 0 2px var(--accent-deep), inset 0 0 0 3.5px rgba(248, 242, 230, 0.5), 0 3px 8px color-mix(in srgb, var(--accent-deep) 35%, transparent);
  user-select: none;
}

.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

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

.nav a, .theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 14.5px;
  letter-spacing: 0.05em;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav a:hover, .theme-btn:hover { color: var(--accent); background: var(--accent-soft); }

.theme-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--ink-soft);
  appearance: none;
  -webkit-appearance: none;
  line-height: 1;
  padding: 9px;
}
.theme-btn svg { display: block; }
.theme-btn .icon-sun { display: none; }
html.dark .theme-btn .icon-sun { display: block; }
html.dark .theme-btn .icon-moon { display: none; }

/* ------------------------------------------------------------------ 首页 hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 10vw, 120px) 0 clamp(56px, 8vw, 88px);
}

/* 暖色光晕 */
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 130%;
  background:
    radial-gradient(42% 55% at 78% 18%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%),
    radial-gradient(35% 45% at 12% 80%, color-mix(in srgb, #c9a44a 10%, transparent), transparent 70%);
  pointer-events: none;
}

/* 巨型水印字 */
.hero-watermark {
  position: absolute;
  right: -4%;
  bottom: -22%;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(280px, 42vw, 560px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--ink) 9%, transparent);
  pointer-events: none;
  user-select: none;
}

.hero .wrap { position: relative; }

.kicker {
  margin: 0 0 20px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.45em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(46px, 8.5vw, 88px);
  line-height: 1.18;
  letter-spacing: 0.05em;
}

.hero-title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent) 20%, var(--accent-deep) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
}

.hero-sub {
  margin: 26px 0 0;
  max-width: 36em;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 18px);
  line-height: 2;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.btn svg { transition: transform 0.2s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn.solid {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #f8f2e6;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent-deep) 38%, transparent);
}
.btn.solid:hover { transform: translateY(-2px); box-shadow: 0 10px 26px color-mix(in srgb, var(--accent-deep) 45%, transparent); }

.btn.ghost {
  border: 1.5px solid var(--line);
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--bg-raise) 60%, transparent);
}
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 44px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.04em;
}
.hero-stats strong { font-family: var(--serif); font-size: 19px; font-weight: 800; color: var(--ink); margin-right: 2px; }
.hero-stats .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }

@media (max-width: 560px) {
  .hero-watermark { font-size: 62vw; bottom: -12%; }
  .hero-stats { gap: 8px 12px; }
}

/* ------------------------------------------------------------------ 文章列表 */
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 28px 0 10px;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--ink-soft);
}

.chips { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  letter-spacing: 0.08em;
  padding: 5px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  border-color: transparent;
  color: #f8f2e6;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent-deep) 30%, transparent);
}

.post-list { margin: 0 0 48px; }

.post-item {
  padding: 30px 6px 34px;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
  transition: background 0.25s var(--ease);
}
.post-item:first-of-type { border-top: 1px solid var(--line-soft); }
.post-item::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 34px;
  bottom: 38px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  opacity: 0;
  transform: scaleY(0.4);
  transition: all 0.25s var(--ease);
}
.post-item:hover::before { opacity: 1; transform: none; }

/* 精选卡片 */
.post-item.featured {
  margin: 18px 0 8px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(color-mix(in srgb, var(--bg-raise) 88%, transparent), color-mix(in srgb, var(--bg-raise) 88%, transparent)) padding-box,
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 55%, var(--line)), var(--line) 55%) border-box;
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.35s var(--ease);
}
.post-item.featured:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.post-item.featured:first-of-type { border-top-width: 1px; }
.post-item.featured::before { display: none; }
.post-item.featured h2 { font-size: clamp(24px, 3.4vw, 31px); }
.post-item.featured p { margin: 6px 0 18px; }
.post-item.featured .read-more { font-size: 15px; }

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.cat {
  display: inline-block;
  padding: 2px 11px 3px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--accent);
  background: var(--accent-soft);
}

.post-item h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(21px, 2.6vw, 25px);
  line-height: 1.5;
  letter-spacing: 0.03em;
}

.post-item h2 a {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 0% 2px;
  background-position: 0 96%;
  transition: background-size 0.3s var(--ease), color 0.2s var(--ease);
}
.post-item:hover h2 a { color: var(--accent); background-size: 100% 2px; }

.post-item p { margin: 0; color: var(--muted); max-width: 46em; }

.read-more { white-space: nowrap; color: var(--accent); font-size: 14px; font-weight: 600; letter-spacing: 0.04em; }
.read-more svg { transition: transform 0.2s var(--ease); }
.read-more:hover svg { transform: translateX(3px); }

.list-all { margin: 0 0 64px; color: var(--muted); font-size: 15px; }
.list-all a { color: var(--accent); }

/* ------------------------------------------------------------------ 文章页 */
.article { padding: clamp(44px, 6vw, 64px) 0 40px; }

.article-header { margin: 0 0 10px; }
.article-header .post-meta { margin-bottom: 18px; }

.article-header h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(30px, 5.6vw, 44px);
  line-height: 1.42;
  letter-spacing: 0.03em;
}

.article-lead {
  margin: 22px 0 0;
  padding-left: 18px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.95;
}

.prose { padding-bottom: 30px; }

.prose p { margin: 1.4em 0; max-width: 44em; }

.prose h2 {
  margin: 2.7em 0 1em;
  font-family: var(--serif);
  font-size: clamp(21px, 3vw, 25px);
  letter-spacing: 0.05em;
  line-height: 1.6;
  scroll-margin-top: 90px;
}

.prose h2::before {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.6em;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  transform: translateY(-0.1em) rotate(45deg);
}

.prose h3 {
  margin: 2.2em 0 0.8em;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.04em;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s var(--ease);
}
.prose a:hover { text-decoration-color: var(--accent); }

.prose blockquote {
  margin: 2em 0;
  padding: 18px 26px;
  border-left: 3px solid var(--accent);
  border-radius: 0 14px 14px 0;
  background: var(--bg-dim);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 1.02em;
}
.prose blockquote p { margin: 0.4em 0; max-width: none; }

.prose code {
  font-family: var(--mono);
  font-size: 0.85em;
  padding: 0.18em 0.5em;
  border-radius: 6px;
  background: var(--code-bg);
  color: var(--code-ink);
}

.prose pre {
  position: relative;
  margin: 1.8em 0;
  padding: 20px 22px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: var(--code-bg);
  color: var(--code-ink);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
.prose pre code { padding: 0; background: transparent; color: inherit; font-size: 13.5px; line-height: 1.8; }

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(236, 227, 205, 0.2);
  border-radius: 8px;
  background: rgba(236, 227, 205, 0.06);
  color: rgba(236, 227, 205, 0.65);
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s var(--ease);
}
.prose pre:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { color: #ece3cd; border-color: rgba(236, 227, 205, 0.45); }
.copy-btn.ok { color: #8fc98f; border-color: #8fc98f; }

.prose ul, .prose ol { padding-left: 1.6em; }
.prose li { margin: 0.45em 0; }
.prose li::marker { color: var(--accent); }

.prose img { max-width: 100%; border-radius: 12px; border: 1px solid var(--line-soft); }

.prose hr { border: 0; margin: 3em 0; text-align: center; }
.prose hr::after {
  content: "◆";
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 1.2em;
  padding-left: 1.2em;
}

/* 目录 */
.toc {
  margin: 26px 0 10px;
  padding: 20px 26px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--bg-raise);
  box-shadow: var(--shadow-sm);
}
.toc-title {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--muted);
}
.toc ol { margin: 0; padding-left: 1.4em; }
.toc li { margin: 0.3em 0; font-size: 15px; }
.toc li::marker { color: var(--accent); font-family: var(--mono); font-size: 12px; }
.toc a { color: var(--ink-soft); text-decoration: none; transition: color 0.2s var(--ease); }
.toc a:hover { color: var(--accent); }

/* 上下篇卡片 */
.pn-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 34px 0 0;
}
.pn-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 24px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--bg-raise);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}
.pn-card span { color: var(--muted); font-size: 12.5px; letter-spacing: 0.18em; }
.pn-card strong { font-family: var(--serif); font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); }
.pn-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line-soft)); }
.pn-card:hover strong { color: var(--accent); }
.pn-card.next { text-align: right; }

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 34px 0 8px;
  color: var(--muted);
  font-size: 14.5px;
  letter-spacing: 0.08em;
  transition: color 0.2s var(--ease);
}
.back-home:hover { color: var(--accent); }

/* ------------------------------------------------------------------ 归档 */
.year-block { margin: 0 0 44px; }
.year {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 16px;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 34px;
  color: var(--ink);
}
.year span {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 12px 3px;
  border-radius: 999px;
  letter-spacing: 0.1em;
}
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 16px;
}
.archive-list time { font-family: var(--mono); font-size: 13.5px; color: var(--muted); flex-shrink: 0; }
.archive-list .cat { font-size: 11.5px; padding: 1px 9px 2px; }
.archive-list a { transition: color 0.2s var(--ease); }
.archive-list a:hover { color: var(--accent); }

/* ------------------------------------------------------------------ 页脚 */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-dim);
}
.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 34px;
  padding-bottom: 20px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-name { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 17px; letter-spacing: 0.1em; }
.footer-tag { margin: 2px 0 0; color: var(--muted); font-size: 13px; letter-spacing: 0.12em; }
.footer-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.footer-nav a {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.footer-nav a:hover { color: var(--accent); background: var(--accent-soft); }
.footer-base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 16px;
  padding-bottom: 26px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.05em;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* ------------------------------------------------------------------ 回到顶部 */
.backtop {
  position: fixed;
  right: 26px;
  bottom: 30px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-raise) 85%, transparent);
  backdrop-filter: blur(8px);
  color: var(--ink-soft);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.25s var(--ease);
  animation: fadeup 0.3s var(--ease);
}
.backtop:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.backtop[hidden] { display: none !important; }

/* ------------------------------------------------------------------ 404 */
.center-box { text-align: center; padding: clamp(90px, 14vh, 140px) var(--gutter) 90px; }
.center-box .num {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(84px, 16vw, 140px);
  line-height: 1;
  margin: 0 0 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
}
.center-box h1 { font-family: var(--serif); font-size: 23px; margin: 0 0 10px; letter-spacing: 0.2em; }
.center-box p { color: var(--muted); margin: 0 0 30px; }

/* ------------------------------------------------------------------ 显现动画 */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@keyframes fadeup { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .pn-card, .post-item.featured, .backtop { transition: none; }
}

/* ------------------------------------------------------------------ 响应式 */
@media (max-width: 560px) {
  :root { --gutter: 20px; }
  body { font-size: 16px; }
  .brand-name { display: none; }
  .nav a { padding: 8px 10px; font-size: 14px; }
  .post-item { padding: 26px 2px 28px; }
  .post-item::before { left: -6px; }
  .pn-nav { grid-template-columns: 1fr; }
  .pn-card.next { text-align: left; }
  .footer-base { justify-content: center; text-align: center; }
  .footer-grid { justify-content: center; }
}
