@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    font-family: 'Nunito Sans', sans-serif;
}

body {
    background-color: #EEEEEE;
    color: #000050;
}

header {
    height: 25vh;
    width: calc(70vw - (100vw - 100%));
    display: flex;
    justify-content: space-between;
    align-items: center;
    top: 0;
    padding: 0 15vw;
    margin-bottom: 30px;
    background-color: #000050;
    color: white;
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}

header > h1 {
    font-size: 3em;
    font-weight: 900;
}

#badgeList {
    width: calc(70vw - (100vw - 100%));
    margin: auto;
    margin-bottom: 2vw;
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    align-items: center;
}

#badgeList > a {
    margin: 10px;
    text-decoration: none;
}

.badgeItem {
    width: 20vh;
    height: 20vh;
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    padding: 10px;

    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}

.badgeItem:hover {
    box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}

.badgeItem > img {
    width: 10vh;
    height: 10vh;
    margin: 10px;
}

.badgeItem > h2 {
    color: #000050;
    font-size: 2vh;
}

/*TABLET SCREENS*/

@media only screen and (max-width: 834px) {
    header {
        height: 15vh;
        width: calc(90vw - (100vw - 100%));
        padding: 0 5vw;
    }

    header > h1 {
        font-size: 2em;
    }

    #badgeList {
        width: calc(100vw - (100vw - 100%));
        margin-bottom: max(5vw, env(safe-area-inset-bottom));
    }

    .badgeItem {
        width: 25vw;
        height: 25vw;
    }

    .badgeItem:hover {
        box-shadow: inherit;
    }

    .badgeItem > img {
        width: 8vh;
        height: 8vh;
    }

    .badgeItem > h2 {
        font-size: 2vh;
    }
}

/*PHONE SCREENS*/

@media only screen and (max-width: 450px) {
    header {
        margin-bottom: 10px
    }

    header > h1 {
        font-size: 1.5em;
    }

    #badgeList {
        width: calc(100vw - (100vw - 100%));
        margin-bottom: max(1vh, env(safe-area-inset-bottom));
    }

    #badgeList > a {
        margin: 1vh;
        text-decoration: none;
    }

    .badgeItem {
        width: 100vw;
        height: 10vh;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        text-align: left;
        box-sizing: border-box;
        padding: 10px 10px 10px 0;

        box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
        transition: all 0.3s cubic-bezier(.25,.8,.25,1);
    }

    .badgeItem > h2 {
        font-size: 3vh;
    }
}

/*DARK MODE*/

@media screen and (prefers-color-scheme: dark) {
    body {
        background-color: #333;
        color: white;
    }

    .badgeItem {
        background-color: #3b3b3b;
        color: white;
    }

    .badgeItem > h2 {
        color: white;
    }

    a:link {
        color: white;
    }

    a:visited  {
        color: white;
    }
}
