/* ==========================================================================
   拾光集 · 博客主题
   想换配色？只改下面「设计变量」里的颜色值即可，全站自动生效。
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC",
    "SimSun", serif;
  --font-mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #f7f7f5;
  --bg-elevated: #ffffff;
  --bg-sunken: #efefec;
  --text: #1b1c1e;
  --text-soft: #44464b;
  --text-muted: #74767c;
  --border: #e3e3dd;
  --border-strong: #d2d2cb;

  --accent: #2f6f6a;
  --accent-hover: #255a56;
  --accent-soft: rgba(47, 111, 106, 0.1);
  --warm: #b8593f;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 22, 0.06),
    0 2px 8px rgba(16, 24, 22, 0.04);
  --shadow: 0 12px 32px -12px rgba(16, 24, 22, 0.18);
  --shadow-lg: 0 32px 64px -24px rgba(16, 24, 22, 0.28);

  --maxw: 1080px;
  --maxw-narrow: 720px;
  --header-h: 66px;
}

[data-theme="dark"] {
  --bg: #121417;
  --bg-elevated: #191c20;
  --bg-sunken: #0e1013;
  --text: #ecedee;
  --text-soft: #c2c4c9;
  --text-muted: #8d9096;
  --border: #272b30;
  --border-strong: #33383e;

  --accent: #6fc5b8;
  --accent-hover: #8ed8cc;
  --accent-soft: rgba(111, 197, 184, 0.14);
  --warm: #e08a6c;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 32px 64px -24px rgba(0, 0, 0, 0.75);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

.container-narrow {
  max-width: var(--maxw-narrow);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
}

/* ---------- 3. 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #6fc5b8);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 17px;
  box-shadow: var(--shadow-sm);
}

.brand-name {
  font-size: 17px;
}

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

.nav a {
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--text-soft);
  transition: background 0.18s ease, color 0.18s ease;
}

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

.nav a.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg-elevated);
  color: var(--text-soft);
  transition: transform 0.15s ease, border-color 0.18s ease, color 0.18s ease;
}

.icon-btn:hover {
  color: var(--accent);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
}

/* ---------- 4. 首页 Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 74px 0 56px;
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% 40% 30% -10%;
  background: radial-gradient(
    circle at 30% 40%,
    var(--accent-soft),
    transparent 62%
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 22px;
}

.hero h1 {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent), #7fb8ae 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  max-width: 60ch;
  margin: 0 0 30px;
  font-size: 18px;
  color: var(--text-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15.5px;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

[data-theme="dark"] .btn-primary {
  color: #0d1113;
}

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text-soft);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px dashed var(--border-strong);
}

.stat b {
  display: block;
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.2;
}

.stat span {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ---------- 5. 区块标题 ---------- */
.section {
  padding: 62px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 28px;
  letter-spacing: -0.01em;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* ---------- 6. 精选文章 ---------- */
.featured {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.featured:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.featured .post-cover {
  min-height: 300px;
  height: 100%;
}

.featured-body {
  padding: 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-body h3 {
  margin: 14px 0 12px;
  font-family: var(--font-serif);
  font-size: 27px;
  line-height: 1.32;
}

.featured-body p {
  margin: 0 0 20px;
  color: var(--text-soft);
}

/* ---------- 7. 文章卡片 ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.search-field {
  position: relative;
  flex: 1 1 260px;
  max-width: 340px;
}

.search-field svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

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

.tag-btn {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-soft);
  font-size: 14px;
  transition: all 0.18s ease;
}

.tag-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tag-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

[data-theme="dark"] .tag-btn.is-active {
  color: #0d1113;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 26px;
}

.post-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.post-card > a {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.post-cover {
  --c1: #2f6f6a;
  --c2: #7fb8ae;
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  overflow: hidden;
}

.post-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 78% 22%,
      rgba(255, 255, 255, 0.35),
      transparent 45%
    ),
    radial-gradient(circle at 15% 85%, rgba(0, 0, 0, 0.22), transparent 55%);
  opacity: 0.75;
}

.post-cover .cover-glyph {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: 54px;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.post-cover .cover-tag {
  position: absolute;
  z-index: 2;
  left: 14px;
  bottom: 12px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
  padding: 4px 11px;
  border-radius: 999px;
}

.post-cover[data-accent="2"] {
  --c1: #3b4a8c;
  --c2: #7d8dd8;
}

.post-cover[data-accent="3"] {
  --c1: #b8593f;
  --c2: #e6a184;
}

.post-cover[data-accent="4"] {
  --c1: #4a6b3f;
  --c2: #97bb84;
}

.post-cover[data-accent="5"] {
  --c1: #6a3f7a;
  --c2: #b58cc4;
}

.post-cover[data-accent="6"] {
  --c1: #8a6a28;
  --c2: #d9b96b;
}

.post-card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-body h3 {
  margin: 10px 0 10px;
  font-family: var(--font-serif);
  font-size: 20.5px;
  line-height: 1.4;
}

.post-card:hover h3 {
  color: var(--accent);
}

.post-card-body p {
  margin: 0 0 18px;
  color: var(--text-soft);
  font-size: 15.3px;
}

.card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

.tag {
  font-size: 12.5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
}

.read-more svg {
  transition: transform 0.2s ease;
}

.post-card:hover .read-more svg,
.featured:hover .read-more svg {
  transform: translateX(4px);
}

.empty-state {
  display: none;
  padding: 46px 24px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
}

.empty-state.is-visible {
  display: block;
}

/* ---------- 8. 邮件订阅条 ---------- */
.newsletter {
  background: var(--accent-soft);
  background: linear-gradient(
    120deg,
    var(--accent-soft),
    color-mix(in srgb, var(--accent-soft) 30%, transparent)
  );
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

.newsletter h3 {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 23px;
}

.newsletter p {
  margin: 0;
  color: var(--text-soft);
  font-size: 15.5px;
  max-width: 46ch;
}

.newsletter form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.newsletter input {
  padding: 12px 16px;
  min-width: 240px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 15px;
}

.newsletter input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-note {
  flex: 1 0 100%;
  margin: 0;
  font-size: 14px;
  color: var(--text-soft);
}

a.eyebrow {
  transition: background 0.18s ease, color 0.18s ease;
}

a.eyebrow:hover {
  background: var(--accent-soft);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

.featured .post-cover .cover-glyph {
  font-size: 72px;
}

/* ---------- 9. 页脚 ---------- */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 46px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

.footer-grid h4 {
  margin: 0 0 14px;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer-links {
  display: grid;
  gap: 9px;
  font-size: 15px;
}

.footer-links a {
  color: var(--text-soft);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-about p {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 14.5px;
  max-width: 34ch;
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 13.8px;
  color: var(--text-muted);
}

/* ---------- 10. 文章页 ---------- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #7fb8ae);
  z-index: 60;
  transition: width 0.1s linear;
}

.post-header {
  padding: 56px 0 34px;
  border-bottom: 1px solid var(--border);
}

.post-header h1 {
  margin: 16px 0 18px;
  font-family: var(--font-serif);
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.post-header .post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-muted);
}

.post-header .tags {
  margin-top: 18px;
}

.post-body {
  padding: 44px 0 20px;
}

.post-body > * {
  max-width: var(--maxw-narrow);
  margin-left: auto;
  margin-right: auto;
}

.post-body h2 {
  margin: 48px auto 16px;
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.35;
  scroll-margin-top: 90px;
}

.post-body h3 {
  margin: 34px auto 12px;
  font-size: 19.5px;
  scroll-margin-top: 90px;
}

.post-body p {
  margin: 18px auto;
  color: var(--text-soft);
}

.post-body strong {
  color: var(--text);
}

.post-body a:not(.btn) {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}

.post-body a:not(.btn):hover {
  border-bottom-color: var(--accent);
}

.post-body ul,
.post-body ol {
  max-width: var(--maxw-narrow);
  padding-left: 22px;
  color: var(--text-soft);
}

.post-body li {
  margin: 8px 0;
}

.post-body li::marker {
  color: var(--accent);
}

.post-body blockquote {
  margin: 28px auto;
  padding: 4px 22px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-soft);
}

.post-body blockquote p {
  margin: 12px 0;
}

.post-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
}

.code-block {
  position: relative;
  max-width: var(--maxw-narrow);
  margin: 26px auto;
}

.code-block pre {
  margin: 0;
  padding: 20px 20px;
  background: #14181d;
  color: #dfe4ea;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.7;
  border: 1px solid #23292f;
}

.code-block pre code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 11px;
  font-size: 12.5px;
  border-radius: 7px;
  border: 1px solid #333a41;
  background: rgba(255, 255, 255, 0.06);
  color: #b9c1c9;
  opacity: 0;
  transition: opacity 0.18s ease, color 0.18s ease;
}

.code-block:hover .copy-btn,
.copy-btn:focus-visible {
  opacity: 1;
}

.copy-btn:hover {
  color: #fff;
}

.post-body table {
  max-width: var(--maxw-narrow);
  width: 100%;
  border-collapse: collapse;
  margin: 26px auto;
  font-size: 15px;
}

.post-body th,
.post-body td {
  border: 1px solid var(--border);
  padding: 10px 13px;
  text-align: left;
}

.post-body th {
  background: var(--bg-sunken);
}

.post-body hr {
  max-width: var(--maxw-narrow);
  margin: 40px auto;
  border: 0;
  border-top: 1px solid var(--border);
}

.post-footer {
  max-width: var(--maxw-narrow);
  margin: 20px auto 0;
  padding: 30px 0 0;
  border-top: 1px solid var(--border);
}

.post-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.author-box {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 30px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.avatar {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #7fb8ae);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 22px;
}

.author-box h4 {
  margin: 0 0 4px;
  font-size: 16.5px;
}

.author-box p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-muted);
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: var(--maxw-narrow);
  margin: 34px auto 0;
  padding: 0 22px;
}

.post-nav a {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: var(--bg-elevated);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.post-nav a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.post-nav span {
  display: block;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.post-nav strong {
  font-weight: 600;
  font-size: 15.5px;
}

.post-nav .next {
  text-align: right;
}

/* ---------- 11. 关于页 ---------- */
.about-hero {
  padding: 60px 0 20px;
}

.about-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 5vw, 44px);
  margin: 0 0 16px;
}

.about-hero p {
  max-width: 62ch;
  color: var(--text-soft);
  font-size: 17.5px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 34px;
}

.info-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  background: var(--bg-elevated);
}

.info-card h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.info-card p,
.info-card li {
  color: var(--text-soft);
  font-size: 15.3px;
}

.info-card ul {
  margin: 0;
  padding-left: 20px;
}

.timeline {
  margin-top: 34px;
  border-left: 2px solid var(--border-strong);
  padding-left: 24px;
  display: grid;
  gap: 26px;
}

.timeline-item time {
  font-size: 13.5px;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}

.timeline-item h4 {
  margin: 6px 0 6px;
  font-size: 17px;
}

.timeline-item p {
  margin: 0;
  color: var(--text-soft);
  font-size: 15.3px;
}

/* ---------- 12. 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-soft);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.22s ease;
  z-index: 40;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- 13. 404 ---------- */
.notfound {
  padding: 90px 0 110px;
  text-align: center;
}

.notfound .code {
  font-family: var(--font-serif);
  font-size: clamp(70px, 16vw, 130px);
  line-height: 1;
  background: linear-gradient(120deg, var(--accent), #7fb8ae);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.notfound h1 {
  font-family: var(--font-serif);
  font-size: 26px;
  margin: 10px 0 12px;
}

.notfound p {
  color: var(--text-muted);
  margin-bottom: 26px;
}

/* ---------- 14. 响应式 ---------- */
@media (max-width: 900px) {
  .featured {
    grid-template-columns: 1fr;
  }

  .featured .post-cover {
    min-height: 220px;
  }

  .featured-body {
    padding: 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 60px;
  }

  body {
    font-size: 16px;
  }

  .nav-toggle {
    display: grid;
  }

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 16px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    border-radius: 10px;
    padding: 11px 12px;
  }

  .section {
    padding: 46px 0;
  }

  .hero {
    padding: 52px 0 40px;
  }

  .hero-stats {
    gap: 22px;
  }

  .newsletter {
    padding: 28px;
  }

  .newsletter input {
    min-width: 0;
    flex: 1 1 160px;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav .next {
    text-align: left;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .to-top,
  .progress-bar,
  .post-nav,
  .newsletter {
    display: none;
  }
}
