/* ========================================
   BLOG POST — EDITORIAL STYLES
   ======================================== */

.blog-post {
    --post-text: #C9D1D9;
    --post-muted: #8B949E;
    --post-accent: #58A6FF;
    --post-border: rgba(139, 148, 158, 0.2);
    --post-surface: #0F1218;

    width: min(100% - 40px, 760px);
    margin: 0 auto;
    padding: 72px 0 96px;
    color: var(--post-text);
}

/* ---------- Article header ---------- */

.blog-post .post-header {
    margin-bottom: 56px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--post-border);
}

.blog-post .post-header h1 {
    margin: 0 0 24px;
    color: #E6EDF3;
    font-size: clamp(2.2rem, 6vw, 3.75rem);
    font-weight: 750;
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.blog-post .post-meta {
    margin: 0;
    color: var(--post-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.blog-post .post-meta time {
    color: #C9D1D9;
}

/* ---------- Article content ---------- */

.blog-post .post-content {
    font-size: 1.075rem;
    line-height: 1.9;
    overflow-wrap: break-word;
}

.blog-post .post-content > p:first-child {
    margin-top: 0;
    color: #E6EDF3;
    font-size: 1.2rem;
    line-height: 1.8;
}

.blog-post .post-content p {
    margin: 0 0 1.6em;
}

.blog-post .post-content section {
    margin-top: 52px;
}

.blog-post .post-content h2 {
    position: relative;
    margin: 0 0 22px;
    padding-bottom: 14px;
    color: #E6EDF3;
    font-size: clamp(1.5rem, 3vw, 1.9rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

.blog-post .post-content h2::after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 42px;
    height: 3px;
    border-radius: 2px;
    background: var(--post-accent);
    content: "";
}

.blog-post .post-content a {
    color: var(--post-accent);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 4px;
    transition:
            color 180ms ease,
            text-decoration-color 180ms ease;
}

.blog-post .post-content a:hover {
    color: #79C0FF;
    text-decoration-color: currentColor;
}

.blog-post .post-content a:focus-visible,
.blog-post .post-footer a:focus-visible {
    outline: 2px solid var(--post-accent);
    outline-offset: 5px;
    border-radius: 2px;
}

/* ---------- Inline code ---------- */

.blog-post .post-content code {
    padding: 0.15em 0.4em;
    border: 1px solid var(--post-border);
    border-radius: 5px;
    background: var(--post-surface);
    color: #79C0FF;
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 0.88em;
}

/* ---------- Article footer ---------- */

.blog-post .post-footer {
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px solid var(--post-border);
}

.blog-post .post-footer a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--post-accent);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition:
            color 180ms ease,
            gap 180ms ease;
}

.blog-post .post-footer a:hover {
    gap: 13px;
    color: #79C0FF;
}

/* ---------- Responsive layout ---------- */

@media (max-width: 600px) {
    .blog-post {
        width: calc(100% - 36px);
        padding: 48px 0 64px;
    }

    .blog-post .post-header {
        margin-bottom: 36px;
        padding-bottom: 24px;
    }

    .blog-post .post-content {
        font-size: 1rem;
        line-height: 1.85;
    }

    .blog-post .post-content > p:first-child {
        font-size: 1.075rem;
    }

    .blog-post .post-content section {
        margin-top: 40px;
    }

    .blog-post .post-footer {
        margin-top: 48px;
    }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .blog-post .post-content a,
    .blog-post .post-footer a {
        transition: none;
    }
}