/* Layout Styles */

/* Container */
.container {
    padding: 0 var(--spacing-md);
    max-width: 1200px;
    /* Restricts width on large screens */
    margin: 0 auto;
}

/* Header */
.site-header {
    background-color: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--spacing-md) 0;
}

.site-header .container {
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping on small mobile */
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
}

.site-title {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    /* Increased from 1.25rem */
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-primary);
    /* text-shadow: 0 0 10px var(--color-primary-glow); Removed neon effect */
}

.site-description {
    width: 100%;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Mobile Header Layout: Title + About on top row */
@media (max-width: 600px) {
    .site-title {
        order: 1;
    }

    .about-btn {
        order: 2;
        margin-left: auto;
        /* Keep it pushed to right */
    }

    .site-description {
        order: 3;
    }

    .filter-nav {
        order: 4;
        width: 100%;
        margin-top: var(--spacing-sm);
        /* Add spacing above nav on mobile */
        overflow-x: auto;
        /* Allow horizontal scroll if needed */
    }
}

/* Filter Nav */
.filter-nav {
    display: flex;
    gap: var(--spacing-md);
}

.filter-btn {
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 1rem;
    /* Increased from 0.95rem */
    padding: var(--spacing-xs) 0;
    position: relative;
    transition: color var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--color-text-main);
}

.filter-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    box-shadow: 0 0 8px var(--color-primary);
    border-radius: 2px;
}

/* About Button */
.about-btn {
    margin-left: auto;
    /* Push to right */
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
}

.about-btn:hover {
    color: var(--color-text-main);
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.05);
}

.about-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--color-text-muted);
    color: var(--color-bg-deep);
    font-size: 0.75rem;
    font-weight: bold;
}

.about-btn:hover .about-icon {
    background-color: var(--color-primary);
}

/* Main Content */
.site-main {
    padding: var(--spacing-xl) 0;
    min-height: 80vh;
}

/* Masonry Layout */
/* Using simple Grid for consistency first, can upgrade to Masonry native if supported or columns */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    /* Note: Ideally we want masonry. CSS Grid Level 2 'grid-template-rows: masonry' is not widely supported yet.
       We will use standard grid for stability, which aligns items in rows.
       If true masonry is needed later, we can switch to 'column-count' or JS layout.
       For detail Design Spec, standard responsive grid is safest for MVP. 
    */
}

/* Footer */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--spacing-xl) 0;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}