/* Blog post reading layout: a calm column, glass figures, numbered sections, a reading-progress bar. */
.article-page { max-width: 780px; }
.article-header h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.05; letter-spacing: -0.035em; text-wrap: balance; }
.article-summary { font-size: 1.08rem; color: var(--ink-2); max-width: 60ch; }
.article-header .post-meta { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.article-body { font-size: 16.5px; line-height: 1.85; color: var(--ink-2); margin-top: 2.5rem; }
.article-body p { max-width: 68ch; text-wrap: pretty; }
.article-body strong { color: var(--ink); }
.article-body h2 { display: flex; align-items: baseline; gap: .75rem; margin-top: 3.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line);
  font-size: clamp(1.45rem, 3vw, 1.9rem); line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
.article-body .sec-n { flex: none; display: inline-grid; place-items: center; min-width: 2.1rem; height: 2.1rem; padding: 0 .55rem; border-radius: 999px;
  font: 600 .95rem/1 var(--mono); color: var(--accent); background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.6));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); box-shadow: 0 6px 16px -10px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 1px 0 #fff;
  transform: translateY(-.15em); }
.article-body .post-question { margin: 0 0 2rem; padding: 1.4rem 1.6rem; border-radius: 18px; max-width: none; font-size: clamp(1.3rem, 2.6vw, 1.65rem); line-height: 1.35; color: var(--ink);
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.66)); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  box-shadow: 0 18px 40px -26px color-mix(in srgb, var(--accent) 55%, transparent), inset 0 1px 0 #fff; position: relative; }
.article-body .post-question::before { content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 3px; border-radius: 3px; background: var(--accent); }
.article-body .post-question em, .article-body .post-question strong { font-style: normal; }
.article-body a { text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-decoration-thickness: 1.5px; transition: text-decoration-color .2s; }
.article-body a:hover { text-decoration-color: var(--accent); }
.article-body .post-fig { margin: 2.25rem -1rem; padding: 14px; border-radius: 20px; background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.72));
  border: 1px solid var(--line); box-shadow: 0 26px 50px -34px rgba(27,27,27,.45), inset 0 1px 0 #fff; }
.article-body .post-fig img { display: block; width: 100%; height: auto; border-radius: 10px; background: #fff; }
.article-body .post-fig figcaption { margin: .75rem .25rem .1rem; font: 500 12px/1.5 var(--mono); color: var(--ink-3); }
[data-theme=dark] .article-body .sec-n, [data-theme=dark] .article-body .post-question, [data-theme=dark] .article-body .post-fig {
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); box-shadow: 0 18px 40px -26px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.12); }
[data-theme=dark] .article-body .post-fig img { filter: brightness(.94); }
/* Reading progress along the top edge, where the browser supports scroll-driven animation. */
@supports (animation-timeline: scroll()) {
  .article-page::before { content: ""; position: fixed; z-index: 60; inset: 0 0 auto 0; height: 3px; transform-origin: 0 50%;
    background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 55%, #fff), var(--accent)); animation: post-progress linear both; animation-timeline: scroll(root); }
  @keyframes post-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}
@keyframes post-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.article-header, .article-body > * { animation: post-rise .25s cubic-bezier(.16,1,.3,1) both; }
@media (max-width: 640px) { .article-body { font-size: 15.5px; } .article-body .post-fig { margin: 1.75rem 0; padding: 8px; border-radius: 14px; } .article-body .post-question { padding: 1.1rem 1.2rem; } }
@media (prefers-reduced-motion: reduce) { .article-header, .article-body > * { animation: none; } }
