/* Setting color variables, explained in book page 136-137 */
:root {
    --background: #fff;
    --headers: #975102;
    --accent: #FB8604;
    --accentlight: #FDB768;
    --text: #342009;
    --dark: #5b3102;
    --shaded: #faf2e9;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Raleway', 'Open Sans', sans-serif;
    color: var(--text);
    background-color: var(--background);
}

header {
    width: 100%;
    height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-image:
        url('../images/banner.jpg');
    background-position: left;
    background-size: cover;
    background-color: #000;
    box-sizing: border-box;
}

main {
    margin: 5px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap; 
    gap: 20px; 
    width: 100%;
    flex-grow: 1;
    justify-content: center;
    background-color: var(--shaded);
}

section {
    flex: 1;
}

h1 {
    color: var(--background);
    padding: 20px;
}

h2 {
    color: var(--headers);
}

a {
    color: var(--accent);
}

nav ul {
    display: flex;
    flex-direction: row;
    list-style-type: none;
}

nav ul li {
    margin-bottom: 5px;
    text-align: left;
    padding-right: 20px;
    font-size: 1.25em;

}

nav a {
    text-decoration: none;
    color: var(--accent);
}

nav a:hover {
    color: var(--accentlight);
}

aside {
    float: left;
    width: 20%;
}

section {
    background-color: var(--shaded);
    padding: 15px;
    margin-bottom: 20px;
}

.video-container {
    width: 100%;
    height: 500px;
    display: flex;
    justify-content: center;
}

.video-container iframe {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
}

main ul {
    padding-left: 20px;
}

footer {
    margin-bottom: 10px;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.bio-image {
    float: right;
    margin-left: 20px;
    margin-bottom: 20px;
    margin-top: 50px;
    margin-right: 30px;
    width: auto;
    height: auto;
    max-height: 300px;

}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th {
    background-color: var(--headers);
    color: var(--background);
    padding: 10px;
    border: 1px solid var(--dark);
    text-align: left;
}

table td {
    color: var(--text);
    padding: 8px;
    border: 1px solid var(--accent);
    text-align: left;
}

table tr:nth-child(even) {
    background-color: var(--shaded);
}

table tr:hover {
    background-color: var(--accentlight);
}

/* I opted for mobile-first design per Chapter 8 */
#mobile_menu {
    display: block;
    width: fit-content;
}

#nav_menu {
    display: none;
}

/* Media Queries - mobile-first per chapter 8 */

/* 200 to 480 */
@media only screen and (min-width: 200px) {

    main {
        flex-direction: column;
    }

    header h1 {
        font-size: 1.8em;
    }

    header h2 {
        font-size: .8em;
    }

    article h1 {
        font-size: 1em;
    }

    .video-container iframe {
        height: 15em;
    }

    footer p {
        font-size: .75em;
    }
}

/* 481 to 796px */

@media only screen and (min-width: 481px) {
    header h1 {
        font-size: 2.4em;
    }

    header h2 {
        font-size: 1em;
    }

    .video-container {
        height: 20em;
        width: 30em;
    }
}

/* 797 to 886px */
@media only screen and (min-width: 797px) {

    main {
        flex-direction: row;
    }

    #nav_menu {
        display: flex;
        justify-content: left;
        width: 100%;
    }

    #mobile_menu {
        display: none;
    }

    header {
        text-align: left;
    }

    header h1 {
        font-size: 2.8em;
    }

    header h2 {
        font-size: 1.2em;
    }

    .video-container {
        width: 30em;
    }
}

/* 887 to 1006 */
@media only screen and (min-width: 887px) {
    header h1 {
        font-size: 3.2em;
    }

    header h2 {
        font-size: 1.4em;
    }
}

/* 1007px or more */
@media only screen and (min-width: 1007px) {
    header h1 {
        font-size: 3.6em;
    }

    header h2 {
        font-size: 1.6em;
    }
}