/* ============================================================
   OAIS Blog — Styles
   Extends the main site stylesheet (../styles.css)
   ============================================================ */

/* --- Nav Override for Blog Pages ---
   Main site nav starts transparent (hero behind it).
   Blog pages have content immediately, so nav needs a
   solid background and z-index at all times. */
.nav {
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
}

html.light .nav {
    background: rgba(255, 255, 255, 0.95);
}

/* --- Blog Layout --- */
.blog-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Blog Listing Page --- */
.blog-hero {
    padding: calc(var(--nav-height) + 4rem) 0 3rem;
    background: var(--bg-primary);
}

.blog-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.blog-hero p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Post Cards (listing) --- */
.blog-posts {
    padding: 0 0 5rem;
}

.post-card {
    display: block;
    padding: 2.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    margin-bottom: 1.5rem;
    transition: border-color var(--transition-base), background var(--transition-base), transform var(--transition-base);
    text-decoration: none;
}

.post-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
}

.post-card-category {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue-light);
    margin-bottom: 0.75rem;
    display: block;
}

.post-card h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
}

.post-card-subtitle {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1rem;
}

.post-card-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}

/* --- Article Page --- */
.article-header {
    padding: calc(var(--nav-height) + 4rem) 0 2.5rem;
    background: var(--bg-primary);
}

.article-category {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue-light);
    margin-bottom: 1.25rem;
    display: block;
}

.article-header h1 {
    font-size: clamp(1.75rem, 4.5vw, 2.65rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}

.article-subtitle {
    font-size: 1.08rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.75rem;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

/* --- Article Body --- */
.article-body {
    padding: 3rem 0 5rem;
}

.article-body p {
    font-size: 1.02rem;
    color: var(--text-secondary);
    line-height: 1.85;
    margin-bottom: 1.5rem;
}

.article-body h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
}

.article-body h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--white);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-body ul,
.article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-body li {
    font-size: 1.02rem;
    color: var(--text-secondary);
    line-height: 1.85;
    margin-bottom: 0.5rem;
    list-style: disc;
}

.article-body ol li {
    list-style: decimal;
}

.article-body strong {
    color: var(--white);
    font-weight: 600;
}

.article-body a {
    color: var(--blue-light);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.article-body a:hover {
    color: #60a5fa;
}

/* --- Callout / Blockquote --- */
.article-callout {
    border-left: 3px solid var(--blue);
    padding: 1.5rem 1.75rem;
    margin: 2.5rem 0;
    background: rgba(37, 99, 235, 0.04);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.article-callout p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.75;
    margin-bottom: 0;
}

/* --- CTA Box --- */
.article-cta {
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: var(--radius-xl);
    padding: 2.25rem;
    margin: 3rem 0;
}

.article-cta h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.article-cta p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0;
}

.article-cta a {
    color: var(--blue-light);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* --- Back Link --- */
.blog-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 2rem;
    transition: color 0.2s ease;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}

.blog-back:hover {
    color: var(--blue-light);
}

/* --- Light mode overrides --- */
html.light .article-callout {
    background: rgba(37, 99, 235, 0.04);
}

html.light .article-cta {
    background: rgba(37, 99, 235, 0.03);
    border-color: rgba(37, 99, 235, 0.12);
}

html.light .post-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

html.light .post-card:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(37, 99, 235, 0.2);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .blog-container {
        padding: 0 1.25rem;
    }

    .blog-hero {
        padding: calc(var(--nav-height) + 2.5rem) 0 2rem;
    }

    .article-header {
        padding: calc(var(--nav-height) + 2.5rem) 0 2rem;
    }

    .post-card {
        padding: 1.75rem 1.25rem;
    }

    .article-cta {
        padding: 1.75rem 1.25rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .blog-container {
        padding: 0 1rem;
    }
}
