:root {
  --fg: #1a1a1a;
  --bg: #ffffff;
  --muted: #666;
  --link: #0b57d0;
  --border: #e0e0e0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e4e4e4;
    --bg: #161616;
    --muted: #999;
    --link: #8ab4f8;
    --border: #333;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0 auto;
  padding: 1rem;
  max-width: 42rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
}

a {
  color: var(--link);
}

h1, h2, h3 {
  line-height: 1.25;
}

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.925em;
}

pre {
  padding: 0.75rem 1rem;
  overflow-x: auto;
  border-radius: 4px;
}

img {
  max-width: 100%;
  border-radius: 4px;
}

.site-header nav {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0 1.5rem;
}

.site-header nav a:first-child {
  font-weight: 700;
  margin-right: auto;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  padding: 2rem 0 0.5rem;
  font-size: 0.9em;
}

.site-footer .footer-note {
  color: var(--muted);
}

.site-footer a {
  margin-left: auto;
  color: var(--muted);
}

.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0;
}

.post-list time,
.post-meta {
  color: var(--muted);
  white-space: nowrap;
}

.subtitle {
  color: var(--muted);
  margin: 0;
}

article > .subtitle {
  font-size: 1.1em;
  margin-top: -0.5rem;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
}

.project-card h3 {
  margin: 0.5rem 0 0.25rem;
}

.project-card p {
  margin: 0.25rem 0;
}

.project-url a {
  color: var(--muted);
  font-size: 0.9em;
}
