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

body {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.6;
  color: #111;
  background: #fff;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

a {
  color: #111;
}

a:hover {
  text-decoration: none;
}

/* ── Layout ── */

.site-header {
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #ddd;
}

.site-header h1 {
  font-size: 1.4rem;
  font-weight: normal;
}

.site-header nav {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  font-family: sans-serif;
}

.site-header nav a {
  margin-right: 1rem;
}

.layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 3rem;
  align-items: start;
}

/* ── Sidebar ── */

.sidebar {
  font-family: sans-serif;
  font-size: 0.85rem;
  position: sticky;
  top: 2rem;
}

.sidebar h2 {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 0.75rem;
}

.tag-list {
  list-style: none;
}

.tag-list li {
  margin-bottom: 0.3rem;
}

.tag-list a {
  text-decoration: none;
  color: #555;
}

.tag-list a:hover,
.tag-list a.active {
  color: #111;
  text-decoration: underline;
}

.tag-list .count {
  color: #bbb;
  margin-left: 0.25rem;
}

/* ── Post list ── */

.post-list {
  list-style: none;
}

.post-item {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #eee;
}

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

.post-item[hidden] {
  display: none;
}

.post-meta {
  font-family: sans-serif;
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 0.4rem;
}

.post-title {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.post-title a {
  text-decoration: none;
}

.post-title a:hover {
  text-decoration: underline;
}

.post-excerpt {
  color: #444;
  font-size: 0.95rem;
}

.post-tags {
  margin-top: 0.6rem;
  font-family: sans-serif;
  font-size: 0.75rem;
}

.post-tags a {
  color: #888;
  margin-right: 0.5rem;
  text-decoration: none;
}

.post-tags a:hover {
  color: #111;
}

/* ── No results ── */

#no-results {
  font-family: sans-serif;
  color: #999;
  font-size: 0.9rem;
}

#no-results[hidden] {
  display: none;
}

/* ── Individual post ── */

.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.post-header h1 {
  font-size: 2rem;
  font-weight: normal;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.post-body {
  max-width: 680px;
}

.post-body p {
  margin-bottom: 1.2rem;
}

.post-body h2 {
  font-size: 1.2rem;
  margin: 2rem 0 0.6rem;
}

.post-body ul,
.post-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}

.post-body blockquote {
  border-left: 3px solid #ddd;
  padding-left: 1rem;
  color: #666;
  margin-bottom: 1.2rem;
}

.post-body pre {
  background: #f5f5f5;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  font-family: sans-serif;
  font-size: 0.85rem;
  color: #999;
}

.post-footer a {
  color: #555;
}

/* ── Footer ── */

.site-footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  font-family: sans-serif;
  font-size: 0.8rem;
  color: #999;
}

/* ── Responsive ── */

@media (max-width: 600px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
  }

  .sidebar h2 {
    margin-bottom: 0;
  }

  .tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .tag-list li {
    margin-bottom: 0;
  }
}
