/* ==========================================================================
   程序员张师傅 · 个人技术博客
   设计系统：深空霓虹 / Deep-Space Neon
   全部手写，无第三方 CSS 依赖。
   ========================================================================== */

/* ---------------------------------------------------------------- tokens */
:root {
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', 'SFMono-Regular', 'Cascadia Code', Consolas, 'Liberation Mono',
    'Microsoft YaHei', monospace;

  --bg: #05070e;
  --bg-soft: #080c16;
  --panel: rgba(14, 21, 38, 0.72);
  --panel-strong: rgba(20, 29, 51, 0.9);
  --panel-solid: #0e1526;
  --border: rgba(125, 211, 252, 0.16);
  --border-strong: rgba(125, 211, 252, 0.34);
  --text: #e8f1ff;
  --text-soft: #b6c6e2;
  --muted: #7d8fae;
  --accent: #22d3ee;
  --accent-2: #a855f7;
  --accent-3: #f472b6;
  --success: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --glow: rgba(34, 211, 238, 0.35);
  --glow-2: rgba(168, 85, 247, 0.32);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.28);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --speed: 0.22s;
  --header-h: 68px;
  color-scheme: dark;
}

[data-theme='light'] {
  --bg: #f4f7fd;
  --bg-soft: #e9f0fa;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --panel-solid: #ffffff;
  --border: rgba(15, 43, 82, 0.12);
  --border-strong: rgba(15, 43, 82, 0.22);
  --text: #0d1526;
  --text-soft: #3f4e6b;
  --muted: #6b7c99;
  --accent: #0891b2;
  --accent-2: #7c3aed;
  --accent-3: #db2777;
  --glow: rgba(8, 145, 178, 0.22);
  --glow-2: rgba(124, 58, 237, 0.18);
  --shadow: 0 18px 44px rgba(23, 42, 78, 0.14);
  --shadow-soft: 0 8px 22px rgba(23, 42, 78, 0.1);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

::selection { background: rgba(34, 211, 238, 0.28); }

/* 滚动条（与主题呼应） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.5), rgba(168, 85, 247, 0.5));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #22d3ee, #a855f7); background-clip: content-box; }

/* ---------------------------------------------------------------- 布局 */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.site-main { position: relative; z-index: 1; padding-bottom: 80px; }

.section { margin-top: 96px; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 32px; flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(24px, 3vw, 32px); }
.section-head p { color: var(--muted); margin-top: 8px; font-size: 15px; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
}
.section-eyebrow svg { opacity: 0.9; }

.link-more {
  display: inline-flex; align-items: center; gap: 6px; color: var(--accent);
  font-size: 14px; font-family: var(--mono); white-space: nowrap;
  transition: gap var(--speed) var(--ease), color var(--speed) var(--ease);
}
.link-more:hover { gap: 12px; color: var(--accent-2); }

/* ---------------------------------------------------------------- 背景光效 */
.bg-layer { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5;
  will-change: transform;
}
.blob-a {
  width: 520px; height: 520px; top: -160px; left: -120px;
  background: radial-gradient(circle at 30% 30%, rgba(34, 211, 238, 0.55), transparent 70%);
  animation: drift-a 26s var(--ease) infinite alternate;
}
.blob-b {
  width: 620px; height: 620px; top: 10%; right: -180px;
  background: radial-gradient(circle at 60% 40%, rgba(168, 85, 247, 0.5), transparent 70%);
  animation: drift-b 32s var(--ease) infinite alternate;
}
.blob-c {
  width: 480px; height: 480px; bottom: -180px; left: 30%;
  background: radial-gradient(circle at 50% 50%, rgba(244, 114, 182, 0.34), transparent 70%);
  animation: drift-c 38s var(--ease) infinite alternate;
}
[data-theme='light'] .blob { opacity: 0.42; }

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 20%, transparent 78%);
}
[data-theme='light'] .grid-overlay {
  background-image:
    linear-gradient(rgba(15, 43, 82, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 43, 82, 0.05) 1px, transparent 1px);
}

@keyframes drift-a { to { transform: translate3d(120px, 90px, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(-140px, 120px, 0) scale(1.08); } }
@keyframes drift-c { to { transform: translate3d(90px, -110px, 0) scale(1.14); } }

/* ---------------------------------------------------------------- 顶栏 */
.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 700; font-size: 17px; color: #04121c;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 20px var(--glow);
}
.brand-mark.small { width: 32px; height: 32px; border-radius: 10px; font-size: 15px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 16px; }
.brand-text em { font-style: normal; font-size: 11px; color: var(--muted); font-family: var(--mono); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  position: relative; padding: 8px 14px; border-radius: 999px; font-size: 14.5px;
  color: var(--text-soft); transition: color var(--speed) var(--ease), background var(--speed) var(--ease);
}
.nav-link:hover { color: var(--text); background: rgba(125, 211, 252, 0.08); }
.nav-link.is-active { color: var(--text); }
.nav-link.is-active::after {
  content: ''; position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%);
  width: 18px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer;
  border-radius: 12px; border: 1px solid var(--border); background: transparent; color: var(--text-soft);
  transition: all var(--speed) var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: rgba(125, 211, 252, 0.08); }
.nav-toggle { display: none; }

.theme-icon-light { display: none; }
[data-theme='light'] .theme-icon-dark { display: none; }
[data-theme='light'] .theme-icon-light { display: block; }

/* ---------------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14.5px; font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease),
    background var(--speed) var(--ease), border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}
.btn-sm { padding: 8px 14px; font-size: 13.5px; }
.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #04121c; box-shadow: 0 10px 30px var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px var(--glow); }
.btn-ghost {
  border-color: var(--border-strong); color: var(--text-soft); background: rgba(125, 211, 252, 0.04);
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.btn-ghost.is-static { cursor: default; }
.btn-ghost.is-static:hover { transform: none; }
.btn-danger { background: rgba(251, 113, 133, 0.14); color: var(--danger); border-color: rgba(251, 113, 133, 0.35); }
.btn-danger:hover { background: rgba(251, 113, 133, 0.22); }

/* ---------------------------------------------------------------- 通用容器 */
.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  box-shadow: var(--shadow-soft);
}

.tag {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-family: var(--mono); color: var(--text-soft);
  border: 1px solid var(--border); background: rgba(125, 211, 252, 0.06);
}
.tag-cat { color: var(--accent); border-color: rgba(34, 211, 238, 0.3); background: rgba(34, 211, 238, 0.08); }
.tag-tech { color: var(--accent-2); border-color: rgba(168, 85, 247, 0.3); background: rgba(168, 85, 247, 0.08); }
.tag-featured { color: #facc15; border-color: rgba(250, 204, 21, 0.35); background: rgba(250, 204, 21, 0.1); }
.tag-draft { color: var(--warn); border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.1); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px;
  font-size: 13.5px; color: var(--text-soft); border: 1px solid var(--border);
  background: rgba(125, 211, 252, 0.04); transition: all var(--speed) var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.is-active {
  color: #04121c; border-color: transparent; background: linear-gradient(120deg, var(--accent), var(--accent-2));
}
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }

.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  font-size: 13px; color: var(--accent); border: 1px solid rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.08); font-family: var(--mono);
}
.meta-item { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); font-family: var(--mono); }
.grad-text {
  background: linear-gradient(120deg, var(--accent) 10%, var(--accent-2) 55%, var(--accent-3) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------------------------------------------------------------- Hero */
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
  padding: 88px 24px 24px;
}
.hero-title { font-size: clamp(38px, 5.6vw, 62px); margin: 20px 0 18px; display: flex; flex-direction: column; }
.hero-sub { font-size: clamp(18px, 2.4vw, 26px); color: var(--text-soft); min-height: 1.4em; font-weight: 500; }
.caret {
  display: inline-block; width: 3px; height: 1.05em; vertical-align: -0.12em;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  animation: blink 1.1s steps(2, start) infinite; border-radius: 2px; margin-top: 6px;
}
@keyframes blink { to { opacity: 0; } }

.hero-intro { color: var(--text-soft); font-size: 16.5px; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; margin: 30px 0 36px; flex-wrap: wrap; }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0; }
.hero-stats div {
  padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: rgba(125, 211, 252, 0.04);
}
.hero-stats dt { font-size: 12px; color: var(--muted); font-family: var(--mono); letter-spacing: 0.08em; }
.hero-stats dd { margin: 4px 0 0; font-size: 24px; font-weight: 650; color: var(--text); }

.hero-visual { position: relative; }
.hero-visual::after {
  content: ''; position: absolute; inset: -18% -10% -14% -10%; z-index: -1;
  background: radial-gradient(circle at 60% 40%, var(--glow), transparent 62%);
  filter: blur(30px);
}
.terminal { overflow: hidden; border-radius: var(--radius-lg); }
.terminal-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); background: rgba(125, 211, 252, 0.05);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-amber { background: #febc2e; }
.dot-green { background: #28c840; }
.terminal-title { margin-left: 10px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.terminal-body {
  margin: 0; padding: 20px 22px; font-family: var(--mono); font-size: 13px; line-height: 1.85;
  color: var(--text-soft); overflow-x: auto;
}
.c-prompt { color: var(--accent); }
.c-out { color: var(--text); }
.c-key { color: var(--accent-2); }
.c-str { color: var(--success); }
.c-cursor { color: var(--accent); animation: blink 1.1s steps(2, start) infinite; }

/* ---------------------------------------------------------------- 卡片网格 */
.grid { display: grid; gap: 24px; }
.grid-works { grid-template-columns: repeat(auto-fill, minmax(324px, 1fr)); }
.grid-posts { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }

.card {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--panel); backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  box-shadow: var(--shadow-soft);
  transition: transform var(--speed) var(--ease), border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow), 0 0 0 1px var(--glow); }
.card-cover { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.card:hover .card-cover img { transform: scale(1.06); }
.cover-fallback { display: grid; place-items: center; height: 100%; color: var(--muted); }

.work-cover-sheen {
  position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(34, 211, 238, 0.18) 50%, transparent 70%);
  transition: opacity var(--speed) var(--ease);
}
.card:hover .work-cover-sheen { opacity: 1; }

.card-body { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px 22px; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-title { font-size: 19px; }
.card-title a { transition: color var(--speed) var(--ease); }
.card-title a:hover { color: var(--accent); }
.card-desc { color: var(--muted); font-size: 14.5px; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.read-more { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 13.5px; font-family: var(--mono); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* ---------------------------------------------------------------- 文章列表行 */
.post-list { display: flex; flex-direction: column; gap: 10px; }
.post-row {
  display: grid; grid-template-columns: 104px 1fr auto; gap: 20px; align-items: center;
  padding: 18px 22px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--panel); transition: all var(--speed) var(--ease);
}
.post-row:hover { border-color: var(--border-strong); transform: translateX(6px); background: var(--panel-strong); }
.post-row-date { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.post-row-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.post-row-main strong { font-size: 16px; font-weight: 600; }
.post-row-main em { font-style: normal; font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-row-side { display: flex; align-items: center; gap: 10px; }

/* ---------------------------------------------------------------- 分类卡片 */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.category-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px;
  transition: transform var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.category-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.category-card strong { font-size: 17px; }
.category-card em { font-style: normal; font-size: 13.5px; color: var(--muted); }
.category-count { font-family: var(--mono); font-size: 12.5px; color: var(--accent); }

/* ---------------------------------------------------------------- 页头与筛选 */
.page-head { padding: 72px 24px 12px; }
.page-head h1 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 12px; }
.page-head p { color: var(--muted); }

.filter-bar {
  display: flex; flex-direction: column; gap: 16px; padding: 20px 22px; margin: 28px 0 32px;
}
.search-form { display: flex; gap: 10px; }
.input {
  flex: 1; padding: 11px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: rgba(125, 211, 252, 0.05); color: var(--text); transition: border-color var(--speed) var(--ease);
}
.input::placeholder { color: var(--muted); }
.input:focus { border-color: var(--accent); outline: none; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 44px; flex-wrap: wrap; }
.page-item {
  min-width: 38px; padding: 8px 14px; text-align: center; border-radius: 10px;
  border: 1px solid var(--border); font-size: 13.5px; font-family: var(--mono); color: var(--text-soft);
  transition: all var(--speed) var(--ease);
}
.page-item:hover { border-color: var(--border-strong); color: var(--text); }
.page-item.is-current { color: #04121c; border-color: transparent; background: linear-gradient(120deg, var(--accent), var(--accent-2)); }
.page-item.is-disabled { opacity: 0.4; }

.empty { padding: 48px; text-align: center; color: var(--muted); }

/* ---------------------------------------------------------------- 文章页 */
.article { max-width: 1000px; padding-top: 48px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-family: var(--mono); margin-bottom: 22px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--accent); }
.crumb-current { color: var(--text-soft); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.article-head h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 16px; }
.article-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.article-cover { margin: 28px 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.article-cover img { width: 100%; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 42px; margin-top: 32px; align-items: start; }
.article-toc, .article-aside { position: sticky; top: calc(var(--header-h) + 20px); padding: 20px; }
.article-toc strong, .article-aside strong { display: block; font-size: 13px; font-family: var(--mono); color: var(--accent); margin-bottom: 12px; letter-spacing: 0.08em; }
.article-toc ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.article-toc a { font-size: 13.5px; color: var(--muted); transition: color var(--speed) var(--ease); }
.article-toc a:hover, .article-toc a.is-active { color: var(--accent); }
.toc-l3 { padding-left: 14px; }

.info-list { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.info-list div { display: flex; flex-direction: column; gap: 2px; }
.info-list dt { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.info-list dd { margin: 0; font-size: 14px; color: var(--text-soft); word-break: break-all; }
.info-list a { color: var(--accent); }

.work-summary { color: var(--text-soft); font-size: 16.5px; margin: 12px 0 16px; max-width: 720px; }
.work-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 56px; }
.article-nav-item { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; transition: all var(--speed) var(--ease); }
.article-nav-item:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.article-nav-item span { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.article-nav-item strong { font-size: 15.5px; font-weight: 600; }
.related { margin-top: 72px; }

/* ---------------------------------------------------------------- Markdown 正文 */
.md { font-size: 16.5px; line-height: 1.85; color: var(--text-soft); }
.md > * + * { margin-top: 20px; }
.md h1, .md h2, .md h3, .md h4 { color: var(--text); scroll-margin-top: calc(var(--header-h) + 20px); }
.md h2 {
  font-size: 25px; margin-top: 46px; padding-left: 14px; position: relative;
}
.md h2::before {
  content: ''; position: absolute; left: 0; top: 0.18em; bottom: 0.18em; width: 4px; border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.md h3 { font-size: 20px; margin-top: 34px; }
.md h4 { font-size: 17px; margin-top: 26px; }
.md a { color: var(--accent); border-bottom: 1px solid rgba(34, 211, 238, 0.35); }
.md a:hover { border-bottom-color: var(--accent); }
.md strong { color: var(--text); font-weight: 650; }
.md ul, .md ol { padding-left: 24px; display: flex; flex-direction: column; gap: 8px; }
.md li::marker { color: var(--accent); }
.md blockquote {
  margin: 0; padding: 16px 20px; border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(34, 211, 238, 0.06); color: var(--text-soft);
}
.md blockquote p + p { margin-top: 10px; }
.md code {
  font-family: var(--mono); font-size: 0.9em; padding: 2px 7px; border-radius: 6px;
  background: rgba(125, 211, 252, 0.1); border: 1px solid var(--border); color: var(--text);
}
.md .md-code {
  position: relative; margin: 0; padding: 20px 22px; border-radius: var(--radius);
  background: rgba(5, 8, 15, 0.72); border: 1px solid var(--border); overflow-x: auto;
}
[data-theme='light'] .md .md-code { background: #f2f6ff; }
.md .md-code code { background: none; border: none; padding: 0; font-size: 13.5px; line-height: 1.75; color: var(--text-soft); }
.md .md-code::after {
  content: attr(data-lang); position: absolute; top: 10px; right: 14px;
  font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.08em;
}
.md .md-code .copy-btn {
  position: absolute; top: 8px; right: 8px; transform: translateY(-120%); opacity: 0;
  padding: 4px 10px; border-radius: 8px; font-size: 11.5px; font-family: var(--mono);
  border: 1px solid var(--border-strong); background: var(--panel-strong); color: var(--text-soft);
  cursor: pointer; transition: all var(--speed) var(--ease);
}
.md .md-code:hover .copy-btn { transform: translateY(0); opacity: 1; }
.md .md-code .copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.md .md-table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.md table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.md th, .md td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.md th { background: rgba(125, 211, 252, 0.07); color: var(--text); font-family: var(--mono); font-size: 13px; }
.md tr:last-child td { border-bottom: none; }
.md img { border-radius: var(--radius-sm); border: 1px solid var(--border); }
.md hr { border: none; height: 1px; background: linear-gradient(90deg, transparent, var(--border-strong), transparent); }

/* ---------------------------------------------------------------- 关于页 */
.about-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 34px; margin-top: 34px; align-items: start; }
.about-card { padding: 30px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.about-avatar {
  width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #04121c;
  box-shadow: 0 12px 36px var(--glow); margin-bottom: 6px;
}
.about-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback { font-size: 42px; font-weight: 700; }
.about-title { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.about-bio { color: var(--muted); font-size: 14.5px; }
.about-contacts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.about-main { display: flex; flex-direction: column; gap: 22px; }
.about-block { padding: 26px 28px; }
.about-block h3 { font-size: 19px; margin-bottom: 16px; }
.about-block p { color: var(--muted); }
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.feature-list li { display: flex; flex-direction: column; gap: 4px; padding-left: 18px; position: relative; }
.feature-list li::before {
  content: ''; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.feature-list strong { font-size: 15.5px; }
.feature-list span { font-size: 14px; color: var(--muted); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 16px; margin: 20px 0 22px; }
.stat-row div { padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: rgba(125, 211, 252, 0.04); }
.stat-row dt { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.stat-row dd { margin: 4px 0 0; font-size: 21px; font-weight: 650; }

.error-page { text-align: center; padding: 120px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.error-page .hero-actions { justify-content: center; }

/* ---------------------------------------------------------------- 页脚 */
.site-footer {
  position: relative; z-index: 1; margin-top: 40px; padding: 42px 0 34px;
  border-top: 1px solid var(--border); background: linear-gradient(180deg, transparent, rgba(125, 211, 252, 0.04));
}
.footer-inner { display: flex; flex-direction: column; gap: 22px; }
.footer-brand { display: flex; align-items: flex-start; gap: 14px; }
.footer-brand strong { font-size: 16px; }
.footer-brand p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a, .footer-static { display: inline-flex; align-items: center; gap: 8px; color: var(--text-soft); font-size: 14px; }
.footer-links a:hover { color: var(--accent); }
.footer-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 12.5px; font-family: var(--mono); }

/* ---------------------------------------------------------------- 动效 */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: 42px; padding-top: 64px; }
  .article-layout { grid-template-columns: 1fr; }
  .article-toc, .article-aside { position: static; }
  .about-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .wrap { padding: 0 18px; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; padding: 12px 18px 20px; background: var(--panel-strong);
    backdrop-filter: blur(18px); border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: all var(--speed) var(--ease);
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-link { padding: 12px 10px; font-size: 16px; }
  .nav-toggle { display: grid; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-row { grid-template-columns: 1fr; gap: 10px; }
  .post-row-date { order: 2; }
  .article-nav { grid-template-columns: 1fr; }
  .section { margin-top: 64px; }
  .page-head { padding-top: 48px; }
}
