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

:root {
  --bg: #fafafa;
  --fg: #1a1a1a;
  --muted: #666;
  --accent: #0070f3;
  --max: 680px;
}

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

header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e5e5e5;
}

header nav a {
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

main {
  max-width: var(--max);
  margin: 3rem auto;
  padding: 0 1.5rem;
}

/* post list */
.posts h1 { font-size: 1.5rem; margin-bottom: 1.5rem; }

.posts ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.posts li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.posts a {
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
}

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

.posts time { color: var(--muted); font-size: 0.875rem; white-space: nowrap; }

/* pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.pagination a { color: var(--accent); text-decoration: none; }
.pagination a:hover { text-decoration: underline; }

/* not found */
.not-found { text-align: center; padding: 4rem 0; }
.not-found h1 { font-size: 4rem; margin: 0; color: var(--muted); }
.not-found a { color: var(--accent); }

/* single post */
.post header { margin-bottom: 2rem; }
.post h1 { font-size: 2rem; margin: 0 0 0.5rem; line-height: 1.2; }
.post header time { color: var(--muted); font-size: 0.875rem; }

.post .body { line-height: 1.8; }
.post .body h2 { margin-top: 2rem; }
.post .body a { color: var(--accent); }
.post .body code {
  background: #f0f0f0;
  padding: 0.1em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}
.post .body pre {
  background: #f0f0f0;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
}
.post .body pre code { background: none; padding: 0; }
