:root {
 --primary-color: #52489c;
 --secondary-color: #59c3c3;
 --background-color: #ebebeb;
 --text-dark: #333;
 --text-light: #ebebeb;
 --primary-font: Arial, Helvetica,sans-serif;
 --secondary-font: Mooli, san-serif;
}

img {
    max-width: 100%;
}
html{
    height: 100%;
}
body{
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    font-family: var(--primary-font);
    text-align: center;
}

header {
    color: var(--text-light);
    background-color: var(--primary-color);
}

a:link,
a:visited {
  color: var(--text-light);
}

h1{
    margin: 0;
    margin-top: 1.5rem;
    font-size: 2rem;
}

nav{
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    line-height: 1.5rem;
}

.menu-toggle {
    all: unset;
    display: block;
    font-size: 1.2rem;
    cursor: pointer;
}

.menu-links{
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: .5rem;
}

.menu-links.active{
    display: flex;
}

.menu-links a {
    text-decoration: none;
    font-weight: bold;
}

main {
    flex-grow: 1;
    font-weight: bold;
    background-color: var(--background-color);
    color: var(--text-dark);
}

.gallery{
    padding-bottom: 1.5rem;
    display: grid;
    gap: 1.5rem;
}

.gallery figure{
    margin: auto;
    padding: 0;
    width: 12rem;
    aspect-ratio: 1/1;
    border: .3em solid var(--text-light);
    box-shadow: 5px 5px 5px #545454;
}

.gallery figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

footer{
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: left;
    padding: 1rem;
}

dialog {
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.6);
}
dialog img {
    width: 90%;
    display: block;
    margin: 20vh auto;
}
.close-viewer {
    position: absolute;
    top: 20vh;
    right: 2vh;
    padding: 3px 6px;
    font-size: 1.5em;
}

@media screen and (min-width: 550px){
    .menu-links{
        flex-direction: row;
        justify-content: center;
    }

    .gallery{
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}
@media screen and (min-width: 785px){
    .menu-toggle{
        display: none;
    }

    .menu-links{
        display: flex;
        flex-direction: row;
        gap: 1.5rem;
        justify-content: center;
    }

    .gallery{
        margin:0 auto;
        max-width: 800px;
        grid-template-columns: repeat(3, 1fr);
    }
}