/* ===== geek.log 深色极客风博客 ===== */
:root {
  --bg: #0a0e14;
  --bg-soft: #0f1520;
  --bg-card: #111826;
  --border: #1e2a3a;
  --text: #c9d4e3;
  --text-dim: #7a8aa0;
  --accent: #4ade80;
  --accent-2: #22d3ee;
  --warn: #fbbf24;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.75;
  min-height: 100vh;
}
::selection { background: rgba(74, 222, 128, .25); }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--mono); }

/* 扫描线氛围 */
body::before {
  content: "";
  position: fixed; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(255,255,255,.012) 2px 4px);
  pointer-events: none; z-index: 999;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* 导航 */
nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10,14,20,.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-family: var(--mono); font-size: 17px; color: var(--accent); font-weight: 700; }
.logo .cursor { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
nav ul { display: flex; gap: 26px; list-style: none; font-family: var(--mono); font-size: 14px; }
nav ul a { color: var(--text-dim); }
nav ul a:hover { color: var(--accent); text-decoration: none; }
nav ul a::before { content: "./"; color: var(--accent); opacity: .6; }

/* Hero 终端窗口 */
.hero { padding: 56px 0 40px; }
.term {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.term-bar {
  display: flex; align-items: center; gap: 8px;
  background: #131b29; padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.r { background: #ff5f56; } .dot.y { background: #ffbd2e; } .dot.g { background: #27c93f; }
.term-bar .title { margin-left: 10px; font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
.term-body { padding: 22px 24px; font-family: var(--mono); font-size: 14px; }
.term-body .ln { margin-bottom: 8px; white-space: pre-wrap; }
.p { color: var(--accent); }  /* prompt */
.c { color: var(--text-dim); } /* comment */
.o { color: var(--text); }
.k { color: var(--accent-2); } /* keyword */
.hl { color: var(--warn); }

/* 区块 */
section { padding: 40px 0; }
.sec-title {
  font-family: var(--mono); font-size: 16px; color: var(--accent);
  margin-bottom: 24px; display: flex; align-items: center; gap: 10px;
}
.sec-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.sec-title .num { color: var(--text-dim); font-size: 13px; }

/* 标签筛选 */
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.tag-btn {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--bg-card); color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 5px 13px; cursor: pointer; transition: all .18s;
}
.tag-btn:hover { color: var(--accent); border-color: var(--accent); }
.tag-btn.active { color: #052e16; background: var(--accent); border-color: var(--accent); font-weight: 700; }

/* 文章卡片 */
.post-list { display: flex; flex-direction: column; gap: 16px; }
.post-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 22px 26px;
  transition: transform .18s, border-color .18s;
  display: block;
}
.post-card:hover { transform: translateY(-2px); border-color: var(--accent); text-decoration: none; }
.post-card h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; }
.post-card:hover h3 { color: var(--accent); }
.post-card .meta { font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); margin-bottom: 10px; display: flex; gap: 16px; flex-wrap: wrap; }
.post-card .excerpt { font-size: 14px; color: var(--text-dim); }
.post-card .ptags { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.ptag { font-family: var(--mono); font-size: 11px; color: var(--accent-2); background: rgba(34,211,238,.08); border: 1px solid rgba(34,211,238,.25); border-radius: 4px; padding: 2px 8px; }
.post-card.hidden { display: none; }

/* 归档时间线 */
.timeline { border-left: 2px solid var(--border); padding-left: 24px; margin-left: 6px; }
.tl-item { position: relative; padding-bottom: 22px; }
.tl-item::before {
  content: ""; position: absolute; left: -31px; top: 8px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.tl-date { font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); }
.tl-item a { font-size: 15px; }

/* 关于 */
.about-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 26px 30px; }
.about-box code { font-family: var(--mono); color: var(--accent); background: rgba(74,222,128,.08); padding: 1px 6px; border-radius: 4px; font-size: 13px; }

/* 页脚 */
footer { border-top: 1px solid var(--border); padding: 26px 0 40px; margin-top: 30px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); }

/* 文章页 */
article.post-page { padding: 50px 0 30px; }
article.post-page h1 { font-size: 26px; margin: 14px 0 18px; line-height: 1.4; }
article.post-page .meta { font-family: var(--mono); font-size: 13px; color: var(--text-dim); margin-bottom: 30px; display: flex; gap: 18px; flex-wrap: wrap; }
.post-content h2 { font-size: 19px; color: var(--accent); margin: 34px 0 14px; }
.post-content h2::before { content: "## "; color: var(--text-dim); font-family: var(--mono); font-size: 15px; }
.post-content p { margin-bottom: 16px; font-size: 15.5px; }
.post-content pre {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px;
  padding: 18px 20px; overflow-x: auto; margin: 18px 0 22px;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.7;
}
.post-content code.inline { font-family: var(--mono); color: var(--accent); background: rgba(74,222,128,.08); padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.post-content blockquote {
  border-left: 3px solid var(--accent); background: rgba(74,222,128,.04);
  padding: 10px 18px; margin: 18px 0; color: var(--text-dim); border-radius: 0 8px 8px 0;
}
.back-home { display: inline-block; font-family: var(--mono); font-size: 13.5px; margin-bottom: 6px; }

@media (max-width: 640px) {
  nav ul { gap: 14px; font-size: 12.5px; }
  .term-body { font-size: 12.5px; }
}
