/* =============================================================================
   BLOG  |  The blog list page (/blog/) and every blog post.
   HTML: src/pages/blog/index.astro and src/pages/blog/[slug].astro     JS: (none)
   Loaded together with 98-pages.css. Every class here starts with bl-.
   ============================================================================= */

.bl-hl{background:linear-gradient(transparent 62%,rgba(142,198,65,.38) 62%);padding:0 .1em}
[data-theme=dark] .bl-hl{background:linear-gradient(transparent 62%,rgba(142,198,65,.3) 62%)}
.pghead h1 em.bl-hl{font-weight:400}

/* meta line and topic pills */
.bl-meta{color:var(--muted);font-size:.9rem;margin:0}
.pghead .bl-meta{margin-top:.2rem}
.bl-tags{display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0 0;padding:0;list-style:none}
.bl-tags li{font-size:.78rem;padding:.25rem .8rem;border-radius:99px;background:rgba(142,198,65,.16);color:var(--green-d)}

/* list of posts */
.bl-list{display:grid;gap:1.2rem;margin-block:1.4rem 3rem;grid-template-columns:minmax(0,1fr)}   /* minmax(0,...) stops a wide picture from stretching the cards */
@media(min-width:700px){
  .bl-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(min-width:1100px){
  .bl-list{grid-template-columns:repeat(3,minmax(0,1fr))}
}
/* the card: a solid white block with an edge and a shadow, so it stands out from the page */
.bl-card{position:relative;min-width:0;padding:0;overflow:hidden;display:flex;flex-direction:column;cursor:pointer;border-radius:24px;
  background:#fff;border:1px solid rgba(10,10,10,.09);box-shadow:0 12px 32px rgba(30,45,10,.12),0 2px 6px rgba(30,45,10,.06);
  transition:transform .3s var(--ease),box-shadow .3s var(--ease),border-color .3s}
.bl-card:hover{transform:translateY(-4px);border-color:rgba(142,198,65,.7);box-shadow:0 18px 44px rgba(30,45,10,.18),0 2px 6px rgba(30,45,10,.06)}
.bl-card:focus-within{outline:2px solid var(--green);outline-offset:3px}
[data-theme=dark] .bl-card{background:#17171a;border-color:rgba(255,255,255,.13);box-shadow:0 14px 36px rgba(0,0,0,.55)}
[data-theme=dark] .bl-card:hover{border-color:rgba(142,198,65,.6);box-shadow:0 18px 44px rgba(0,0,0,.65)}
/* the picture area has a fixed shape; the picture fills it and can never change the card's width */
.bl-tlink{position:relative;display:block;aspect-ratio:1200/630;overflow:hidden;background:var(--paper)}
.bl-card .bl-thumb{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto;object-fit:cover}
.bl-cbody{padding:1.15rem 1.3rem 1.35rem;display:grid;gap:.55rem;align-content:start}
.bl-card h2,.bl-card h3{font-size:clamp(1.1rem,2vw,1.28rem);letter-spacing:-.025em;line-height:1.18}
.bl-title{color:inherit;text-decoration:none}
.bl-title::after{content:"";position:absolute;inset:0;z-index:1}   /* stretches the title link over the whole card */
.bl-card:hover .bl-title{color:var(--green-d)}
.bl-card p{margin:0;color:var(--muted);font-size:.92rem}
.bl-card .bl-meta{font-size:.82rem}
.bl-desc{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.bl-card .bl-tags{margin:.2rem 0 0}
.bl-more{display:inline-block;justify-self:start;font-weight:600;font-size:.9rem;color:var(--green-d);margin-top:.2rem;transition:transform .25s var(--ease)}
.bl-more::after{content:" \2192"}
.bl-card:hover .bl-more{transform:translateX(4px)}
.bl-empty{padding:clamp(1.8rem,4vw,3rem);max-width:640px;margin-block:1.4rem 3rem}
.bl-empty h2{font-size:clamp(1.5rem,3.4vw,2rem);margin-bottom:.8rem}
.bl-empty p{margin:0;color:var(--muted)}
.bl-empty a{color:var(--green-d);text-underline-offset:3px}

/* pictures: a post's own image, or the branded placeholder when it has none */
.bl-thumb{display:block;width:100%;height:auto;aspect-ratio:1200/630;object-fit:cover}
.bl-ph{position:relative;overflow:hidden;background:var(--paper)}
.bl-ph::before,.bl-ph::after{content:"";position:absolute;border-radius:50%;filter:blur(38px)}
.bl-ph::before{width:62%;height:100%;background:var(--green);opacity:.42}
.bl-ph::after{width:54%;height:90%;background:#d6f0a8;opacity:.9}
.bl-ph0::before{left:-12%;top:-35%}.bl-ph0::after{right:-10%;bottom:-40%}
.bl-ph1::before{right:-12%;top:-40%}.bl-ph1::after{left:-8%;bottom:-38%}
.bl-ph2::before{left:22%;top:-58%}.bl-ph2::after{left:32%;bottom:-62%}
[data-theme=dark] .bl-ph::before{opacity:.22}
[data-theme=dark] .bl-ph::after{background:var(--green);opacity:.12}
.bl-play{position:absolute;z-index:1;left:50%;top:50%;width:clamp(56px,13%,88px);aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,rgba(255,255,255,.55),rgba(255,255,255,.2));border:1px solid var(--g-border);box-shadow:var(--g-shadow),var(--g-inner);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
.bl-play svg{width:42%;height:42%;fill:#fff;filter:drop-shadow(0 1px 3px rgba(30,45,10,.4))}

/* a single post */
.bl-post{max-width:760px}
.bl-hero{display:block;width:100%;max-width:100%;height:auto;aspect-ratio:1200/630;object-fit:cover;border-radius:28px;margin:0 0 2rem}
.bl-summary{padding:1.4rem 1.6rem;margin:0 0 2rem}
.bl-summary b{display:block;font-size:.76rem;letter-spacing:.14em;text-transform:uppercase;color:var(--green-d);margin-bottom:.5rem}
.bl-summary p{margin:0}
.bl-body{font-size:1.05rem;line-height:1.7}
.bl-body>*{max-width:72ch}
.bl-body>table,.bl-body>pre,.bl-body>img,.bl-body>figure{max-width:100%}
.bl-body h2{font-size:clamp(1.5rem,3.2vw,2rem);margin:2.4rem 0 .8rem}
.bl-body h3{font-size:1.25rem;margin:1.8rem 0 .6rem}
.bl-body p,.bl-body ul,.bl-body ol{margin:0 0 1.1rem}
.bl-body ul,.bl-body ol{padding-left:1.3rem}
.bl-body li{margin:.4rem 0}
.bl-body strong{font-weight:600}
.bl-body a{color:var(--green-d);text-underline-offset:3px}
.bl-body a:hover{color:var(--ink)}
.bl-body blockquote{margin:1.6rem 0;padding:1rem 1.4rem;border-radius:20px;background:var(--g-bg);border:1px solid var(--g-border);box-shadow:var(--g-shadow),var(--g-inner);color:var(--muted)}
.bl-body blockquote p:last-child{margin:0}
.bl-body img{display:block;max-width:100%;height:auto;border-radius:20px;margin:1.6rem 0}
.bl-body figure{margin:1.6rem 0}
.bl-body figure img{margin:0}
.bl-body figcaption{font-size:.88rem;color:var(--muted);margin-top:.5rem}
.bl-body hr{border:0;height:1px;background:var(--g-border);margin:2.4rem 0}
.bl-body code{font-size:.92em;padding:.1em .4em;border-radius:8px;background:rgba(142,198,65,.14)}
.bl-body pre{overflow-x:auto;padding:1rem 1.2rem;border-radius:16px;font-size:.9rem;line-height:1.5}
.bl-body pre code{padding:0;background:none}
.bl-body table{display:block;overflow-x:auto;border-collapse:collapse;margin:1.6rem 0;font-size:.95rem}
.bl-body th,.bl-body td{padding:.6rem .9rem;border-bottom:1px solid var(--g-border);text-align:left}
.bl-body th{font-weight:600}

/* more posts */
.bl-related{margin-block:3rem 0}
.bl-related h2{font-size:clamp(1.5rem,3.2vw,2rem)}
