/* =============================================================
   coderliang 风主题 — 霓虹终端设计系统
   配色与质感复刻 coderliang.com（oklch 色彩、青色霓虹 glow）
   ============================================================= */

/* ---------- 0. 本地字体（可变字体，覆盖全部字重；无需外网 Google Fonts） ---------- */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geistmono-latin.woff2") format("woff2");
}

/* ---------- 1. Design Tokens ---------- */
:root {
  /* 深色（默认） */
  --background: #0b1120;
  --background: oklch(10% .02 260);
  --foreground: #e8edf5;
  --foreground: oklch(93% .01 260);
  --card: #121a2c;
  --card: oklch(14% .02 260);
  --card-foreground: oklch(93% .01 260);
  --muted: #1b2438;
  --muted: oklch(20% .02 260);
  --muted-foreground: #94a3b8;
  --muted-foreground: oklch(65% .02 260);
  --border: #273349;
  --border: oklch(30% .03 260);
  --primary: #00e5c6;
  --primary: oklch(75% .2 180);
  --primary-foreground: #0b1120;
  --primary-foreground: oklch(10% .02 260);
  --accent: #1b2438;
  --accent: oklch(25% .04 280);
  --destructive: #ff5c5c;
  --destructive: oklch(60% .25 25);
  --code-block-bg: #0a0f1c;
  --code-block-bg: oklch(8% .02 260);

  /* 霓虹发光 */
  --glow-text: 0 0 10px oklch(75% .2 180/.6), 0 0 40px oklch(75% .2 180/.2);
  --glow-text-soft: 0 0 8px oklch(75% .2 180/.45);
  --glow-box: 0 0 15px oklch(75% .2 180/.15), inset 0 1px 0 oklch(100% 0 0/.05);
  --neon-border: oklch(75% .2 180/.3);
  --neon-muted: oklch(75% .2 180/.2);

  /* 终端交通灯 */
  --dot-red: oklch(65% .2 25);
  --dot-yellow: oklch(80% .16 90);
  --dot-green: oklch(70% .17 150);

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;

  --container: 1180px;
  --radius: 10px;
  --header-h: 60px;
  color-scheme: dark;
}

[data-theme="light"] {
  --background: #fbfcfd;
  --background: oklch(98.5% .005 250);
  --foreground: #1b2438;
  --foreground: oklch(22% .02 260);
  --card: #ffffff;
  --card: oklch(100% 0 0);
  --card-foreground: oklch(22% .02 260);
  --muted: #f0f3f7;
  --muted: oklch(95.5% .008 250);
  --muted-foreground: #5b6b84;
  --muted-foreground: oklch(50% .02 260);
  --border: #e2e8f0;
  --border: oklch(90% .01 250);
  --primary: #0aa3a0;
  --primary: oklch(55% .12 185);
  --primary-foreground: #ffffff;
  --primary-foreground: oklch(99% .003 250);
  --accent: #eef1f6;
  --accent: oklch(94% .02 280);
  --code-block-bg: #0f172a;
  --glow-text: 0 1px 2px oklch(55% .12 185/.15);
  --glow-text-soft: 0 1px 2px oklch(55% .12 185/.15);
  --glow-box: 0 1px 2px oklch(25% .02 260/.06), 0 8px 24px oklch(25% .02 260/.07);
  --neon-border: oklch(55% .12 185/.3);
  --neon-muted: oklch(55% .12 185/.15);
  color-scheme: light;
}

/* ---------- 2. Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}
::selection { background: var(--neon-muted); }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary); }
img { max-width: 100%; }
h1, h2, h3, h4, h5, h6 { line-height: 1.3; margin: 0 0 .6em; }
p { margin: 0 0 1em; }
.mono, code, pre, kbd { font-family: var(--font-mono); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ---------- 3. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in oklab, var(--background) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 600;
  color: var(--foreground);
  white-space: nowrap;
}
.logo:hover .logo-name { text-shadow: var(--glow-text); }
.logo-mark { color: var(--primary); }
.logo-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  margin-left: 2px;
  background: var(--primary);
  box-shadow: var(--glow-text-soft);
  animation: blink 1.1s steps(2, start) infinite;
  vertical-align: text-bottom;
}
@keyframes blink { to { visibility: hidden; } }

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-link {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--muted-foreground);
  white-space: nowrap;
}
.nav-link:hover { color: var(--foreground); background: var(--muted); }
.nav-link.active { color: var(--primary); background: var(--neon-muted); }

.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12.5px;
  transition: all .2s;
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--neon-muted); }
.search-hint { opacity: .85; }
#theme-toggle .icon-sun { display: none; }
[data-theme="light"] #theme-toggle .icon-sun { display: block; }
[data-theme="light"] #theme-toggle .icon-moon { display: none; }

/* ---------- 4. Hero / Terminal ---------- */
.hero { padding: 36px 0 8px; }
.terminal {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--glow-box);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}
.traffic { display: flex; gap: 7px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.red { background: var(--dot-red); }
.dot.yellow { background: var(--dot-yellow); }
.dot.green { background: var(--dot-green); }
.terminal-title { font-size: 12.5px; color: var(--muted-foreground); }
.terminal-body { padding: 20px 22px; background: var(--code-block-bg); font-size: 14px; }
.t-line { line-height: 1.9; min-height: 1.9em; }
.t-prompt { color: var(--primary); font-weight: 600; }
.t-cmd { color: var(--foreground); }
.t-out { color: var(--foreground); }
.t-green { color: var(--primary); text-shadow: var(--glow-text-soft); }
.t-comment { color: var(--muted-foreground); }
.t-dim { color: var(--muted-foreground); }
.t-gap { min-height: .9em; }
.t-line a { color: var(--primary); }
.hero-terminal .terminal-body { font-size: 15px; }
.typing::after {
  content: "▊";
  color: var(--primary);
  margin-left: 2px;
  animation: blink 1.1s steps(2, start) infinite;
}

/* ---------- 5. Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 18px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 7px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}
.tab:hover { color: var(--primary); border-color: var(--neon-border); }
.tab.active {
  color: var(--primary);
  border-color: var(--neon-border);
  background: var(--neon-muted);
  box-shadow: var(--glow-box);
}

/* ---------- 6. Post Cards ---------- */
.post-list { display: flex; flex-direction: column; gap: 14px; }
.post-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--glow-box);
  transition: all .25s;
  position: relative;
}
.post-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 20px oklch(75% .2 180/.18), inset 0 1px 0 oklch(100% 0 0/.05);
}
.post-card-link { display: block; color: inherit; }
.post-card-link:hover { color: inherit; }
.post-card-body { padding: 18px 20px; }
.post-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.post-card-date { font-size: 12px; color: var(--muted-foreground); }
.tag-pill {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--neon-border);
  border-radius: 999px;
  background: color-mix(in oklab, var(--primary) 6%, transparent);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.4;
}
a.tag-pill:hover { box-shadow: var(--glow-box); }
.post-card-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--foreground);
  transition: color .2s;
}
.post-card:hover .post-card-title { color: var(--primary); }
.post-card-excerpt {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: var(--muted-foreground);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.meta-item { display: inline-flex; align-items: center; gap: 4px; }
.meta-arrow { margin-left: auto; color: var(--primary); transition: transform .2s; }
.post-card:hover .meta-arrow { transform: translateX(3px); }

/* ---------- 7. Sidebar Panels ---------- */
.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  padding: 22px 0 40px;
}
.sidebar { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--glow-box);
  overflow: hidden;
}
.panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 14px;
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}
.panel-title { font-size: 12px; color: var(--muted-foreground); }
.panel-more { font-size: 11.5px; color: var(--primary); }
.panel-body { padding: 8px; }
.log-row {
  display: flex;
  gap: 10px;
  padding: 8px 8px;
  border-radius: 8px;
  color: inherit;
}
.log-row:hover { background: var(--neon-muted); }
.log-idx { color: var(--primary); font-size: 12px; flex-shrink: 0; }
.log-body { min-width: 0; }
.log-title {
  display: block;
  font-size: 13px;
  color: var(--foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.log-row:hover .log-title { color: var(--primary); }
.log-meta { font-size: 11px; color: var(--muted-foreground); }

.repo-row { display: block; padding: 9px 8px; border-radius: 8px; color: inherit; }
.repo-row:hover { background: var(--neon-muted); }
.repo-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.repo-lang {
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--neon-border);
  color: var(--primary);
  flex-shrink: 0;
}
.repo-name { font-size: 12px; color: var(--foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-desc {
  font-size: 12px;
  color: var(--muted-foreground);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.repo-meta { font-size: 11px; color: var(--muted-foreground); }
.repo-star { color: var(--primary); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px; }
.cloud-tag {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted-foreground);
  transition: all .2s;
}
.cloud-tag:hover { color: var(--primary); border-color: var(--primary); box-shadow: var(--glow-box); }
.cloud-count { color: var(--primary); margin-left: 4px; font-size: 11px; }

/* ---------- 8. Pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  font-size: 13px;
}
.page-btn {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--foreground);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); box-shadow: var(--glow-box); }
.page-btn.disabled { opacity: .4; pointer-events: none; }
.page-numbers { display: flex; gap: 6px; align-items: center; }
.page-num { padding: 4px 9px; border-radius: 6px; color: var(--muted-foreground); }
.page-num:hover { color: var(--primary); }
.page-num.current { color: var(--primary); background: var(--neon-muted); }

/* ---------- 9. Post Page ---------- */
.page-main { padding: 26px 0 50px; }
.post-path {
  font-size: 12.5px;
  color: var(--muted-foreground);
  margin-bottom: 14px;
  padding: 8px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
}
.path-file { color: var(--primary); }
.post-header { margin-bottom: 22px; }
.post-header-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.tag-chip {
  font-size: 12px;
  color: var(--muted-foreground);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px dashed var(--border);
}
.tag-chip:hover { color: var(--primary); border-color: var(--primary); }
.post-title-lg {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -.01em;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12.5px;
  color: var(--muted-foreground);
}

/* 正文排版 */
.post-content {
  font-size: 16px;
  line-height: 1.85;
  color: var(--foreground);
}
.post-content > *:first-child { margin-top: 0; }
.post-content h2 {
  font-size: 22px;
  margin-top: 2em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.post-content h3 { font-size: 18px; margin-top: 1.8em; }
.post-content h4 { font-size: 16px; margin-top: 1.5em; }
.post-content a { border-bottom: 1px dashed var(--primary); }
.post-content a:hover { border-bottom-style: solid; }
.post-content blockquote {
  margin: 1.4em 0;
  padding: 4px 18px;
  border-left: 3px solid var(--primary);
  background: var(--neon-muted);
  border-radius: 0 8px 8px 0;
  color: var(--muted-foreground);
}
.post-content ul, .post-content ol { padding-left: 1.6em; margin: 0 0 1em; }
.post-content li { margin: .35em 0; }
.post-content li::marker { color: var(--primary); }
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: 14px;
}
.post-content th, .post-content td {
  padding: 8px 12px;
  border: 1px solid var(--border);
  text-align: left;
}
.post-content th { background: var(--muted); font-family: var(--font-mono); font-weight: 500; }
.post-content hr { border: none; border-top: 1px dashed var(--border); margin: 2.2em 0; }
.post-content img { border-radius: 8px; border: 1px solid var(--border); }
.post-content kbd {
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--muted);
  font-size: 12.5px;
}

/* 代码块（霓虹终端风） */
.post-content .highlight, .post-content pre {
  background: var(--code-block-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.7;
  box-shadow: inset 0 1px 0 oklch(100% 0 0/.04);
  margin: 1.4em 0;
}
.post-content pre code, .post-content .highlight code {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
}
.post-content code {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--neon-muted);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--neon-border);
}
.post-content .highlight figcaption {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-foreground);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}
.post-content .highlight table { margin: 0; border: none; width: auto; }
.post-content .highlight tr, .post-content .highlight td, .post-content .highlight th { border: none; padding: 0; background: none !important; }
.post-content .highlight .gutter { display: none; }

/* hljs 霓虹配色 */
.hljs-comment, .hljs-quote { color: #5b6b84; color: oklch(60% .03 260); font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-doctag, .hljs-title.function_ { color: #7dd3fc; }
.hljs-string, .hljs-regexp, .hljs-addition { color: #00e5c6; color: oklch(75% .2 180); }
.hljs-number, .hljs-symbol, .hljs-bullet { color: #fbbf24; color: oklch(80% .16 90); }
.hljs-title, .hljs-section, .hljs-name, .hljs-selector-id, .hljs-selector-class { color: #a5b4fc; color: oklch(70% .15 285); }
.hljs-built_in, .hljs-type, .hljs-class .hljs-title { color: #67e8f9; color: oklch(85% .1 195); }
.hljs-attr, .hljs-attribute, .hljs-variable, .hljs-template-variable, .hljs-property { color: #f0abfc; color: oklch(75% .18 320); }
.hljs-meta { color: #94a3b8; color: oklch(65% .02 260); }
.hljs-deletion { color: #f87171; color: oklch(70% .2 25); }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 600; }

/* 目录 */
.toc-wrap {
  margin: 0 0 26px;
  padding: 14px 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--card) 60%, transparent);
  font-size: 13px;
}
.toc-title { color: var(--primary); margin-bottom: 8px; }
.toc-wrap .toc { list-style: none; margin: 0; padding: 0; }
.toc-wrap .toc .toc { padding-left: 16px; }
.toc-wrap .toc li { margin: 4px 0; }
.toc-wrap .toc a { color: var(--muted-foreground); }
.toc-wrap .toc a:hover, .toc-wrap .toc .active a { color: var(--primary); }
.toc-wrap .toc .active a { text-shadow: var(--glow-text-soft); }

/* 文章底部分页导航 */
.post-footer { margin-top: 34px; }
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: inherit;
  transition: all .2s;
}
.post-nav-link:hover { border-color: var(--primary); box-shadow: var(--glow-box); }
.post-nav-link.next { text-align: right; }
.post-nav-link.disabled { opacity: .45; pointer-events: none; }
.post-nav-label { font-size: 11.5px; color: var(--muted-foreground); }
.post-nav-title { font-size: 14px; color: var(--foreground); }
.post-nav-link:hover .post-nav-title { color: var(--primary); }
.post-back { font-size: 13px; }

/* Giscus */
.giscus-wrap { margin-top: 30px; }
.giscus-bar {
  padding: 9px 14px;
  background: var(--muted);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 12px;
  color: var(--muted-foreground);
}
.giscus { padding: 6px; border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); background: var(--card); }

/* ---------- 10. Archive / Category / Tag 终端页 ---------- */
.term-page .terminal-body { font-size: 14px; }
.archive-row { display: flex; gap: 16px; align-items: baseline; }
.archive-row .t-dim { flex-shrink: 0; }
.archive-link { color: var(--foreground); }
.archive-link:hover { color: var(--primary); text-shadow: var(--glow-text-soft); }

/* ---------- 11. Footer ---------- */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.footer-terminal {
  margin: 26px 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--code-block-bg);
  font-size: 14px;
  box-shadow: var(--glow-box);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 30px;
  padding: 8px 0 26px;
}
.footer-desc { font-size: 13.5px; color: var(--muted-foreground); margin: 12px 0 14px; max-width: 300px; }
.footer-social { display: flex; gap: 10px; }
.social-link {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.social-link:hover { color: var(--primary); border-color: var(--primary); }
.footer-col-title { font-size: 11.5px; color: var(--muted-foreground); margin-bottom: 12px; letter-spacing: .08em; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-link { font-size: 13.5px; color: var(--muted-foreground); width: fit-content; }
.footer-link:hover { color: var(--primary); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 0 22px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted-foreground);
}
.footer-built a { color: var(--muted-foreground); border-bottom: 1px dashed var(--border); }
.footer-built a:hover { color: var(--primary); }

/* ---------- 12. Search Modal ---------- */
.search-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 20px 0; }
.search-modal[hidden] { display: none; }
.search-modal-backdrop { position: absolute; inset: 0; background: oklch(0% 0 0/.6); backdrop-filter: blur(4px); }
.search-panel {
  position: relative;
  width: min(640px, 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 0 40px oklch(75% .2 180/.2), var(--glow-box);
  overflow: hidden;
  animation: pop .18s ease;
}
@keyframes pop { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.search-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--muted);
}
.search-prompt { color: var(--primary); font-family: var(--font-mono); font-weight: 600; }
.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 15px;
}
.search-input::placeholder { color: var(--muted-foreground); }
.search-input-row kbd {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 11px;
  color: var(--muted-foreground);
  background: var(--card);
}
.search-status { padding: 10px 16px; font-family: var(--font-mono); font-size: 12px; color: var(--muted-foreground); border-bottom: 1px solid var(--border); }
.search-results { list-style: none; margin: 0; padding: 8px; max-height: 46vh; overflow-y: auto; }
.search-result a { display: block; padding: 10px 12px; border-radius: 8px; color: inherit; }
.search-result a:hover, .search-result.active a { background: var(--neon-muted); }
.search-result-title { font-size: 14px; color: var(--foreground); margin-bottom: 2px; }
.search-result a:hover .search-result-title { color: var(--primary); }
.search-result-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-foreground); }
.search-empty { padding: 22px; text-align: center; font-family: var(--font-mono); font-size: 13px; color: var(--muted-foreground); }

/* ---------- 13. Responsive ---------- */
@media (max-width: 1024px) {
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .search-hint { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .hero { padding-top: 22px; }
  .terminal-body { padding: 14px 16px; font-size: 13px; }
  .post-card-body { padding: 15px 16px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* 打印优化 */
@media print {
  .site-header, .site-footer, .sidebar, .post-nav, .post-back, .toc-wrap, .giscus-wrap { display: none !important; }
  .content-layout { grid-template-columns: 1fr; }
  body { background: #fff; color: #111; }
}
