:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #666;
  --border: #e0e0e0;
  --link: #0066cc;
  --code-bg: #f5f5f5;
  --max-width: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --text: #e0e0e0;
    --text-secondary: #999;
    --border: #333;
    --link: #4d9fff;
    --code-bg: #2d2d2d;
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  padding: 20px;
}

header {
  max-width: var(--max-width);
  margin: 0 auto 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

header h1 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

header h1 a {
  color: var(--text);
  text-decoration: none;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  margin-right: 20px;
}

nav a:hover {
  color: var(--link);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
}

article {
  margin-bottom: 40px;
}

article h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

article h2 a {
  color: var(--text);
  text-decoration: none;
}

article h2 a:hover {
  color: var(--link);
}

.meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.tags {
  margin-top: 10px;
}

.tag {
  display: inline-block;
  background: var(--code-bg);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.85rem;
  margin-right: 5px;
  color: var(--text-secondary);
  text-decoration: none;
}

.tag:hover {
  color: var(--link);
}

.content h2 {
  margin-top: 30px;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.content h3 {
  margin-top: 25px;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.content p {
  margin-bottom: 15px;
}

.content ul, .content ol {
  margin-bottom: 15px;
  padding-left: 25px;
}

.content li {
  margin-bottom: 5px;
}

.content a {
  color: var(--link);
}

.content code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.content pre {
  background: var(--code-bg);
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 15px;
}

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

.content blockquote {
  border-left: 3px solid var(--border);
  padding-left: 15px;
  margin: 15px 0;
  color: var(--text-secondary);
}

footer {
  max-width: var(--max-width);
  margin: 60px auto 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
