/* ===================================================================
   Loose Leaves — the blog post interior.
   Lighter, more diaristic than the notebook essay. Clean (un-ruled)
   paper, handwritten Caveat header + dated stamp, a taped snapshot.
   Reuses .essay-wrap / .essay-body / .essay-rule / .essay-nav from
   essay.css; this file only restyles the header + photo + chrome.
   =================================================================== */

body.blogpost {
  background-color: var(--paper);
  /* faint warm vignette instead of notebook rules — feels like a loose page */
  background-image:
    radial-gradient(120% 80% at 50% -10%, rgba(161,113,68,0.06), transparent 60%);
}

/* breadcrumb back to the blog */
.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 40px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ochre-deep);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.blog-back:hover { border-bottom-color: var(--ochre); }

/* header — handwritten, dated like a journal entry */
.blog-head { margin: 34px 0 0; }
.blog-head .stamp {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.blog-head .stamp .cat { color: var(--ochre-deep); }
.blog-head .stamp .date {
  font-family: "Caveat", cursive;
  font-size: 22px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--blue);
}
.blog-head h1 {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: clamp(46px, 7vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
  color: var(--ink);
  margin: 10px 0 0;
  text-wrap: balance;
}
.blog-head .dek {
  font-family: "Newsreader", serif;
  font-style: italic;
  font-size: 20px;
  line-height: 1.4;
  color: var(--muted);
  margin: 12px 0 0;
  max-width: 52ch;
  text-wrap: pretty;
}

/* taped snapshot — smaller + more casual than the essay hero */
.blog-photo {
  margin: 34px auto 4px;
  width: min(78%, 460px);
  background: #fff;
  padding: 12px 12px 0;
  border: 1px solid rgba(22,32,42,0.10);
  box-shadow: 0 14px 30px -18px rgba(20, 40, 58, 0.5);
  transform: rotate(-1.4deg);
  position: relative;
}
.blog-photo::before {
  /* a strip of tape */
  content: "";
  position: absolute;
  top: -12px; left: 50%;
  width: 92px; height: 24px;
  transform: translateX(-50%) rotate(-2.5deg);
  background: rgba(161,113,68,0.16);
  border: 1px solid rgba(161,113,68,0.22);
}
.blog-photo img { width: 100%; display: block; }
.blog-photo .img-ph { aspect-ratio: 4 / 3; }
.blog-photo figcaption {
  font-family: "Caveat", cursive;
  font-size: 19px;
  line-height: 1.2;
  color: var(--blue);
  text-align: center;
  padding: 9px 4px 12px;
}

/* inline figure inside a blog entry — same taped-snapshot voice */
.blog-fig {
  margin: 2.2em auto;
  width: min(86%, 520px);
  background: #fff;
  padding: 12px 12px 0;
  border: 1px solid rgba(22,32,42,0.10);
  box-shadow: 0 12px 26px -18px rgba(20, 40, 58, 0.45);
  transform: rotate(0.8deg);
}
.blog-fig img { width: 100%; display: block; }
.blog-fig .img-ph { aspect-ratio: 4 / 3; }
.blog-fig figcaption {
  font-family: "Caveat", cursive;
  font-size: 18px;
  line-height: 1.2;
  color: var(--blue);
  text-align: center;
  padding: 9px 4px 12px;
}

/* signature off — handwritten */
.blogpost .essay-end .sig { color: var(--blue); }

/* ---- shared image placeholder (used here + on essay pages) ---- */
.img-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  min-height: 180px;
  padding: 18px;
  background-color: var(--paper-deep);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0 11px,
    rgba(61,90,128,0.05) 11px 22px
  );
  border: 1px solid var(--rule);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 560px) {
  .blog-photo { width: min(96%, 460px); }
  .blog-head .stamp { flex-wrap: wrap; gap: 6px 12px; }
}

.essay-body .blog-photo.book-float{float:left;width:190px;max-width:42%;margin:6px 30px 14px 0;transform:rotate(-1.5deg)}
.essay-body .blog-photo.book-float img{width:100%;height:auto;aspect-ratio:auto;object-fit:contain;display:block}
.essay-body .blog-photo.book-float figcaption{font-size:11px;line-height:1.35}
.essay-body .essay-end{clear:both}
.gr-link{color:var(--blue-deep);text-decoration:none;border-bottom:1px solid var(--blue)}
.gr-link:hover{color:var(--blue)}
@media (max-width:520px){.essay-body .blog-photo.book-float{width:130px;margin-right:18px}}
