/* Mobile First View */
header {
    border: 2px solid var(--Text);
    border-bottom: 0;
    background-color: var(--Flamingo);
    margin: 1% 5% 0% 5%;
    display: flex;
    flex-flow: column nowrap;
}

/* All of the .header_title class CSS is for the top titlebar */
.header_title {
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    background-color: var(--MochaBase);
    max-height: 80px;
}

.header_title>a>h1 {
    color: var(--Crust);
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    line-height: 0.5;
    margin: 3% 0% 0% 0%;
}

.header_title>a>h2 {
    color: var(--Crust);
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    line-height: 0.5;
    margin: 0% 0% 3% 0%;
}

.header_title>a>hr {
    width: 90px;
    color: var(--Red);
}

.header_title>a {
    text-decoration: none;
}

/* Removes the html link decoration. */
#hamburger_image {
    display: block;
    border-radius: 8px;
    margin: 20px auto;
    padding: 10px;
    width: 10%;
}

/* Hidden checkbox - "Controlled" by clicking the hamburger image. */
#hamburger_checkbox,
#hamburger_checkbox:not(:checked)+nav {
    display: none;
}

nav,
#bottom_nav {
    display: flex;
    flex-flow: column nowrap;
    padding: 0 0;
    margin: 0 0;
}

#bottom_nav {
    background-color: var(--Crust);
}

nav>ul,
#bottom_nav>ul {
    padding: 0 0;
    margin: 0 0;
}

nav>ul>li,
#bottom_nav>ul>li {
    list-style: none;
}

nav>ul>li>a,
#bottom_nav>ul>li>a {
    display: flex;
    justify-content: center;
    align-items: center;
    color: black;
    font-size: 17px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    width: 100%;
    padding: 15px 0 15px 0;
}

/*
 * 1 & 2: Changes #hamburger_image background when hovered & `:checked` + hovered.
 * 3 & 4: Self-explainatory.
 * Makes the navbar feel reactive. 
 */
#hamburger_image:hover,
header:has(#hamburger_checkbox:checked) #hamburger_image:hover,
nav>ul>li>a:hover,
nav>ul>li>a:focus,
#bottom_nav ul li a:hover,
#bottom_nav ul li a:focus {
    background-color: var(--Maroon);
}

/* Remove outline when using tab key */
nav ul li a:focus,
#bottom_nav ul li a {
    outline: none;
}

/* Highlight the current page + selected menu icon */
.active_nav,
header:has(#hamburger_checkbox:checked) #hamburger_image {
    background-color: var(--Red);
    color: white;
}

/* Make the github and gitlab logos viewport lock to 24px x 24px */
.svg_logo {
    width: 24px;
    height: 24px;
}

/* Medium devices (landscape tablets, 960px and up) */
@media only screen and (min-width: 960px) {

    /* Move the header to the left */
    .header_title>a>h1 {
        text-align: left;
        margin: 3% 0% 0% 3%;
    }

    .header_title>a>h2 {
        text-align: left;
        margin: 0% 0% 3% 3%;
    }

    .header_title>a>hr {
        margin-left: 3%;
        text-align: left;
        width: 90px;
    }

    /* Hide the hamburger menu*/
    #hamburger_image {
        display: none;
    }

    /* Show the links no matter what */
    #hamburger_checkbox:not(:checked)+nav {
        display: flex;
        justify-content: space-between;
        flex-flow: row nowrap;
        align-items: stretch;
    }

    /* Split up the left and right bars */
    .nav_left {
        display: flex;
        flex-flow: row nowrap;
        align-self: flex-start;
    }

    .nav_right {
        display: flex;
        flex-flow: row nowrap;
        align-self: flex-end;
    }

    .nav_bottom {
        display: flex;
        flex-flow: row nowrap;
        align-self: flex-end;
        background-color: var(--Surface0);
    }

    #bottom_nav ul li a:hover,
    #bottom_nav ul li a:focus {
        background-color: var(--Surface2);
    }

    .active_bottom_nav {
        background-color: var(--Surface2);
    }

    nav ul li a {
        padding: 0;
    }

    .nav_right li a {
        padding: 22px 0 22px 0;
        min-width: 100px;
        margin: 0;
    }

    .nav_left li a,
    .nav_bottom>li>a {
        padding: 24px 0 24px 0;
        min-width: 100px;
    }

    .nav_bottom>li>a {
        min-width: 150px;
    }
}
