:root {
  color-scheme: light dark;
  --bg: #fdfcfb;
  --fg: #1c1a17;
  --muted: #6b6459;
  --accent: #a2492f;
  --border: #e7e1d8;
  --code-bg: #f2ede4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16140f;
    --fg: #ece7dd;
    --muted: #a39b8b;
    --accent: #e08a5f;
    --border: #322d24;
    --code-bg: #201c15;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Georgia, serif;
  line-height: 1.65;
}

.wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5rem;
}

header.site-header {
  margin-bottom: 3rem;
}

header.site-header a.brand {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--fg);
  letter-spacing: -0.02em;
}

header.site-header .tagline {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

h1, h2, h3 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

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

.post-list { list-style: none; padding: 0; margin: 0; }

.post-list li {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}

.post-list li:first-child { padding-top: 0; }

.post-list a.title {
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--fg);
}

.post-list a.title:hover { color: var(--accent); }

.meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.3rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tag {
  display: inline-block;
  background: var(--code-bg);
  color: var(--muted);
  border-radius: 4px;
  padding: 0.1rem 0.5rem;
  font-size: 0.78rem;
  margin-right: 0.35rem;
}

article.post h1 {
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

article.post .meta { margin-bottom: 2rem; }

article.post .content img,
article.post .content iframe {
  max-width: 100%;
  height: auto;
}

article.post .content pre,
article.post .content code {
  background: var(--code-bg);
  border-radius: 4px;
}

article.post .content pre {
  padding: 0.9rem;
  overflow-x: auto;
}

article.post .content code {
  padding: 0.1rem 0.35rem;
  font-size: 0.9em;
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--muted);
}

footer.site-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
