/* ==========================================================================
   杂志风个人博客 · 样式表
   --------------------------------------------------------------------------
   想改配色？只改下面 :root 里的变量即可，全站生效。
   想改字体？改 --font-serif / --font-sans 两行。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 主题变量
   -------------------------------------------------------------------------- */
:root {
  /* 配色 */
  --paper: #ffffff;
  --paper-soft: #f7f6f3;
  --paper-tint: #f1efea;
  --ink: #14161a;
  --ink-2: #3d434d;
  --ink-3: #6b7280;
  --ink-4: #9aa1ac;
  --line: #e5e2dc;
  --line-strong: #d6d2ca;
  --accent: #c8443a;
  --accent-soft: #fdf0ee;
  --accent-ink: #ffffff;

  /* 排版 */
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun",
    Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, "Courier New", monospace;

  /* 尺寸节奏 */
  --wrap: 1200px;
  --wrap-narrow: 720px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;

  /* 阴影 */
  --shadow-1: 0 1px 2px rgba(20, 22, 26, 0.04), 0 2px 8px rgba(20, 22, 26, 0.04);
  --shadow-2: 0 2px 6px rgba(20, 22, 26, 0.06), 0 12px 32px rgba(20, 22, 26, 0.09);
  --shadow-3: 0 4px 12px rgba(20, 22, 26, 0.08), 0 24px 60px rgba(20, 22, 26, 0.12);

  --header-h: 68px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme="dark"] {
  --paper: #14161a;
  --paper-soft: #1a1d22;
  --paper-tint: #20242a;
  --ink: #eef0f3;
  --ink-2: #c7ccd4;
  --ink-3: #9aa1ac;
  --ink-4: #6b7280;
  --line: #2a2f36;
  --line-strong: #363c45;
  --accent: #ff6b5e;
  --accent-soft: #2a1c1a;
  --accent-ink: #1a0f0d;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-3: 0 24px 60px rgba(0, 0, 0, 0.5);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

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

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

.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;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 999;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus {
  top: 12px;
}

/* --------------------------------------------------------------------------
   3. 布局容器
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}
.wrap-narrow {
  max-width: var(--wrap-narrow);
}
.wrap-mid {
  max-width: 900px;
}

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

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-sub {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-top: -3px;
}

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

.nav a {
  position: relative;
  padding: 8px 12px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: var(--radius-sm);
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
  white-space: nowrap;
}
.nav a:hover {
  color: var(--ink);
  background: var(--paper-soft);
}
.nav a.is-active {
  color: var(--accent);
}
.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--ink-2);
  border: 1px solid transparent;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}
.icon-btn:hover {
  background: var(--paper-soft);
  color: var(--ink);
  border-color: var(--line);
}
.icon-btn svg {
  width: 19px;
  height: 19px;
}

.nav-toggle {
  display: none;
}

/* 移动端抽屉 */
.drawer {
  display: none;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  padding: 8px 0 16px;
}
.drawer.is-open {
  display: block;
}
.drawer a {
  display: block;
  padding: 11px 4px;
  font-size: 16px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.drawer a:last-child {
  border-bottom: 0;
}
.drawer a.is-active {
  color: var(--accent);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   5. 搜索面板
   -------------------------------------------------------------------------- */
.search-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: color-mix(in srgb, var(--ink) 45%, transparent);
  backdrop-filter: blur(4px);
  padding: 12vh 24px 24px;
}
.search-panel.is-open {
  display: block;
  animation: fade-in 0.18s var(--ease);
}

.search-box {
  max-width: 640px;
  margin: 0 auto;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  animation: pop-in 0.22s var(--ease);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.search-field svg {
  width: 20px;
  height: 20px;
  color: var(--ink-4);
  flex-shrink: 0;
}
.search-field input {
  flex: 1;
  border: 0;
  outline: 0;
  background: none;
  font-size: 17px;
  color: var(--ink);
}
.search-field input::placeholder {
  color: var(--ink-4);
}
.search-esc {
  font-size: 11px;
  color: var(--ink-4);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  font-family: var(--font-mono);
}

.search-results {
  max-height: 52vh;
  overflow-y: auto;
  padding: 8px;
}
.search-hit {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.14s var(--ease);
}
.search-hit:hover,
.search-hit.is-cursor {
  background: var(--paper-soft);
}
.search-hit-title {
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink);
}
.search-hit-title mark {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 3px;
  padding: 0 2px;
}
.search-hit-meta {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 3px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.search-empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14.5px;
}
.search-hint {
  padding: 10px 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-4);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--ink-3);
  background: var(--paper-soft);
}

/* --------------------------------------------------------------------------
   6. 通用小节标题
   -------------------------------------------------------------------------- */
.section {
  padding: 56px 0;
}
.section-tight {
  padding: 36px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: "";
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: var(--accent);
}

.section-more {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.18s var(--ease), gap 0.18s var(--ease);
}
.section-more:hover {
  color: var(--accent);
  gap: 9px;
}

/* --------------------------------------------------------------------------
   7. 头条区（Hero）
   -------------------------------------------------------------------------- */
.hero {
  padding: 44px 0 8px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 40px;
  align-items: stretch;
}

.hero-main {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-tint);
  box-shadow: var(--shadow-2);
  min-height: 340px;
}
.hero-main .cover {
  position: absolute;
  inset: 0;
}
.hero-main .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.hero-main:hover .cover img {
  transform: scale(1.04);
}
.hero-main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 12, 16, 0) 32%,
    rgba(10, 12, 16, 0.62) 68%,
    rgba(10, 12, 16, 0.88) 100%
  );
}
.hero-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 34px;
  color: #fff;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3.1vw, 38px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.015em;
  margin: 12px 0 10px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}
.hero-excerpt {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  max-width: 60ch;
}
.hero-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 16px;
  flex-wrap: wrap;
}

/* 侧边列表 */
.hero-side {
  display: flex;
  flex-direction: column;
}
.hero-side-head {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-side-head span {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.mini-list {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.mini-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.2s var(--ease);
}
.mini-item:last-child {
  border-bottom: 0;
}
.mini-item:hover {
  padding-left: 6px;
}
.mini-rank {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--line-strong);
  transition: color 0.2s var(--ease);
}
.mini-item:hover .mini-rank {
  color: var(--accent);
}
.mini-title {
  display: block;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 6px;
  color: var(--ink);
  transition: color 0.18s var(--ease);
}
.mini-item:hover .mini-title {
  color: var(--accent);
}
.mini-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--ink-4);
}
.mini-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   8. 文章卡片网格
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: 32px 28px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 22px;
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-tint);
  margin-bottom: 16px;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}
.card:hover .card-cover img {
  transform: scale(1.05);
}
.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  pointer-events: none;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-cat {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -0.008em;
  margin: 0 0 8px;
}
.card-title a {
  background-image: linear-gradient(var(--ink), var(--ink));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.35s var(--ease), color 0.2s var(--ease);
}
.card:hover .card-title a {
  background-size: 100% 1px;
}

.card-excerpt {
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--ink-3);
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-4);
  flex-wrap: wrap;
}
.card-foot .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

/* 横向大卡片（列表页第一屏用） */
.card-wide {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.card-wide .card-cover {
  margin-bottom: 0;
  aspect-ratio: 16 / 9;
}
.card-wide .card-title {
  font-size: 26px;
  line-height: 1.34;
}
.card-wide .card-excerpt {
  -webkit-line-clamp: 4;
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   9. 分类条
   -------------------------------------------------------------------------- */
.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--paper);
  transition: all 0.18s var(--ease);
}
.chip:hover {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-1px);
}
.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.chip .count {
  font-size: 12px;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.chip.is-active .count {
  color: color-mix(in srgb, var(--paper) 65%, transparent);
}

/* --------------------------------------------------------------------------
   10. 页头 / 面包屑
   -------------------------------------------------------------------------- */
.page-head {
  padding: 40px 0 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.page-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.page-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4.2vw, 42px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.page-desc {
  font-size: 15.5px;
  color: var(--ink-3);
  margin: 0;
  max-width: 65ch;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-4);
  padding: 22px 0 0;
  flex-wrap: wrap;
}
.crumbs a:hover {
  color: var(--accent);
}
.crumbs .sep {
  color: var(--line-strong);
}

/* --------------------------------------------------------------------------
   11. 文章页
   -------------------------------------------------------------------------- */
.post {
  padding: 8px 0 0;
}

.post-head {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  padding: 26px 0 30px;
}
.post-cat {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 5px 12px;
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}
.post-title {
  font-family: var(--font-serif);
  font-size: clamp(27px, 4.4vw, 44px);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.022em;
  margin: 0 0 18px;
}
.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 13.5px;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.post-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}
.post-meta strong {
  color: var(--ink-2);
  font-weight: 600;
}

.post-hero {
  max-width: 1000px;
  margin: 0 auto 16px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-tint);
  box-shadow: var(--shadow-1);
}
.post-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.post-credit {
  max-width: 1000px;
  margin: 0 auto 44px;
  font-size: 12.5px;
  color: var(--ink-4);
  text-align: right;
}

.prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 17.5px;
  line-height: 1.88;
  color: var(--ink-2);
}
.prose > * + * {
  margin-top: 1.35em;
}
.prose h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 2.2em 0 0.7em;
  padding-top: 0.3em;
  scroll-margin-top: 90px;
}
.prose h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
  margin: 1.9em 0 0.6em;
  scroll-margin-top: 90px;
}
.prose h2::before {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  margin-bottom: 16px;
}
.prose p {
  margin: 0;
}
.prose a {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.prose a:hover {
  border-bottom-color: var(--accent);
  background: var(--accent-soft);
}
.prose strong {
  color: var(--ink);
  font-weight: 700;
}
.prose ul,
.prose ol {
  padding-left: 1.4em;
}
.prose li + li {
  margin-top: 0.45em;
}
.prose li::marker {
  color: var(--accent);
}
.prose blockquote {
  margin: 2em 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--accent);
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.8;
  color: var(--ink);
  font-style: normal;
}
.prose blockquote p + p {
  margin-top: 0.8em;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.855em;
  background: var(--paper-tint);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 6px;
  color: var(--ink);
}
.prose pre {
  background: #16181d;
  color: #e6e9ef;
  border-radius: var(--radius);
  padding: 20px 22px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.75;
  margin: 2em 0;
  box-shadow: var(--shadow-1);
}
.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.prose img {
  border-radius: var(--radius);
  margin: 2em auto;
  box-shadow: var(--shadow-1);
}
.prose figure {
  margin: 2.2em 0;
}
.prose figcaption {
  font-size: 13.5px;
  color: var(--ink-4);
  text-align: center;
  margin-top: 12px;
}
.prose hr {
  margin: 3em auto;
  width: 60px;
  border-top: 2px solid var(--line-strong);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 2em 0;
  display: block;
  overflow-x: auto;
}
.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
}
.prose th {
  background: var(--paper-soft);
  font-weight: 600;
  color: var(--ink);
}
.prose .callout {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 16px;
  color: var(--ink-2);
  margin: 2em 0;
}
.prose .callout p:first-child {
  margin-top: 0;
}

/* 标签 + 分享 */
.post-foot {
  max-width: 720px;
  margin: 56px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.tag-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tag {
  font-size: 13px;
  color: var(--ink-3);
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  transition: all 0.18s var(--ease);
}
.tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.share-row {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--ink-4);
}

/* 目录 */
.toc {
  max-width: 720px;
  margin: 0 auto 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
  padding: 18px 22px;
}
.toc-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc ol {
  margin: 0;
  padding-left: 1.2em;
  font-size: 14.5px;
  line-height: 1.9;
}
.toc a {
  color: var(--ink-2);
  transition: color 0.16s var(--ease);
}
.toc a:hover,
.toc a.is-active {
  color: var(--accent);
  font-weight: 600;
}

/* 上下篇 */
.post-nav {
  max-width: 1000px;
  margin: 56px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.post-nav-item {
  display: block;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all 0.2s var(--ease);
}
.post-nav-item:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow-1);
  transform: translateY(-2px);
}
.post-nav-item.next {
  text-align: right;
}
.post-nav-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 7px;
}
.post-nav-title {
  font-family: var(--font-serif);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink);
}

/* 阅读进度条 */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  z-index: 300;
  transition: width 0.1s linear;
}

/* --------------------------------------------------------------------------
   12. 关于页 / 个人信息
   -------------------------------------------------------------------------- */
.profile {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: start;
}
.avatar {
  width: 200px;
  height: 200px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--paper-tint);
  box-shadow: var(--shadow-1);
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 32px;
}
.stat {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.stat-num {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent);
}
.stat-label {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 6px;
}

/* --------------------------------------------------------------------------
   13. 分页 / 空态
   -------------------------------------------------------------------------- */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 52px;
}
.pager button,
.pager a {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  color: var(--ink-2);
  transition: all 0.16s var(--ease);
}
.pager button:hover:not(:disabled),
.pager a:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.pager .is-current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  font-weight: 600;
}
.pager button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-3);
}
.empty-mark {
  font-family: var(--font-serif);
  font-size: 54px;
  color: var(--line-strong);
  line-height: 1;
  margin-bottom: 18px;
}

/* --------------------------------------------------------------------------
   14. 加载骨架
   -------------------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--paper-soft) 25%,
    var(--paper-tint) 37%,
    var(--paper-soft) 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
  border-radius: var(--radius);
}
.sk-card {
  height: 300px;
}

/* --------------------------------------------------------------------------
   15. 页脚
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: var(--paper-soft);
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.footer-about {
  font-size: 14.5px;
  color: var(--ink-3);
  line-height: 1.75;
  max-width: 42ch;
  margin: 14px 0 0;
}
.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin: 0 0 14px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col li + li {
  margin-top: 9px;
}
.footer-col a {
  font-size: 14.5px;
  color: var(--ink-2);
  transition: color 0.16s var(--ease);
}
.footer-col a:hover {
  color: var(--accent);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  font-size: 13px;
  color: var(--ink-4);
  flex-wrap: wrap;
}

/* 回到顶部 */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.24s var(--ease);
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.to-top:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.to-top svg {
  width: 19px;
  height: 19px;
}

/* --------------------------------------------------------------------------
   16. 滚动进场动画
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes shimmer {
  from {
    background-position: 100% 50%;
  }
  to {
    background-position: 0 50%;
  }
}

/* --------------------------------------------------------------------------
   17. 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 22px;
  }
  .grid-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 60px;
  }
  .wrap {
    padding: 0 18px;
  }
  .nav {
    display: none;
  }
  .nav-toggle {
    display: grid;
  }
  .brand-sub {
    display: none;
  }
  .section {
    padding: 40px 0;
  }
  .section-title {
    font-size: 20px;
  }
  .hero-body {
    padding: 24px 20px;
  }
  .hero-main {
    min-height: 280px;
  }
  .hero-excerpt {
    display: none;
  }
  .card-wide {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .card-wide .card-title {
    font-size: 22px;
  }
  .post-head {
    padding: 12px 0 22px;
  }
  .prose {
    font-size: 16.5px;
    line-height: 1.85;
  }
  .prose h2 {
    font-size: 22px;
  }
  .prose h3 {
    font-size: 18.5px;
  }
  .post-nav {
    grid-template-columns: 1fr;
  }
  .post-nav-item.next {
    text-align: left;
  }
  .profile {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .avatar {
    width: 120px;
    height: 120px;
  }
  .stat-row {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .to-top {
    right: 16px;
    bottom: 16px;
  }
  .search-panel {
    padding: 8vh 16px 16px;
  }
}

@media (max-width: 520px) {
  .grid,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .hero-title {
    font-size: 23px;
  }
  .mini-item {
    grid-template-columns: 18px 1fr;
    gap: 10px;
  }
  .mini-rank {
    font-size: 17px;
  }
}

/* --------------------------------------------------------------------------
   18. 无障碍 / 打印
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .to-top,
  .search-panel,
  .post-nav,
  .progress,
  .share-row {
    display: none !important;
  }
  .prose {
    max-width: none;
    font-size: 12pt;
  }
  body {
    background: #fff;
    color: #000;
  }
}
