html {
    scroll-behavior: smooth;
    box-sizing: border-box;
}

  *, *:before, *:after {
    box-sizing: inherit;
  }

body{
    font-family: 'Montserrat', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h2{
    font-size: 2rem;
    font-weight: bold;
}

p{
    font-size: 1.3rem;
}

.btn{
    font-size: 1.3rem;
    font-weight: 300;
}

.form .form_header{
    font-size: 1.3em;
    font-weight: bold;
}

.nav { 
    background: white;
    height: 5rem; 
    width: 100%;
    text-transform: uppercase;
    font-size: 1.7rem;
    font-weight: bold;
}

.nav ul {
    text-align: right;
    list-style: none;
    margin: 0 auto;
    padding:0%;
  }

.nav ul li {
    display: inline-flex; 
    line-height: 5rem;  
}
  
.nav a {
    color: rgb(100,100,100);
    position: relative;
    text-align: center;
    margin: 0 1rem;
    box-sizing: border-box;
    text-decoration: none;
    transition: transform 0.4s;
}

 .nav a:hover{
    color: #FF9800;
} 

.nav a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) scaleX(0);
    transform-origin: 50% 50%;
    width: 110%;
    height: 3px;
    background-color: #FF9800;
    transition: transform 0.4s;
}

.nav a:hover::after{
    transform: translateX(-50%) scaleX(1);
} 

#scroll{
    display: inline-block;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    font-size: 1.5rem;
    line-height: 1.5rem;
    width: 50px;
    height: 50px;
    text-align: center;
    text-decoration: none;
    border: 1px solid #FF9800;
    outline: none;
    background-color: transparent;
    color: #FF9800;
    cursor: pointer;
    padding: 15px;
    border-radius: 15px;
}
#scroll:hover{
    background-color: #FF9800;
    color: white;
}

/* Contact */

.contact{
    text-align: center;
    padding: 3%;
}

/* Buttons section */

.btn {
    box-sizing: border-box;
    width: 200px;
    height: 55px;
    margin-top: 10px;
    border-radius: 15px;
    border: 1px solid orange;
    background: white;
    color: #FF9800;
    cursor: pointer;
    text-align:center;
    transition: all .3s ease-in-out;
  }

.btn:hover {
    color: #fff;
    border: none;
    background-image: linear-gradient(to right, #FF9800, #f5ce62);
}

.btn:focus {
    outline: none;
}

/* Header section */

.header{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: calc(100vh - 5rem);
    padding: 30px;
    background-color: gray;
    background: gray url(img/road.jpg) no-repeat center/ cover ;
    box-sizing: border-box;
    animation: header 1s 2s forwards;
    opacity: 0.5;
}

@keyframes header{
    0%{
        opacity: 0.5;
    }
    100%{
        opacity: 1;
    }
}

.header h1{
    color: #FF9800;
    font-size: 8rem;
    text-transform: uppercase;
    opacity: 0;
    animation: h1_animation 3s 1s forwards;
}

@keyframes h1_animation{
    0%{
        opacity: 0;
    }
    100%{
        opacity: 100;
    }
}

.header p{
    color: white;
    font-size: 5rem;
    max-width: 90%;
    opacity: 0;
    animation: p_animation 4s 4s forwards;
}

@keyframes p_animation{
    0%{
        opacity: 0;
    }
    100%{
        opacity: 100;
    }
}

.contact{
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.contact p {
    font-size: 2rem;
}

.contact .buttons{
    width: 100%;
    display: flex;
    justify-content: space-evenly;
}

/* About me section */

#about_me_background{
    height: auto;
    background-color: rgb(240, 240, 240);
    padding: 3%;
    display: flex; 
    flex-direction: column;
    width: 100%;
}

.about_me{
    padding: 2%;
    background-color: rgb(255,255,255);
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1600px;
    align-self: center;
}

.about_me .details{
    min-width: 295px;
}

.details .value{
    color: #FF9800;
}
.details p{
    font-weight: 900;
}

.photo{
    margin: 1.5%;
}

.about_me img{
    width: 180px;
    border-radius: 50%;
}

.about_me .details{
    margin: 1.5%;
}

.description{
    margin: 1.5%;
    /* width: 50%; */
}

/* Skills section */

#skills_background{
    height: auto;
    background-color: rgb(240, 240, 240);
    padding: 3%;
    display: flex; 
    flex-direction: column;
    width: 100%;
}

#skills{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.skill {
    background-color: #FF9800;
    font-size: 10rem;
    text-align: center;
    color: #fff;
    height: 200px;
    width: 200px;
    box-sizing: border-box;
    border: 20px;
    margin: 5px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

#skills i {
    line-height: 200px;
    transition: all 0.3s ease-in-out;
}

#skills .skill:hover i {
    font-size: 1.15em; 
}

/* Portfolio section */

#portfolio_background{
    height: auto;
    background-color: rgb(240, 240, 240);
    padding: 3%;
    display: flex; 
    flex-direction: column;

}

#portfolio{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center; 
}

.project{
    width: 450px;
    height: 250px;
	text-align: center;
    background-color: black;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

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

.project .project_description
{
    position: absolute;
	display: block;
	width: 100%;
    height: 100%;
    padding: 5%;
    color: #fff;
    background-color: #000;
    text-align: center;
	left: 0px;
	top: 0px;
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
}

.project:hover .project_description
{
	opacity: 0.8;
}

.project .project_name {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: black;
    color: #fff;
    padding-left: 20px;
    padding-right: 20px;
    opacity: 0.8;
}
.project:hover .project_name
{
	opacity: 0;
}

#contact_form_background{
    display: flex;
    flex-direction: column; 
    width: 100%;
    background-color: rgb(240, 240, 240);
    padding: 3%;
}

#contact_me{
    display: flex;
    max-width: 1600px;
    align-self: center;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

#contact{
    background-color: #FF9800;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    width: 50%;
    padding: 3%;
    color: #fff;
}
#contact .address{
    line-height: 1rem;
}

.form{
    padding: 3%;
    width: 50%;
    background-color: rgb(255,255,255);
    display: flex;
    flex-direction: column;
}

form{
    display: flex;
    flex-direction: column;
}

form .row{
    font-size: 18px;
    padding: 3%;
    margin-top: 15px;
    box-sizing: border-box;
    background: rgb(240, 240, 240);
    width: 100%;
    height: 60px;
    border-radius: 15px;
    text-align: left;
    border: none;
}

.form .message{
    height: 150px;
}

.form .row:focus{
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}

.form .btn{
    margin-top: 15px;
    align-self: flex-end;
}

.footer { 
    background: white;
    height: 2rem; 
    padding-bottom: 1%;
  }
  
.footer p { 
    color: gray;
    text-align: center;
    font-size: 0.75rem;  
    height: 2rem; 
    line-height: 2rem;
    margin: 0;  
}

@media only screen and (max-width: 1024px){
.header h1{
        font-size: 6rem;
    }
    .header p{
        font-size: 4rem;
        max-width: 100%;
    }

    .contact{
        width: 95%;
    }

     #skills .skill {
        background-color: #FF9800;
        font-size: 6rem;
        color: #fff;
        height: 130px;
        width: 130px;
    }
    #skills i {
        line-height: 130px;
    }
    .project{
        width: 300px;
        height: 200px;
    }
}

@media only screen and (max-width: 768px){
    .nav{
        display: inline;
        font-size: 1rem;
        line-height: 1.5rem;  
    }

    .header h1{
        font-size: 5rem;
    }
    .header p{
        font-size: 3rem;
    }

    .about_me{
        flex-wrap: wrap;
        justify-content: space-around;
    }

    .description{ 
        width: 100%;
    } 
}

@media only screen and (max-height: 450px), (orientation: horizontal){
    .nav{
        display: inline;
        font-size: 0.8rem;
        line-height: 1rem; 
        height: 2rem; 
    }
    .nav ul li {
        display: inline-flex; 
        line-height: 2rem;  
    }

    .nav a {
        margin: 0 0.5rem;
    }

    #scroll{
        bottom: 10px;
        right: 10px;
        font-size: 1.5rem;
        width: 30px;
        height: 30px;
        padding: 0px;
        border-radius: 10px;
    }
    .header{
        height: calc(100vh - 2rem);
    }   
    .header h1{
        font-size: 3rem;
        margin: auto;
    }
    .header p{
        font-size: 2rem;
        margin: auto;
    }
}

@media only screen and (max-width: 450px){
    
    .nav{
        display: inline;
        font-size: 0.8rem;
        line-height: 2rem;  
    }
    .nav a {
        margin: 0 0.5rem;
    }

    #scroll{
        bottom: 10px;
        right: 10px;
        font-size: 1.5rem;
        width: 30px;
        height: 30px;
        padding: 0px;
        border-radius: 10px;
    }

    .header h1{
        font-size: 2.5rem;
    }
    .header p{
        font-size: 1.8rem;
    }

    .contact .buttons{
        flex-direction: column;
        align-items: center;
    
    }
    .contact p{
        font-size: 1.5rem;
    }
    .btn{
        font-size: 1rem;
    }
    #portfolio_background{
        max-width: 100%;
    }
    .project{
        width: 100%;
        height: 250px;
    }
    #contact_me{
        flex-direction: column;
    }
    #contact{
        width: 100%;
    }

    #contact_form_background{
        width: 100%;
    }
    .form{
        width: 100%;
    }
}