:root {
  --bg: #ffffff;
  --fg: #1f2328;
  --muted: #667085;
  --line: #e6e8eb;
  --accent: #2563eb;
  --card: #fafafa;
  --code-bg: #f4f5f7;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --fg: #e6e8eb;
    --muted: #9aa4b2;
    --line: #23272e;
    --accent: #6ea8fe;
    --card: #161922;
    --code-bg: #1b1f27;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.75;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

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

/* header */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 20px; padding-bottom: 20px; flex-wrap: wrap;
}
.site-title { font-size: 20px; font-weight: 700; color: var(--fg); }
.site-nav { display: flex; gap: 18px; }
.site-nav a { color: var(--muted); font-size: 15px; }
.site-nav a:hover { color: var(--fg); text-decoration: none; }

main { padding: 40px 0 60px; }

/* post list */
.post-card { padding: 22px 0; border-bottom: 1px solid var(--line); }
.post-card:last-child { border-bottom: 0; }
.post-card-title { margin: 0 0 6px; font-size: 22px; line-height: 1.35; }
.post-card-title a { color: var(--fg); }
.post-summary { margin: 10px 0 0; color: var(--muted); }

.post-meta { color: var(--muted); font-size: 14px; }
.tag {
  display: inline-block; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 1px 10px; margin-right: 4px; font-size: 13px; color: var(--muted);
}
.dot { margin: 0 6px; }

.empty { color: var(--muted); }

/* single post */
.post-title { font-size: 30px; line-height: 1.3; margin: 8px 0 10px; }
.post-content { margin-top: 28px; }
.post-content h2 { margin: 1.6em 0 .6em; font-size: 24px; }
.post-content h3 { margin: 1.4em 0 .5em; font-size: 20px; }
.post-content p { margin: 1em 0; }
.post-content img { max-width: 100%; height: auto; border-radius: 8px; }
.post-content blockquote {
  margin: 1.2em 0; padding: 2px 16px; border-left: 3px solid var(--line); color: var(--muted);
}
.post-content pre {
  background: var(--code-bg); padding: 14px 16px; border-radius: 8px; overflow: auto; font-size: 14px;
}
.post-content code {
  background: var(--code-bg); padding: 2px 5px; border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em;
}
.post-content pre code { background: none; padding: 0; }
.post-content table { border-collapse: collapse; width: 100%; }
.post-content th, .post-content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.post-content hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.back { margin-top: 40px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-footer p { padding: 24px 0; margin: 0; }
