:root {
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --color-bg: #fafafa;
  --color-text: #1a1a1a;
  --color-text-muted: #666;
  --color-link: #0066cc;
  --color-border: #e5e5e5;
  --max-width: 640px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #111;
    --color-text: #e5e5e5;
    --color-text-muted: #999;
    --color-link: #6cb6ff;
    --color-border: #333;
  }
}

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

html {
  font-size: 16px;
  line-height: 1.6;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

nav .logo {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--color-text);
}

nav .nav-links {
  display: flex;
  gap: 1.5rem;
}

nav .nav-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

nav .nav-links a:hover {
  color: var(--color-text);
}

/* Main content */
main {
  flex: 1;
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* Typography */
h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
}

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

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
  margin-bottom: 1rem;
}

ul li {
  margin-bottom: 0.5rem;
}

/* About page */
.about .tagline {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.about section {
  margin-bottom: 2rem;
}

/* Blog index */
.blog-index h1 {
  margin-bottom: 2rem;
}

.blog-index .empty {
  color: var(--color-text-muted);
}

.post-list li {
  margin-bottom: 0.75rem;
}

.post-list a {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  color: var(--color-text);
  text-decoration: none;
}

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

.post-list time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.post-list .title {
  transition: color 0.15s;
}

/* Post page */
.post header {
  margin-bottom: 2rem;
}

.post header time {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.post header h1 {
  margin-top: 0.5rem;
}

.post .content {
  line-height: 1.7;
}

.post .content > p:first-child img {
  width: calc(100% + 3rem);
  margin-left: -1.5rem;
  margin-top: -1rem;
  margin-bottom: 2rem;
  border-radius: 4px;
}

.post .content h2 {
  margin-top: 2.5rem;
}

.post .content h3 {
  font-size: 1rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.post .content ul,
.post .content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  list-style: disc;
}

.post .content ol {
  list-style: decimal;
}

.post .content blockquote {
  border-left: 3px solid var(--color-border);
  padding-left: 1rem;
  color: var(--color-text-muted);
  margin: 1.5rem 0;
}

.post .content pre {
  background: var(--color-border);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.post .content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-border);
  padding: 0.15em 0.3em;
  border-radius: 3px;
}

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

.post footer {
  margin-top: 3rem;
}

/* Dev section */
.dev-section {
  border: 1px dashed #f59e0b;
  padding: 1rem;
  border-radius: 4px;
  margin-top: 1rem;
}

.dev-section h2 {
  color: #f59e0b;
  margin-top: 0;
}

/* Draft banner */
.draft-banner {
  background: #f59e0b;
  color: #000;
  text-align: center;
  padding: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border-radius: 4px;
}
