
:root{

    --nav-font-color: #92ccce;
    --header-bg-color: #31343d;
    --gradient-3: linear-gradient(45deg, #92ccce, #92ccce);
    --border-radius: 2px;
    --secondary-blue: #445877;
    --main-bg-color: #eeeef7;
    --margin-from-header: 20px;
}

*{
    box-sizing: border-box;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}


body{
    position: relative;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

/* Header style */

header{
    display: flex;
    justify-content: space-between; 
    align-items: center;
    background-color: var(--header-bg-color);
    width: 100%;
    transition: all .25s ease-in;
}

.profile-name{
    background: var(--gradient-3);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    display: inline-block;
    padding: 1.5vw;
    padding-left: 5vw;
    margin: 15px 0px;
    font-weight: bolder;
    font-size: 2.5rem;
    color: var(--header-bg-color);
    width: fit-content;
}

/* Nav styles */


nav{
    /* list-style: none; */
    display: flex;
    margin: 0 20px;
    flex-flow: row wrap;
    justify-content: center;
    
}

nav a {
    margin: 5px;
    font-size: larger;
    font-weight: bold;
    background: var(--gradient-3);
    /* background:rgb(241, 72, 5); */
    padding: 10px;
    border-radius: var(--border-radius);
    background-repeat: no-repeat;
    background-size: 100% .2em;
    background-position: bottom;
    transition: all .25s ease-in;
    text-decoration: none;
    color: var(--nav-font-color);
    transition: all .25s ease-in;
    font-size: 1.2rem;
}

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


/* Banner styles */
.banner{
    background:center/contain no-repeat url('../images/pexels-anni-roenkae-3169299.jpg');
    background-size: cover;
    min-height: 300px;
    display: flex;
    justify-content: end;
    align-items: flex-end;
    
}

.banner p{
    color: var(--header-bg-color);
    background: var(--nav-font-color);
    font-size: 1.5rem;
    text-align: right;
    margin: 10px 20px;
    font-weight: bold;
    padding: .5em;
    border-radius: var(--border-radius);
}

/* Main Styling */

main{
    display: flex;
    flex-flow: column;
    background: var(--main-bg-color);
    /* needed for bg images */
    z-index: 1;
    position: relative;
}


.about-me, .work, .contact{
    display: flex;
    padding: 10px;
    margin: 15px 5vw;
}

/* Main Header effective size */
.section-header{
    flex: 0 0 15vw;
}

h2{
    font-size: 2.5rem;
    text-align: right;
    color: var(--secondary-blue);
    border-right: 3px solid var(--secondary-blue);
    padding: 15px;
    font-weight: bold;
}

/* About me styles*/

.about-me div{
    margin-left: var(--margin-from-header);
}

.about-me p{
    font-size: 1rem;
    color: var(--secondary-blue);
    margin: 0 25px 25px 0px;
}

/* Work Styles */
.work-grid{
    flex-grow: 1;
    display: flex;
    flex-flow: row wrap;
    /* grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: repeat(2, 250px);
    gap: 1em; */
    margin-left: var(--margin-from-header);
}

.work article{
    display: block;
}

.work article{
    flex: 1 1 40%;
    box-sizing: border-box;
    display: flex;
    flex-flow: column;
    overflow: hidden;
    position: relative;
    border-radius: var(--border-radius);
    border: 5px solid var(--nav-font-color);
    transition: all .3s;
    height: 10rem;
    margin: .5rem;
}

.work article:first-child{
    flex: 1 1 100%;
    height: 30rem;
}
.work article:hover{
    opacity: .75;
    box-shadow: -.5rem 1rem 1rem rgba(0, 0, 0, 0.178);
    transform: translateY(-10px);
}

.work article a{
    height: 100%;
}

.work article img{
    object-position: center center;
    object-fit: cover;
    /* small gap on right side of image */
    width: 101%;
    height: 100%;
    /* https://stackoverflow.com/questions/3197601/white-space-at-bottom-of-anchor-tag */
    vertical-align: bottom;
}


.work article div{
    background: var(--nav-font-color);
    width: fit-content;
    position: absolute;
    left: 0;
    bottom: 10px;
}

.work article h3, .work article p{
    color: var(--header-bg-color);
    /* background: linear-gradient(45deg, #3c548d 0%, #182848 100%); */
    padding: 5px;
    margin: 5px;
}
.work article h3{
    font-weight: bolder;
    font-size: 1.25rem;
    color: var(--header-bg-color);
}

/* Contact styling */

.contact ul{
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    flex-grow: 1;
    margin-left: var(--margin-from-header);
    list-style-type: none;
    
}

.contact ul li{
    margin: 20px;
}

.contact ul li a{
    color: var(--secondary-blue);
    text-decoration: none;
    border-bottom: 3px solid var(--secondary-blue);
    padding: 10px;
    font-size: 1.25rem;
}


@media screen and (max-width:900px){
    .about-me, .work, .contact{
        flex-flow: column wrap;
    }
    
    .section-header{
        text-align: left;
        border-right: 3px none var(--secondary-blue);
        border-bottom: 3px solid var(--secondary-blue);
        width: 100%;
        flex-basis: auto;
        margin-bottom: 2rem;
    }

    .about-me div{
        margin-left: 0;
    }

    .contact ul{
        margin-left: 0;
    }

    .flex-child{
        margin-left: 0;
    }

    header{
        flex-flow: column;
    }
    
    nav{
        margin: 0;
    }

    .profile-name{
        padding: 10px;
    }

    .contact ul{
        flex-flow: column wrap;
        align-items: center;
        
    }

    .contact ul li{
        margin-left: 0px;
    }

    .work-grid{
        flex-flow: column wrap;
    }

    .work article{
        /* grid-column: span 2; */
        flex: 0 1 10rem;
        height: 10rem;
    }

    .work article:first-child{
        /* grid-column: span 2; */
        flex: 0 1 10rem;
        height: 10rem;
    }
}

@media screen and (max-width:500px){
    nav{
        flex-flow: row wrap;
    }

    nav{
        width: 100%;
    }

    nav a{
        width: 40%;
        text-align: center;
    }
}

@media screen and (max-width:290px){
    html{
        font-size: 70%;
    }
}