:root {
  --text: #1a1a1a;
  --bg: #fff;
  --accent: #2563eb;
  --muted: #6b7280;
  --border: #e5e7eb;
  --max-width: 720px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 17px;
}

main { max-width: var(--max-width); margin: 0 auto; padding: 2rem 1rem; }

.site-header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.site-title {
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--text);
}

.site-header ul { list-style: none; display: flex; gap: 1.5rem; }
.site-header a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.site-header a:hover { color: var(--text); }

.post-header { margin-bottom: 2rem; }
.post-header h1 { font-size: 2rem; line-height: 1.3; margin-bottom: 0.5rem; }
.post-meta { color: var(--muted); font-size: 0.9rem; }
.post-meta a { color: var(--accent); text-decoration: none; }

.toc {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
}
.toc h2 { font-size: 1rem; margin-bottom: 0.5rem; }
.toc ul { padding-left: 1.5rem; }
.toc a { color: var(--accent); text-decoration: none; font-size: 0.9rem; }

.post-content h2 { font-size: 1.5rem; margin: 2rem 0 1rem; }
.post-content h3 { font-size: 1.25rem; margin: 1.5rem 0 0.75rem; }
.post-content p { margin-bottom: 1rem; }
.post-content ul, .post-content ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.post-content li { margin-bottom: 0.25rem; }
.post-content a { color: var(--accent); }
.post-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 1rem 0; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--muted);
  margin: 1rem 0;
}

.post-tags { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  background: #f3f4f6;
  color: var(--muted);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  text-decoration: none;
}
.tag:hover { background: var(--border); }

.related-posts { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.related-posts h2 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.related-posts ul { list-style: none; }
.related-posts li { margin-bottom: 0.5rem; }
.related-posts a { color: var(--accent); text-decoration: none; }

.post-summary { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.post-summary h2 { font-size: 1.3rem; margin-bottom: 0.25rem; }
.post-summary h2 a { color: var(--text); text-decoration: none; }
.post-summary h2 a:hover { color: var(--accent); }
.read-more { color: var(--accent); text-decoration: none; font-size: 0.9rem; }

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer a { color: var(--muted); }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .post-header h1 { font-size: 1.5rem; }
  .site-header nav { flex-direction: column; gap: 0.5rem; }
}
