:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface2: #242424;
  --border: #c7c7c7;
  --text: #f0f0f0;
  --muted: #888;
  --accent: #8c40a3;
  --accent-dim: #531f6e;
  --mono: 'Space Mono', monospace;
  --sans: 'Alexandria', sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  padding: 2rem 1.25rem 4rem;
  max-width: 680px;
  margin: 0 auto;
}

a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

header.site-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

header.site-header h1 {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

header.site-header h1 a { color: inherit; }

header.site-header p {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* Post list (index page) */
.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.post-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 16px 18px;
  transition: background 0.15s, border-color 0.15s;
}

.post-card:hover, .post-card:focus-visible {
  background: var(--surface2);
  text-decoration: none;
  outline: none;
}

.post-card .post-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

.post-card .post-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.post-card .post-excerpt {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

/* Single post page */
.back-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  margin-bottom: 1.5rem;
}

article.post h1 {
  font-family: var(--sans);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 6px;
}

article.post .post-date {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 1.75rem;
  display: block;
}

article.post .post-body p {
  margin-bottom: 1.1rem;
}

article.post .post-body h2 {
  font-size: 1.2rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--accent);
}

footer.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

/* Image placeholder — swap out for a real <img> when ready */
.img-placeholder {
  width: 100%;
  background: repeating-linear-gradient(45deg, var(--surface2), var(--surface2) 10px, var(--surface) 10px, var(--surface) 20px);
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  text-align: center;
  margin: 1.5rem 0;
}
.img-placeholder.banner { height: 220px; }
.img-placeholder.inline { height: 160px; max-width: 320px; margin: 1.5rem auto; }

/* Font-weight utilities — drop onto any span/text to force a weight */
.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* Weight reference block */
.weight-ref {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 18px;
  margin: 1.5rem 0;
}
.weight-ref .weight-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.weight-ref .weight-row:last-child { border-bottom: none; }
.weight-ref .weight-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  min-width: 120px;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
