:root {
  --bg: #fafafa;
  --text: #1a1a1a;
  --text-muted: #666666;
  --border: #e5e5e5;
  --accent: #0066cc;
  --code-bg: #f0f0f0;
  --card-bg: #ffffff;
  --max-width: 740px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #e0e0e0;
    --text-muted: #999999;
    --border: #2a2a2a;
    --accent: #4da3ff;
    --code-bg: #1e1e1e;
    --card-bg: #181818;
  }
}

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

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px 80px 20px;
}

header {
  margin-bottom: 50px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--border);
}

.site-title {
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.5px;
}

.site-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 4px;
}

nav {
  margin-top: 15px;
}

nav a {
  color: var(--accent);
  text-decoration: none;
  margin-right: 18px;
  font-size: 15px;
}

nav a:hover {
  text-decoration: underline;
}

article h1 {
  font-size: 32px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

article h2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

article h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 10px;
}

article p {
  margin-bottom: 20px;
}

article ul, article ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

article li {
  margin-bottom: 8px;
}

blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 18px;
  margin: 24px 0;
  color: var(--text-muted);
  font-style: italic;
}

pre {
  background: var(--code-bg);
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 14px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 14px;
  background: var(--code-bg);
  padding: 2px 5px;
  border-radius: 4px;
}

pre code {
  background: none;
  padding: 0;
}

hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

/* Post Meta */
.post-meta {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 25px;
}

/* Post list on homepage */
.post-list {
  list-style: none;
  padding: 0;
}

.post-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.post-item-title {
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  display: inline-block;
  margin-bottom: 6px;
}

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

.post-item-summary {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 8px;
}

.post-item-date {
  font-size: 13px;
  color: var(--text-muted);
}

footer {
  margin-top: 60px;
  padding-top: 25px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}
