* {
    box-sizing: border-box;
    background-color: blueviolet;
}

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

main {
    padding: 10px 15%;
    display: flex;
    flex-direction: column;
    background-color: cyan;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: blueviolet;
    padding: 10px 15%;
    position: sticky;
    z-index: 100;
    top: 0%;
}

header h1 {
    color: white;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    margin-right: 20px;
}

nav {
    display: flex;
    align-items: center;
}

.hamburger {
    display: none;
}

.hamburger .line {
    width: 20px;
    height: 2px;
    background-color: #333;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0px;
    padding: 0px;
}

nav li {
    margin-left: 20px;
}

nav a {
    font-weight: bold;
    color: white;
}

/* ensure that the anchored section doesn't scroll
all the way under the sticky header */
section {
    scroll-margin-top: 100px;
    background-color: inherit;
}

h1 {
    background-color: inherit;
}

/* tablets */
@media screen and (max-width: 900px) {
    header {
        display: block;
        padding: 5px 5%;
    }

    main {
        padding: 5px 5%;
    }

    h1 {
        text-align: center;
        background-color: inherit;
    }
    .logo {
        flex-direction: row;
        justify-content: space-between;
    }

    .logo img {
        margin: 0;
    }

    nav {
        width: 100%;
        /* change flex direction so that the links open under the hamburger */
        flex-direction: column;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 10px;
        cursor: pointer;
        padding-left: 20px;
        padding-right: 10px;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        padding-top: 10px;
        padding-bottom: 0px;
        padding-left: 0px;
        padding-right: 0px;
    }

    nav li {
        margin-left: 0;
        margin-bottom: 10px;
    }

    nav.open ul {
        display: flex;
    }
}
