/* ==========================================================================
   Wencue 个人网站 - 全局样式
   纯 HTML + CSS + JS,无任何外部依赖(字体,图标均为系统/内联)
   ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
  --font-sans: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei",
               system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", Consolas, "Courier New", monospace;

  --bg: #0e1117;
  --bg-soft: #141922;
  --bg-card: #171d28;
  --bg-hover: #1f2733;
  --border: #242e3c;
  --text: #e7eaf1;
  --text-dim: #9aa6b8;
  --text-faint: #67738a;

  --accent: #7c6cff;
  --accent-2: #b06bff;
  --accent-soft: rgba(124, 108, 255, .14);
  --gradient: linear-gradient(135deg, #7c6cff 0%, #b06bff 55%, #ff8cc6 100%);

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 12px 32px rgba(0, 0, 0, .35);
  --max-width: 1060px;
  --nav-h: 64px;
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-soft: #eef0f6;
  --bg-card: #ffffff;
  --bg-hover: #eef1f8;
  --border: #e2e6ef;
  --text: #1d2436;
  --text-dim: #57637b;
  --text-faint: #8b94a9;
  --accent-soft: rgba(124, 108, 255, .10);
  --shadow: 0 12px 32px rgba(30, 40, 90, .10);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }

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

button { font-family: inherit; cursor: pointer; }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.accent { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 滚动条默认隐藏(前端规范),如需恢复请删除以下三段 */
html { scrollbar-width: none; -ms-overflow-style: none; }
::-webkit-scrollbar { display: none; }

/* ---------- 入场动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 导航栏 ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
[data-theme="light"] .nav.scrolled { background: color-mix(in srgb, var(--bg) 86%, transparent); }

.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }

.nav-logo {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
}

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

.nav-link {
  position: relative;
  color: var(--text-dim);
  font-size: 15px;
  padding: 4px 0;
  transition: color .25s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  border-radius: 2px;
  background: var(--gradient);
  transition: width .25s ease;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after, .nav-link:hover::after { width: 100%; }

.nav-cta {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--gradient);
  padding: 7px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(124, 108, 255, .35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(124, 108, 255, .45); }

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

.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-dim);
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.icon-btn:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }

.nav-burger { display: none; width: 42px; font-size: 20px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 40px) 0 80px;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  pointer-events: none;
  animation: blob-float 16s ease-in-out infinite alternate;
}
.hero-blob-1 {
  width: 480px; height: 480px;
  top: -120px; right: -80px;
  background: radial-gradient(circle at 30% 30%, #7c6cff, #b06bff);
}
.hero-blob-2 {
  width: 380px; height: 380px;
  bottom: -100px; left: -100px;
  background: radial-gradient(circle at 60% 40%, #ff8cc6, #7c6cff);
  animation-delay: -8s;
}
@keyframes blob-float {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.12); }
}

.hero-inner { position: relative; z-index: 1; }

.hero-greeting { color: var(--text-faint); font-size: 18px; margin-bottom: 8px; }

.hero-sub {
  margin-top: 14px;
  font-size: clamp(12.5px, 1.9vw, 15px);
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  max-width: 720px;
}
.hero-en {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  letter-spacing: .4px;
  max-width: 720px;
}

.hero-name {
  font-size: clamp(56px, 9vw, 96px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -3px;
  color: var(--text);
}
.hero-name .dot { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero-type {
  margin-top: 10px;
  font-size: clamp(18px, 2.6vw, 24px);
  color: var(--text-dim);
  min-height: 1.8em;
  font-family: var(--font-mono);
}
.cursor { color: var(--accent); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
  max-width: 560px;
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 16px;
}

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

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary {
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 8px 22px rgba(124, 108, 255, .35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(124, 108, 255, .45); }

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-2px); }

.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }

.badge {
  font-size: 13px;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}
.badge:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

/* ---------- 通用区块 ---------- */
.section { padding: 96px 24px; }
.section-alt { background: var(--bg-soft); }

.section-title {
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 700;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-index {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 3px 10px;
  border-radius: 8px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.more-link {
  font-size: 15px;
  color: var(--accent);
  font-weight: 600;
  transition: gap .2s ease, opacity .2s ease;
}
.more-link:hover { opacity: .8; }

/* ---------- 关于 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 36px 30px;
  box-shadow: var(--shadow);
}

.about-seal { margin-bottom: 20px; }
.about-seal .seal-img {
  width: 100px; height: 100px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: var(--shadow);
}
.about-seal .seal-light { display: none; }
[data-theme="light"] .about-seal .seal-dark { display: none; }
[data-theme="light"] .about-seal .seal-light { display: block; }
.seal-caption {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  letter-spacing: 1.5px;
}

.about-card h3 { font-size: 22px; margin-bottom: 2px; }
.about-sub { color: var(--text-faint); font-size: 14px; margin-bottom: 16px; }
.about-text { color: var(--text-dim); font-size: 15px; }

.about-facts {
  list-style: none;
  margin-top: 20px;
  display: grid;
  gap: 10px;
}
.about-facts li {
  font-size: 14.5px;
  color: var(--text-dim);
  padding: 9px 14px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

.about-side { display: grid; gap: 18px; }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .25s ease, border-color .25s ease;
}
.stat-card:hover { transform: translateY(-3px); border-color: var(--accent); }

.stat-num {
  font-size: 34px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font-family: var(--font-mono);
}
.stat-label { color: var(--text-faint); font-size: 13.5px; margin-top: 4px; }

/* ---------- 技能 ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .25s ease, border-color .25s ease;
}
.skill-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }

.skill-head { display: flex; align-items: center; margin-bottom: 16px; }
.skill-head h3 { font-size: 17px; }

.bar {
  height: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--gradient);
  transition: width 1.1s cubic-bezier(.22, 1, .36, 1) .2s;
}
.skill-card.visible .bar-fill { width: var(--w); }

.skill-note { margin-top: 12px; font-size: 13.5px; color: var(--text-faint); }

/* ---------- 文章卡片(首页 + 列表页共用) ---------- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: var(--shadow);
}

.post-card .post-date { font-size: 13px; color: var(--text-faint); font-family: var(--font-mono); }
.post-card h3 {
  font-size: 19px;
  margin: 8px 0 10px;
  line-height: 1.45;
}
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--accent); }
.post-card .post-summary {
  font-size: 14px;
  color: var(--text-dim);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag {
  font-size: 12.5px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 3px 11px;
  border-radius: 999px;
}

.post-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.read-more { font-size: 14px; font-weight: 600; color: var(--accent); }

.empty { color: var(--text-faint); text-align: center; padding: 40px 0; grid-column: 1 / -1; }

/* ---------- 日记栏目 ---------- */
.diary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.month-block {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--text-faint);
  margin: 8px 0 2px;
}

/* ---------- 语录栏目 ---------- */
.quotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.quote-card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform .25s ease, border-color .25s ease;
}
.quote-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.quote-card p {
  font-size: 15px;
  line-height: 1.9;
  font-family: var(--font-mono);
  letter-spacing: .5px;
}

/* ---------- 博客列表页 ---------- */
.page-hero {
  padding: calc(var(--nav-h) + 72px) 24px 40px;
  text-align: center;
}
.page-hero h1 { font-size: clamp(30px, 4.5vw, 44px); font-weight: 800; }
.page-hero p { color: var(--text-dim); margin-top: 8px; font-size: 16px; }

.blog-toolbar { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }

.search-box { position: relative; max-width: 520px; width: 100%; margin: 0 auto; }
.search-box input {
  width: 100%;
  padding: 13px 20px 13px 46px;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.search-box input::placeholder { color: var(--text-faint); }
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box::before {
  content: "";
  position: absolute;
  left: 18px; top: 50%;
  width: 16px; height: 16px;
  transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2367738a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.5' y2='16.5'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

.tag-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip {
  font-size: 13.5px;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 15px;
  border-radius: 999px;
  transition: all .2s ease;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.active {
  color: #fff;
  background: var(--gradient);
  border-color: transparent;
}

.blog-count { text-align: center; color: var(--text-faint); font-size: 13.5px; margin-bottom: 24px; }
.blog-count b { color: var(--accent); }

/* ---------- 文章页 ---------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--gradient);
  z-index: 200;
}

.post-page { padding: calc(var(--nav-h) + 48px) 24px 80px; }

.back-link {
  display: inline-block;
  color: var(--text-dim);
  font-size: 14.5px;
  margin-bottom: 28px;
  transition: color .2s ease;
}
.back-link:hover { color: var(--accent); }

.post-header { max-width: 760px; margin: 0 auto 30px; }

.post-header h1 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.5px;
  margin: 14px 0;
}

.post-header .post-meta {
  justify-content: flex-start;
  gap: 18px;
  color: var(--text-faint);
  font-size: 14px;
  font-family: var(--font-mono);
}

.post-body {
  max-width: 760px;
  margin: 0 auto;
  font-size: 16.5px;
  color: var(--text);
  line-height: 1.9;
}

/* 文章正文排版 */
.post-body h2 {
  font-size: 25px;
  margin: 2.2em 0 .8em;
  padding-bottom: .4em;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.post-body h2::before {
  content: "";
  display: inline-block;
  width: 4px; height: 1.1em;
  margin-right: 12px;
  border-radius: 2px;
  background: var(--gradient);
  vertical-align: -0.18em;
}
.post-body h3 { font-size: 20px; margin: 1.8em 0 .6em; }
.post-body h4 { font-size: 17px; margin: 1.5em 0 .5em; }

.post-body p { margin: 1.1em 0; }
.post-body a { border-bottom: 1px dashed color-mix(in srgb, var(--accent) 60%, transparent); transition: border-color .2s ease; }
.post-body a:hover { border-bottom-style: solid; border-bottom-color: var(--accent); }

.post-body strong { font-weight: 700; }
.post-body ul, .post-body ol { margin: 1em 0; padding-left: 1.6em; }
.post-body li { margin: .45em 0; }
.post-body li::marker { color: var(--accent); }

.post-body hr { border: none; border-top: 1px solid var(--border); margin: 2.4em 0; }

.post-body blockquote {
  margin: 1.4em 0;
  padding: 14px 20px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-dim);
}
.post-body blockquote p { margin: .3em 0; }

.inline-code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  color: var(--accent-2);
}

.code-block {
  position: relative;
  margin: 1.5em 0;
  background: #0d1119;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.code-lang {
  position: absolute;
  top: 10px; right: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-faint);
  background: #1b2230;
  padding: 2px 9px;
  border-radius: 6px;
}
.code-block code {
  display: block;
  padding: 20px 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.75;
  color: #d8e0f0;
}
[data-theme="light"] .code-block { background: #10131b; border-color: #c9cedd; }
[data-theme="light"] .code-block code { color: #dde3f0; }

.table-wrap { overflow-x: auto; margin: 1.5em 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.post-body table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.post-body th, .post-body td { padding: 10px 16px; text-align: center; border-bottom: 1px solid var(--border); white-space: nowrap; }
.post-body th { background: var(--bg-soft); color: var(--text-dim); font-weight: 600; }
.post-body tbody tr:last-child td { border-bottom: none; }
.post-body tbody tr:hover td { background: var(--bg-hover); }

.post-body img { border-radius: var(--radius); margin: 1.5em 0; border: 1px solid var(--border); }

/* 前后篇 */
.post-nav {
  max-width: 760px;
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.post-nav a {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--text-dim);
  font-size: 13.5px;
  transition: all .25s ease;
}
.post-nav a:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.post-nav .dir { font-size: 12px; color: var(--text-faint); display: block; margin-bottom: 4px; font-family: var(--font-mono); }
.post-nav .title { font-weight: 600; font-size: 15px; }
.post-nav .next { text-align: right; }

/* ---------- 页脚 ---------- */
.footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 56px 24px 36px;
}
.footer-logo { font-size: 30px; font-weight: 800; }
.footer-brand p { color: var(--text-faint); font-size: 13.5px; margin-top: 8px; }

.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-links h4 { font-size: 14px; color: var(--text-dim); margin-bottom: 4px; letter-spacing: 1px; }
.footer-links a { color: var(--text-faint); font-size: 14px; transition: color .2s ease; }
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 18px 24px;
  color: var(--text-faint);
  font-size: 13px;
}

/* ---------- 回到顶部 ---------- */
.back-top {
  position: fixed;
  right: 26px; bottom: 26px;
  width: 44px; height: 44px;
  font-size: 19px;
  color: #fff;
  background: var(--gradient);
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(124, 108, 255, .4);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 90;
}
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-top:hover { transform: translateY(-3px); }

/* ---------- 404 ---------- */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.error-code {
  font-size: clamp(90px, 18vw, 160px);
  font-weight: 800;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font-family: var(--font-mono);
}
.error-page h1 { font-size: 26px; margin: 16px 0 8px; }
.error-page p { color: var(--text-dim); margin-bottom: 28px; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .nav-burger { display: inline-flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 26px 18px;
    display: none;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-link { width: 100%; padding: 10px 0; font-size: 16px; }
  .nav-cta { margin-top: 10px; width: 100%; text-align: center; }
}

@media (max-width: 560px) {
  .section { padding: 72px 18px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }
  .footer-inner { grid-template-columns: 1fr; }
}