@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');

:root {
    --header-height: 6rem;
    --first-color: hsl(350, 98%, 64%);
    --first-color-alt: hsl(350, 98%, 50%);
    --title-color: hsl(0, 0%, 100%);
    --text-color: hsl(0, 0%, 77%);
    --text-color-light: hsl(0, 0%, 80%);
    --body-color: hsl(0, 0%, 6%);
    --container-color: hsl(0, 0%, 10%);
    --border-color: hsla(0, 0%, 100%, 0.2);
    --description-color:#ffffff;

    --body-font: 'Ubuntu', sans-serif;
    --second-font: 'Montserrat', sans-serif;

    --big-font-size: clamp(2rem, 0.9706rem + 4.7059vw, 4.5rem);
    --h1-font-size:  clamp(1.75rem, 0.9265rem + 3.7647vw, 3.75rem);
    --h2-font-size: 1.75rem;
    --h3-font-size: 1.5rem;
    --normal-font-size: 1.25rem;
    --small-font-size: 1rem;
    --smaller-font-size: 0.8175rem;

    --weight-300: 300;
    --weight-400: 400;
    --weight-500: 500;
    --weight-600: 600;
    --weight-700: 700;
    --weight-900: 900;

    --transition: cubic-bezier(0.05, 0.2, 0.1, 1);

    --radius: 0.5rem;

    --z-tooltip: 10;
    --z-fixed: 100;
}
/* Responsive typography */
@media screen and (max-width: 992px) {
    :root {
        --header-height: 5rem;
        --h2-font-size: 1.5rem;
        --h3-font-size: 1.25rem;
        --normal-font-size: 1rem;
        --small-font-size: 0.9375rem;
        --smaller-font-size: 0.813rem;
    }
}

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

html{
    scroll-behavior: smooth;
}

input,
textarea,
body {
    color: var(--text-color);
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    font-weight: var(--weight-300);
}

body {
    background-color: var(--body-color);
}

h1,
h2,
h3 {
    color: var(--title-color);
    font-weight: var(--weight-700);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

p {
    line-height: 1.67rem;
}

img {
    max-width: 100%;
}

textarea,
input {
    background-color: none;
    border: none;
    outline: none;
}

.container {
    max-width: 1260px;
    margin-inline: auto;
    padding-inline: 0.75rem;
}

.grid {
    display: grid;
    gap: 1.75rem;
}

.section {
    padding-block: 8rem;
}

.section-title {
    font-size: var(--h1-font-size);
    margin-bottom: 1rem;
}

.section-title:not(.about .section-title, .contact .section-title),
.section-description {
    text-align: center;
}

.section-description {
    max-width: 600px;
    margin-inline: auto;
    margin-bottom: 3.75rem;
}

.btn {
    display: inline-block;
    color: var(--title-color);
    background-color: var(--first-color);
    border: 2px solid var(--first-color);
    padding: 1rem 2.5rem;
    border-radius: var(--radius);
    font-size: var(--small-font-size);
    font-weight: var(--weight-500);
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s var(--transition);
}
.cv{
    margin-left: 10px;
}
.btn:hover {
    background-color: transparent;
    color: var(--first-color);
}

/* Header */
.header{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-fixed);
}
.nav,
.nav-list,
.nav-socials{
    display: flex;
}
.nav{
    height: calc(var(--header-height) + 1.5rem);
    align-items: center;
    justify-content: space-between;
    column-gap: 3.5rem;
}
.nav-logo{
    color: var(--title-color);
    font-size: 2.3rem;
    font-weight: var(--weight-700);
}
.nav-logo span{
    color: var(--first-color);
}
.nav-list{
    column-gap: 2rem;
}
.nav-link,
.nav-social-link{
    font-size: var(--small-font-size);
    color: var(--title-color);
    transition: all 0.3s var(--transition);
}
.nav-link{
    font-weight: var(--weight-500);
}
.nav-socials{
    column-gap: 1.75rem;
    margin-left: auto;
}
.nav-social-link:hover{
    color: var(--first-color);
    transform: translateY(-0.25rem);
}
.nav-link-btn{
    font-size: var(--smaller-font-size);
    background-color: transparent;
    border-color: var(--border-color);
    padding: 0.625rem 1.25rem;
}
.nav-link-btn:hover{
    background-color: var(--first-color);
    border-color: var(--first-color);
    color: var(--title-color);
}
.nav-toggle,
.nav-close{
    display: none;
}
.nav-close {
    display: block; /* Ensure the close button is visible */
    font-size: 1.5rem;
    color: var(--title-color);
    cursor: pointer;
    position: absolute;
    top: 1rem; /* Adjust as needed for placement */
    right: 1rem; /* Adjust as needed for placement */
}

.nav-menu {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: var(--body-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease-in-out;
}

.nav-menu.show-menu {
    display: flex; /* Make menu visible when active */
}

/* Active link */
.active-link,
.nav-link:hover{
    color: var(--first-color);
}

.scroll-header{
    position: fixed;
    background-color: var(--container-color);
    box-shadow: 0 0 10px hsla(0, 0%, 0%, 0.25);
    animation: slide-down 0.7s;
}
@keyframes slide-down {
    0%{
        transform: translateY(-100%);
    }
    100%{
        transform: translateY(0);
    }
    
}
.scroll-header .nav{
    height: var(--header-height);
}
/* home */
.home {
    padding-block: 16rem 9rem;
}

.home-container {
    grid-template-columns: 7fr 5fr;
    align-items: center;
}

.home-subtitle {
    font-size: var(--small-font-size);
    font-weight: var(--weight-400);
    letter-spacing: 0.25rem;
    margin-bottom: 1.25rem;
    display: block;
}

.home-title {
    font-family: var(--second-font);
    font-size: var(--big-font-size);
    font-weight: var(--weight-900);
}

.home-title span {
    color: var(--first-color);
}

.home-img {
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 0.75rem solid var(--container-color);
    margin-left: auto;
}

/* about */
.about {
    background-color: var(--container-color);
    overflow: hidden;
}


.about-container {
    grid-template-columns: 5fr 7fr;
    align-items: stretch;
    column-gap: 4rem;
}

.about-img {
    border-radius: var(--radius);
    width: 100%;
    height: 610px;
}

.about-description {
    margin-bottom: 2rem;
}

/* about -> Tab buttons */
.tab-btns {
    display: flex;
    column-gap: 2.5rem;
    margin-bottom: 1.25rem;
}
.tabs-content {
    min-height: 300px; /* Adjust to your preference */
}

.tabs-btn,
.tabs-description span:first-child {
    font-weight: var(--weight-500);
}

.tabs-btn {
    cursor: pointer;
    color: var(--title-color);
    position: relative;
    padding-bottom: 0.5rem;
}

.tabs-btn::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30%;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s var(--transition);
}

.tabs-data {
    row-gap: 1rem;
}

.tabs-description span:last-child {
    display: block;
}

.tabs-btn.tabs-active {
    color: var(--first-color);
}

.tabs-btn.tabs-active::after {
    background-color: var(--first-color);
    width: 100%;
}

.tabs-item {
    max-height: 400px; /* or any value that fits your design */
    overflow-y: auto;
}

.tabs-item[data-content] {
    display: none;
}

.tabs-active[data-content] {
    display: block;
}

/* Services */
.services-container {
    grid-template-columns: repeat(3, 1fr);
}

.services-item {
    /* text-align: center; */
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius);
    background-color: var(--container-color);
    box-shadow: 0 2px 4px hsla(0, 0%, 0%, 0.1);
    transition: all 0.3s var(--transition);
}

.services-icon {
    color: var(--first-color);
    font-size: 3.25rem;
    line-height: 1;
}

.services-title {
    font-size: var(--h3-font-size);
    font-weight: var(--weight-500);
    margin-block: 1.75rem 1.25rem;
}

/* Portfolio */
.portfolio {
    background-color: var(--container-color);
}

.portfolio-container {
    grid-template-columns: repeat(3, 1fr);
}

.portfolio-item {
    position: relative;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--description-color);
    height: 98%;
}

.portfolio-item::after,
.portfolio-data {
    position: absolute;
    transition: all 0.65s var(--transition);
}

.portfolio-item::after {
    content: '';
    inset: 0;
    background: linear-gradient(180deg,transparent, var(--container-color)),
                linear-gradient(360deg,transparent, var(--container-color));
    opacity: -10;
}

.portfolio-img {
    width: 100%;
    vertical-align: middle;
    transition: all 1s var(--transition);
    border: 2px solid var(--description-color);
}

.portfolio-data {
    inset-inline: 2rem;
    bottom: 1.25rem;
    text-align: center;
    z-index: var(--z-tooltip);
}

.portfolio-subtitle,
.portfolio-description {
    color: var(--description-color);
    /* opacity: 0.7; */
}

.portfolio-subtitle {
    font-size: var(--small-font-size);
    margin-bottom: 0.25rem;
}

.portfolio-title {
    font-size: var(--h2-font-size);
    font-weight: var(--weight-600);
    margin-bottom: 0.75rem;
}

.portfolio-description {
    font-weight: var(--weight-400);
    display: none;
}

.portfolio-item:hover::after {
    opacity: 1;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-description {
    display: block;
}

.portfolio-item:hover .portfolio-data {
    transform: translateY(-2rem);
}

/* Contact */
/* .contact{
    background-color: var(--container-color);
} */
.contact-container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    column-gap: 4rem;
}

.contact-description,
.contact-input {
    font-weight: var(--weight-400);
    /* opacity: 0.7; */
}

.contact-description {
    margin-bottom: 3rem;
}

.contact-description a {
    color: var(--title-color);
    font-weight: var(--weight-500);
}

.contact-form {
    position: relative;
}
.contact-img{
    width: 100%;
    height: auto;
    padding-left: 10rem;
}
.contact-input {
    border: 2px solid var(--border-color);
    padding: 0.8rem 1.25rem;
    width: 100%;
    border-radius: var(--radius);
    font-size: var(--smaller-font-size);
    margin-bottom: 1.25rem;
    background-color: transparent;
}

.textarea {
    height: 120px;
    resize: none;
}
.error-message {
    position: absolute;
    bottom: 3.5%;
    /* left: 0; */
    right: 0;
    font-size: var(--small-font-size);
    font-weight: var(--weight-400);
}
#progress-bar-container {
    position: absolute; 
    bottom: -40px; 
    left: 0;
    width: 100%;
    background-color: #f3f3f3;
    border-radius: 4px;
    margin: 10px 0; 
    overflow: hidden;
    height: 5px; 
    display: none; 
}
#progress-bar {
    width: 0;
    height: 5px;
    background: linear-gradient(to right, #ff0000, #ff8000, #ffff00, #80ff00, #00ff00);
    background-size: 200% 100%;
    background-position: 0% 0;
    transition: width 0.3s ease-in-out;
    animation: gradientMove 2s infinite linear;
}
@keyframes gradientMove {
    0% {
        background-position: 0% 0;
    }
    100% {
        background-position: 100% 0;
    }
}



.color-first {
    color: var(--first-color);
}

/* Footer */
.footer {
    background-color: var(--container-color);
    padding-block: 2rem;
}

.footer-container {
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
}

.footer-logo {
    color: var(--title-color);
    font-size: 2.5rem;
    font-weight: var(--weight-700);
}

.footer-logo span {
    color: var(--first-color);
}

.footer-socials {
    display: flex;
    justify-content: center;
    column-gap: 0.75rem;
}

.footer-social-link {
    color: var(--text-color);
    font-size: var(--small-font-size);
    border: 2px solid var(--text-color);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    transition: all 0.3s var(--transition);
}

.footer-social-link:hover {
    background-color: var(--first-color);
    border-color: var(--first-color);
}

.footer-copyright {
    font-size: var(--smaller-font-size);
    font-weight: var(--weight-400);
    justify-self: flex-end;
} 

/* Scroll up */
.scrollup{
    position: fixed;
    right: 1rem;
    bottom: -100%;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--title-color);
    display: grid;
    place-items: center;
    z-index: var(--z-fixed);
    transition: all 0.43 var(--transition);
}

.scrollup-icon{
    color: var(--first-color);
    font-size: 2.25rem;
    line-height: 1;
}

.show-scroll{
    bottom: 3rem;
}



/* Media queries */

@media screen and (max-width: 1200px) {
    .container{
        max-width: 960px;
    }
    .nav-btns{
        display: none;
    }
    .home{
        padding-top: 11rem;
    }
    .home-container,
    .about-container{
        grid-template-columns: 1fr;
        row-gap: 2rem;
    }
    .home-content{
        order: 1;
    }
    .home-img,
    .about-img{
        margin-inline: auto;
    }
    .about-img{
        width: 50%;
        height: auto;
    }
    .home-img{
        border: 0.5rem solid var(--container-color);
        width: 380px;
        height: 380px;
    }
    .about-container{
        row-gap: 2.5rem;
    }
    .services-container,
    .portfolio-container{
        grid-template-columns: repeat(2,1fr);
    }
    .contact-container{
        column-gap: 2rem;
    }
}

@media screen and (max-width: 992px) {
    .container{
        max-width: 720px;
    }
    .nav{
        height: var(--header-height);
        column-gap: 1.25rem;
    }
    .nav-logo{
        font-size: 2rem;
    }
    .nav-btns,
    .nav-toggle,
    .nav-close{
        display: block;
    }
    .nav-link-btn{
        display: none;
    }
    .nav-menu{
        position: fixed;
        top: 0;
        left: 0;
        right: -100%;
        width: 60vw;
        height: 100vh;
        background-color: var(--container-color);
        padding: 3.5rem;
        transition: all 0.3s var(--transition);
    }
    .show-menu{
        right: 0;
    }
    .nav-list{
        flex-direction: column;
        row-gap: 1.125rem;
    }
    .nav-close{
        font-size: 1.5rem;
        position: absolute;
        top: 1rem;
        right: 1rem;
        cursor: pointer;
    }
    .nav-toggle{
        font-size: var(--h2-font-size);
    }
    .nav-close,
    .nav-toggle{
        cursor: pointer;
    }
    .home{
        padding: 9rem;
    }
    .home-img{
        width: 320px;
        height: 320px;
    }
    .services-icon{
        font-size: 2.5rem;
    }
    .services-title{
        margin-block: 1.5rem 1rem;
    }
    .contact-description{
        grid-template-columns: 1fr;
        row-gap: 2rem;
    }
    .contact-content{
        order: 1;
    }
    .contact-description{
        margin-bottom: 2rem;
    }
    .footer-social-link{
        font-size: var(--small-font-size);
        width: 36px;
        height: 36px;
    }
    .scrollup{
        width: 42px;
        height: 42px;
    }
    .scrollup-icon{
        font-size: 2rem;
    }
}


@media screen and (max-width: 768px) {
    .container:not(.contact-container){
        max-width: 540px;
        justify-content: center;
    }
    .home {
        padding: 9rem 0 9rem 0;
    }
    .home-img{
        width: 280px;
        height: 280px;
    }
    .tabs-btns{
        flex-wrap: wrap;
        row-gap: 0.75rem;
        column-gap: 1.5rem;
    }
    .services-container,
    .portfolio-container,
    .footer-container{
        grid-template-columns: 1fr;
    }
    .footer-container{
        row-gap: 1.5rem;
        justify-items: center;
    }
    .footer-copyright{
        justify-self: center;
    }
    .contact-img{
        width: 100%;
        height: auto;
        padding-left: 0rem;
    }
    #feats,
    [data-target="#feats"] {
        display: none;
    }
    
}

@media screen and (max-width: 576px) {
    .nav-menu{
        width: 100vw;
        padding: 2.75em;
    }
    .home-img{
        width: 260px;
        height: 260px;
    }
    .services-item{
        padding: 2rem 1.5rem;
    }
    .error-message {
        position: absolute;
        bottom: 3.5%;
        /* left: 0; */
        right: 0;
        font-size: var(--small-font-size);
        font-weight: var(--weight-400);
    }
    .contact-container {
        grid-template-columns: repeat(1, 1fr);
    }
    .contact-img{
        display: none;
    }
    .contact-container .section-title{
        display: flex;
        justify-content: center;
    }
}


@media screen and (max-width: 350px) {
    .home-img{
        width: 240px;
        height: 240px;
    }
    .tabs-description span:last-child{
        display: inline;
    }
    .portfolio-data{
        inset-inline: 1rem;
        bottom: 1rem;
    }
    
}
