/* Blog (blog.html and the post pages). The blog's content is set in Alegreya (a serif for titles, quotes and reading)
   and Alegreya Sans (dates and small text); the header menu and footer keep the site's font, like every other page.
   blog.html is a list: each post has its date and reading time, its title, a passage in my own words, and a picture
   that opens larger (assets/blog.js). Posts that live elsewhere (LinkedIn, NASA) link straight there. */
:root { --bl-serif: "Alegreya", Georgia, "Times New Roman", serif; --bl-sans: "Alegreya Sans", var(--sans); }
.blog-page main { font-family: var(--bl-serif); font-size: 1.12rem; }
.blog-page main :is(h1, h2, h3) { font-family: var(--bl-serif); letter-spacing: 0; }

/* The list */
.bl-title { margin: 64px 0 36px; font-size: clamp(3rem, 7vw, 5.25rem); font-weight: 500; line-height: 1; }
.bl-list { margin: 0 0 24px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.bl-post { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 360px); align-items: start; gap: 18px 44px; padding: 40px 0; border-bottom: 1px solid var(--line); }
.bl-meta { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 0; font: 400 1rem/1.45 var(--bl-sans); color: var(--ink-2); }
.bl-h { margin: 0; font-size: clamp(1.55rem, 2.4vw, 2rem); font-weight: 600; line-height: 1.2; }
.bl-h a { color: var(--ink); text-decoration: none; }
.bl-h a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.bl-sub { margin: 6px 0 0; font-size: 1.22rem; font-style: italic; color: var(--ink-2); }
.bl-quote { margin: 18px 0 0; max-width: 58ch; font-size: 1.24rem; line-height: 1.55; color: var(--ink); }
.bl-quote p { margin: 0; text-indent: -.42em; }
.bl-go { display: inline-block; margin-top: 18px; font: 500 1.05rem/1.4 var(--bl-sans); color: var(--link); }
.bl-fig { margin: 0; }
.bl-zoom { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; cursor: zoom-in; }
.bl-zoom img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease; }
.bl-zoom.is-diagram img { object-fit: contain; padding: 6px; }
.bl-zoom.is-natural img { aspect-ratio: auto; }
.bl-zoom:hover img { transform: scale(1.03); }
.bl-zoom:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.bl-fig figcaption { margin-top: 8px; font: 400 .95rem/1.4 var(--bl-sans); color: var(--ink-2); }
@media (max-width: 960px) {
  .bl-post { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); }
  .bl-meta { grid-column: 1 / -1; flex-direction: row; gap: 18px; margin: 0; }
}
@media (max-width: 640px) {
  .bl-title { margin: 40px 0 24px; }
  .bl-post { grid-template-columns: minmax(0, 1fr); padding: 30px 0; }
  .bl-fig { order: -1; }
}
@media (prefers-reduced-motion: reduce) { .bl-zoom img { transition: none; } .bl-zoom:hover img { transform: none; } }

/* The larger picture */
.bl-viewer { width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.bl-viewer::backdrop { background: rgba(10, 20, 26, .72); }
.bl-viewer figure { margin: 0; }
.bl-viewer img { display: block; width: 100%; max-height: calc(100vh - 140px); object-fit: contain; background: #fff; }
.bl-viewer figcaption { padding: 12px 56px 16px 18px; font: 400 1rem/1.45 var(--bl-sans); color: var(--ink-2); }
.bl-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: #172026; font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.bl-close:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* A post page */
.blog-article { padding: 38px 0 20px; }
.blog-back { display: inline-block; margin-bottom: 38px; font: 400 1rem/1.4 var(--bl-sans); }
.blog-article > header { max-width: 800px; }
.blog-article h1 { max-width: 20ch; margin: 0; font-size: clamp(2.4rem, 5vw, 3.75rem); font-weight: 600; line-height: 1.05; }
.blog-lead { max-width: 50ch; margin: 14px 0 0; font-size: 1.45rem; font-style: italic; line-height: 1.4; color: var(--ink-2); }
.blog-byline { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 20px 0 0; font: 400 1rem/1.45 var(--bl-sans); color: var(--ink-2); }
.blog-author { color: var(--ink); font-weight: 500; }
.blog-prose { max-width: 66ch; margin: 34px 0; font-size: 1.2rem; line-height: 1.7; }
.blog-archive { padding-left: 14px; border-left: 2px solid var(--line); font: 400 1rem/1.5 var(--bl-sans); color: var(--ink-2); }
.blog-figure { max-width: 900px; margin: 30px 0; }
.blog-figure img { display: block; max-width: 100%; height: auto; background: white; }
.blog-figure figcaption { margin-top: 10px; font: 400 .95rem/1.45 var(--bl-sans); color: var(--ink-2); }
.blog-book { margin: 30px 0; }
.blog-book img { max-width: 200px; height: auto; }
.blog-next { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; margin-top: 50px; padding-top: 20px; border-top: 1px solid var(--line); font: 400 1rem/1.4 var(--bl-sans); }
