/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

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

a { color: #1a5ca8; text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── Site header ───────────────────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid #e8e8e8;
  padding: 1.5rem 1.25rem 1rem;
  text-align: center;
}

.site-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.site-title a { color: #1a1a1a; }
.site-title a:hover { text-decoration: none; color: #1a5ca8; }

.cat-nav {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.6rem;
  font-size: 0.82rem;
}

.cat-nav a { color: #555; }
.cat-nav a:hover { color: #1a5ca8; }

/* ── Main content ──────────────────────────────────────────────────────────── */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

/* ── Listing page ──────────────────────────────────────────────────────────── */
.listing-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.listing-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.listing-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.listing-thumb {
  flex: 0 0 72px;
}

.listing-thumb img {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 3px;
}

.listing-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  display: block;
  margin-bottom: 0.15rem;
}
.listing-title:hover { color: #1a5ca8; text-decoration: none; }

.listing-meta {
  font-size: 0.82rem;
  color: #888;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

/* ── Category tags ─────────────────────────────────────────────────────────── */
.cat-tag {
  background: #f0f4fa;
  color: #1a5ca8;
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.cat-tag:hover { background: #dbe8f8; text-decoration: none; }

.post-cats {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

/* ── Post page ─────────────────────────────────────────────────────────────── */
.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e8e8e8;
}

.post-title {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.post-meta {
  font-size: 0.85rem;
  color: #888;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* ── Post body ─────────────────────────────────────────────────────────────── */
.post-body { }

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

.post-body h1, .post-body h2, .post-body h3 {
  margin: 1.75rem 0 0.6rem;
  font-weight: 700;
  line-height: 1.2;
}

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

/* ── Images & galleries ────────────────────────────────────────────────────── */
.post-image, .post-gallery, .post-video {
  margin: 1.5rem 0;
}

.post-image img {
  width: 100%;
  border-radius: 3px;
}

/* Single image in a gallery block */
.gallery-1 img {
  width: 100%;
  border-radius: 3px;
}

/* Two images side by side */
.gallery-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

/* Three images */
.gallery-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
}

/* 4+ images — 3-column grid */
.gallery-n {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.post-gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 2px;
}

.gallery-1 img {
  height: auto;
  max-height: none;
}

/* ── Videos ────────────────────────────────────────────────────────────────── */
.post-video video {
  width: 100%;
  max-height: 480px;
  border-radius: 3px;
}

/* ── Post navigation ───────────────────────────────────────────────────────── */
.post-nav {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #e8e8e8;
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.post-nav a { color: #555; }
.post-nav a:hover { color: #1a5ca8; }

/* ── 404 ───────────────────────────────────────────────────────────────────── */
.error-page { text-align: center; padding: 4rem 0; }
.error-page h2 { font-size: 1.5rem; margin-bottom: 1rem; }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.82rem;
  color: #aaa;
  border-top: 1px solid #f0f0f0;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .post-title { font-size: 1.35rem; }
  .gallery-3, .gallery-n { grid-template-columns: repeat(2, 1fr); }
  .post-gallery img { height: 160px; }
  .listing-thumb { flex: 0 0 56px; }
  .listing-thumb img { width: 56px; height: 40px; }
}
