*{
    margin: 0;
    padding: 0;
}

/* Font settings */
h1, h2{
    font-family: 'Open Sans', sans-serif;
}

h1{
    font-size: 2.5rem;
}

h3, p, #contact span, a, h4{
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
}

input, textarea{
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
}

p, .value{
    color: #666;
}

h1, h2, h3, .description{
    color: #36454F;
}

/* Page display settings */
.content{
    max-width: 1200px;
    margin: auto;
}

.content>h2{
    text-align: center;
}

/* Remove dots from lists defaultly */
li{
    list-style-type: none;
}

/* Set background colors to sections */
header, #education, #projects{
    background-color: #c8d8e4;
    padding: 30px 50px;
}

#about, #contact{
    background-color: #f2f2f2;
    padding: 30px 50px;
}

#socials{
    background-color: #8aafcb;
    padding: 30px 50px 20px;
}

/* Divide header in two halves */
#header-title{
    display: flex;
}

#header-text{
    position: relative;
    width: 66%;
    flex: 0 0 auto;
}

header img{
    width: 33%;
    flex: 0 0 auto;
}

/* Set title position in header */
#header-title h1{
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
}

#header-title p{
    position: absolute;
    top: 62%;
    transform: translateY(-50%);
}

#header-myname{
    color: #c99f2c;
}

/* Navbar visible from the whole page */
#header-menu{
    position: sticky;
    top: 0;
    background-color: #8aafcb;
    z-index: 999;
}

/* Visual navbar settings */
nav{
    list-style-type: none;
    overflow: hidden;
}

nav li{
    display: inline;
}

nav li a{
    display: inline-block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    transition: 0.2s;
}

nav li a:hover{
    background-color: #24577d;
}

a.icon{
    display: none;
}

/* Divide navbar to left and right side */
.nav{
    float: left;
}

.navbar-right{
    float:right;
}

/* Contact section divider*/
#about-divider{
    display: flex;
    justify-content: space-between;
    margin: 20px 0 0 0;
}

/* Visual contact form settings; borrowed from the first ITW project */
#contact-form form{
    display: grid;
    width: 600px;
    grid-template-columns: auto auto;
    grid-column-gap: 20px;
    grid-row-gap: 20px;
    align-items: center;
}

#contact-form #contact-subject, #contact-form #contact-message{
    grid-column: 1/3;
}

#contact-form form input, #contact-form form textarea{
    padding: 10px;
    border-radius: 5px;
}

#contact-form form textarea{
    resize: none;
}

#contact-form #contact-submit{
    grid-column: 1/3;
    width: 50%;
    justify-self: center;
}

/* Visual settings */
#projects ul li{
    margin: 15px 0;
}

#projects a{
    text-decoration: none;
    color: #24577d;
    transition: 0.2s;
}

#projects a:hover{
    color: #f5f5f5;
}

/* Visual social settings */
#socials{
    list-style-type: none;
    overflow: hidden;
    text-align: center;
}

#socials li{
    display: inline;
}

/* Horizontal list */
#socials li a{
    display: inline-block;
    color: white;
    text-align: center;
    padding: 10px 10px;
    margin: 5px;
    text-decoration: none;
    border-radius: 50%;
    transition: 0.2s;
}

#socials li a:hover{
    background-color: #24577d;
}

#socials i{
    font-size: 2.5rem;
}

/* xs */
@media only screen and (max-width: 575px){
    /* Reverse the order of divs */
    #header-title{
        flex-direction: column-reverse;
        justify-content: center;
    }

    #header-text{
        width: 100%;
        margin: 25px auto 5px;
    }

    /* Positions aren't absolute anymore */
    #header-title h1{
        position: relative;
        transform: none;
    }

    #header-title p{
        position: relative;
        transform: none;
    }

    #header-title img{
        margin: auto;
    }

    h1{
        font-size: 1.25rem;
    }

    header img{
        width: 50%;
    }

    .navlink-title{
        text-align: center;
    }

    /* Display hamburger menu */
    a.icon{
        display: block;
        color: white;
        text-align: right;
        padding: 14px 16px;
        text-decoration: none;
        border-bottom: 1px solid white;
    }

    /* Hide dropdown when hamburger menu not opened*/
    nav ul.navbar-right li{
        display: none;
    }

    /* Show dropdown when hamburger opened */
    nav ul.navbar-right.responsive li{
        float: none;
        display: block;
        text-align: left;
    }

    .navbar-right{
        float: none;
    }

    /* Reverse order so the form is above the info */
    #about-divider{
        flex-direction: column-reverse;
    }

    /* Adjust size of form to fit better in small windows */
    #contact-form form{
        display: grid;
        width: 100%;
        grid-template-columns: auto auto;
        grid-column-gap: 20px;
        grid-row-gap: 20px;
        align-items: center;
        margin: 0 auto;
    }

    #contact-form input, #contact-form textarea{
        grid-column: 1/3;
    }

    #contact-form #contact-subject, #contact-form #contact-message{
        grid-column: 1/3;
    }

    /* Make icons bigger so they are clickable better */
    #socials i{
        font-size: 3rem;
    }

    .navbar-right li a{
        width: 100%;
        text-align: left;
    }
}

/* sm */
/* Some of these settings below are the same as above, so they might not be commented */
@media only screen and (min-width: 576px) and (max-width: 768px){
    #header-title{
        flex-direction: column-reverse;
        justify-content: center;
    }

    #header-text{
        width: 100%;
        margin: 15% auto;
    }

    /* Adjust position of text in header */
    #header-title h1{
        top: 30%;
        transform: translateY(-100%);
    }

    #header-title p{
        top: 90%;
        transform: translateY(0);
    }

    #header-title img{
        margin: auto;
    }

    h1{
        font-size: 1.5rem;
    }

    header img{
        width: 50%;
    }

    .navlink-title{
        display: none;
    }

    #about-divider{
        flex-direction: column-reverse;
    }

    /* Center contact form */
    #contact-form form{
        width: 100%;
        margin: 0 auto;
    }
}

/* md */
@media only screen and (min-width: 768px) and (max-width: 992px){
    #header-title{
        flex-direction: column-reverse;
        justify-content: center;
    }

    #header-text{
        width: 100%;
        margin: 5% auto;
    }

    #header-title h1{
        top: 60%;
        transform: translateY(-100%);
    }

    #header-title p{
        top: 90%;
        transform: translateY(0);
    }

    #header-title img{
        margin: auto;
    }

    h1{
        font-size: 1.5rem;
    }

    header img{
        width: 50%;
    }

    #about-divider{
        flex-direction: column-reverse;
    }

    #contact-form form{
        width: 100%;
        margin: 0 auto;
    }
}

/* lg */
/*
@media only screen and (min-width: 992px) and (max-width: 1200px){

}
*/
/* xl */
/*
@media only screen and (min-width: 1200px){

}
*/