:root {
  --color-text: #222;
  --color-muted: #666;
  --color-bg: #fdfcfa;
  --color-accent: #7a5c3e;
  --font-body: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
  --wrap-width: 860px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

.wrap {
  max-width: var(--wrap-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.25;
}

/* Header / nav */
.site-header {
  border-bottom: 1px solid #eee;
  padding: 1.25rem 0;
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-text);
}
.site-nav ul {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--color-muted);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.site-nav a[aria-current="page"] { color: var(--color-accent); }

/* Home hero */
.home-hero { margin: 2rem auto; }
.home-hero img { border-radius: 4px; }

/* Post grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.75rem;
  margin: 1.5rem 0 3rem;
}
.post-card-image {
  border-radius: 4px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.post-card-title {
  font-size: 1.05rem;
  margin: 0.6rem 0 0.2rem;
}
.post-card-date {
  color: var(--color-muted);
  font-size: 0.85rem;
}
.post-card-link { color: var(--color-text); }
.post-card-link:hover .post-card-title { text-decoration: underline; }

/* Category pages */
.category-header { margin: 2rem 0; }
.category-hero {
  border-radius: 4px;
  margin: 1rem 0;
}
.category-intro { color: var(--color-muted); }
.category-latest-heading {
  border-top: 1px solid #eee;
  padding-top: 1.5rem;
}

/* Single post */
.post { margin: 2rem auto 4rem; }
.post-header time {
  display: block;
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.post-hero {
  border-radius: 4px;
  margin-bottom: 1.5rem;
}
.post-body img { border-radius: 4px; margin: 1.25rem 0; }
.post-tags { margin-top: 2rem; }
.tag {
  display: inline-block;
  background: #f1ede8;
  color: var(--color-muted);
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-right: 0.4rem;
  text-decoration: none;
}
.tag:hover { background: #e8e2d9; }

.post-nav {
  display: flex;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}
.post-nav-prev { text-align: left; }
.post-nav-next { margin-left: auto; text-align: right; }

/* Tag cloud */
.tag-cloud-section { margin-bottom: 3rem; }
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
}
.tag-cloud-item {
  color: var(--color-accent);
  text-decoration: none;
}
.tag-cloud-item:hover { text-decoration: underline; }
.tag-cloud-count {
  font-size: 0.75em;
  color: var(--color-muted);
}
.tag-cloud-item.weight-1 { font-size: 0.85rem; }
.tag-cloud-item.weight-2 { font-size: 1.05rem; }
.tag-cloud-item.weight-3 { font-size: 1.3rem; }
.tag-cloud-item.weight-4 { font-size: 1.6rem; }
.tag-cloud-item.weight-5 { font-size: 2rem; }

/* Footer */
.site-footer {
  border-top: 1px solid #eee;
  padding: 2rem 0;
  color: var(--color-muted);
  font-size: 0.85rem;
  margin-top: 3rem;
}
