@import url('https://fonts.googleapis.com/css2?family=Mooli&display=swap');

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

* {
    margin: 0;
}

body {
    font-family: var(--primary-font);
    font-size: 1.5em;
}

h1,
h2 {
    font-family: var(--secondary-font);
    text-align: center;
}

header {
    padding: 1rem 0;
    background-color: var(--primary-color);
    color: var(--text-light);
}

main {
    padding: 1.5rem 0;
    background-color: var(--text-light);
}

footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
    padding: 0.5rem 0;
}

figure {
    display: flex;
    flex-flow: column;
    padding: 10px;
    margin: auto;
    background: var(--white);
    box-shadow: 9px 9px 10px 0px var(--text-dark);
}

figure img {
    max-width: 100%;
    width: 250px;
    height: 250px;
    object-fit: cover;
}

nav {
    padding: 1rem 0 0;
    width: 100%;
    text-align: center;
}

nav ul {
    padding: 0;
    width: 100%;
    list-style: none;
    line-height: 2rem;
}

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

button {
    border: none;
    background-color: transparent;
    color: var(--text-light);
    font-size: 1.3em;
}

button:hover {
    cursor: pointer;
}

.gallery {
    display: grid;
    padding: 1.5rem;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.hide {
    display: none;
}

.viewer {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: grid;
    justify-content: center;
    display: none;
}

.viewer button {
    padding: 0 3%;
    align-self: center;
    text-align: end;
}

.viewer img {
    margin: 0 auto;
    max-width: 94%;
    max-height: 100%;
    object-fit: cover;
}

@media screen and (min-width: 700px) {
    nav ul {
        display: none;
    }

    .gallery {
        grid-template-columns: 1fr 1fr;
    }
}


@media screen and (min-width: 1000px) {
    nav ul {
        display: flex;
        justify-content: center;
        gap: 2em;
    }

    button {
        display: none;
    }

    .gallery {
        max-width: 1000px;
        margin: auto;
        grid-template-columns: 1fr 1fr 1fr;
    }

    .viewer button {
        display: block;
    }

    .viewer {
        top: 50%;
        left: 50%;
        transform: translateX(-50%) translateY(-50%);
        max-width: 1000px;
        max-height: 1000px;
        justify-content: center;
    }

    .viewer img {
        max-width: 95%;
        max-height: 95%;
        object-fit: cover;
    }
}