/* reset */

*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

a:link{
    color: blueviolet
}

html {
    font-size: 24px;
    line-height: 1.44;
    height: 100%;
    scroll-behavior: smooth;
    background-color: black;
}


h1 {
    margin-top: 0;
    font-size: 1.728rem;
    text-align:center ;
    background-color: blueviolet;
}

figcaption {
    width: 100%;
    text-align: center;
    font-size: 0.833rem;
    color: blueviolet;
}

#gallery{
    padding: 0.482rem;
    display: grid;
    gap: 0.482rem;
}


#gallery figure{
     padding: relative;
     overflow: hidden; 
}

#gallery img, header img{
    width: 100%;
    max-width: 400px;

}


#gallery img{
    object-fit: cover;
    aspect-ratio: 16/9;
    transition: transform 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
}

#gallery img:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

#gallery figcaption, dialog figcaption{
    transform:translateY(-1.000rem);
    background: rgb(0, 0, 0, 0.8)
}



/* modal styles */

dialog{
    position: fixed;
    top: 5vh;
    max-width: 90vw;
    max-height: 90vh;
    margin: 0 auto;
}

dialog::backdrop{
    background-color: rgb(0, 0, 0 /0.8);
}

dialog img{
    width: 100%;
    max-height: 83vh;
}

footer{
    width: 100vw;
    background-color: blueviolet;
    
}

@media screen and (min-width: 400px) {
    #gallery{
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (min-width: 800px) {
    #gallery{
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media screen and (min-width: 1200px) {
    #gallery{
        grid-template-columns: repeat(4, 1fr);
    }
}