/* ============================================================
   JustTom的小屋 · 样式表
   暖纸色亮色主题 + 暖炭色暗色主题，无外部依赖
   ============================================================ */

:root {
  --bg: #faf7f2;
  --bg-soft: #f3eee6;
  --surface: #ffffff;
  --surface-2: #fbf8f3;
  --border: #eae2d7;
  --border-strong: #ddd2c3;
  --text: #2b2622;
  --text-soft: #6b6157;
  --muted: #9a8f83;
  --accent: #d9480f;
  --accent-strong: #bf3d0b;
  --accent-soft: rgba(217, 72, 15, 0.09);
  --accent-contrast: #ffffff;
  --tech: #0b7285;
  --tech-soft: rgba(11, 114, 133, 0.09);
  --daily: #b08900;
  --daily-soft: rgba(176, 137, 0, 0.1);
  --code-bg: #241f1b;
  --code-text: #e9e2d8;
  --code-muted: #9c9187;
  --shadow-sm: 0 1px 2px rgba(43, 38, 34, 0.05), 0 2px 8px rgba(43, 38, 34, 0.04);
  --shadow-lg: 0 6px 16px rgba(43, 38, 34, 0.08), 0 20px 44px rgba(43, 38, 34, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 64px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  --font-mono: "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas,
    "Liberation Mono", monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #171412;
  --bg-soft: #1d1915;
  --surface: #211d19;
  --surface-2: #262019;
  --border: #332d26;
  --border-strong: #443c32;
  --text: #ece7e1;
  --text-soft: #b6aba1;
  --muted: #8d8378;
  --accent: #ff8a4d;
  --accent-strong: #ffa26e;
  --accent-soft: rgba(255, 138, 77, 0.12);
  --accent-contrast: #231408;
  --tech: #5fc9dd;
  --tech-soft: rgba(95, 201, 221, 0.12);
  --daily: #ecc25f;
  --daily-soft: rgba(236, 194, 95, 0.12);
  --code-bg: #120f0d;
  --code-text: #ded6cb;
  --code-muted: #7c736a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.4), 0 24px 48px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* ---------- 基础 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

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

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-strong);
}

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

.container {
  width: min(1080px, 100% - 48px);
  margin-inline: auto;
}

@media (max-width: 720px) {
  .container {
    width: min(1080px, 100% - 36px);
  }
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: 999px;
  font-weight: 600;
  transition: top 0.2s ease;
}

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

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

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  color: var(--text);
  letter-spacing: 0.2px;
}

.logo:hover {
  color: var(--text);
}

.logo-mark {
  width: 26px;
  height: 26px;
  color: var(--accent);
  flex: none;
}

.logo-dot {
  font-weight: 500;
  color: var(--text-soft);
}

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

.nav-link {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

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

.nav-link.active {
  color: var(--accent);
  font-weight: 700;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 18px;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
  transform: translateX(-50%);
}

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

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-sun {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: block;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

.nav-toggle {
  display: none;
}

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 64px;
  background:
    radial-gradient(720px 360px at 12% -8%, var(--accent-soft), transparent 65%),
    radial-gradient(640px 400px at 96% 12%, var(--tech-soft), transparent 60%);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
}

.hero-title {
  margin: 22px 0 18px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.18;
  letter-spacing: -0.5px;
  font-weight: 800;
}

.grad {
  background: linear-gradient(120deg, var(--accent) 20%, #eab308 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 38px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 6px 18px var(--accent-soft);
}

.btn-primary:hover {
  background: var(--accent-strong);
  color: var(--accent-contrast);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px var(--accent-soft);
}

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

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

.hero-stats {
  display: flex;
  gap: 40px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat strong {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

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

/* 终端卡片 */
.hero-card {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--code-bg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotate(1.2deg);
  transition: transform 0.3s ease;
}

.hero-card:hover {
  transform: rotate(0deg) translateY(-4px);
}

.hero-card-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.hero-card-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #57504a;
}

.hero-card-bar i:nth-child(1) { background: #ff5f57; }
.hero-card-bar i:nth-child(2) { background: #febc2e; }
.hero-card-bar i:nth-child(3) { background: #28c840; }

.hero-card-bar span {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--code-muted);
}

.hero-card-body {
  margin: 0;
  padding: 20px 22px 24px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--code-text);
  overflow-x: auto;
}

/* ---------- 区块 ---------- */
.section {
  padding: 56px 0 20px;
}

.section-head {
  margin-bottom: 30px;
}

.section-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: "";
  width: 5px;
  height: 24px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), #eab308);
}

.section-sub {
  margin: 6px 0 0 17px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- 文章卡片 ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

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

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-top time {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-excerpt {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
  color: var(--muted);
}

.card-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card-time .ico {
  width: 14px;
  height: 14px;
}

.card-more {
  font-weight: 600;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.2s ease;
}

.post-card:hover .card-more {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- 徽章 / 标签 ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.chip-daily {
  color: var(--daily);
  background: var(--daily-soft);
}

.chip-tech {
  color: var(--tech);
  background: var(--tech-soft);
}

.tag {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-soft);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

/* ---------- 分类卡片 ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 40px;
}

.cat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}

.cat-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  font-size: 30px;
  border-radius: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.cat-info {
  flex: 1;
  min-width: 0;
}

.cat-info h3 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 800;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.cat-count {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.cat-info p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-arrow {
  flex: none;
  font-size: 20px;
  color: var(--muted);
  transition: all 0.2s ease;
}

.cat-card:hover .cat-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ---------- 分类归档页 ---------- */
.page-head {
  padding: 72px 0 44px;
  background:
    radial-gradient(560px 280px at 18% 0%, var(--accent-soft), transparent 60%),
    radial-gradient(520px 300px at 90% 10%, var(--tech-soft), transparent 60%);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.page-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  font-size: 36px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.page-title {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.page-desc {
  margin: 0 auto;
  max-width: 56ch;
  color: var(--text-soft);
  font-size: 15.5px;
}

.page-count {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.archive-list {
  list-style: none;
  margin: 36px 0 64px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.archive-item a {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 22px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.archive-item a:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
  color: var(--text);
}

.archive-date {
  flex: none;
  width: 96px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  border-right: 1px dashed var(--border-strong);
  padding-right: 22px;
}

.archive-main {
  flex: 1;
  min-width: 0;
}

.archive-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}

.archive-item a:hover .archive-title {
  color: var(--accent);
}

.archive-excerpt {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.archive-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.archive-arrow {
  flex: none;
  font-size: 18px;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.2s ease;
}

.archive-item a:hover .archive-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent);
}

/* ---------- 文章页 ---------- */
.article {
  max-width: 780px;
  padding-top: 44px;
  padding-bottom: 40px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
  font-size: 13.5px;
  color: var(--muted);
}

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

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

.crumb-now {
  color: var(--text-soft);
  max-width: 40ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-head {
  margin-bottom: 38px;
}

.article-title {
  margin: 16px 0 20px;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
  color: var(--text-soft);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #eab308);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}

.meta-author {
  font-weight: 700;
  color: var(--text);
}

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

.meta-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-time .ico {
  width: 15px;
  height: 15px;
}

/* 正文排版 */
.article-body {
  font-size: 16.5px;
  line-height: 1.9;
  color: var(--text);
}

.article-body > p {
  margin: 0 0 1.35em;
}

.article-body h2 {
  position: relative;
  margin: 2.2em 0 1em;
  padding-left: 16px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.article-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  bottom: 0.32em;
  width: 5px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), #eab308);
}

.article-body h3 {
  margin: 1.8em 0 0.8em;
  font-size: 18px;
  font-weight: 700;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.35em;
  padding-left: 8px;
  list-style: none;
}

.article-body li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 0.55em;
}

.article-body li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.75;
  transform: rotate(45deg);
}

.article-body strong {
  font-weight: 700;
  color: var(--text);
}

.article-body blockquote {
  margin: 1.6em 0;
  padding: 16px 22px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-soft);
  color: var(--text-soft);
  font-size: 15.5px;
}

.article-body blockquote p {
  margin: 0;
}

/* 行内代码 */
.article-body code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  word-break: break-word;
}

[data-theme="dark"] .article-body code {
  color: var(--accent);
}

/* 代码块（终端风，恒暗色） */
.article-body pre {
  position: relative;
  margin: 1.6em 0;
  padding: 46px 22px 20px;
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.article-body pre::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 18px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 20px 0 0 #febc2e, 40px 0 0 #28c840;
}

.article-body pre code {
  display: block;
  padding: 0;
  background: none;
  color: var(--code-text);
  font-size: 13.5px;
  line-height: 1.8;
  white-space: pre;
}

/* 表格 */
.article-body table {
  width: 100%;
  margin: 1.6em 0;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.6;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-strong);
}

.article-body th {
  background: var(--bg-soft);
  font-weight: 700;
  text-align: left;
}

.article-body th,
.article-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.article-body th:first-child,
.article-body td:first-child {
  white-space: nowrap;
  font-weight: 600;
}

.article-body tr:last-child td {
  border-bottom: none;
}

/* 文末 */
.article-foot {
  margin-top: 48px;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 34px;
}

.article-end {
  text-align: center;
  color: var(--muted);
  letter-spacing: 8px;
  margin-bottom: 34px;
  font-size: 14px;
  opacity: 0.7;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.pager-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pager-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}

.pager-next {
  text-align: right;
}

.pager-empty {
  visibility: hidden;
}

.pager-label {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}

.pager-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pager-item:hover .pager-title {
  color: var(--accent);
}

/* ---------- 404 ---------- */
.nf {
  text-align: center;
  padding: 110px 0 130px;
}

.nf-code {
  margin: 0;
  font-size: clamp(90px, 16vw, 150px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -4px;
  background: linear-gradient(120deg, var(--accent), #eab308);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nf-title {
  margin: 18px 0 10px;
  font-size: 24px;
  font-weight: 800;
}

.nf-desc {
  margin: 0 0 32px;
  color: var(--text-soft);
}

.nf-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
}

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

.footer-inner {
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
}

.footer-brand .logo-mark {
  width: 20px;
  height: 20px;
}

.footer-tagline {
  margin: 10px 0 6px;
  font-size: 13.5px;
  color: var(--text-soft);
}

.footer-meta {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.footer-meta a {
  color: var(--muted);
  border-bottom: 1px dashed var(--border-strong);
}

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

/* ---------- 回到顶部 ---------- */
.back-top {
  position: fixed;
  right: 26px;
  bottom: 30px;
  z-index: 90;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text-soft);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: all 0.25s ease;
}

.back-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

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

.back-top svg {
  width: 20px;
  height: 20px;
}

/* ---------- 入场动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease var(--d, 0ms), transform 0.55s ease var(--d, 0ms);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .hero-card {
    max-width: 520px;
  }

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

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

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

  .site-nav[data-open="true"] {
    display: flex;
  }

  .nav-link {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
  }

  .nav-link.active::after {
    display: none;
  }

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

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

  .cat-card {
    padding: 22px;
  }

  .archive-item a {
    flex-wrap: wrap;
    gap: 14px;
    padding: 18px 20px;
  }

  .archive-date {
    width: auto;
    border-right: none;
    padding-right: 0;
    padding-bottom: 2px;
  }

  .archive-arrow {
    display: none;
  }

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

  .hero-stats {
    gap: 28px;
  }

  .back-top {
    right: 16px;
    bottom: 20px;
  }
}
