:root {
  --max-width: 720px;
  --text: #222;
  --muted: #777;
  --link: #0050b3;
  --bg: #fafafa;
  --code-bg: #f0f0f0;
  --border: #ddd;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

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

header.site-header h1 {
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.02em;
}

header.site-header h1 a {
  color: var(--text);
  text-decoration: none;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.2rem;
  font-size: 0.9rem;
}

nav a:first-child {
  margin-left: 0;
}

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

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

a:hover {
  text-decoration: underline;
}

.intro {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

article h1 {
  font-size: 1.75rem;
  margin: 0 0 0.4rem 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

article .meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1.8rem;
  font-family: "SF Mono", "Menlo", monospace;
}

article p, article ul, article ol {
  margin: 1rem 0;
}

article ul, article ol {
  padding-left: 1.4rem;
}

article li {
  margin: 0.3rem 0;
}

article h2 {
  font-size: 1.2rem;
  margin: 2rem 0 0.6rem;
  font-weight: 600;
}

pre {
  background: var(--code-bg);
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.83rem;
  line-height: 1.55;
  border-radius: 4px;
  margin: 1.2rem 0;
}

code {
  background: var(--code-bg);
  padding: 0.1rem 0.35rem;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.85em;
  border-radius: 3px;
}

pre code {
  background: transparent;
  padding: 0;
  font-size: inherit;
}

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

ul.post-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

ul.post-list li {
  margin: 0.7rem 0;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

ul.post-list .date {
  color: var(--muted);
  font-size: 0.82rem;
  font-family: "SF Mono", "Menlo", monospace;
  white-space: nowrap;
  flex-shrink: 0;
  width: 6.5rem;
}

ul.post-list a {
  font-size: 1rem;
}

footer.site-footer {
  margin-top: 5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.back-link:hover {
  color: var(--link);
}

@media (max-width: 540px) {
  ul.post-list li {
    flex-direction: column;
    gap: 0.1rem;
  }
  ul.post-list .date {
    width: auto;
  }
  header.site-header {
    flex-direction: column;
    align-items: flex-start;
  }
  nav {
    margin-top: 0.3rem;
  }
  nav a {
    margin-left: 0;
    margin-right: 1rem;
  }
}
