/* Wrapper */
.post {
  max-width: 780px;
  margin: 0 auto;
  padding-bottom: 60px;
}

/* ── Title & metadata ─────────────────────────────────────── */
.post-title {
  font-family: 'CMU Sans Serif', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5rem 0;
}

.post-subtitle {
  font-size: 1rem;
  color: #555;
  margin: 0 0 0.5rem 0;
}

.post-date {
  font-size: 0.85rem;
  color: #666;
  margin: 0 0 0.2rem 0;
}

.post-date:last-of-type {
  margin-bottom: 0.75rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 2rem;
  font-family: 'CMU Sans Serif', sans-serif;
  font-size: 0.88rem;
  color: #444;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  padding: 0.75rem 0;
  margin-bottom: 2rem;
}

.post-meta span {
  display: flex;
  gap: 0.4rem;
}

.post-meta .post-meta-label {
  font-weight: 700;
  color: #003409;
}

/* ── Sections ─────────────────────────────────────────────── */
.post-section {
  margin-bottom: 2.5rem;
}

.post-section h2 {
  font-family: 'CMU Sans Serif', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  border-bottom: 2px solid #4c9cf1;
  padding-bottom: 4px;
  margin-bottom: 0.9rem;
  color: #003409;
}

.post-section p {
  line-height: 1.65;
  margin-bottom: 0.9rem;
}

.post-section ul,
.post-section ol {
  padding-left: 1.4rem;
  line-height: 1.65;
  margin-bottom: 0.9rem;
}

.post-section li {
  margin-bottom: 0.35rem;
}

/* ── Highlighted / colored text ──────────────────────────── */
.highlight {
  color: #004de6;
  font-weight: 600;
}

/* ── Images ───────────────────────────────────────────────── */
/* Single full-width image */
.post-img {
  margin: 1.5rem 0;
  text-align: center;
}

.post-img img,
.post-img gif {
  max-width: 100%;
  display: block;
  margin: 0 auto;
}

/* Two-column image row */
.post-img-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

/* Three-column image row */
.post-img-row.three {
  grid-template-columns: 1fr 1fr 1fr;
}

/* Four-column image row */
.post-img-row.four {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

.post-img-row img {
  width: 100%;
  display: block;
}

/* Caption below any image container */
.post-img figcaption,
.post-img-row figcaption,
.post-caption {
  font-size: 0.82rem;
  color: #666;
  text-align: center;
  margin-top: 0.4rem;
}

/* ── Resource link buttons ────────────────────────────────── */
.post-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.5rem 0;
}

.post-links a {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 2px solid #004de6;
  color: #004de6;
  font-family: 'CMU Sans Serif', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 3px;
  transition: background 0.2s, color 0.2s;
}

.post-links a:hover {
  background: #004de6;
  color: #fff;
}

/* ── Embedded video ───────────────────────────────────────── */
.post-video {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  margin: 1.5rem 0;
}

.post-video iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Citation / BibTeX block ──────────────────────────────── */
.post-citation {
  background: #f4f4f0;
  border-left: 3px solid #4c9cf1;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  padding: 1rem 1.2rem;
  white-space: pre-wrap;
  overflow-x: auto;
  margin: 1rem 0;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .post-title { font-size: 1.4rem; }

  .post-img-row,
  .post-img-row.three,
  .post-img-row.four {
    grid-template-columns: 1fr;
  }
}
