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

:root {
  --text: #1a1a1a;
  --muted: #666;
  --border: #e5e5e5;
  --tag-bg: #f0f0f0;
  --accent: #1a1a1a;
  --max-w: 680px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  margin: 0;
  padding: 0 1.25rem;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.65;
}

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

main { flex: 1; }

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

.site-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-title:hover { opacity: 0.7; }

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

/* Post list */
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.post-item:last-child { border-bottom: none; }

.post-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}

.post-title:hover { opacity: 0.65; }

.post-meta {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tag-sep { color: var(--border); }

.tag {
  background: var(--tag-bg);
  color: var(--muted);
  padding: 0.1em 0.55em;
  border-radius: 3px;
  font-size: 0.78rem;
}

.empty { color: var(--muted); }

/* Single post */
.post h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.post-header { margin-bottom: 2.5rem; }

.post-content {
  font-size: 1rem;
  line-height: 1.75;
}

.post-content h2 { font-size: 1.3rem; margin-top: 2rem; }
.post-content h3 { font-size: 1.1rem; margin-top: 1.75rem; }

.post-content a { color: var(--text); }
.post-content a:hover { opacity: 0.65; }

.post-content pre {
  background: #f6f6f6;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.55;
}

.post-content code {
  font-size: 0.88em;
  background: #f6f6f6;
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

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

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

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

.back-link {
  display: inline-block;
  margin-top: 3rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}

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