/* Blog styles - shared by blog list and individual posts */

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

:root {
  --background: #0a0a0a;
  --foreground: #fafafa;
  --card: #171717;
  --card-foreground: #fafafa;
  --muted-foreground: #a1a1aa;
  --accent: #27272a;
  --primary: #3b82f6;
  --border: #27272a;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
}

.page {
  min-height: 100vh;
  max-width: 72rem;
  margin: 0 auto;
  position: relative;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.site-logo {
  color: var(--foreground);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  transition: color 0.2s;
}

.site-logo:hover {
  color: var(--primary);
}

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

.nav-link {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav-link.active {
  color: var(--primary);
}

/* Blog list page */
.blog-header {
  padding: 5rem 2rem 2rem;
  max-width: 56rem;
  margin: 0 auto;
}

.blog-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.blog-header p {
  color: var(--muted-foreground);
  font-size: 1.125rem;
}

.blog-list {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blog-post-card {
  padding: 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--card);
}

.blog-post-card time {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.blog-post-card h2 {
  margin: 0.5rem 0;
}

.blog-post-card h2 a {
  color: var(--foreground);
  text-decoration: none;
  transition: color 0.2s;
}

.blog-post-card h2 a:hover {
  color: var(--primary);
}

.blog-post-card p {
  color: var(--muted-foreground);
  line-height: 1.6;
}

.tags {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  background: var(--accent);
  color: var(--muted-foreground);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
}

.no-posts {
  color: var(--muted-foreground);
  font-style: italic;
  text-align: center;
  padding: 3rem;
}

/* Individual post page */
.post-header {
  padding: 5rem 2rem 2rem;
  max-width: 56rem;
  margin: 0 auto;
}

.post-header time {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.post-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0.5rem 0 1rem;
  line-height: 1.2;
}

.back-link {
  display: inline-block;
  color: var(--primary);
  text-decoration: none;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.back-link:hover {
  text-decoration: underline;
}

.post-meta {
  margin-top: 1.5rem;
}

.post-content {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  line-height: 1.8;
}

.post-content p {
  margin-bottom: 1.5rem;
  color: var(--card-foreground);
}

.post-content h2 {
  margin: 2rem 0 1rem;
  font-size: 1.5rem;
}

.post-content h3 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.25rem;
}

.post-content pre {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-content code {
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 0.875rem;
}

.post-content ul, .post-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

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

.post-content .tags {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
