main {
    max-width: 1200px;
    margin: var(--spacing-lg) auto;
    padding: var(--spacing-md);
    align-items: center; 
}

/* Projects Grid Layout */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;  
    max-width: 900px;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

/* Project Card Styling */
article {
    background: var(--card-bg);
    padding: var(--spacing-md);
    border-radius: 0.75rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    animation: slideUp 0.6s ease-out;
    
    &:hover {
        transform: translateY(-10px);
        /* COLOR-MIX */
        box-shadow: 0 15px 40px color-mix(in srgb, var(--primary-color), black 80%);
    }
    
    & h3 {
        /* COLOR-MIX */
        color: color-mix(in srgb, var(--primary-color), var(--secondary-color) 30%);
        margin-bottom: 1rem;
        font-size: 1.75rem;
    }
}

article img {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 0.5rem;
    margin: 1rem auto;  
    /* margin: 1rem 0; */
    transition: transform 0.3s ease;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    
    &:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
}

.comparison-layout .image-comparison {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: stretch;        
    margin: 1.5rem 0;
    flex-wrap: wrap;
    
    & figure {
        flex: 1;
        min-width: 250px;
        max-width: 300px;
        margin: 0;
        display: flex;
        flex-direction: column;
        
        & img {
            width: 100%;
            height: 300px;           
            object-fit: cover;       
            object-position: center;
            margin: 0;
            border-radius: 0.5rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            transition: transform 0.3s ease;
            
            &:hover {
                transform: scale(1.05);
                box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            }
        }
        
        & figcaption {
            margin-top: 0.75rem;
            font-size: 1rem;
            color: var(--text-color);
            text-align: center;
            font-weight: 600;
        }
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    article img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    article img {
        height: 150px;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

main > section > h2 {
    text-align: center;
}

/* Center the projects container */
section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

