body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

main {
    margin: 100px 0 50px 0;
}

header {
    background-color: black;
    color: #fff;
    padding: 10px 0;
    text-align: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
    animation: animate-header linear both; 
    animation-timeline: scroll(root);
    animation-range: 0 100px;
}

/* animate header on scroll */
@keyframes animate-header {
    to {
        padding: 3px 0;
        background-color: rgba(0, 0, 0, 0.7);
        font-size: 12px;
        backdrop-filter: blur(5px);
    }
}

section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
    max-width: 1240px;
    margin: 0 auto;
    
    & img {
        margin: 10px;
        width: 300px;
        height: auto;
        border-radius: 8px;
        transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth hover effect */
        animation: reveal-image linear both; 
        animation-timeline: view(); 
        animation-range: entry 10% cover 20%;
        
        &:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }
    }
}

/* Animation for image reveal on viewport */
@keyframes reveal-image {
    from {
        opacity: 0;
        translate: 0 100px;
        scale: 0.7;
    }
    to {
        opacity: 1;
        translate: 0 0;
        scale: 1;
    }
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    position: relative;
    bottom: 0;
    width: 100%;
    
    & p {
        margin: 5px 0;
        font-size: 12px;
        line-height: 1.6;
        color: gray
    }
}