/* Blog (/blog, src/blog.php): posts written in WordPress, shown in the site's design. */

/* Categories */
.bcats { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.75rem; }
.bcats a { padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--slate); font-size: .9375rem; font-weight: 600; text-decoration: none; }
.bcats a:hover { border-color: var(--blue); color: var(--blue); }
.bcats a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.bhero .crumbs ol { justify-content: center; }

/* Post cards */
.bgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
.bcard { display: flex; flex-direction: column; min-width: 0; }
.bcard__img { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--tint); border: 1px solid var(--line); }
.bcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease-out; }
.bcard:hover .bcard__img img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .bcard__img img { transition: none; } }
.bcard__body { padding-top: 1rem; }
.bcard__cat { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--blue); text-decoration: none; margin-bottom: .4rem; }
.bcard__title { font-size: 1.1875rem; line-height: 1.3; letter-spacing: -.01em; margin: 0 0 .5rem; }
.bcard__title a { color: var(--ink); text-decoration: none; }
.bcard__title a:hover { color: var(--blue); }
.bcard__excerpt { font-size: .9375rem; line-height: 1.55; color: var(--text); margin: 0 0 .6rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bcard__date { font-size: .8125rem; color: var(--muted); margin: 0; }

/* The newest post, large */
.bcard--lead { display: grid; grid-template-columns: 1.25fr 1fr; gap: 2.25rem; align-items: center; margin-bottom: 3rem; padding-bottom: 3rem; border-bottom: 1px solid var(--line); }
.bcard--lead .bcard__body { padding-top: 0; }
.bcard--lead .bcard__title { font-size: clamp(1.5rem, 2.6vw, 2.125rem); line-height: 1.2; letter-spacing: -.02em; }
.bcard--lead .bcard__excerpt { font-size: 1.0625rem; -webkit-line-clamp: 4; }

.bpager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 3rem; color: var(--muted); font-size: .9375rem; }
.bempty { text-align: center; color: var(--muted); padding: 3rem 0; }

@media (max-width: 960px) { .bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .bgrid { grid-template-columns: 1fr; gap: 2rem; }
  .bcard--lead { grid-template-columns: 1fr; gap: 0; margin-bottom: 2rem; padding-bottom: 2rem; }
  .bcard--lead .bcard__body { padding-top: 1rem; }
  .bpager { flex-wrap: wrap; }
}

/* A post */
main > .bpost:first-child { padding-top: calc(clamp(1.5rem, 3.5vw, 2.75rem) + var(--header-h)); background: radial-gradient(60rem 28rem at 50% -10%, var(--blue-50), transparent 70%) no-repeat; }
.bpost__head { padding: 0 0 clamp(1.5rem, 3vw, 2.25rem); }
.bpost__head .crumbs ol { justify-content: flex-start; }
.bpost__head h1 { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; margin: 1rem 0 1rem; }
.bpost__meta { display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin: 0; font-size: .9375rem; color: var(--muted); }
.bpost__meta > * + *::before { content: "·"; margin-right: .5rem; color: var(--mist); }

/* Post text */
.bprose { font-size: 1.125rem; line-height: 1.75; color: var(--slate); padding-bottom: 1rem; }
.bprose > * { margin: 0 0 1.25rem; }
.bprose h2 { font-size: clamp(1.5rem, 3vw, 1.875rem); line-height: 1.25; margin: 2.75rem 0 1rem; scroll-margin-top: 96px; }
.bprose h3 { font-size: 1.3125rem; line-height: 1.3; margin: 2rem 0 .75rem; scroll-margin-top: 96px; }
.bprose h4 { font-size: 1.125rem; color: var(--ink); margin: 1.5rem 0 .5rem; }
.bprose a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.bprose a:hover { text-decoration-thickness: 2px; }
.bprose strong { color: var(--ink); }
.bprose ul, .bprose ol { padding-left: 1.4rem; }
.bprose li { margin: 0 0 .5rem; }
.bprose li > ul, .bprose li > ol { margin: .5rem 0 0; }
.bprose figure { margin: 2rem 0; }
.bprose img { height: auto; border-radius: var(--radius); }
.bprose figcaption { font-size: .875rem; color: var(--muted); text-align: center; margin-top: .6rem; }
.bprose blockquote { margin: 1.75rem 0; padding: 1rem 1.25rem; border-left: 3px solid var(--blue); background: var(--blue-50); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink); }
.bprose blockquote > :last-child { margin-bottom: 0; }
.bprose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.bprose code { font-size: .9em; background: var(--tint); padding: .1em .35em; border-radius: 4px; }

/* Tables */
.btable { overflow-x: auto; margin: 1.75rem 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.bprose table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; }
.bprose th, .bprose td { padding: .7rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); min-width: 9rem; }
.bprose th { background: var(--tint); color: var(--ink); font-weight: 700; }
.bprose tr:last-child td { border-bottom: 0; }

/* Table of contents (from the WordPress plugin) */
.bprose .btoc { margin: 2rem 0; padding: 1.25rem 1.5rem; background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius); font-size: 1rem; line-height: 1.5; }
.bprose .btoc > p { margin: 0 0 .75rem; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bprose .btoc ul { list-style: none; padding: 0; margin: 0; }
.bprose .btoc li { margin: 0 0 .45rem; }
.bprose .btoc li ul { padding-left: 1rem; margin-top: .45rem; }
.bprose .btoc a { color: var(--ink); text-decoration: none; }
.bprose .btoc a:hover { color: var(--blue); text-decoration: underline; }

/* Call to action after the post */
.bcta { display: flex; align-items: center; gap: 1.5rem; margin: 2.5rem 0 1rem; padding: 1.75rem; border-radius: var(--radius); background: var(--ink); color: #c9cfdb; }
.bcta__title { color: var(--white); font-size: 1.25rem; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; margin: 0 0 .35rem; }
.bcta p { margin: 0; }
.bcta .btn { flex: none; }
@media (max-width: 720px) { .bcta { flex-direction: column; align-items: stretch; text-align: left; } }

.brelated { border-top: 1px solid var(--line); margin-top: 2rem; }
.brelated h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }
.brelated .bcard__title { font-size: 1.0625rem; }
