/* asamarts.com: one small stylesheet, no framework, no JS.
   Colors adapt to the reader's light/dark preference. */

:root {
  --fg: #1a1a1a;
  --bg: #fdfdfc;
  --muted: #6a6a68;
  --accent: #315b8c;
  --rule: #e5e5e2;
  --code-bg: #f2f2ef;
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #d6d6d2;
    --bg: #16171a;
    --muted: #8a8a86;
    --accent: #7fa7d4;
    --rule: #2a2b2f;
    --code-bg: #1e2024;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  margin: 0 auto;
  max-width: var(--measure);
  padding: 2.5rem 1.25rem 4rem;
}

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

h1, h2, h3 { line-height: 1.25; font-weight: 650; }
h1 { font-size: 1.6rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.25rem; margin: 2.25rem 0 0.5rem; }
h3 { font-size: 1.05rem; margin: 1.75rem 0 0.5rem; }

/* Header / nav */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.site-title {
  font-weight: 700;
  color: var(--fg);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.site-header nav a { color: var(--muted); margin-left: 1rem; }
.site-header nav a:first-child { margin-left: 0; }
.site-header nav a:hover { color: var(--accent); }

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer a { color: var(--muted); }

/* Post lists */
.post-list { list-style: none; padding: 0; margin: 1rem 0; }
.post-list li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 0.15rem 0;
}
.post-list time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Article meta */
.meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 1.5rem; }
.meta a { color: var(--muted); }

/* Tags */
.tag-cloud { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.tag-cloud .count { color: var(--muted); font-size: 0.85rem; }

/* Prose */
article p, article ul, article ol, article blockquote { margin: 1rem 0; }
blockquote {
  margin-inline: 0;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
}
hr { border: none; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
img { max-width: 100%; height: auto; }

/* Code */
code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}
pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.5;
}
pre code { background: none; padding: 0; font-size: 0.875rem; }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--rule); }
