:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --border: #2a2a2a;
  --text: #e0e0e0;
  --text-muted: #888;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --max-w: 720px;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* Layout */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.site-header .logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.site-header .logo span { color: var(--accent); }

nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
nav a {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
nav a.active { background: var(--surface); color: var(--accent); }

main {
  max-width: var(--max-w);
  margin: 3rem auto;
  padding: 0 1.5rem;
}

h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: -0.03em; }
h2 { font-size: 1.4rem; font-weight: 600; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }

.meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 2rem; }

.content p { margin-bottom: 1.25rem; }
.content ul, .content ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.content li { margin-bottom: 0.4rem; }
.content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  background: var(--surface);
  border-radius: 0 6px 6px 0;
  color: var(--text-muted);
}
.content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  line-height: 1.6;
}
.content code {
  background: var(--surface);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}
.content pre code { background: none; padding: 0; }
.content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.tag {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-right: 0.35rem;
}

/* Comments section */
.comments-section {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.comments-section h2 { margin-top: 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 4rem;
}

/* Post list (index) */
.post-list { list-style: none; padding: 0; }
.post-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.post-list li:last-child { border-bottom: none; }
.post-list .post-title {
  font-size: 1.15rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}
.post-list .post-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.post-list .post-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 0;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.hero p { color: var(--text-muted); font-size: 1.1rem; max-width: 500px; margin: 0 auto; }
