/* Blog editorial layout. Site chrome (topbar/footer) comes from site-pages.css
   + footer.css; this owns the reading column and inherits the Old Light visual
   language: near-black void, frosted steel-blue panels, amber accents, cyan
   links, light-weight headings, monospace uppercase labels. */

:root {
    --ol-amber: #ffb457;
    --ol-amber-hi: #ffcb84;
    --ol-cyan: #7fdbff;
    --ol-text: #cfd8e8;
    --ol-bright: #e8eef7;
    --ol-muted: #7a8aa6;
    --ol-panel: rgba(10, 16, 36, 0.88);
    --ol-border: rgba(74, 111, 165, 0.18);
    --ol-mono: ui-monospace, "JetBrains Mono", monospace;
    --ol-sans: "Inter", -apple-system, system-ui, sans-serif;
}

/* Keyboard skip-link: off-screen until focused, then pinned top-left so a
   keyboard/screen-reader user can jump past the topbar to the article. */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 10px 16px;
    background: var(--ol-amber);
    color: #0a1024;
    font-family: var(--ol-mono);
    font-size: 13px;
    letter-spacing: 0.04em;
    text-decoration: none;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    left: 0;
}

.blog-article,
.blog-index {
    max-width: 760px;
    margin: 0 auto;
    padding: 56px 20px 72px;
    color: var(--ol-text);
    font-family: var(--ol-sans);
}

/* Monospace amber eyebrow above the H1 and on cards. */
.blog-kicker,
.blog-card-kicker {
    display: block;
    color: var(--ol-amber);
    font-family: var(--ol-mono);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 11px;
    margin: 0 0 14px;
}

.blog-article h1,
.blog-index h1 {
    font-size: clamp(30px, 4.4vw, 46px);
    font-weight: 300;
    line-height: 1.12;
    letter-spacing: -0.015em;
    color: var(--ol-bright);
    margin: 0 0 14px;
}

.blog-byline {
    color: var(--ol-muted);
    font-family: var(--ol-mono);
    font-size: 12px;
    letter-spacing: 0.02em;
    margin-bottom: 28px;
}

.blog-meta-sep {
    opacity: 0.5;
    padding: 0 0.3em;
}

.blog-back {
    display: inline-block;
    margin-bottom: 26px;
    color: var(--ol-muted);
    font-family: var(--ol-mono);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 11px;
    text-decoration: none;
    transition: color 0.12s;
}

.blog-back:hover {
    color: var(--ol-amber);
}

/* Hero + inline figures: frosted panel framing to match the site's cards. */
.blog-hero,
.blog-body figure {
    margin: 0 0 28px;
    border: 1px solid var(--ol-border);
    border-radius: 6px;
    overflow: hidden;
    background: #05070d;
}

.blog-hero {
    margin-bottom: 36px;
}

.blog-hero img {
    display: block;
    width: 100%;
    height: auto;
}

.blog-body figure {
    margin: 28px 0;
}

.blog-body figcaption {
    padding: 10px 14px;
    color: var(--ol-muted);
    font-size: 13px;
    border-top: 1px solid var(--ol-border);
}

/* Body images get the same panel frame as the hero. marked wraps a standalone
   image in a <p>, so target every img and undo the frame inside a <figure>
   (which already provides one). */
.blog-body img {
    display: block;
    width: 100%;
    height: auto;
    margin: 28px 0;
    border: 1px solid var(--ol-border);
    border-radius: 6px;
}

.blog-body figure img {
    margin: 0;
    border: none;
    border-radius: 0;
}

.blog-body {
    font-size: 1.08rem;
    line-height: 1.78;
}

.blog-body h2,
.blog-body h3 {
    color: var(--ol-bright);
    font-weight: 300;
    letter-spacing: -0.01em;
    margin: 2.4rem 0 0.8rem;
    scroll-margin-top: 84px;
}

.blog-body h2 {
    font-size: clamp(22px, 2.4vw, 28px);
}

.blog-body h3 {
    font-size: 19px;
    font-weight: 600;
}

.blog-body p {
    margin: 0 0 1.4rem;
}

.blog-anchor {
    margin-left: 0.45rem;
    color: var(--ol-amber);
    opacity: 0;
    font-weight: 400;
    text-decoration: none;
    transition: opacity 0.12s ease;
}

.blog-body h2:hover .blog-anchor,
.blog-body h3:hover .blog-anchor,
.blog-body h2:focus-within .blog-anchor,
.blog-body h3:focus-within .blog-anchor {
    opacity: 0.7;
}

.blog-body a {
    color: var(--ol-cyan);
    text-decoration: none;
    border-bottom: 1px solid rgba(127, 219, 255, 0.3);
    transition: border-color 0.12s;
}

.blog-body a:hover {
    border-bottom-color: var(--ol-cyan);
}

.blog-body ul,
.blog-body ol {
    margin: 0 0 1.4rem;
    padding-left: 1.3rem;
}

.blog-body li {
    margin: 0.4rem 0;
}

.blog-body blockquote {
    margin: 1.6rem 0;
    padding: 0.2rem 0 0.2rem 1.1rem;
    border-left: 2px solid var(--ol-amber);
    color: var(--ol-bright);
}

.blog-body code {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ol-cyan);
    font-family: var(--ol-mono);
    font-size: 0.88em;
    padding: 0.12rem 0.36rem;
    border-radius: 4px;
}

/* Mid-post call to action: frosted panel with an amber glow and a glowing
   button, tuned to pull the eye and invite the click. */
.blog-cta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
    margin: 3rem 0;
    padding: 26px 28px;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(255, 180, 87, 0.1), transparent 60%),
        var(--ol-panel);
    border: 1px solid rgba(255, 180, 87, 0.35);
    border-radius: 8px;
    backdrop-filter: blur(6px);
    overflow: hidden;
}

/* Faint amber halo so the block reads as the page's brightest element. */
.blog-cta::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(255, 180, 87, 0.08) inset;
    pointer-events: none;
}

.blog-cta-body {
    flex: 1 1 260px;
}

.blog-cta-kicker {
    margin: 0 0 8px;
    color: var(--ol-amber);
    font-family: var(--ol-mono);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 11px;
}

.blog-cta-text {
    margin: 0;
    color: var(--ol-bright);
    font-size: 16px;
    line-height: 1.5;
}

.blog-cta-action {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

/* Scoped under .blog-cta so it beats the `.blog-body a` link styling
   (which would otherwise paint the button text cyan with an underline). */
.blog-cta .blog-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    background: var(--ol-amber);
    color: #0a1024;
    border: 1px solid var(--ol-amber);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: var(--ol-mono);
    font-size: 13px;
    font-weight: 600;
    padding: 14px 26px;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 0 0 rgba(255, 180, 87, 0);
    transition:
        background 0.14s,
        border-color 0.14s,
        box-shadow 0.14s,
        transform 0.14s;
}

.blog-cta .blog-cta-btn span {
    color: #0a1024;
}

/* Animated affordance arrow (CSS glyph, not content) that nudges on hover. */
.blog-cta .blog-cta-btn::after {
    content: "\2192";
    display: inline-block;
    color: #0a1024;
    transition: transform 0.14s ease;
}

.blog-cta .blog-cta-btn:hover {
    background: var(--ol-amber-hi);
    border-color: var(--ol-amber-hi);
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(255, 180, 87, 0.28);
}

.blog-cta .blog-cta-btn:hover::after {
    transform: translateX(3px);
}

.blog-cta-note {
    text-align: center;
    color: var(--ol-muted);
    font-family: var(--ol-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
}

/* Index intro + footer link. */
.blog-index-intro {
    color: var(--ol-muted);
    font-size: 16px;
    margin: 0 0 36px;
}

.blog-index-foot {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--ol-border);
    font-family: var(--ol-mono);
    font-size: 13px;
    letter-spacing: 0.04em;
}

.blog-index-foot a {
    color: var(--ol-amber);
    text-decoration: none;
}

.blog-index-foot a:hover {
    color: var(--ol-amber-hi);
}

/* Index cards: frosted steel-blue panels, amber accent on hover. */
.blog-card-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
}

.blog-card a {
    display: block;
    padding: 22px 24px;
    background: var(--ol-panel);
    border: 1px solid var(--ol-border);
    border-radius: 6px;
    backdrop-filter: blur(6px);
    text-decoration: none;
    transition:
        border-color 0.15s ease,
        transform 0.15s ease;
}

.blog-card a:hover {
    border-color: rgba(255, 180, 87, 0.45);
    transform: translateY(-1px);
}

.blog-card-kicker {
    margin-bottom: 10px;
}

.blog-card h2 {
    margin: 0 0 0.45rem;
    font-size: 1.35rem;
    font-weight: 300;
    letter-spacing: -0.01em;
    color: var(--ol-bright);
}

.blog-card-desc {
    margin: 0 0 0.7rem;
    color: var(--ol-text);
    line-height: 1.55;
}

.blog-card-meta {
    color: var(--ol-muted);
    font-family: var(--ol-mono);
    font-size: 12px;
    letter-spacing: 0.02em;
}

@media (max-width: 560px) {
    .blog-cta {
        flex-direction: column;
        align-items: stretch;
    }
    /* In the column layout the row-width basis (260px) becomes a HEIGHT basis
       and forces a tall empty gap above the button. Reset it so the body sizes
       to its content. */
    .blog-cta-body {
        flex: 0 0 auto;
    }
    .blog-cta-action {
        width: 100%;
    }
    .blog-cta .blog-cta-btn {
        width: 100%;
    }
}

/* Older / Newer post navigation at the foot of each article */
.blog-postnav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 3rem 0 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--ol-border);
}
.blog-postnav-link,
.blog-postnav-slot {
    flex: 1 1 0;
    min-width: 0;
}
.blog-postnav-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    background: var(--ol-panel);
    border: 1px solid var(--ol-border);
    border-radius: 8px;
    text-decoration: none;
    transition:
        border-color 0.12s,
        transform 0.12s;
}
.blog-postnav-link:hover {
    border-color: rgba(255, 180, 87, 0.45);
    transform: translateY(-1px);
}
.blog-postnav-newer {
    text-align: right;
}
.blog-postnav-label {
    font-family: var(--ol-mono);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 11px;
    color: var(--ol-amber);
}
.blog-postnav-older .blog-postnav-label::before {
    content: "\2190  ";
}
.blog-postnav-newer .blog-postnav-label::after {
    content: "  \2192";
}
.blog-postnav-title {
    color: var(--ol-bright);
    font-size: 15px;
    line-height: 1.35;
}
@media (max-width: 560px) {
    .blog-postnav {
        flex-direction: column;
    }
    .blog-postnav-slot {
        display: none;
    }
    .blog-postnav-newer {
        text-align: left;
    }
    .blog-postnav-newer .blog-postnav-label::after {
        content: "";
    }
}
