:root {
  --bg: #0d1117;
  --bg-secondary: #161b22;
  --text: #c9d1d9;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-dim: #1f6feb;
  --border: #30363d;
  --green: #3fb950;
  --red: #f85149;
  --yellow: #d29922;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', Consolas, monospace;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

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

h1, h2, h3, h4 {
  color: #e6edf3;
  margin: 1.5em 0 0.5em;
  line-height: 1.3;
}
h1 { font-size: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.3em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

p { margin: 0.8em 0; }

code {
  background: var(--bg-secondary);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1em;
  overflow-x: auto;
  margin: 1em 0;
}
pre code { background: none; padding: 0; }

blockquote {
  border-left: 3px solid var(--accent-dim);
  padding-left: 1em;
  color: var(--text-muted);
  margin: 1em 0;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.85rem;
}
th, td {
  border: 1px solid var(--border);
  padding: 0.5em 0.75em;
  text-align: left;
}
th {
  background: var(--bg-secondary);
  color: #e6edf3;
}
tr:nth-child(even) { background: rgba(22, 27, 34, 0.5); }

ul, ol { margin: 0.8em 0; padding-left: 1.5em; }
li { margin: 0.3em 0; }

/* Header / Nav */
.site-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.site-header h1 {
  border: none;
  margin: 0;
  font-size: 1.3rem;
}
.site-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0.3em 0 0;
}
.site-nav {
  margin-top: 0.8em;
  font-size: 0.85rem;
}
.site-nav a {
  margin-right: 1.2em;
  color: var(--text-muted);
}
.site-nav a:hover { color: var(--accent); }

/* Post list */
.post-list { list-style: none; padding: 0; }
.post-list li {
  margin: 1em 0;
  padding: 0.8em;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.post-list .post-date {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.post-list .post-title {
  font-size: 1rem;
  display: block;
  margin-top: 0.2em;
}

/* Post */
.post-header { margin-bottom: 1.5em; }
.post-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.3em;
}

/* Accuracy colors */
.accuracy-good { color: var(--green); }
.accuracy-bad { color: var(--red); }
.accuracy-neutral { color: var(--yellow); }

/* Tag */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15em 0.5em;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  margin-right: 0.3em;
}

/* Figures and images */
.figure {
  margin: 2em 0;
  text-align: center;
}
.figure img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}
.figure figcaption,
.figure .caption {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.5em;
  font-style: italic;
}
img {
  max-width: 100%;
  height: auto;
}

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

/* Callout boxes */
.callout {
  border-left: 3px solid var(--accent);
  background: var(--bg-secondary);
  padding: 1em 1.2em;
  margin: 1.5em 0;
  border-radius: 0 6px 6px 0;
}
.callout.insight {
  border-left-color: var(--green);
}
.callout.warning {
  border-left-color: var(--yellow);
}
.callout.story {
  border-left-color: #bc8cff;
}
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
.callout strong:first-child {
  display: block;
  margin-bottom: 0.3em;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Hero image */
.hero-figure {
  margin: 0 -1.5rem 2em;
}
.hero-figure img {
  width: 100%;
  max-width: none;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* Pull quote */
.pull-quote {
  font-size: 1.15rem;
  color: #e6edf3;
  text-align: center;
  padding: 1.5em 2em;
  margin: 2em 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
  font-style: italic;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1em;
  margin: 1.5em 0;
}
.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1em;
  text-align: center;
}
.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent);
  display: block;
}
.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3em;
  display: block;
}

/* Section dividers with labels */
.section-break {
  text-align: center;
  margin: 2.5em 0;
  position: relative;
}
.section-break::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--border);
}
.section-break span {
  background: var(--bg);
  padding: 0 1em;
  position: relative;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Responsive */
@media (max-width: 600px) {
  body { padding: 1rem; }
  h1 { font-size: 1.3rem; }
  table { font-size: 0.75rem; }
  th, td { padding: 0.3em 0.5em; }
  .stats-grid { grid-template-columns: 1fr; }
  .hero-figure { margin: 0 -1rem 2em; }
  .pull-quote { padding: 1em; font-size: 1rem; }
}
