/* Blog: index and article pages (generated by blog/build.mjs). Loaded after site.css; ar.css still loads last on Arabic pages. */

/* index */
.blog-hero h1 .line{white-space:normal}
.post-list{list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}
.post-list li{border-bottom:1px solid var(--line)}
.post-row{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,8fr) 24px;gap:clamp(24px,4vw,64px);padding-block:clamp(32px,4vw,52px);align-items:start}
.post-row-meta{display:flex;flex-direction:column;gap:4px;padding-top:.45em}
.post-row h2,.post-row h3{font-family:var(--f-display);font-weight:700;font-size:clamp(24px,2.6vw,40px);line-height:1.1;letter-spacing:-.02em;text-wrap:balance;transition:color .4s var(--ease)}
.post-row p{color:var(--t60);margin-top:16px;max-width:62ch}
.post-row-time{display:block;margin-top:16px}
.post-row>.arr{width:20px;height:20px;margin-top:.55em;color:var(--t60);transition:transform .5s var(--ease),color .4s var(--ease)}
.post-row:hover h2,.post-row:hover h3{color:var(--yellow)}
.post-row:hover>.arr{transform:translateX(6px);color:var(--t)}
[dir="rtl"] .post-row:hover>.arr{transform:scaleX(-1) translateX(6px)}
.blog-list{padding-bottom:clamp(40px,6vw,80px)}
@media (max-width:820px){.post-row{grid-template-columns:minmax(0,1fr);gap:14px}.post-row-meta{flex-direction:row;flex-wrap:wrap;gap:4px 14px;padding-top:0}.post-row>.arr{display:none}}

/* article hero */
.p-hero.post-hero{padding-bottom:clamp(48px,6vw,88px)}
.p-hero.post-hero h1{font-size:clamp(38px,5.4vw,92px);line-height:1;max-width:16ch}
.p-hero.post-hero .lede{max-width:34ch}
.post-meta{display:flex;flex-wrap:wrap;gap:6px 20px;margin-top:40px}
.post-meta>*+*{position:relative}
.post-meta>*+*::before{content:"";position:absolute;inset-inline-start:-11px;top:50%;width:3px;height:3px;margin-top:-1.5px;border-radius:50%;background:var(--t40)}

/* article body: contents on the left (sticky), text on the right, like the site's .row2 sections */
.post-grid{display:grid;grid-template-columns:minmax(0,4fr) minmax(0,8fr);gap:clamp(40px,6vw,120px);padding-block:clamp(56px,7vw,104px) clamp(24px,4vw,56px);border-top:1px solid var(--line)}
.post-aside{position:sticky;top:120px;align-self:start}
.toc ol{list-style:none;margin:0;padding:0;counter-reset:toc;border-top:1px solid var(--line)}
.toc li{counter-increment:toc;border-bottom:1px solid var(--line)}
.toc a{display:grid;grid-template-columns:28px 1fr;gap:8px;padding:12px 0;font-size:14px;line-height:1.45;color:var(--t60);transition:color .3s}
.toc a::before{content:counter(toc,decimal-leading-zero);font-size:12px;color:var(--t40);padding-top:.15em;transition:color .3s}
.toc a:hover,.toc a[aria-current="true"]{color:var(--t)}
.toc a[aria-current="true"]::before{color:var(--t)}
@media (max-width:900px){.post-grid{grid-template-columns:minmax(0,1fr)}.post-aside{display:none}}

/* prose */
.prose{max-width:66ch;font-size:18px;line-height:1.7;color:rgba(244,244,240,.8);overflow-wrap:break-word}
.prose>*+*{margin-top:1.15em}
.prose h2{font-size:clamp(26px,2.6vw,38px);line-height:1.12;color:var(--t);margin-top:2.4em;scroll-margin-top:110px}
.prose h3{font-family:var(--f-display);font-weight:700;font-size:21px;line-height:1.3;letter-spacing:-.01em;color:var(--t);margin-top:2em;scroll-margin-top:110px}
.prose>h2:first-child,.prose>h3:first-child{margin-top:0}
.prose h2+*,.prose h3+*{margin-top:.8em}
.prose strong{color:var(--t);font-weight:600}
.prose a{color:var(--t);text-decoration:underline;text-decoration-color:var(--t40);text-decoration-thickness:1px;text-underline-offset:.22em;transition:text-decoration-color .3s}
.prose a:hover{text-decoration-color:var(--t)}
.prose ul,.prose ol{margin-bottom:0;padding-inline-start:1.4em}
.prose li+li{margin-top:.6em}
.prose li::marker{color:var(--t40)}
.prose ol>li::marker{font-family:var(--f-display);font-size:.85em;font-weight:500}
.prose blockquote{margin:1.8em 0 0;padding-inline-start:24px;border-inline-start:1px solid var(--t40)}
.prose blockquote p{font-family:var(--f-display);font-weight:300;font-size:clamp(21px,2vw,27px);line-height:1.35;letter-spacing:-.01em;color:var(--t)}
.prose blockquote p+p{margin-top:.6em}
.prose figure{margin:2.2em 0 0}
.prose img{display:block;width:100%;height:auto;border-radius:12px}
.prose figcaption{font-size:13px;color:var(--t60);margin-top:12px}
.prose hr{border:0;border-top:1px solid var(--line);margin-block:2.6em}
.prose code{font-size:.88em;background:var(--graphite);padding:.12em .4em;border-radius:4px}
.prose bdi{unicode-bidi:isolate}
.prose :lang(ar),.lede :lang(ar){font-family:var(--f-ar)}
@media (max-width:560px){.prose{font-size:17px}}

/* Arabic pages count in Arabic-Indic digits, like the rest of /ar/ */
[dir="rtl"] .prose ol{list-style-type:arabic-indic}
[dir="rtl"] .toc a::before{content:counter(toc,arabic-indic)}

/* Arabic reads better with a little more room */
[dir="rtl"] .prose{line-height:1.9}
[dir="rtl"] .prose p,[dir="rtl"] .prose li{line-height:1.9}
[dir="rtl"] .p-hero.post-hero h1{line-height:1.25;max-width:18ch}
[dir="rtl"] .post-row h2,[dir="rtl"] .post-row h3{line-height:1.35}
[dir="rtl"] .prose h2{line-height:1.35}

/* related articles under a post */
.post-more{padding-top:clamp(64px,8vw,112px)}
.post-more .shead{margin-bottom:clamp(32px,4vw,56px)}
.post-more .shead h2{font-size:var(--fs-h2)}
.post-more .shead .label{margin-bottom:14px}
