:root {
  --bg: #fff;
  --fg: #1f2328;
  --muted: #59636e;
  --line: #d1d9e0;
  --accent: #0969da;
  --code-bg: #f6f8fa;
}
:root[data-theme="dark"] {
  --bg: #0d1117;
  --fg: #e6edf3;
  --muted: #9198a1;
  --line: #3d444d;
  --accent: #4493f8;
  --code-bg: #161b22;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117;
    --fg: #e6edf3;
    --muted: #9198a1;
    --line: #3d444d;
    --accent: #4493f8;
    --code-bg: #161b22;
  }
}
* { box-sizing: border-box; }
body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.7;
  background: var(--bg);
  color: var(--fg);
}
header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.site-title { font-weight: 700; font-size: 1.75rem; text-decoration: none; color: inherit; }
h1 { font-size: 1.75rem; }
article { overflow-wrap: break-word; }
nav a { margin-left: 1.25rem; text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--accent); }
#theme-toggle {
  margin-left: 1.25rem;
  padding: 0.15rem 0.5rem;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--fg);
  cursor: pointer;
  vertical-align: middle;
}
#theme-toggle svg { width: 1rem; height: 1rem; vertical-align: -0.15rem; }
#theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] #theme-toggle .icon-sun { display: inline; }
:root[data-theme="dark"] #theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #theme-toggle .icon-sun { display: inline; }
  :root:not([data-theme="light"]) #theme-toggle .icon-moon { display: none; }
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.3; }
footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
.post-list { list-style: none; padding: 0; }
.post-list li { margin-bottom: 1.5rem; }
.post-list a { font-size: 1.1rem; font-weight: 600; text-decoration: none; }
.post-list a:hover { text-decoration: underline; }
.post-list time { display: block; font-size: 0.85rem; color: var(--muted); }
.post-list p { margin: 0.25rem 0 0; color: var(--muted); }
.meta { color: var(--muted); font-size: 0.95rem; }
.meta a { text-decoration: none; }
pre {
  background: var(--code-bg);
  padding: 1rem;
  overflow-x: auto;
  border-radius: 6px;
  border: 1px solid var(--line);
}
code { font-size: 0.88em; }
p code, li code {
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}
pre code { background: none; padding: 0; }
img { max-width: 100%; border-radius: 6px; }
blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--line);
  color: var(--muted);
}
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid var(--line); padding: 0.5rem 0.75rem; text-align: left; }
.about-avatar {
  display: block;
  width: 160px;
  margin: 1rem auto;
  border-radius: 50%;
  border: 3px solid var(--line);
}
