:root {
  --bg: #fbfaf7;
  --text: #2b2b2b;
  --muted: #7a7a7a;
  --line: #e6e2da;
  --accent: #2f6f8f;
  --code-bg: #f1eee8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1d1f;
    --text: #e3e3e3;
    --muted: #9a9a9a;
    --line: #333538;
    --accent: #7db8d4;
    --code-bg: #2a2c2f;
  }
}

* { box-sizing: border-box; }

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

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

header.site {
  border-bottom: 1px solid var(--line);
  padding: 28px 0 16px;
  margin-bottom: 24px;
}

header.site .name {
  font-size: 24px;
  font-weight: bold;
  color: var(--text);
  text-decoration: none;
}

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

a { color: var(--accent); }

h1 { font-size: 26px; line-height: 1.4; margin: 8px 0 4px; }
h2 { font-size: 20px; margin: 28px 0 8px; }
.meta { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

ul.posts { list-style: none; padding: 0; margin: 0; }
ul.posts li { padding: 14px 0; border-bottom: 1px solid var(--line); }
ul.posts a { font-size: 18px; text-decoration: none; }
ul.posts p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

code, pre {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  background: var(--code-bg);
  border-radius: 4px;
}
code { padding: 1px 5px; }
pre { padding: 12px 14px; overflow-x: auto; line-height: 1.6; }
pre code { padding: 0; background: none; }

table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }

footer.site {
  margin: 48px 0 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
footer.site a { color: var(--muted); text-decoration: none; margin: 0 6px; }
footer.site a:hover { color: var(--accent); }
