/* Order of properties in each rule: 
1. Dimensions (height, width)
2. Margins, paddings and borders
3. Display/position styles
4. Font styles
*/

/* Generic styles */

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root{
    --main-dark-blue: #252b36;
}

html{
    scroll-behavior: smooth;
    height: 100%;
}

body{
    min-height: 100%;
    display: flex;
    flex-direction: column;
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
}

header{
    position: sticky;
    top: 0;
    z-index: 2;
}

li{
    list-style: none;
}

a{
    color: white;
    text-decoration: none;
}

p{
    font-weight: 300;
}

h3{
    font-weight: 400;
}

button{
    border: none;
    outline: none;
    font-family: 'Oswald', sans-serif;
    cursor: pointer;
}

textarea{
    resize: none;
}

section:not(:first-child){
    width: 80%;
    margin: 15rem auto;
}

main{
    background-color: #f6f6f6;
    background-image: linear-gradient(315deg, #f6f6f6 0%, #e9e9e9 74%);
}


/* Home styles */

#home{
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background:linear-gradient(rgba(37, 43, 54, 0.4), rgba(37, 43, 54, 0.4)),
    url("../images/bg-img.jpg") no-repeat center 58%/cover;
}

.home-titles{
    border: 2px solid white;
    padding: 0.7rem;
    position: relative;
    bottom: 1.5rem;
    color: white;
}

.home-titles h1, .home-titles p{
    user-select: none;
}

.home-titles h1{
    font-size: 5rem;
    font-weight: 400;
}

.home-titles p{
    font-size: 1.7rem;
}

@media screen and (max-width: 700px){
    .home-titles h1{
        font-size: 3.8rem;
    }
    .home-titles p{
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 370px){
    .home-titles h1{
        font-size: 3rem;
    }
    .home-titles p{
        font-size: 1.1rem;
    }
    #home{
        background-position: 60% center;
    }
}

/* Top navbar styles */

.top-nav{
    height: 10vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:var(--main-dark-blue);
}

.top-nav-links{
    height: 100%;
    width: 80%;
    display: flex;
    justify-content: space-around;
}

.top-nav-links li{
    height: 100%;
    width: 10%;
}

.top-nav-link{
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in;
}

.top-nav-link:hover{
    background: #fff;
    color: var(--main-dark-blue);
}

@media screen and (max-width: 850px){
    /* This is until I figure out a design for the hamburger menu */
    .top-nav-links{
        width: 100%;
    }
}

@media screen and (max-width: 600px){
    /* This is until I figure out a design for the hamburger menu */
    .top-nav-links li{
        width: 16%;
    }
}

/* Generic section titles */

.section-titles{
    margin-top: 2rem;
    text-align: center;
}

.section-titles h2{
    font-size: 2.5rem;
    font-weight: 400;
}


.section-titles p{
    margin-top: 1rem;
    font-weight: 400;
    color: gray;
}

/* About section */

#about{
    margin-top: 8rem;
}

.about-info{
    width: 45%;
    padding: 1rem;
    text-align: justify;
}

.about-info h3{
    margin-top: 2rem;
}

p.job-title, .about-info h3{
    font-weight: 400;
    font-size: 1.2rem;
}

p.job-title{
    margin: 1rem 0;
}

.cv-btn{
    margin-top: 3rem;
    padding: 0.5rem;
    color: #fff;
    background: linear-gradient(to right, #813ad9, #536cfc);
}

.about-container{
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.about-img{
    width: 500px;
    margin-left: 2rem;
    box-shadow: rgba(0, 0, 0, 0.25) 0px 0px 20px;
    border-radius: 5px;
}

@media screen and (max-width: 1000px){
    .about-container{
        flex-direction: column;
        align-items: center;
    }

    .about-info{
        width: 80%;
        text-align: center;
    }

    .about-img{
        width: 80%;
        margin: 2rem auto;
    }
}

@media screen and (max-width: 500px){
    .about-info, .about-img{
        width: 100%;
    }   
}

/* Services section */

.services-container{
    margin-top: 2rem;
    display: flex;
    text-align: center;
    justify-content: space-around;
}

.service-logo-circle{
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    box-shadow: rgba(0, 0, 0, 0.25) 0px 0px 20px;
}

.service-logo-circle img{
    width: 50px;
}

.service{
    width: 33%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service p{
    color: rgb(104, 102, 102);
}

.service-logo-circle, .service h3, .service p{
    margin: 1rem auto;
}

@media screen and (max-width: 600px){
    .services-container{
        flex-direction: column;
        align-items: center;
    }
    .service{
        width: 90%;
    }
}

/* Projects section */

.projects-container{
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    justify-items: center;
}

.project{
    width: 90%;
    height: auto;
    position: relative;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.project:hover{
    transform: scale(1.05);
}

.project-overlay{
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    width: 100%;
    opacity: 0;
    transition: 0.5s ease;
    background-color: rgba(37, 43, 54, 0.9);
}

.project-img-caption{
    color: #fff;
    font-size: 2rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.project:hover .project-overlay{
    opacity: 1;
}

.project-img{
    height: 100%;
    width: 100%;
}

@media screen and (max-width: 1000px){
    .projects-container{
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 600px){
    .projects-container{
        grid-template-columns: 1fr;
    }
}

/* Skills section */

#skills{
    margin-bottom: 10rem;
}

.skills-container{
    margin-top: 5rem;
    display: flex;
}

.skills-list{
    width: 70%;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-content: center;
    gap: 5rem;
}

.skill{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skills-text{
    width: 30%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 2rem;
    line-height: 1.8;
}

.skills-text hr{
    width: 30%;
    height: 0.4rem;
    margin-top: 1rem;
    background: #536dfd;
    border: none;
    text-align: center;
}

@media screen and (max-width: 870px){
    .skills-text{
        width: 40%;
    }
    .skills-list{
        width: 60%;
    }
}

@media screen and (max-width: 800px){
    .skills-container{
        flex-direction: column;
        align-items: center;
        margin-top: 4rem;
    }

    .skills-list, .skills-text{
        width: 80%;
    }

    .skills-text{
        margin-bottom: 2rem;
        text-align: center;
    }

    .skills-text hr{
        width: 20%;
    }

}

@media screen and (max-width: 500px){
    .skills-container{
        margin-top: 3rem;
    }

    .skills-text{
        width: 100%;
    }

    .skills-list{
        grid-template-columns: repeat(2, 1fr);
    }
}

.skill-logo{
    margin-bottom: 0.5rem;
}

.skill figcaption{
    font-size: 0.9rem;
    color: gray;
    user-select: none;
}

.skill-logo, .skill figcaption{
    width: 60px;
    text-align: center;
}

/* Contact section */

#contact{
    margin-bottom: 8rem;
}

.contact-container{
    display: flex;
}

.contact-text{
    width: 50%;
}

.contact-form{
    width: 50%;
}

.form-label{
    margin-bottom: 0.5rem;
    display: inline-block;
    font-weight: bold;
}

.form-control{
    display: block;
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    font-weight: 300;
    font-family: inherit;
    line-height: 1.42857143;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}

.form-control:focus {
    border-color: #66afe9;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(37, 43, 54, .6);
}

.form-group {
    margin-bottom: 15px;
}

.contact-btn{
    display: block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    color: #fff;
    text-align: center;
    background-color: #343a40;
    border-color: #343a40;
}

.contact-btn:hover{
    background-color: #23272b;
    border-color: #1d2124;
}

.contact-btn:focus{
    box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5);
}

.contact-text h3{
    font-size: 3rem;
    margin-bottom: 3rem;
}

.contact-text p{
    margin-bottom: 2rem;
}

.robot-signature{
    user-select: none;
    font-size: 2rem;
    font-family: 'Parisienne', cursive;
    font-weight: bold;
}

@media screen and (max-width: 780px){
    .contact-container{
        flex-direction: column;
        align-items: center;
    }

    .contact-form, .contact-text{
        width: 80%;
        margin-bottom: 2rem;
    }

    .contact-text{
        text-align: center;
    }
    
    .contact-btn{
        width: 30%;
        margin: 0 auto;
    }
}

@media screen and (max-width: 500px){
    .contact-text{
        width: 100%;
    }
    
    .contact-form{
        width: 90%;
    }
}

/* Footer */

footer{
    padding: 0.5rem;
    background-color: var(--main-dark-blue);
    text-align: center;
}

.copyrights{
    color: white;
    font-weight: bold;
    font-size: 1rem;
}

.made-with-love{
    margin-top: 0.2rem;
}

.my-github{
    transition: 0.2s all ease;
}

.my-github:hover{
    color: #bebebe;
}

@media screen and (max-width: 400px){
    .copyrights{
        font-size: 0.9rem;
    }
}
