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

:root {
  --text: #1a1a1a;
  --muted: #666;
  --accent: #2563eb;
  --border: #e5e5e5;
  --bg: #fff;
  --max-width: 680px;
}

html {
  font-size: 18px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0 1rem;
}

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

/* Nav */
header {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

nav {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
}

.site-title {
  font-weight: 600;
  font-size: 1rem;
  flex: 1;
}

nav a {
  color: var(--text);
  text-decoration: none;
}

nav a:hover {
  color: var(--accent);
}

/* Main content */
main {
  min-height: calc(100vh - 180px);
}

h1, h2 {
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 1.6rem; margin: 0 0 0.25rem; }
h2 { font-size: 1.1rem; margin: 0 0 1rem; }

/* Homepage intro */
.intro {
  margin-bottom: 2.5rem;
  color: var(--muted);
}

/* Post list */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.post-item {
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
}

.post-item time {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-width: 6rem;
}

.post-item a {
  color: var(--text);
  text-decoration: none;
}

.post-item a:hover {
  color: var(--accent);
}

/* Single post */
.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.post-header time {
  color: var(--muted);
  font-size: 0.9rem;
}

.post-content {
  max-width: 65ch;
}

.post-content a {
  color: var(--accent);
}

.post-content pre {
  background: #f5f5f5;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 4px;
  font-size: 0.85rem;
}

.post-content code {
  font-size: 0.88em;
  background: #f5f5f5;
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content blockquote {
  border-left: 3px solid var(--border);
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

/* Footer */
footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--accent);
}
