:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #6b6b6b;
  --link: #0b5fff;
  --line: #e4e4e4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181c;
    --fg: #e6e6e6;
    --muted: #9a9a9a;
    --link: #7aa7ff;
    --line: #2c2f36;
  }
}

* { box-sizing: border-box; }

body {
  max-width: 42rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.5rem;
}

.site-title { font-weight: 600; font-size: 1.1rem; color: var(--fg); }
nav a { margin-left: 1rem; }
nav a:first-child { margin-left: 0; }

h1, h2, h3 { line-height: 1.3; margin: 2rem 0 0.75rem; }
h1 { font-size: 1.6rem; margin-top: 0; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
img { max-width: 100%; height: auto; }

.meta { color: var(--muted); font-size: 0.9rem; margin-top: -0.5rem; }

/* Post / project lists */
.list { list-style: none; padding: 0; }
.list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.75rem;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}
.list .date { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }

blockquote {
  margin: 0 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--line);
  color: var(--muted);
}

code {
  background: var(--line);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.9em;
}

pre {
  background: var(--line);
  padding: 0.9rem;
  border-radius: 5px;
  overflow-x: auto;
}
pre code { background: none; padding: 0; }

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

footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
footer a { margin-right: 1rem; }
