:root {
  --bg: #0d1117;
  --fg: #c9d1d9;
  --accent: #6C63FF;
  --accent2: #58a6ff;
  --muted: #8b949e;
  --border: #21262d;
  --card: #161b22;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  font-size: 16px;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Header */
header {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
header h1 { font-size: 1.8rem; }
header h1 a { color: var(--fg); text-decoration: none; }
header h1 a:hover { color: var(--accent); }
.tagline { color: var(--muted); margin: 0.3rem 0 0.8rem; }
nav a { color: var(--accent2); text-decoration: none; font-size: 0.9rem; }
nav a:hover { text-decoration: underline; }

/* Post list (index) */
.post-list { list-style: none; }
.post-list li {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border);
}
.post-list .post-link {
  color: var(--fg);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
}
.post-list .post-link:hover { color: var(--accent); }
.post-list .post-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.3rem;
}
.post-list .post-excerpt {
  color: var(--muted);
  margin-top: 0.4rem;
  font-size: 0.95rem;
}

/* Post */
.post-title { font-size: 1.8rem; margin-bottom: 0.3rem; }
.post-date { color: var(--muted); font-size: 0.9rem; }
.post-tags { margin: 0.5rem 0 1.5rem; }
.tag {
  display: inline-block;
  background: var(--card);
  color: var(--accent2);
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  font-size: 0.8rem;
  margin-right: 0.4rem;
}

.post-content { margin-top: 1.5rem; }
.post-content h2 { margin: 2rem 0 0.8rem; color: var(--fg); font-size: 1.4rem; }
.post-content h3 { margin: 1.5rem 0 0.6rem; color: var(--fg); font-size: 1.15rem; }
.post-content p { margin-bottom: 1rem; }
.post-content a { color: var(--accent2); }
.post-content img { max-width: 100%; border-radius: 6px; margin: 1rem 0; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--muted);
  margin: 1rem 0;
}
.post-content code {
  background: var(--card);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
}
.post-content pre {
  background: var(--card);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1rem 0;
}
.post-content pre code { background: none; padding: 0; }
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
.post-content th, .post-content td {
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--border);
  text-align: left;
}
.post-content th { background: var(--card); }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.post-content li { margin-bottom: 0.3rem; }

.post-nav { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.post-nav a { color: var(--accent2); text-decoration: none; }

/* Category labels */
.category-label {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Tag cloud & category nav */
.tag-cloud, .category-nav {
  margin: 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag-link {
  display: inline-block;
  background: var(--card);
  color: var(--accent2);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.tag-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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