:root {
    --black: #000000;
    --dark-gray: #202020;
    --medium-purple: #4A4E69;
    --peach: #C9ADA7;
    --white: #FFFFFF;
}

body {
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    line-height: 1.5;
}

#logo {
    max-height: 50px;
    margin-left: 20px;
}

/* Navigation */

#nav {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 20px 0px 0px 5px;
}

nav {
    display: flex;
    flex-direction: row;
    margin-right: 50px;
}

nav a {
    text-decoration: none;
    padding: 5px 10px;
    margin-right: 10px;
    color: var(--white);
    background-image: linear-gradient(270deg, var(--white), 0%, var(--white) 100%);
    background-repeat: no-repeat;
    background-size: 100% 0.2em;
    background-position: bottom;
    transition: all 0.25s ease-in;
    font-size: 1.4rem;
}

nav a:hover {
    background-size: 100% 100%;
    color: var(--black);
}

/* Hero Banner */
.hero {
    background-image: url("../images/hero-image-sea.jpg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    min-height: 50vh;
    padding-bottom: 2%;
}

#subtitle {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    text-align: right;
    padding: 2% 3%;
    min-height: 50vh;
}

.hero h2 {
    margin: 0;
    padding: 5px 10px;
    color: var(--black);
    background-color: var(--white);
    border-radius: 20px 0px 20px 20px;
    font-weight: bold;
    font-size: 20px;
    display: inline;
}

/* Main Body container */
main {
    margin-top: 20px;
    margin-bottom: 45px;
    max-width: 85%;
    margin-left: auto;
    margin-right: auto;
}

/* Sections */
.page-section {
    margin: 25px 0p;
    padding: 10px 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: space-between;
}

.page-section>h3 {
    flex: 0 0 20%;
    font-size: 3vw;
    text-align: right;
    padding-right: 15px;
    line-height: 1.1;
    border-right: solid 4px var(--dark-gray);
    text-decoration: none;
}

.page-section>div {
    flex: 0 0 75%;
}

.page-section p {
    margin-bottom: 20px;
    color: var(--dark-gray);
    flex: 0 0 77%;
}

section>h3>a {
    color: var(--dark-gray);
    text-decoration: none;
}


/* Portfolio */
.flex-container {
    display: flex;
    flex-wrap: wrap;
}

.flex-item {
    flex: 1;
    border: 5px solid var(--dark-gray);
    background-color: rgb(82, 82, 82);
    min-height: 150px;
    min-width: 335px;
    background-blend-mode: soft-light;
    margin: 10px;
    background-size: 150%;
    transition: all 0.5s;
    
    /* Descriptive Box Elements */
    display: flex;
    align-items: flex-end;
    padding: 0 0 20px 0;
    text-decoration: none;
    font-size: 0.8rem;
    color: var(--white);
}

/* Grid Portfolio - Feature First Child */
.flex-item:first-child {
    min-height: 400px;
    flex-basis: 100%;
}

.flex-item:hover {
    background-color: unset;
}

.flex-item div {
    background-color: var(--dark-gray);
    padding: 10px;
    padding-right: 25px;
    border-radius: 0px 60px 60px 0px;
}

.flex-item h4 {
    font-size: 1.4rem;
}

/* Images */
.take-a-hike {
    background-image: url("../images/hike_heroimage.jpg");
    background-position: center;

}

.code-quiz {
    background-image: url("../images/hp-background.jpg");
    background-position: center;
    background-size: cover;
}

.day-planner {
    background-image: url("../images/work-day-scheduler-screenshot.png");
    background-position: top;
}

.reel-cinema {
    background-image: url("../images/reel-cinema.png");
}

.weather-dashboard {
    background-image: url("../images/weather-dashboard.png");
}

/* Footer */
.page-section > div > address {
    display: flex;
    justify-content: space-around;
}

#contact > a {
    text-decoration: none;
    font-style: normal;
    padding: 5px;
    margin-right: 10px;
    color: var(--dark-gray);
    background-image: linear-gradient(270deg, var(--dark-gray), 0%, var(--dark-gray) 100%);
    background-repeat: no-repeat;
    background-size: 100% 0.2em;
    background-position: bottom;
    transition: all 0.25s ease-in;
    margin: 0 0.2rem 0.1rem;
    font-size: 1.1em;
}

#contact a:hover {
    background-size: 100% 100%;
    color: #ffffff;
}

main footer p {
    text-align: center;
    color: var(--dark-gray);
}


/* Webpage responsiveness */
@media (max-width: 768px) {
    .flex-grid {
        display: block;
    }

    .flex-item, .flex-item:first-child {
        min-height: 150px;
    }

    .hero-banner {
        justify-content: center;
        text-align: center;
    }

    .hero {
        display: block;
    }

    nav {
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
    }

    header h1 {
        width: 100%;
        font-size: 4vw;
        text-align: center;
    }

    #contact {
        display: flex;
        flex-wrap: wrap;
        flex-direction: column;
    }

    .flex-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-content: flex-start;
        min-height: 100px;
    }

    .flex-item:first-child {
        height: auto;
    }
}