/* Minimal, readable blog styling inspired by clean WP themes */

:root {
  --maxw: 760px;
  --g: 1.25rem;
  --text: #111;
  --muted: #666;
  --border: #e8e8e8;
  --link: #0a58ca;
  --bg: #fff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --text: #e8e8ea;
    --muted: #a0a0ad;
    --border: #22242a;
    --link: #7ab5ff;
  }
}

* { box-sizing: border-box; }
html, body { padding: 0; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

header, main, footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--g);
}

header h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin: 0 0 .35rem 0;
  letter-spacing: -0.01em;
}

nav a {
  margin-right: 1rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  color: var(--text);
}
nav a:hover { border-color: var(--text); }

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
a:hover { background: linear-gradient(currentColor, currentColor) left bottom/100% 1px no-repeat; }

/* Rhythm & typography */
main { padding-top: calc(var(--g) * .5); }
h1,h2,h3,h4,h5,h6 { line-height: 1.25; margin: 2rem 0 0.75rem; }
p, ul, ol, blockquote, pre, table, figure { margin: 1rem 0; }

blockquote {
  padding: .5rem 1rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
  background: rgba(0,0,0,.02);
}
@media (prefers-color-scheme: dark) {
  blockquote { background: rgba(255,255,255,.03); }
}

hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* Lists / index pages */
ul.listing {
  list-style: none;
  padding: 0;
  margin: 0;
}
ul.listing li {
  padding: 1.0rem 0;
  border-top: 1px solid var(--border);
}
ul.listing li:first-child { border-top: 0; }
ul.listing li .post-title {
  font-size: 1.15rem;
  margin: 0 0 .25rem 0;
}
.post-meta {
  font-size: .9rem;
  color: var(--muted);
}

/* Excerpt paragraph on listing pages */
.excerpt { margin: .5rem 0 0 0; color: var(--muted); }

/* Article page */
article h1 { margin-top: 0; }
article img { max-width: 100%; height: auto; border-radius: .5rem; }
article code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
code {
  background: rgba(0,0,0,.04);
  border: 1px solid var(--border);
  border-radius: .4rem;
  padding: .12rem .35rem;
}
pre {
  background: rgba(0,0,0,.04);
  border: 1px solid var(--border);
  border-radius: .7rem;
  padding: 1rem;
  overflow: auto;
}
@media (prefers-color-scheme: dark) {
  code, pre { background: rgba(255,255,255,.04); }
}

table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
}
th, td {
  text-align: left;
  padding: .5rem .6rem;
  border-top: 1px solid var(--border);
}
thead th { background: rgba(0,0,0,.03); }
@media (prefers-color-scheme: dark) {
  thead th { background: rgba(255,255,255,.04); }
}

/* Footer */
footer { color: var(--muted); }

