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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a;
  background: #fff;
  line-height: 1.7;
  font-size: 16px;
}

/* ── Header ── */
header {
  border-bottom: 1px solid #eee;
  padding: 1rem 0;
}

header nav {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a1a;
  text-decoration: none;
  letter-spacing: -0.02em;
}

/* ── Layout ── */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

footer {
  border-top: 1px solid #eee;
  text-align: center;
  padding: 2rem;
  color: #999;
  font-size: 0.85rem;
}

/* ── Home: post list ── */
.card {
  padding: 1.75rem 0;
  border-bottom: 1px solid #eee;
}

.card:last-child { border-bottom: none; }

.card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.card h2 a {
  color: #1a1a1a;
  text-decoration: none;
}

.card h2 a:hover { color: #0052cc; }

.meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 0.5rem;
}

.tag {
  background: #f0f0f0;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  font-size: 0.75rem;
  text-transform: capitalize;
  color: #555;
}

.excerpt {
  font-size: 0.92rem;
  color: #555;
  line-height: 1.6;
}

.empty { color: #999; padding: 2rem 0; }

/* ── Pagination ── */
.pager {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin-top: 2.5rem;
  font-size: 0.9rem;
}

.pager a { color: #0052cc; text-decoration: none; }
.pager a:hover { text-decoration: underline; }
.pager span { color: #888; }

/* ── Post ── */
.post h1 {
  font-size: 1.9rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #eee;
}

.post-body { font-size: 1.05rem; }

.post-body h2 { font-size: 1.45rem; margin: 2rem 0 0.75rem; line-height: 1.3; }
.post-body h3 { font-size: 1.2rem; margin: 1.75rem 0 0.6rem; line-height: 1.3; }
.post-body p  { margin-bottom: 1.1rem; }
.post-body ul,
.post-body ol { padding-left: 1.6rem; margin-bottom: 1.1rem; }
.post-body li { margin-bottom: 0.3rem; }
.post-body a  { color: #0052cc; }
.post-body a:hover { text-decoration: none; }
.post-body strong { font-weight: 600; }
.post-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 0.5rem 0; }

.post-body blockquote {
  border-left: 3px solid #0052cc;
  margin: 1.25rem 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  color: #555;
  font-style: italic;
}

.post-body table { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; font-size: 0.95rem; }
.post-body th,
.post-body td { border: 1px solid #e5e5e5; padding: 0.6rem 0.85rem; text-align: left; }
.post-body th { background: #f8f8f8; font-weight: 600; }

.post-body pre {
  background: #f6f6f6;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.9rem;
  margin-bottom: 1.1rem;
}

.back {
  display: inline-block;
  margin-top: 2.5rem;
  color: #0052cc;
  text-decoration: none;
  font-size: 0.9rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .post h1 { font-size: 1.45rem; }
  .post-body { font-size: 1rem; }
}
