/* ==========================================================================
   Blog — Editorial Design System
   Dark theme with gold accents, inspired by design reference
   ========================================================================== */

:root {
    --b-gold: #FFD700;
    --b-gold-dim: rgba(255, 215, 0, 0.3);
    --b-bg: #0A0A0A;
    --b-surface: #12151C;
    --b-white: #ffffff;
    --b-off-white: #E2E8F0;
    --b-muted: #64748B;
    --b-border: rgba(255, 255, 255, 0.1);
    --b-border-subtle: rgba(255, 255, 255, 0.05);
    --b-sans: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --b-serif: 'Noto Serif', Georgia, serif;
    --b-radius: 0.75rem;
}

/* Shell — override site-wide styles */
.blog-shell {
    background: var(--b-bg);
    color: var(--b-off-white);
    font-family: var(--b-sans);
    -webkit-font-smoothing: antialiased;
    width: 100%;
    overflow-x: hidden;
}

.blog-shell ::selection {
    background: var(--b-gold);
    color: var(--b-bg);
}

.blog-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   Blog list — grid layouts only
   Card visuals + featured-post styling live in listings.css
   ========================================================================== */

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    padding-bottom: 48px;
}

@media (max-width: 900px) {
    .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .post-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ==========================================================================
   Blog Pagination — homepage-aligned design
   ========================================================================== */

.blog-pagination {
    padding: 48px 0 88px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.pagination-list {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-list > li {
    display: flex;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    font-family: 'Public Sans', sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.55);
    background: #171717;
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.pagination-link:hover:not(.pagination-active):not(.pagination-disabled) {
    color: #FFD700;
    border-color: rgba(255, 215, 0, 0.45);
    background: #1f1f1f;
    transform: translateY(-1px);
}

.pagination-active {
    background: #FFD700 !important;
    color: #0A0A0A !important;
    border-color: #FFD700 !important;
    font-weight: 900;
    cursor: default;
    box-shadow: 0 6px 18px rgba(255, 215, 0, 0.18);
}

.pagination-step {
    padding: 0 18px;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.14em;
}

.pagination-step .material-symbols-outlined {
    font-size: 16px;
}

.pagination-step-label {
    display: inline;
}

.pagination-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 44px;
    font-family: 'Public Sans', sans-serif;
    font-size: 16px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.08em;
}

.pagination-summary {
    font-family: 'Public Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.pagination-summary strong {
    color: #FFD700;
    font-weight: 900;
}

@media (max-width: 600px) {
    .pagination-step-label { display: none; }
    .pagination-step { padding: 0 12px; min-width: 44px; }
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.blog-empty {
    text-align: center;
    padding: 120px 24px;
    color: var(--b-muted);
}

.blog-empty h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--b-white);
    margin: 16px 0 8px;
}

.blog-empty p {
    font-size: 0.9rem;
}

/* ==========================================================================
   Blog Single — Article
   ========================================================================== */

.blog-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px 0;
}

/* Breadcrumb */
.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--b-muted);
    margin-bottom: 32px;
}

.article-breadcrumb a {
    color: var(--b-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.article-breadcrumb a:hover {
    color: var(--b-gold);
}

.bc-sep {
    font-size: 10px;
    opacity: 0.4;
}

.bc-current {
    color: var(--b-off-white);
}

/* Title */
.article-main-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--b-white);
    margin: 0 0 32px;
}

.article-subtitle {
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--b-muted);
    line-height: 1.5;
    margin: -16px 0 32px;
}

/* Author Bar */
.article-author-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    border-top: 1px solid var(--b-border);
    border-bottom: 1px solid var(--b-border);
    padding: 20px 0;
    margin-bottom: 40px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--b-surface);
    border: 2px solid var(--b-gold-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--b-gold);
}

.author-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--b-white);
    margin: 0;
    line-height: 1.3;
}

.author-meta {
    font-size: 13px;
    color: var(--b-muted);
    margin: 2px 0 0;
}

.article-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reading-time {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--b-muted);
}

.reading-time .material-symbols-outlined {
    font-size: 18px;
}

.action-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--b-muted);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.action-icon:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--b-off-white);
}

.action-icon .material-symbols-outlined {
    font-size: 20px;
}

/* Hero Image */
.article-hero-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--b-radius);
    overflow: hidden;
    margin-bottom: 48px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    ring: 1px solid var(--b-border);
}

.article-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Callout */
.article-callout {
    background: var(--b-surface);
    border-left: 4px solid var(--b-gold);
    border-radius: 0 var(--b-radius) var(--b-radius) 0;
    padding: 28px 32px;
    margin-bottom: 48px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.callout-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--b-gold);
    margin: 0 0 12px;
}

.article-callout p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--b-off-white);
    opacity: 0.9;
    margin: 0;
}

/* Article Prose */
.article-prose {
    font-family: var(--b-serif);
    max-width: 680px;
    margin: 0 auto 48px;
}

.article-prose p {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--b-off-white);
    margin-bottom: 1.75rem;
}

.article-prose h2 {
    font-family: var(--b-sans);
    font-weight: 700;
    font-size: 1.75rem;
    letter-spacing: -0.025em;
    color: var(--b-white);
    margin: 3rem 0 1.5rem;
}

.article-prose h3 {
    font-family: var(--b-sans);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    color: var(--b-white);
    margin: 2.5rem 0 1rem;
}

.article-prose a {
    color: var(--b-gold);
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: opacity 0.2s;
}

.article-prose a:hover {
    opacity: 0.8;
}

.article-prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--b-radius);
    margin: 2rem 0;
    display: block;
}

/* ==========================================================================
   Image width variants (Medium-style breakout)
   Normal = stays within prose. Wide = breaks out beyond prose on desktop.
   Full = edge-to-edge viewport.
   ========================================================================== */

.article-prose figure {
    margin: 2.5rem 0;
    display: block;
}

.article-prose figure img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--b-radius);
    margin: 0;
    display: block;
}

.article-prose figure figcaption {
    display: block;
    width: 100%;
    margin-top: 14px;
    text-align: center;
    font-family: var(--b-sans);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--b-off-white);
    line-height: 1.5;
    letter-spacing: 0.01em;
}

.article-prose figure figcaption * {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.article-prose figure figcaption p {
    margin: 0;
}

/* Wide — visually protrudes ~180px each side on desktop,
   responsive cap so it never overflows the viewport. */
.article-prose figure.image-wide {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: min(1040px, calc(100vw - 48px));
    max-width: 1040px;
}

/* Full — edge-to-edge viewport, no border radius so it feels immersive. */
.article-prose figure.image-full {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 100vw;
    margin: 3rem 0;
}

.article-prose figure.image-full img {
    border-radius: 0;
}

.article-prose figure.image-full figcaption {
    padding: 0 24px;
}

/* On narrow screens, wide collapses back to prose width — no breakout possible. */
@media (max-width: 900px) {
    .article-prose figure.image-wide {
        width: 100%;
        left: auto;
        transform: none;
    }
}

.article-prose blockquote {
    margin: 2.5rem 0;
    padding: 1.5rem 0 1.5rem 2rem;
    border-left: 5px solid var(--b-gold);
    font-style: italic;
    font-size: 1.35rem;
    font-weight: 300;
    color: var(--b-white);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 var(--b-radius) var(--b-radius) 0;
}

.article-prose blockquote p {
    color: var(--b-white);
    font-size: inherit;
    margin-bottom: 0;
}

.article-prose ul, .article-prose ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.article-prose li {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--b-off-white);
    margin-bottom: 0.5rem;
}

.article-prose pre {
    background: var(--b-surface);
    border: 1px solid var(--b-border);
    border-radius: var(--b-radius);
    padding: 20px 24px;
    overflow-x: auto;
    margin: 2rem 0;
    font-size: 0.9rem;
}

.article-prose code {
    background: var(--b-surface);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.article-prose pre code {
    background: none;
    padding: 0;
}

/* Source Box */
.article-source-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--b-surface);
    border: 1px solid var(--b-border);
    border-radius: var(--b-radius);
    padding: 20px 24px;
    margin-bottom: 40px;
}

.article-source-box .material-symbols-outlined {
    font-size: 24px;
    color: var(--b-gold);
    flex-shrink: 0;
}

.source-text {
    font-size: 13px;
    color: var(--b-muted);
    display: block;
}

.source-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--b-gold);
    text-decoration: none;
}

.source-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Footer Bar — Tags & Share */
.article-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    border-top: 1px solid var(--b-border);
    padding: 32px 0;
    margin-bottom: 48px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-tag {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--b-border-subtle);
    color: var(--b-muted);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.share-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--b-muted);
}

.share-circle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--b-border-subtle);
    color: var(--b-muted);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-circle:hover {
    background: var(--b-gold);
    color: var(--b-bg);
    border-color: var(--b-gold);
}

.share-circle .material-symbols-outlined {
    font-size: 20px;
}

/* ==========================================================================
   Continue Reading
   ========================================================================== */

.blog-related {
    border-top: 1px solid var(--b-border);
    padding: 64px 0 80px;
}

.related-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--b-white);
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 40px;
}

.heading-bar {
    display: block;
    width: 32px;
    height: 2px;
    background: var(--b-gold);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
    .featured-post {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .post-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 600px) {
    .blog-hero {
        padding: 48px 0 32px;
    }

    .post-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .article-main-title {
        font-size: 1.75rem;
    }

    .article-author-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-footer-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-prose blockquote {
        font-size: 1.1rem;
        padding-left: 1.2rem;
    }
}
