/* Minimal dark theme — no frameworks, no webfonts */

:root {
  --bg: #111;
  --bg-card: #1a1a1a;
  --text: #ccc;
  --text-muted: #888;
  --accent: #f0c040;
  --link: #6af;
  --code-bg: #222;
  --border: #333;
  --max-w: 680px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
}

header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1rem 1rem;
}

.logo {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
}

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

footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

footer a { color: var(--text-muted); }

/* --- Index --- */
.post-preview {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.post-preview h2 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.post-preview h2 a {
  color: var(--text);
  text-decoration: none;
}

.post-preview h2 a:hover { color: var(--link); }

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

.post-preview p {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Post --- */
article { padding-top: 1rem; }

.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.post-header h1 {
  font-size: 1.7rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

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

.post-body h2 {
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
  color: #eee;
}

.post-body h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
  color: #ddd;
}

.post-body p { margin: 0.75rem 0; }

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

.post-body strong { color: #eee; }

.post-body em { color: #ddd; }

.post-body code {
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.post-body pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1rem 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

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

.post-body ul, .post-body ol {
  padding-left: 1.5rem;
  margin: 0.75rem 0;
}

.post-body li { margin: 0.3rem 0; }

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

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.post-body img {
  max-width: 100%;
  border-radius: 6px;
}

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

.post-body table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}

.post-body th, .post-body td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
}

.post-body th { background: var(--code-bg); }

/* --- Tags --- */
.tags { margin-top: 0.5rem; }
.tag {
  display: inline-block;
  background: var(--code-bg);
  color: var(--text-muted);
  padding: 0.15em 0.6em;
  border-radius: 4px;
  font-size: 0.8rem;
  text-decoration: none;
  margin-right: 0.3rem;
}
.tag:hover { color: var(--link); }

/* --- Page title (for list pages) --- */
.page-title {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  color: #eee;
}

/* --- Banner --- */
.banner {
  max-width: var(--max-w);
  margin: 0 auto 1rem;
  padding: 0 1rem;
}
.banner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* --- RSS link --- */
footer a[href*="index.xml"] {
  margin-left: 1rem;
}
