/* =============================================================
   Journal — rich post content patterns
   ============================================================= */

/* Video embeds — responsive 16:9 */
.prose .video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  margin: 2em 0;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
}
.prose .video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Full-bleed figure — image that breaks out of the prose column */
.prose .figure-bleed {
  margin: 2.4em calc(50% - 50vw);
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  width: calc(100vw - 2 * var(--gutter));
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.prose .figure-bleed img {
  width: 100%;
  border-radius: 12px;
  display: block;
}
.prose .figure-bleed figcaption {
  margin-top: 12px;
  text-align: center;
}

/* Side-by-side image pair */
.prose .figure-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 2em 0;
}
.prose .figure-pair img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

/* Gallery — 3-up */
.prose .gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 2em 0;
}
.prose .gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  transition: transform 0.25s var(--ease);
}
.prose .gallery img:hover { transform: scale(1.02); }

/* Callout — highlighted block (use sparingly) */
.prose .callout {
  background: var(--surface-1);
  border-left: 2px solid var(--yellow);
  border-radius: 6px;
  padding: 22px 24px;
  margin: 2em 0;
  font-size: 16px;
  color: var(--ink);
}
.prose .callout strong { color: var(--yellow); }

/* =============================================================
   Share row
   ============================================================= */
.share-row {
  max-width: 720px;
  margin: 64px auto 0;
  padding: 24px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.share-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.share-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--ink-2);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  text-decoration: none;
}
.share-btn:hover {
  color: var(--carbon);
  border-color: var(--yellow);
  background: var(--yellow);
}
.share-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.share-btn.is-copied {
  background: var(--yellow);
  color: var(--carbon);
  border-color: var(--yellow);
}

/* =============================================================
   Comments (Giscus container)
   ============================================================= */
.comments-section {
  max-width: 880px;
  margin: 64px auto 0;
  padding-top: 48px;
  border-top: 1px solid var(--border-soft);
}
.comments-section h3 {
  font-family: var(--display);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.comments-intro {
  font-size: 14.5px;
  color: var(--ink-3);
  line-height: 1.55;
  margin-bottom: 24px;
  max-width: 60ch;
}
.comments-intro a {
  color: var(--yellow);
  border-bottom: 1px solid color-mix(in srgb, var(--yellow) 30%, transparent);
}
.comments-intro a:hover { border-color: var(--yellow); }

/* Giscus iframe wrapper styling */
.giscus, .giscus-frame { width: 100%; }

/* =============================================================
   Related posts
   ============================================================= */
.related {
  max-width: 1100px;
  margin: 80px auto 0;
  padding-top: 48px;
  border-top: 1px solid var(--border-soft);
}
.related-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.related-head h3 {
  font-family: var(--display);
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.related-head a {
  font-family: var(--display);
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.related-head a:hover { color: var(--yellow); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 720px) {
  .prose .figure-pair { grid-template-columns: 1fr; }
  .prose .gallery { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .share-row { flex-direction: column; align-items: flex-start; }
}
