/* =========================================================
   Paper — 极简博客模板
   1. 设计令牌 2. 基础排版 3. 布局 4. 组件 5. 页面级 6. 响应式
   ========================================================= */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f5f2ec;
  --text: #17171a;
  --text-soft: #3d3d44;
  --muted: #6f6f78;
  --line: #e5e1d8;
  --brand: #c2410c;
  --brand-ink: #9a3412;
  --brand-soft: #fdf0e9;
  --code-bg: #16161a;
  --code-text: #e8e6e0;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
    "Songti SC", "Noto Serif SC", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --measure: 68ch;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(23, 23, 26, .05), 0 2px 8px rgba(23, 23, 26, .04);
  --shadow-md: 0 2px 6px rgba(23, 23, 26, .06), 0 14px 34px rgba(23, 23, 26, .08);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

html[data-theme="dark"] {
  --bg: #0f0f11;
  --surface: #17171b;
  --surface-2: #1e1e23;
  --text: #edece6;
  --text-soft: #cfcec8;
  --muted: #9c9ca6;
  --line: #2b2b31;
  --brand: #f97316;
  --brand-ink: #fb923c;
  --brand-soft: #241a13;
  --code-bg: #101014;
  --code-text: #e8e6e0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, .45), 0 14px 34px rgba(0, 0, 0, .5);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand-ink); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }

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

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

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

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

.skip-link {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--text);
  color: var(--bg);
  padding: .7rem 1.2rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: .9rem;
}
.skip-link:focus { top: 0; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.5rem);
}
.container--narrow { max-width: 780px; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 .9rem;
}

.muted { color: var(--muted); }

/* ---------- 3. 布局 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: -.03em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-left: auto;
  list-style: none;
  padding: 0;
}
.nav__links a {
  display: block;
  padding: .45rem .7rem;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: .94rem;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.nav__links a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav__links a[aria-current="page"] { color: var(--text); font-weight: 600; }

.nav__actions { display: flex; align-items: center; gap: .4rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--text-soft); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn--ghost { border-color: transparent; background: transparent; }

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

.nav__burger { display: none; }

.mobile-menu {
  display: none;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.mobile-menu.is-open { display: block; }
.mobile-menu ul { list-style: none; margin: 0; padding: .5rem 0 1.2rem; }
.mobile-menu a {
  display: block;
  padding: .75rem 0;
  color: var(--text-soft);
  font-size: 1rem;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:hover { text-decoration: none; color: var(--brand); }

/* ---------- 4. 组件 ---------- */
/* Hero */
.hero {
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: end;
}
.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.9rem);
  margin-bottom: 1rem;
}
.hero h1 em { font-style: italic; color: var(--brand); }
.hero__lede {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--muted);
  max-width: 46ch;
  margin: 0;
}
.hero__side {
  font-size: .86rem;
  color: var(--muted);
  border-left: 2px solid var(--brand);
  padding-left: 1rem;
  line-height: 1.9;
}
.hero__side strong { color: var(--text); font-weight: 600; }

/* Section head */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.6rem;
}
.section-head h2 {
  font-size: 1.3rem;
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -.01em;
}
.section-head__link { font-size: .88rem; color: var(--muted); }
.section-head__link:hover { color: var(--brand); }

/* 主栅格 */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px;
  gap: clamp(2rem, 5vw, 3.6rem);
  padding: clamp(2.4rem, 5vw, 4rem) 0 4rem;
  align-items: start;
}

/* 文章卡片 */
.post-list { display: grid; gap: 1rem; }

.card {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 1.4rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
}
.card__thumb {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  aspect-ratio: 4 / 3;
}
.card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__thumb img { transform: scale(1.04); }
.card__thumb--placeholder {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 60%),
    var(--surface-2);
  color: var(--brand);
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-style: italic;
}
.card__body { min-width: 0; padding: .2rem .4rem .2rem 0; display: flex; flex-direction: column; }
.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  font-size: .76rem;
  color: var(--muted);
  letter-spacing: .02em;
  margin-bottom: .45rem;
}
.card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.card h3 {
  font-size: 1.28rem;
  margin: 0 0 .35rem;
  letter-spacing: -.01em;
}
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; } /* 整卡可点 */
.card:hover h3 a { color: var(--brand); }
.card__excerpt {
  font-size: .93rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 .85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__foot { margin-top: auto; display: flex; align-items: center; gap: .6rem; }

.tag {
  display: inline-block;
  padding: .18rem .55rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.tag--ghost { background: var(--surface-2); color: var(--muted); font-weight: 500; }

.read-more {
  font-size: .84rem;
  font-weight: 600;
  color: var(--brand-ink);
  margin-left: auto;
}
.read-more::after { content: " →"; }

/* 精选大卡 */
.feature {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 2.6rem;
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.feature:hover { box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 32%, var(--line)); }
.feature__media { position: relative; min-height: 260px; background: var(--surface-2); }
.feature__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature__body { padding: clamp(1.4rem, 3vw, 2.4rem); display: flex; flex-direction: column; justify-content: center; }
.feature h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: .2rem 0 .6rem; }
.feature h3 a { color: var(--text); }
.feature h3 a::after { content: ""; position: absolute; inset: 0; }
.feature:hover h3 a { color: var(--brand); text-decoration: none; }
.feature p { font-size: .95rem; color: var(--muted); margin-bottom: 1.1rem; }

/* 侧栏 */
.side { position: sticky; top: 92px; display: grid; gap: 1.6rem; }
.widget {
  border-top: 2px solid var(--text);
  padding-top: 1rem;
}
.widget h3 {
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .9rem;
}
.widget p { font-size: .9rem; color: var(--text-soft); line-height: 1.7; }
.widget ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.widget li a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .42rem 0;
  font-size: .9rem;
  color: var(--text-soft);
  border-bottom: 1px dashed var(--line);
}
.widget li a:hover { color: var(--brand); text-decoration: none; }
.widget li a span { color: var(--muted); font-variant-numeric: tabular-nums; }

.search-box { position: relative; }
.search-box svg {
  position: absolute;
  left: .8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: .65rem .8rem .65rem 2.3rem;
  font: inherit;
  font-size: .9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.search-box input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}
.search-box input::placeholder { color: var(--muted); }

/* 分页 */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin-top: 2.4rem;
  font-size: .9rem;
}
.pager a, .pager span {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 .6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  color: var(--text-soft);
  background: var(--surface);
}
.pager a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.pager .is-current { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; }
.pager .is-disabled { opacity: .4; }

/* 页脚 */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.8rem 0 3.4rem;
  background: var(--surface-2);
}
.footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
}
.footer__brand { font-family: var(--font-serif); font-size: 1.05rem; margin-bottom: .4rem; }
.footer__note { font-size: .85rem; color: var(--muted); max-width: 34ch; margin: 0; }
.footer__links { display: flex; gap: 1.2rem; font-size: .86rem; flex-wrap: wrap; }
.footer__links a { color: var(--muted); }
.footer__links a:hover { color: var(--brand); }

/* ---------- 文章页 ---------- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--brand);
  z-index: 150;
  transition: width .1s linear;
}

.article-head {
  padding: clamp(2.2rem, 5vw, 3.6rem) 0 1.8rem;
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  display: flex;
  gap: .5rem;
  align-items: center;
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: 1.4rem;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span { opacity: .5; }

.article-head h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  margin-bottom: .8rem;
}
.article-head .lede {
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  color: var(--muted);
  max-width: 56ch;
  font-family: var(--font-serif);
  font-style: italic;
  line-height: 1.6;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem;
  margin-top: 1.6rem;
  font-size: .84rem;
  color: var(--muted);
}
.article-meta .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-ink);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: .9rem;
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
}
.article-meta b { color: var(--text); font-weight: 600; }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: clamp(2rem, 5vw, 3.4rem);
  padding: clamp(2rem, 4vw, 3rem) 0 3.5rem;
  align-items: start;
}

/* 正文排版 */
.prose { max-width: var(--measure); font-size: 1.03rem; }
.prose > * + * { margin-top: 0; }
.prose h2 {
  font-size: 1.62rem;
  margin: 2.6rem 0 .9rem;
  scroll-margin-top: 100px;
}
.prose h3 {
  font-size: 1.22rem;
  margin: 2rem 0 .7rem;
  scroll-margin-top: 100px;
}
.prose p { margin: 0 0 1.35em; }
.prose ul, .prose ol { margin: 0 0 1.35em; padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--brand); }
.prose a {
  color: var(--brand-ink);
  border-bottom: 1px solid color-mix(in srgb, var(--brand) 40%, transparent);
}
.prose a:hover { text-decoration: none; border-bottom-color: var(--brand); }

.prose blockquote {
  margin: 1.8rem 0;
  padding: .3rem 0 .3rem 1.3rem;
  border-left: 3px solid var(--brand);
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-style: italic;
  color: var(--text-soft);
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose figure { margin: 2rem 0; }
.prose figure img { border-radius: var(--radius-sm); border: 1px solid var(--line); width: 100%; }
.prose figcaption {
  margin-top: .7rem;
  font-size: .8rem;
  color: var(--muted);
  text-align: center;
}

.prose code {
  font-family: var(--font-mono);
  font-size: .86em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .12em .38em;
}
.prose pre {
  position: relative;
  margin: 1.8rem 0;
  padding: 1.15rem 1.2rem;
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: .86rem;
  line-height: 1.7;
  tab-size: 2;
}
.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  color: inherit;
  white-space: pre;
}
.copy-btn {
  position: absolute;
  top: .55rem;
  right: .55rem;
  padding: .28rem .55rem;
  font: inherit;
  font-size: .7rem;
  font-family: var(--font-sans);
  letter-spacing: .04em;
  color: #b9b7b1;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .18s var(--ease), background-color .18s var(--ease);
}
.prose pre:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.copy-btn.is-done { color: #86efac; border-color: #86efac; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8rem 0;
  font-size: .92rem;
}
.prose th, .prose td {
  text-align: left;
  padding: .6rem .8rem;
  border-bottom: 1px solid var(--line);
}
.prose th { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.prose tbody tr:hover { background: var(--surface-2); }

.prose hr { margin: 2.6rem 0; }

/* 右侧目录 */
.toc { position: sticky; top: 96px; font-size: .86rem; }
.toc h3 {
  font-family: var(--font-sans);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .8rem;
}
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: .32rem 0 .32rem .85rem;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--muted);
  line-height: 1.5;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.is-active { color: var(--brand); border-left-color: var(--brand); font-weight: 600; }
.toc a.toc-h3 { padding-left: 1.6rem; font-size: .82rem; }

/* 文末 */
.article-foot {
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.share { display: flex; gap: .5rem; align-items: center; font-size: .84rem; color: var(--muted); }

.author-box {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  padding: 1.3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.author-box .avatar {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-ink);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
}
.author-box h4 { font-size: 1rem; margin: 0 0 .2rem; font-family: var(--font-sans); }
.author-box p { font-size: .86rem; color: var(--muted); margin: 0; line-height: 1.65; }

/* 上一篇/下一篇 */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.4rem;
}
.post-nav a {
  display: block;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.post-nav a:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-1px); }
.post-nav .dir { display: block; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.post-nav .title { font-family: var(--font-serif); font-size: .98rem; color: var(--text); }
.post-nav a:last-child { text-align: right; }

/* ---------- 归档 / 关于 ---------- */
.page-head { padding: clamp(2.4rem, 6vw, 4rem) 0 2rem; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2rem, 4.6vw, 3rem); margin-bottom: .6rem; }
.page-head p { color: var(--muted); max-width: 54ch; margin: 0; }

.year-group { margin-top: 2.2rem; }
.year-group__label {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  color: color-mix(in srgb, var(--text) 22%, transparent);
  font-weight: 600;
  line-height: 1;
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--line);
}
.archive-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: baseline;
  padding: .62rem 0;
  border-bottom: 1px dashed var(--line);
}
.archive-item time { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }
.archive-item a { color: var(--text); font-size: .98rem; }
.archive-item a:hover { color: var(--brand); text-decoration: none; }
.archive-item .tag { font-size: .68rem; }

.about-grid {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: 2.6rem 0 4rem;
  align-items: start;
}
.about-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--brand) 30%, transparent), transparent 62%),
    var(--surface-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 3.2rem;
  color: var(--brand);
}

/* 空状态 */
.empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-size: .92rem;
  display: none;
}
.empty.is-visible { display: block; }

/* 代码高亮（手写 token，零依赖） */
.tok-k { color: #f0a868; }               /* 属性 / 关键字 */
.tok-s { color: #a7d8a0; }               /* 字符串 */
.tok-n { color: #8fc2f0; }               /* 数字 / 单位 */
.tok-c { color: #7b7b86; font-style: italic; } /* 注释 */
.tok-p { color: #e3b0ff; }               /* 选择器 / 结构 */
.tok-f { color: #f4d58d; }               /* 函数名 */

/* ---------- 6. 响应式 ---------- */
@media (max-width: 960px) {
  .layout, .article-layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .toc { display: none; }
  .hero__grid { grid-template-columns: 1fr; align-items: start; }
  .hero__side { border-left: 0; border-top: 1px solid var(--line); padding: 1rem 0 0; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav__links { display: none; }
  .nav__burger { display: grid; }
  .nav { height: 60px; gap: .8rem; }
  .card { grid-template-columns: 104px minmax(0, 1fr); gap: 1rem; padding: .85rem; }
  .card h3 { font-size: 1.08rem; }
  .card__excerpt { -webkit-line-clamp: 2; font-size: .88rem; }
  .feature { grid-template-columns: 1fr; }
  .feature__media { min-height: 200px; aspect-ratio: 16 / 9; }
  .archive-item { grid-template-columns: 62px minmax(0, 1fr); }
  .archive-item .tag { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about-avatar { width: 110px; height: 110px; font-size: 2.2rem; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav a:last-child { text-align: left; }
  .footer__grid { flex-direction: column; }
}

@media (max-width: 420px) {
  .card__thumb { display: none; }
  .card { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .site-header, .site-footer, .side, .toc, .post-nav, .progress-bar, .share { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .article-layout, .layout { display: block; }
  .prose { max-width: none; }
  a { color: #000; }
}
