/**
 * Critical CSS - Above-the-fold styles
 * 
 * This file contains the minimum CSS needed for the initial viewport.
 * It should be inlined in the head for fastest rendering.
 * 
 * @package OutputLag
 * @since 1.0.0
 */

/* CSS Reset (minimal) */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #0A0A0A;
    color: #E0E0E0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container System */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Critical Styles */
.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: #00D4FF;
    text-decoration: none;
}

/* Navigation Critical Styles */
.primary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

.primary-menu a {
    color: #E0E0E0;
    text-decoration: none;
    padding: 0.5rem 0;
    font-weight: 500;
}

/* Hero Section Critical Styles */
.hero-section {
    background: #0A0A0A;
    padding: 2rem 0;
}

.hero-split-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    min-height: 600px;
}

.featured-main {
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
    display: flex;
    align-items: flex-end;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.featured-image-wrapper {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,10,10,0) 0%, rgba(10,10,10,0.9) 100%);
    z-index: 1;
}

.featured-content {
    position: relative;
    z-index: 2;
    padding: 3rem;
    width: 100%;
}

.hero-title {
    font-size: clamp(48px, 5vw, 72px);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1.5rem;
}

.hero-title a {
    color: #FFFFFF;
    text-decoration: none;
}

/* Side Posts Critical Styles */
.hero-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.featured-side {
    flex: 1;
    min-height: 190px;
    padding: 1rem;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.featured-side-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    width: 100%;
}

.side-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.featured-side-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.featured-side-title a {
    color: #E0E0E0;
    text-decoration: none;
}

/* Mobile Critical Styles */
@media (max-width: 1023px) {
    .hero-split-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        min-height: auto;
    }
    
    .hero-side {
        flex-direction: row;
        gap: 1rem;
        overflow-x: auto;
    }
    
    .featured-side {
        min-width: 280px;
    }
    
    .featured-side-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 120px 1fr;
        gap: 0.5rem;
    }
}

@media (max-width: 767px) {
    .header-content {
        gap: 1rem;
    }
    
    .primary-menu {
        display: none;
    }
    
    .hero-section {
        padding: 1.5rem 0;
    }
    
    .featured-main {
        min-height: 400px;
    }
    
    .featured-content {
        padding: 1.5rem;
    }
    
    .featured-side {
        min-width: 260px;
        padding: 0.5rem;
    }
}

/* Loading State */
.featured-image,
.side-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.featured-image.loaded,
.side-image.loaded {
    opacity: 1;
}

/* Screen Reader Text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}