/**
 * Blog listing + article layouts — aligned with au-home, hub-hero-card, and premium glass surfaces.
 */

.au-home .hero-summary a {
    color: #38bdf8;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.au-home .hero-summary a:hover {
    color: #7dd3fc;
}

[data-theme="light"] .au-home .hero-summary a {
    color: #0284c7;
}

.blog-article-page {
    padding-bottom: 4rem;
}

.blog-article-wrap {
    width: min(1080px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.25rem 0 3.5rem;
}

.blog-article-hero {
    position: relative;
    padding: 1.75rem 1.5rem;
}

.blog-article-hero .blog-article-title {
    max-width: none;
    font-size: clamp(1.65rem, 2.8vw, 2.85rem);
    line-height: 1.1;
}

.blog-article-hero .blog-article-title code {
    font-size: 0.88em;
    padding: 0.12em 0.35em;
    border-radius: 0.35rem;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: #7dd3fc;
}

[data-theme="light"] .blog-article-hero .blog-article-title code {
    color: #0369a1;
    background: rgba(14, 165, 233, 0.1);
}

.blog-article-topic {
    position: absolute;
    top: 1rem;
    right: 1rem;
    max-width: min(200px, 46vw);
    text-align: right;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 1.75rem;
    padding: 0 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--home-border);
    background: rgba(56, 189, 248, 0.08);
    color: var(--home-text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.25;
}

.blog-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.blog-meta-row span {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--home-border);
    background: rgba(56, 189, 248, 0.06);
    color: var(--home-text);
    font-size: 0.82rem;
    font-weight: 600;
}

.blog-article-panel {
    margin-top: 1.25rem;
    padding: 1.5rem 1.35rem;
}

.blog-prose {
    max-width: 72ch;
}

.blog-prose > *:first-child {
    margin-top: 0;
}

.blog-prose h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    scroll-margin-top: 100px;
    color: var(--home-text-strong);
    font-family: "Outfit", "Inter", sans-serif;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.2;
    font-weight: 700;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.blog-prose h3 {
    margin-top: 1.65rem;
    margin-bottom: 0.65rem;
    scroll-margin-top: 100px;
    color: var(--home-text-strong);
    font-size: 1.08rem;
    font-weight: 700;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.blog-prose p,
.blog-prose li {
    color: var(--home-text);
    line-height: 1.8;
    font-size: 1rem;
}

.blog-prose ul,
.blog-prose ol {
    padding-left: 1.25rem;
}

.blog-prose a {
    color: #38bdf8;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.blog-prose a:hover {
    color: #7dd3fc;
}

[data-theme="light"] .blog-prose a {
    color: #0284c7;
}

.blog-prose code {
    padding: 0.12em 0.4em;
    border-radius: 0.35rem;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.18);
    color: var(--home-text-strong);
    font-size: 0.88em;
}

.blog-prose pre {
    margin: 1.25rem 0;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    background: rgba(2, 6, 23, 0.92);
    color: #e2e8f0;
    overflow-x: auto;
    font-size: 0.86rem;
    line-height: 1.65;
    border: 1px solid rgba(56, 189, 248, 0.12);
}

.blog-prose pre code {
    padding: 0;
    background: transparent;
    border: 0;
    color: inherit;
    font-size: inherit;
}

.blog-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid var(--home-border);
    background: rgba(15, 23, 42, 0.35);
}

[data-theme="light"] .blog-prose table {
    background: rgba(248, 250, 252, 0.95);
}

.blog-prose th,
.blog-prose td {
    padding: 0.85rem 1rem;
    text-align: left;
    vertical-align: top;
    border-top: 1px solid var(--home-border);
    color: var(--home-text);
}

.blog-prose thead th {
    border-top: 0;
    background: rgba(56, 189, 248, 0.12);
    color: var(--home-text-strong);
    font-weight: 700;
}

.blog-note {
    padding: 1.1rem 1.15rem;
    border-radius: 1rem;
    margin: 1.5rem 0;
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.1), rgba(45, 212, 191, 0.06));
    border: 1px solid rgba(56, 189, 248, 0.22);
}

.blog-note strong {
    color: var(--home-text-strong);
}

.blog-note p {
    margin: 0.5rem 0 0;
}

.blog-quick-nav {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 1.25rem 0 2rem;
}

.blog-quick-nav a {
    display: block;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    border: 1px solid var(--home-border);
    background: rgba(15, 23, 42, 0.45);
    color: var(--home-text-strong);
    text-decoration: none;
    font-weight: 700;
    line-height: 1.5;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="light"] .blog-quick-nav a {
    background: rgba(255, 255, 255, 0.85);
}

.blog-quick-nav a:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.2);
}

.blog-quick-nav a span {
    display: block;
    margin-top: 0.25rem;
    color: var(--home-text-muted);
    font-size: 0.88rem;
    font-weight: 500;
}

/* Listing: post cards use topic-map grid + glass link cards */
.blog-post-card {
    min-height: 100%;
    text-align: left;
}

.blog-post-card h2 {
    margin: 0.65rem 0 0;
    font-size: 1.12rem;
    line-height: 1.35;
    color: var(--home-text-strong);
    font-family: "Outfit", "Inter", sans-serif;
}

.blog-post-card .blog-post-summary {
    margin: 0.65rem 0 0;
    flex: 1;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--home-text);
}

.blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--home-text-muted);
}

.blog-post-cta {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #38bdf8;
}

.blog-post-card:hover .blog-post-cta {
    color: #7dd3fc;
}

@media (max-width: 640px) {
    .blog-article-topic {
        position: static;
        max-width: none;
        text-align: left;
        justify-content: flex-start;
        margin-bottom: 0.75rem;
    }

    .blog-prose table,
    .blog-prose thead,
    .blog-prose tbody,
    .blog-prose tr,
    .blog-prose th,
    .blog-prose td {
        display: block;
        width: 100%;
    }

    .blog-prose thead {
        display: none;
    }

    .blog-prose tr {
        margin-bottom: 0.5rem;
    }

    .blog-prose td {
        border-top: 1px solid var(--home-border);
    }
}
