
/* HEADER */
#header{
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: calc(100vh - var(--navbar-height));
    min-height: calc(100lvh - var(--navbar-height));

    
    margin-top: var(--navbar-height);
    /* background: url(../media/bg.jpg) no-repeat center center;
    background-size: cover; */
    background-color: var(--clr-3);

    display: flex;
    justify-content: center;
    align-items: center;
}

#homepage-header-bg{
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

#header-container{
    z-index: 10;
    align-items: flex-start;
    flex-direction: column;
    color: var(--clr-1);
    padding-top: 100px;
    padding-bottom: 100px;
}

#header-subtitle{
    max-width: 1200px;
    width: 100%;
    font-size: calc(var(--font-size) * 2);
    margin-top: 25px;
    margin-bottom: 50px;
    color: var(--clr-7);
    line-height: 1.5;
}

#header-title{
    display: flex;
    flex-wrap: wrap;
}

#header-title-bold{
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-color: var(--clr-1);
    text-decoration-thickness: 2px;
}

#header-link{
    z-index: 10;
    position: relative;
    background-color: var(--clr-6);
    border-radius: var(--border-radius-2);
    padding: 10px 30px;
    color: var(--clr-1);
    font-weight: 600;
    font-size: calc(var(--font-size) * 1.5);
    transition: color .2s ease;
}
#header-link::after{
    z-index: -1;
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0%;
    height: 100%;
    background-color: var(--clr-1);
    border-radius: var(--border-radius-2);
    transition: width .2s ease;
}
@media (hover: hover) and (pointer: fine) {
    #header-link:hover::after{
        width: 100%;
    }
    #header-link:hover{
        color: var(--clr-4);
    }
}




/* MAIN */
#main{
    width: 100%;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* SKILL */
#skill{
    width: 100%;
    padding: 50px 0;
    background-color: var(--clr-3);

    display: flex;
    justify-content: center;
    align-items: center;
}
#skill-container{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(1, 1fr);
    place-items: center;
}

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

.skill-item-icon{
    width: fit-content;
    height: fit-content;
    
    display: flex;
    justify-content: center;
    align-items: center;
}

.skill-item-number-block{
    color: var(--clr-1);
    font-size: calc(var(--font-size) * 3);
    font-weight: 700;
    margin: 10px 0;
}

.skill-item-text{
    color: var(--clr-7);
    font-size: calc(var(--font-size) * 1);
    font-weight: 700;

}



/* SERVICES */
#services{
    width: 100%;
    padding: 200px 0;

    display: flex;
    justify-content: center;
    align-items: center;
}
#services-container{
    flex-direction: column;
    max-width: none;
    width: 100%;
}


#services-group{
    width: 100%;
    margin-top: 50px;
    padding: 5px;

    display: grid;
    gap: 5px;
    grid-template-areas: 
    'one two two three four'
    'five six seven seven eight';
    grid-template-columns: repeat(5, 1fr);
}

.services-item{
    position: relative;
    min-height: 300px;
    opacity: 0;

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}
@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
    }
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
.services-item.animate__fadeIn {
    -webkit-animation: fadeIn .5s linear forwards;
    animation: fadeIn .5s linear forwards;
}


.services-item-img{
    z-index: 0;
    position: absolute;
    object-fit: cover;
    width: 100%;
    height: 100%;
    /* filter: brightness(30%); */
}

.services-item:nth-child(1){grid-area: one;}
.services-item:nth-child(2){grid-area: two;}
.services-item:nth-child(3){grid-area: three;}
.services-item:nth-child(4){grid-area: four;}
.services-item:nth-child(5){grid-area: five;}
.services-item:nth-child(6){grid-area: six;}
.services-item:nth-child(7){grid-area: seven;}
.services-item:nth-child(8){grid-area: eight;}

.services-item-text{
    z-index: 10;
    color: var(--clr-7);
    font-size: calc(var(--font-size) * 1.5);
    font-weight: 700;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    transition: background-color .2s ease, color .2s ease;
    padding: 0 20px;

    display: flex;
    justify-content: center;
    align-items: center;
}
@media (hover: hover) and (pointer: fine) {
    .services-item:hover .services-item-text{
        background-color: rgba(255, 255, 255, 0.9);
        color: var(--clr-3);
    }
}


.services-item-icon{
    visibility: visible;
    position: absolute;
    right: 0;
    bottom: 0;
    margin: 20px;
    z-index: 10;
    transition: filter .2s ease;
    filter: invert(1);
}
@media (hover: hover) and (pointer: fine) {
    .services-item:hover .services-item-icon{
        filter: none;

    }
}



#services-title{
    padding-right: 30px;
    border-top-left-radius: var(--border-radius-3);
    border-bottom-left-radius: var(--border-radius-3);
}
#services-title::after{ 
    width: var(--title-left-0);
    left: calc(100% - 5px);
}

#services-subtitle{
    font-size: calc(var(--font-size) * 1.5);
    font-weight: 600;
    color: var(--clr-3);
    padding: 0 var(--side-gap);
    text-align: center;
    margin-top: 45px;
}


/* ABOUT */
#about{
    width: 100%;
    padding-bottom: 100px;

    display: flex;
    justify-content: center;
    align-items: center;
}

#about-container{
    justify-content: space-between;
}

.about-block{
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
    color: var(--clr-3);

}

.about-block:first-child{
    max-width: 550px;
}
.about-block:last-child{
    width: 100%;
    align-items: center;
    margin-left: 50px;
}

#about-title{
    margin-bottom: 40px;
    padding-left: 0px;
    padding-right: 30px;
    border-top-right-radius: var(--border-radius-3);
    border-bottom-right-radius: var(--border-radius-3);
}
#about-title::after{ 
    right: calc(100% - 5px);
    width: var(--title-left-1);
}

#about-subtitle{
    color: var(--clr-3);
    font-size: calc(var(--font-size) * 1.5);
    font-weight: 600;
}
#about-text{
    color: var(--clr-3);
    font-size: calc(var(--font-size) * 1.2);
    font-weight: 500;
    margin: 25px 0;
    line-height: 2;
}

#about-link{
    max-width: 120px;
    width: 100%;
    text-align: center;
    z-index: 10;
    position: relative;
    background-color: var(--clr-6);
    border-radius: var(--border-radius-2);
    color: var(--clr-1);
    font-size: calc(var(--font-size) * 1.2);
    font-weight: 600;
    padding: 5px 0;
    margin-top: 10px;
    transition: color .2s ease;

}
#about-link::after{
    z-index: -1;
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0%;
    height: 100%;
    background-color: var(--clr-1);
    border-radius: var(--border-radius-2);
    transition: width .2s ease, border .2s ease;
}
@media (hover: hover) and (pointer: fine) {
    #about-link:hover::after{
        width: 100%;
        border: 1px var(--clr-4) solid;
    }
    #about-link:hover{
        color: var(--clr-4);
    }
}




/* REFERENCE */
#reference{
    width: 100%;
    padding: 100px 0;

    display: flex;
    justify-content: center;
    align-items: center;
}

#reference-container{
    flex-direction: column;
}

#reference-title{
    border-top-left-radius: var(--border-radius-3);
    border-bottom-left-radius: var(--border-radius-3);
    margin-bottom: 35px;
    padding-right: 30px;
}
#reference-title::after{
    left: calc(100% - 5px);
    width: var(--title-left-2);
}

#reference-subtitle{
    max-width: 600px;
    width: 100%;
    padding: 0 35px;
    margin-bottom: 40px;
    font-size: calc(var(--font-size) * 1.5);
    font-weight: 600;
    color: var(--clr-3);
    text-align: center;
    line-height: 2;

}

#reference-block{
    width: 100%;

    display: grid;
    grid-template-areas: 
    'one two three';
    gap: 25px;
}

.reference-items{
    z-index: 10;
    position: relative;
    min-height: 300px;
    color: var(--clr-1);
    opacity: 0;
}

.reference-items.animate__fadeIn {
    -webkit-animation: fadeIn .5s linear forwards;
    animation: fadeIn .5s linear forwards;
}
.reference-items:nth-child(1){grid-area: one;}
.reference-items:nth-child(2){grid-area: two;}
.reference-items:nth-child(3){grid-area: three;}

.reference-items-img{
    z-index: -1;
    position: absolute;
    object-fit: cover;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
}

.reference-items-group{
    position: relative;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 40px;
    text-align: left;
    transition: background-color .2s ease, color .2s ease;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
}
@media (hover: hover) and (pointer: fine) {
    .reference-items-group:hover{
        background-color: rgba(255, 255, 255, 0.9);
        color: var(--clr-3);
    }
    .reference-items-group:hover .reference-items-text{
        color: var(--clr-3);
    }
}

.reference-items-title{
    width: fit-content;
    position: relative;
    font-size: calc(var(--font-size) * 1.5);
    font-weight: 600;
    padding-bottom: 5px;
}
.reference-items-title::after{
    position: absolute;
    content: '';
    left: 0;
    bottom: 0;
    background-color: var(--clr-1);
    width: 60%;
    height: 2.5px;
    transition: background-color .2s ease;
}
@media (hover: hover) and (pointer: fine) {
    .reference-items-group:hover .reference-items-title::after{
        background-color: var(--clr-3);
    }
}

.reference-items-year{
    position: absolute;
    right: 0;
    bottom: 0;
    padding: 40px;
    font-size: calc(var(--font-size) * 1.2);
    font-weight: 600;

}

.reference-items-text{
    font-size: calc(var(--font-size) * 1.2);
    font-weight: 500;
    margin: 25px 0;
    line-height: 1.5;
    color: var(--clr-7);
    transition: color .2s ease;
}

.reference-items-icon{
    background-color: var(--clr-1);
    padding: 5px 15px;
    border-radius: var(--border-radius-1);
    width: fit-content;
    transition: background-color .2s ease;

    display: flex;
    justify-content: center;
    align-items: center;
}
@media (hover: hover) and (pointer: fine) {
    .reference-items-group:hover .reference-items-icon{
        background-color: var(--clr-3);
    }
    .reference-items-group:hover .reference-items-icon img{
        filter: brightness(0) saturate(100%) invert(100%) sepia(0%);
    }
}
.reference-items-icon img{
    transition: filter .2s ease;

}

#reference-link{
    max-width: 200px;
    width: 100%;
    text-align: center;
    z-index: 10;
    position: relative;
    background-color: var(--clr-6);
    border-radius: var(--border-radius-2);
    color: var(--clr-1);
    font-size: calc(var(--font-size) * 1.2);
    font-weight: 600;
    padding: 5px 0;
    margin-top: 40px;
    transition: color .2s ease;

    display: flex;
    justify-content: center;
    align-items: center;
}
#reference-link::after{
    z-index: -1;
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0%;
    height: 100%;
    background-color: var(--clr-1);
    border-radius: var(--border-radius-2);
    transition: width .2s ease, border .2s ease;
}
@media (hover: hover) and (pointer: fine) {
    #reference-link:hover::after{
        width: 100%;
        border: 1px var(--clr-4) solid;
    }
    #reference-link:hover{
        color: var(--clr-4);
    }
}



/* CONTACT */
#contact{
    width: 100%;
    padding: 100px 0;

    display: flex;
    justify-content: center;
    align-items: center;
}
#contact-container{
    flex-direction: column;
    align-items: flex-start;
}

#contact-title{
    border-top-right-radius: var(--border-radius-3);
    border-bottom-right-radius: var(--border-radius-3);
    margin-bottom: 30px;
    padding-right: 30px;
    padding-left: 0px;
}
#contact-title::after{
    right: calc(100% - 5px);
    width: var(--title-left-3);
}

#contact-block{
}

#contact-span{
    color: var(--clr-3);
    font-size: calc(var(--font-size) * 1.5);
    font-weight: 600;
}

#contact-text{
    color: var(--clr-3);
    font-size: calc(var(--font-size) * 1.2);
    font-weight: 500;
    margin: 25px 0;
    margin-bottom: 30px;
    max-width: 800px;
    line-height: 2;

}


#contact-link{
    max-width: 200px;
    width: 100%;
    text-align: center;
    z-index: 10;
    position: relative;
    background-color: var(--clr-6);
    border-radius: var(--border-radius-2);
    color: var(--clr-1);
    font-size: calc(var(--font-size) * 1.2);
    font-weight: 600;
    padding: 5px 0;
    margin-top: 10px;
    transition: color .2s ease;

    display: flex;
    justify-content: center;
    align-items: center;

}
#contact-link::after{
    z-index: -1;
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0%;
    height: 100%;
    background-color: var(--clr-1);
    border-radius: var(--border-radius-2);
    transition: width .2s ease, border .2s ease;
}
@media (hover: hover) and (pointer: fine) {
    #contact-link:hover::after{
        width: 100%;
        border: 1px var(--clr-4) solid;
    }
    #contact-link:hover{
        color: var(--clr-4);
    }
}









/* MEDIA */
@media screen and (max-width: 1700px) {
   
    #skill-container{
        flex-wrap: wrap;
    }
   
}

@media screen and (max-width: 1300px) {
    #services-group{
        grid-template-areas: 
        'four four one one'
        'six three two two'
        'five seven seven eight';    
        grid-template-columns: repeat(4, 1fr);

    }

    #about-container{
        flex-direction: column;
    }

    .about-block:first-child{
        max-width: none;
    }

    .about-block:last-child{
        margin-left: 0;
    }

    #about-link{
        max-width: 150px;
        margin-bottom: 100px;
    }

    #reference-block{
        grid-template-areas: 
        'one'
        'two'
        'three';
    }  

}

@media screen and (max-width: 1200px) {
    #header-title{
        font-size: calc(var(--font-size) * 2.8);
    }
    #header-subtitle{
        font-size: calc(var(--font-size) * 1.8);
    }    
    #header-link{
        font-size: calc(var(--font-size) * 1.3);
    }
}

@media screen and (max-width: 1100px) {
    #skill-container{
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 50px;
    }
}

@media screen and (max-width: 767px) {
    #header-title{
        font-size: calc(var(--font-size) * 2.5);
    }
    #header-subtitle{
        font-size: calc(var(--font-size) * 1.5);
    }    
    #header-link{
        font-size: calc(var(--font-size) * 1.3);
    }

    #services-container{
        padding: 0;
    }    
    #services-group{
        grid-template-areas: 
        'four'
        'one'
        'three'
        'five'
        'six'
        'eight'
        'seven'
        'two';    
        grid-template-columns: repeat(1, 1fr);

    }

    #about-img{
        max-width: 500px;
        width: 100%;
    }

    #reference-block{
        grid-template-areas: 
        'one'
        'two'
        'three';
        gap: 5px;
        padding: 5px;
    }  
    #reference-container{
        max-width: none;
        width: 100%;
        padding: 0;
    }
}

@media screen and (max-width: 500px) {
    #header-title{
        width: 100%;
        text-align: left;

    }
    #header-subtitle{
        width: 100%;
        text-align: left;

    }    
    #header-link{
        width: 100%;
        text-align: center;
    }

    #skill-container{
        grid-template-columns: repeat(1, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 50px;
    }
    

    #about-link{
        max-width: none;
        padding: 10px 0;
    }
    #reference-link{
        max-width: none;
        width: 80%;
        padding: 10px 0;
        margin-top: 20px;
        
    }
    #contact-link{
        max-width: none;
        padding: 10px 0;
    }

}

@media screen and (max-width: 400px) {
    /* #skill{
        padding: 15px 0;
    }     */
    .skill-item{
        margin: 15px;
        max-width: 250px;
        min-width: 250px;
    }
}