/* night —— 极简暗夜主题（色板取自用户服务器站点：背景 #313034 / 文字 #d7d0c6） */
@font-face {
  font-family: 'HYWenHei-85W';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/font/HYWenHei-85W.woff2') format('woff2');
}

:root {
  --bg: #313034;
  --fg: #d7d0c6;
  --muted: #a29c92;
  --dim: #837e77;
  --accent: #e3b341;
  --line: #45444a;
  --code-bg: #3a393e;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'HYWenHei-85W', -apple-system, "PingFang SC", "Microsoft YaHei",
               "Noto Sans CJK SC", sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

main, .site-header, .site-footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 头部 ---------- */
.site-header { padding-top: 48px; margin-bottom: 40px; }

.site-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: 1px;
}
.site-title:hover { color: var(--accent); }

.site-desc {
  color: var(--dim);
  font-size: 14px;
  margin-top: 2px;
}

.site-header nav { margin-top: 14px; font-size: 14px; }
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  margin-right: 16px;
}
.site-header nav a:hover { color: var(--accent); }

/* ---------- 列表 ---------- */
.post-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.post-date {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  color: var(--dim);
  flex-shrink: 0;
}

.post-link {
  color: var(--fg);
  text-decoration: none;
}
.post-link:hover { color: var(--accent); }

.pager {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--dim);
}
.pager a { color: var(--muted); text-decoration: none; }
.pager a:hover { color: var(--accent); }

/* ---------- 文章 ---------- */
.post { margin-bottom: 60px; }

.post-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 6px;
}

.post-meta {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  color: var(--dim);
  margin-bottom: 28px;
}

.post-content h2, .post-content h3 {
  font-weight: 700;
  margin: 1.6em 0 0.5em;
  line-height: 1.4;
}
.post-content h2 { font-size: 20px; }
.post-content h3 { font-size: 17px; }

.post-content p { margin: 0 0 1em; }

.post-content a { color: var(--accent); text-decoration: none; }
.post-content a:hover { text-decoration: underline; }

.post-content img {
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  border-radius: 4px;
  display: block;
  margin: 1em auto;
}

.post-content blockquote {
  margin: 1em 0;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--line);
  color: var(--muted);
}

.post-content code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

.post-content pre {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.6;
}
.post-content pre code { background: none; padding: 0; }

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

.post-content table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
.post-content th, .post-content td {
  border: 1px solid var(--line);
  padding: 6px 10px;
  text-align: left;
}
.post-content th { background: var(--code-bg); }

/* ---------- 页脚 ---------- */
.site-footer {
  margin: 80px auto 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 13px;
}

/* ---------- 手机 ---------- */
@media (max-width: 480px) {
  body { font-size: 15px; }
  .site-header { padding-top: 32px; }
  .post-title { font-size: 22px; }
  .post-row { flex-direction: column; gap: 2px; padding: 12px 0; }
}
