:root {
  --bg: #fafafa; --fg: #222; --muted: #666; --link: #2563eb;
  --border: #e5e7eb; --code-bg: #f3f4f6; --mark: #fff3a3;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
[data-theme="dark"] {
  --bg: #1a1a1a; --fg: #e5e5e5; --muted: #999; --link: #60a5fa;
  --border: #333; --code-bg: #2a2a2a; --mark: #5c4d00;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--fg); line-height: 1.7; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
main { max-width: 760px; margin: 2rem auto; padding: 0 1rem; }
.site-header { max-width: 760px; margin: 1rem auto; padding: 0 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.site-title { font-weight: 700; font-size: 1.25rem; color: var(--fg); }
.site-nav { display: flex; gap: 1rem; align-items: center; }
.site-footer { max-width: 760px; margin: 3rem auto 1rem; padding: 0 1rem; color: var(--muted); }
.post-card { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.post-meta { color: var(--muted); font-size: 0.9rem; }
.post-tags a { display: inline-block; padding: 0 .5em; border: 1px solid var(--border); border-radius: 4px; font-size: .85rem; margin-right: .3em; }
article h1, article h2, article h3 { line-height: 1.3; }
article pre { background: var(--code-bg); padding: 1rem; overflow-x: auto; border-radius: 4px; }
article code { background: var(--code-bg); padding: 1px 4px; border-radius: 3px; font-size: .9em; }
article pre code { background: transparent; padding: 0; }
.theme-toggle { background: transparent; color: var(--fg); border: 1px solid var(--border); padding: .25rem .5rem; border-radius: 4px; cursor: pointer; font-family: inherit; font-size: .85rem; }
mark { background: var(--mark); padding: 0 2px; }
.pagination { display: flex; justify-content: space-between; margin: 2rem 0; }
.search-box input { width: 100%; padding: .5rem; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); color: var(--fg); }
