/**
 * Blog Styles
 *
 * Styles for blog list and single post templates.
 * Optimized for content discovery and reading experience.
 */

/* ============================================
   BLOG LIST PAGE
   ============================================ */

.blog-container {
    max-width: var(--content-max-width, 1200px);
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
    /* Match docs/resume padding pattern */
}

.blog-header {
    margin-bottom: var(--space-12);
    padding: var(--space-8) 0;
    text-align: center;
}

/* Moved to layouts/page-header.css - use .page-header.page-header--centered */

.blog-description {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    /* Match docs/resume text color pattern */
    max-width: 600px;
    margin: 0 auto;
    line-height: var(--leading-relaxed);
    /* Match docs/resume for readability */
}

.blog-count {
    margin-top: var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    /* Match docs/resume text color pattern */
}

/* Blog Section Titles */
.blog-section-title {
    font-size: var(--text-2xl);
    /* Increased from xl for better hierarchy */
    font-weight: var(--weight-bold);
    /* Increased from semibold for better prominence */
    color: var(--color-text-primary);
    margin-bottom: var(--space-8);
    /* Increased from space-6 */
    padding-bottom: var(--space-3);
    border-block-end: 2px solid var(--color-border-light);
    /* Match resume pattern */
    transition: border-color var(--transition-fast) var(--ease-out);
}

.blog-section-title:hover {
    border-block-end-color: var(--color-primary);
    /* Match resume hover pattern */
}

/* Featured Posts Section */
.blog-featured {
    margin-bottom: var(--space-12);
    padding-bottom: var(--space-8);
    border-block-end: 1px solid var(--color-border-light);
    /* Visual separation */
}

.blog-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-6);
}

/* Force single column on very small screens */
@media (max-width: 399px) {
    .blog-featured-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .blog-featured-grid {
        grid-template-columns: 1fr;
    }
}

/* Blog Post List */
.blog-posts {
    margin-bottom: var(--space-12);
    margin-top: var(--space-8);
    /* Add top margin for separation */
}

.blog-post-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

/* Virtualize blog post lists unless DevTools are open */
html:not([data-devtools-open]) .blog-post-list > * {
  content-visibility: auto;
  contain-intrinsic-size: 200px;
}

/* Scroll-driven animations for blog posts */
.blog-post-list.stagger-fade-in>* {
    /* Will be animated by scroll-animations.css */
}

/* Blog Post Cards */
.blog-post-card,
.blog-featured-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    /* Already 12px - good! */
    overflow: hidden;
    box-shadow: var(--elevation-card);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
    position: relative;
}

/* Gradient border support */
.blog-post-card.gradient-border,
.blog-featured-card.gradient-border {
    border: none;
}

.blog-post-card.fluid-combined,
.blog-featured-card.fluid-combined {
    border: none;
}

/* Motion gradient background on hover */
.blog-post-card::before,
.blog-featured-card::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at 40% 40%,
            color-mix(in srgb, var(--blob-color-1) 6%, transparent) 0%,
            color-mix(in srgb, var(--blob-color-2) 4%, transparent) 25%,
            transparent 50%);
    border-radius: 50%;
    animation: blob-morph var(--blob-duration-slow) ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-post-card:hover::before,
.blog-featured-card:hover::before {
    opacity: 1;
}

.blog-post-card>*,
.blog-featured-card>* {
    position: relative;
    z-index: 1;
}

/* Fallback for browsers without color-mix */
@supports not (color: color-mix(in srgb, black, white)) {

    .blog-post-card::before,
    .blog-featured-card::before {
        background: radial-gradient(circle at 40% 40%,
                rgba(59, 130, 246, 0.06) 0%,
                rgba(139, 92, 246, 0.04) 25%,
                transparent 50%);
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {

    .blog-post-card::before,
    .blog-featured-card::before {
        animation: none !important;
    }
}

.blog-post-card:hover,
.blog-featured-card:hover {
    box-shadow: var(--elevation-high);
    transform: translate3d(0, -2px, 0);
    transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Disable transform animations on mobile for performance */
@media (max-width: 768px) {

    .blog-post-card:hover,
    .blog-featured-card:hover {
        transform: none;
    }
}

/* Horizontal layout for list items */
.blog-post-card {
    flex-direction: row;
}

@media (max-width: 768px) {
    .blog-post-card {
        flex-direction: column;
    }
}

/* Blog Card Image */
.blog-card-image {
    position: relative;
    overflow: hidden;
    background: var(--color-bg-secondary);
}

.blog-featured-card .blog-card-image {
    aspect-ratio: 16 / 9;
}

.blog-post-card .blog-card-image {
    flex: 0 0 280px;
    aspect-ratio: 16 / 9;
}

@media (max-width: 768px) {
    .blog-post-card .blog-card-image {
        flex: none;
        aspect-ratio: 16 / 9;
    }
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-post-card:hover .blog-card-image img,
.blog-featured-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-image a {
    display: block;
    height: 100%;
}

/* Blog Card Content */
.blog-card-content {
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    flex: 1;
}

.blog-card-title {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-tight);
    /* Match docs heading pattern */
    margin: 0;
}

.blog-card-title a {
    color: var(--color-text-primary);
    text-decoration: none;
}

.blog-card-title a:hover {
    color: var(--color-primary);
}

.blog-card-excerpt {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    /* Match docs/resume text color pattern */
    line-height: var(--leading-relaxed);
    /* Match docs/resume for readability */
    margin: 0;
}

/* Blog Card Metadata */
.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    align-items: center;
    font-size: var(--text-sm);
    color: var(--color-text-primary-muted);
    margin-top: auto;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: var(--weight-medium);
    color: var(--color-text-primary);
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.reading-time {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

/* Blog Tags */
.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.blog-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary-muted);
    text-decoration: none;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    transition: all 0.2s ease;
}

.blog-tag:hover {
    background: var(--color-primary);
    color: white;
}

/* Read More Link */
.blog-read-more {
    display: inline-block;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: var(--weight-medium);
    font-size: var(--text-sm);
}

.blog-read-more:hover {
    text-decoration: underline;
}

/* Empty State */
.blog-empty {
    text-align: center;
    padding: var(--space-12);
    color: var(--color-text-secondary);
    /* Match docs/resume text color pattern */
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
}

/* ============================================
   BLOG SINGLE POST PAGE
   ============================================ */

.blog-post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
    max-width: 1000px;
    /* Increased from 800px for better reading experience */
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
    /* Match docs/resume padding pattern */
}

.blog-post-layout.blog-with-toc {
    grid-template-columns: minmax(0, 1fr) 260px;
    max-width: 1200px;
    gap: var(--space-8);
    /* Increased gap for better separation */
}

@media (max-width: 1024px) {
    .blog-post-layout.blog-with-toc {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        display: none;
    }
}

/* Blog Post Header */
.blog-post-header {
    margin-bottom: var(--space-10);
    /* Increased from space-8 for better separation */
}

.blog-post-image {
    margin: 0 0 var(--space-8) 0;
    border-radius: var(--radius-xl);
    /* Match card border radius pattern */
    overflow: hidden;
    aspect-ratio: 16 / 9;
    box-shadow: var(--elevation-card);
    /* Add subtle shadow for depth */
}

.blog-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-post-header h1 {
    margin-bottom: var(--space-6);
    /* Increased spacing for better hierarchy */
    font-size: var(--text-4xl);
    /* Ensure consistent heading size */
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--color-text-primary);
}

.blog-post-header .lead {
    font-size: var(--text-xl);
    /* Increased from lg for better prominence */
    color: var(--color-text-secondary);
    font-weight: var(--weight-normal);
    line-height: var(--leading-relaxed);
    /* Match docs/resume pattern */
    letter-spacing: 0.01em;
    padding-bottom: var(--space-6);
    margin-bottom: 0;
    border-block-end: 1px solid var(--color-border);
}

/* Blog Post Metadata */
.blog-post-meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-4) 0;
    border-block-start: 1px solid var(--color-border);
    /* Changed from border-top */
    border-block-end: 1px solid var(--color-border);
    /* Changed from border-bottom */
    margin: var(--space-6) 0;
}

.blog-post-author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.blog-post-author .author-avatar {
    width: 48px;
    height: 48px;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.author-title {
    font-size: var(--text-sm);
    color: var(--color-text-primary-muted);
}

.blog-post-details {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    align-items: center;
    font-size: var(--text-sm);
    color: var(--color-text-primary-muted);
}

.blog-post-details>* {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Blog Post Tags */
.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

/* Blog Post Content */
.blog-post-content {
    margin: var(--space-10) 0;
    /* Increased spacing for better reading flow */
    font-family: var(--font-sans);
    line-height: var(--leading-relaxed);
    /* Match docs/resume for readability */
    color: var(--color-text-primary);
}

/* Blog Post Footer */
.blog-post-footer {
    margin-top: var(--space-12);
    padding-top: var(--space-8);
    /* Increased from space-6 */
    border-block-start: 2px solid var(--color-border-light);
    /* Match resume pattern */
}

.blog-updated {
    margin-bottom: var(--space-6);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    /* Match docs/resume text color pattern */
    font-style: italic;
}

/* Author Bio */
.author-bio {
    padding: var(--space-6);
    background: var(--color-bg-secondary);
    /* Match resume summary pattern */
    border-radius: var(--radius-xl);
    /* Match resume pattern */
    border-inline-start: 4px solid var(--color-primary);
    /* Match resume accent border */
    margin: var(--space-8) 0;
    transition: transform var(--transition-smooth) var(--ease-smooth),
        box-shadow var(--transition-smooth) var(--ease-smooth);
    box-shadow:
        inset 0.5px 0.5px 1px rgba(255, 255, 255, 0.3),
        inset -0.5px -0.5px 1px rgba(0, 0, 0, 0.1),
        1px 1px 2px rgba(0, 0, 0, 0.08),
        -0.5px -0.5px 1px rgba(255, 255, 255, 0.2);
}

.author-bio:hover {
    transform: translate3d(0, -2px, 0);
    box-shadow:
        inset 0.5px 0.5px 1.5px rgba(255, 255, 255, 0.4),
        inset -0.5px -0.5px 1.5px rgba(0, 0, 0, 0.12),
        2px 2px 6px rgba(0, 0, 0, 0.1),
        -1px -1px 3px rgba(255, 255, 255, 0.3);
}

.author-bio-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.author-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-bio h3 {
    margin: 0;
    font-size: var(--text-lg);
}

.author-bio-text {
    line-height: var(--leading-relaxed);
    /* Match docs/resume pattern */
    margin: 0;
    color: var(--color-text-secondary);
}

.author-links {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.author-links a {
    color: var(--color-primary);
    text-decoration: none;
    font-size: var(--text-sm);
}

.author-links a:hover {
    text-decoration: underline;
}

/* Social Sharing */
.blog-social-share {
    margin: var(--space-8) 0;
    padding: var(--space-6);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border-light);
}

.blog-social-share h4 {
    font-size: var(--text-lg);
    /* Increased from base for better prominence */
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-4);
    /* Increased spacing */
    color: var(--color-text-primary);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.share-button {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    /* Use design tokens */
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    transition: all var(--transition-fast) var(--ease-out);
    /* Use design tokens */
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.share-button:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-primary);
    transform: translate3d(0, -1px, 0);
    /* Subtle lift effect */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.share-button svg {
    flex-shrink: 0;
}

/* Blog Sidebar */
.blog-sidebar {
    position: sticky;
    top: 80px;
    /* Account for fixed header */
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overscroll-behavior: contain;
    /* Match docs sidebar pattern */
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    padding-inline-start: var(--space-6);
    /* Match docs TOC padding */
}

/* Newsletter CTA */
.newsletter-cta {
    padding: var(--space-6);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.newsletter-cta h3 {
    margin: 0 0 var(--space-2) 0;
    font-size: var(--text-lg);
}

.newsletter-cta p {
    margin: 0 0 var(--space-4) 0;
    font-size: var(--text-sm);
    color: var(--color-text-primary-muted);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.newsletter-form input {
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
}

.newsletter-form button {
    padding: 0.5rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: var(--weight-medium);
    cursor: pointer;
}

.newsletter-form button:hover {
    background: var(--color-primary-hover);
}

/* Comments Section */
.comments-section {
    margin-top: var(--space-12);
    padding: var(--space-8) 0;
    background: var(--color-bg-secondary);
}

.comments-section h2 {
    text-align: center;
    margin-bottom: var(--space-8);
}

.comments-placeholder {
    text-align: center;
    color: var(--color-text-primary-muted);
    font-style: italic;
}

/* ============================================
   BLOG HOME PAGE
   ============================================ */

.blog-home {
    max-width: var(--content-max-width, 1200px);
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
}

/* Blog Home Hero */
.blog-home-hero {
    text-align: center;
    padding: var(--space-12) 0 var(--space-8);
    margin-bottom: var(--space-8);
    border-block-end: 1px solid var(--color-border-light);
}

.blog-home-title {
    font-size: var(--text-4xl);
    font-weight: var(--weight-bold);
    color: var(--color-text-primary);
    margin: 0 0 var(--space-4) 0;
    line-height: var(--leading-tight);
}

.blog-home-subtitle {
    font-size: var(--text-xl);
    color: var(--color-text-secondary);
    margin: 0;
    line-height: var(--leading-relaxed);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.blog-home-content {
    margin-bottom: var(--space-12);
}

/* Blog Home Recent Posts Section */
.blog-home-recent {
    margin: var(--space-12) 0;
}

.blog-home-recent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.blog-home-recent-title {
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
    color: var(--color-text-primary);
    margin: 0;
}

.blog-home-view-all {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: var(--weight-medium);
    font-size: var(--text-base);
    transition: color var(--transition-fast) var(--ease-out);
}

.blog-home-view-all:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

.blog-home-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-6);
}

@media (max-width: 640px) {
    .blog-home-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* Blog Home Post Cards */
.blog-home-post-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--elevation-card);
    transition: all var(--transition-fast) var(--ease-out);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
    position: relative;
}

/* Motion gradient background on hover */
.blog-home-post-card::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at 40% 40%,
            color-mix(in srgb, var(--blob-color-1) 6%, transparent) 0%,
            color-mix(in srgb, var(--blob-color-2) 4%, transparent) 25%,
            transparent 50%);
    border-radius: 50%;
    animation: blob-morph var(--blob-duration-slow) ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-home-post-card:hover::before {
    opacity: 1;
}

.blog-home-post-card>* {
    position: relative;
    z-index: 1;
}

/* Fallback for browsers without color-mix */
@supports not (color: color-mix(in srgb, black, white)) {
    .blog-home-post-card::before {
        background: radial-gradient(circle at 40% 40%,
                rgba(59, 130, 246, 0.06) 0%,
                rgba(139, 92, 246, 0.04) 25%,
                transparent 50%);
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .blog-home-post-card::before {
        animation: none !important;
    }
}

.blog-home-post-card:hover {
    box-shadow: var(--elevation-high);
    transform: translate3d(0, -2px, 0);
}

.blog-home-post-image {
    position: relative;
    overflow: hidden;
    background: var(--color-bg-secondary);
    aspect-ratio: 16 / 9;
}

.blog-home-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-home-post-card:hover .blog-home-post-image img {
    transform: scale(1.05);
}

.blog-home-post-content {
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    flex: 1;
}

.blog-home-post-title {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-tight);
    margin: 0;
}

.blog-home-post-title a {
    color: var(--color-text-primary);
    text-decoration: none;
}

.blog-home-post-title a:hover {
    color: var(--color-primary);
}

.blog-home-post-date {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.blog-home-post-excerpt {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin: 0;
}

.blog-home-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: auto;
}

.blog-home-post-link {
    display: inline-block;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: var(--weight-medium);
    font-size: var(--text-sm);
    margin-top: var(--space-2);
}

.blog-home-post-link:hover {
    text-decoration: underline;
}

/* ============================================
   RECENT POSTS ON HOME PAGE (Generic home.html)
   ============================================ */

.recent-posts {
    margin: var(--space-12) 0;
    padding: var(--space-8) 0;
}

.recent-posts-title {
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-3);
    border-block-end: 2px solid var(--color-border-light);
    transition: border-color var(--transition-fast) var(--ease-out);
}

.recent-posts-title:hover {
    border-block-end-color: var(--color-primary);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-6);
}

@media (max-width: 640px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

/* Post card on home page - reuse blog card styles with some adjustments */
.recent-posts .post-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--elevation-card);
    transition: all var(--transition-fast) var(--ease-out);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
    position: relative;
}

/* Motion gradient background on hover */
.recent-posts .post-card::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at 40% 40%,
            color-mix(in srgb, var(--blob-color-1) 6%, transparent) 0%,
            color-mix(in srgb, var(--blob-color-2) 4%, transparent) 25%,
            transparent 50%);
    border-radius: 50%;
    animation: blob-morph var(--blob-duration-slow) ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recent-posts .post-card:hover::before {
    opacity: 1;
}

.recent-posts .post-card>* {
    position: relative;
    z-index: 1;
}

/* Fallback for browsers without color-mix */
@supports not (color: color-mix(in srgb, black, white)) {
    .recent-posts .post-card::before {
        background: radial-gradient(circle at 40% 40%,
                rgba(59, 130, 246, 0.06) 0%,
                rgba(139, 92, 246, 0.04) 25%,
                transparent 50%);
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .recent-posts .post-card::before {
        animation: none !important;
    }
}

.recent-posts .post-card:hover {
    box-shadow: var(--elevation-high);
    transform: translate3d(0, -2px, 0);
}

.recent-posts .post-card-image {
    position: relative;
    overflow: hidden;
    background: var(--color-bg-secondary);
    aspect-ratio: 16 / 9;
}

.recent-posts .post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recent-posts .post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.recent-posts .post-card-content {
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    flex: 1;
}

.recent-posts .post-card-title {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-tight);
    margin: 0;
}

.recent-posts .post-card-title a {
    color: var(--color-text-primary);
    text-decoration: none;
}

.recent-posts .post-card-title a:hover {
    color: var(--color-primary);
}

.recent-posts .post-card-date {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.recent-posts .post-card-excerpt {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin: 0;
}

.recent-posts .read-more {
    display: inline-block;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: var(--weight-medium);
    font-size: var(--text-sm);
    margin-top: auto;
}

.recent-posts .read-more:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE: ULTRA-WIDE (Better Proportions)
   ============================================ */

/* Ultra-wide screens - wider container with more breathing room */
@media (min-width: 1920px) {
    .blog-container {
        max-width: var(--container-3xl, 1920px);
        padding: var(--space-10) var(--space-8);
    }

    .blog-post-layout {
        max-width: var(--container-xl, 1280px);
        padding: var(--space-10) var(--space-8);
    }

    /* Blog grid can be wider */
    .blog-grid {
        gap: var(--space-8);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .blog-container {
        padding: var(--space-6) var(--space-4);
        /* Reduce padding on mobile */
    }

    .blog-post-layout {
        padding: var(--space-6) var(--space-4);
        /* Reduce padding on mobile */
    }

    .blog-post-header,
    .blog-post-footer {
        padding: var(--space-4) 0;
    }

    .blog-post-header .lead {
        font-size: var(--text-lg);
        /* Slightly smaller but still readable */
        padding-bottom: var(--space-4);
    }

    .blog-card-content {
        padding: var(--space-4);
    }

    .blog-section-title {
        font-size: var(--text-xl);
        /* Smaller on mobile */
        margin-bottom: var(--space-6);
    }
}
