/* Blog Specific Styles */

/* 1. Blog Grid (Index Page) */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-card {
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 133, 255, 0.15);
}

.blog-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.1);
}

.blog-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.blog-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    font-weight: 600;
    color: var(--primary);
    margin-top: auto;
}

/* 2. Article Page (Single Post) */
.article-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Site Header Overrides for Blog */
header.glass-card {
    z-index: 1000;
    position: fixed;
    top: 0;
    width: 100%;
}

.article-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--text), var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.article-meta {
    color: var(--text-muted);
    font-size: 1rem;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
}

.article-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.article-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: var(--text);
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.article-content a:hover {
    color: var(--accent);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Article Figure & Image Styling */
.article-image {
    margin: 2rem 0;
    width: 100%;
}

.article-image picture {
    display: block;
    width: 100%;
}

.article-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-image img:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 30px rgba(0, 133, 255, 0.15);
}

.article-image figcaption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
    line-height: 1.5;
    padding: 0 1rem;
}

/* Light mode adjustments */
.light-mode .article-image img {
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.light-mode .article-image img:hover {
    box-shadow: 0 8px 30px rgba(0, 133, 255, 0.2);
}



/* Responsive */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .article-title {
        font-size: 2rem;
    }
}