/* GOOGLE FONTS */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@900&family=Poppins:wght@300;400;500;600;700&display=swap');

/* VARIABLES CSS */
:root {
    --header-height: 6rem;

    /* COLORS */
    /* Color mode HSL(Hue, Saturation, Lightness) */
    --first-color: hsl(180, 60%, 45%);
    --title-color: hsl(0, 0%, 100%);
    --text-color: hsl(0, 0%, 77%);
    --body-color: hsl(0, 0%, 6%);
    --container-color: hsl(0, 0%, 10%);
    --border-color: hsla(0, 0%, 100%, 0.2);

    /* FONTS & TYPOGRAPHY */
    /* .5rem = 8px | 1rem = 16px ...*/
    --body-font: 'Poppins', 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.125rem;
    --small-font-size: 1rem;
    --smaller-font-size: 0.875rem;

    /* FONT WEIGHT */
    --weight-300: 300;
    --weight-400: 400;
    --weight-500: 500;
    --weight-600: 600;
    --weight-700: 700;
    --weight-900: 900;

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

    /* BORDER RADIUS */
    --radius: .5rem;
    
    /* Z-INDEX */
    --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;
        }
}

/* BASE */
* {
    margin: 0;
    padding: 0;
    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.67em;
}

img {
    max-width: 100%;
}

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


/* REUSABLE CSS CLASSES */
.container {
    max-width: 80%;
    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);
}

.btn:hover {
    color: var(--first-color);
    background-color: transparent;
}

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



/* HEADER & NAV */
.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.5rem;
    font-weight: var(--weight-700);
}

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

.nav__list {
    column-gap: 2rem;
}

.nav__link{
    font-size: var(--normal-font-size);
    color: var(--title-color);
    transition: all 0.3s var(--transition);
}

.nav__social-link {
    font-size: var(--h3-font-size);
    color: var(--title-color);
    transition: all 0.3s var(--transition);
}

.nav__link {
    font-weight: var(--weight-500);
}

#nav-link-contact {
    display: none;
}

.nav__socials {
    column-gap: 1.5rem;
    margin-left: auto;
}

.nav__social-link:hover {
    color: var(--first-color);
    transform: translateY(-0.25rem);
}

.nav__link-btn {
    font-style: 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;
}

/* ACTIVE LINK */
.active-link, .nav__link:hover {
    color: var(--first-color);
}

/* CHANGE BACKGROUND HEADER */
.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 {
    display: block;
    font-size: var(--small-font-size);
    font-weight: var(--weight-400);
    letter-spacing: 0.25rem;
    margin-bottom: 1.25rem;
}

.home__title {
    font-family: var(--second-font);
    font-size: var(--h1-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.5rem solid var(--container-color);
    margin-left: auto;
}

.home__img:hover {
    border-color: var(--first-color);
}

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

.about__container {
    grid-template-columns: 4fr 8fr;
    align-items: center;
    column-gap: 4rem;
}

.about__img {
    border-radius: var(--radius);
}

.about__description {
    margin-bottom: 2rem;
    text-align: left;
}

.tabs__content {
    min-height: 212.281px;
}

.tabs__btns {
    display: flex;
    column-gap: 2.5rem;
    margin-bottom: 1.25rem;
}

.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;
}

/* ACTIVE TAB */
.tabs__btn.tab__active {
    color: var(--first-color);
}

.tabs__btn.tab__active::after {
    background-color: var(--first-color);
    width: 100%;
}

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

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

/* SERVICES */
.services__container {
    grid-template-columns: repeat(3, 1fr);
    /* grid-auto-rows: minmax(100px, auto); */
}

.services__item {
    /* display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: start; */
    background-color: var(--container-color);
    padding: 3rem 2rem;
    border-radius: var(--radius);
}

.services__icon {
    height: 4rem;
}

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

.services__description {
    font-weight: var(--weight-400);
}

/* WORK */
.project {
    background-color: var(--container-color);
}

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

.project__item {
    background-color: var(--body-color);
    padding: 2.5rem;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content:space-between;
}

.project__icons {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    width: 80%;
}

.project__link {
    color: var(--title-color);
    font-size: 2rem;
    transition: all .65s var(--transition);
    /* line-height: 1; */
}

.project__link:hover {
    color: var(--first-color);
    transform: scale(1.5);
}

.project__img {
    vertical-align: middle;
    transition: all .65s var(--transition);
}

.project__img:hover {
    transform: scale(1.1);
}

.project__data {
    /* inset-inline: 2rem;
    bottom: 1.25rem; */
    text-align: center;
}

.project__title {
    /* font-size: var(--h3-font-size);
    font-weight: var(--weight-500);
    margin-block: 1.75rem 1.25rem; */
    font-size: var(--h2-font-size);
    font-weight: var(--weight-600);
    margin-bottom: 0.75rem;
    margin-top: 1rem;
}

.project__description {
    font-weight: var(--weight-400);
    color: var(--title-color);
    opacity: 0.7;
    margin-bottom: 0.75rem;
}

/* .project__item {
    position: relative;
    cursor: pointer;
    border-radius: var(--radius);
    overflow: hidden;
}

.project__item::after, .project__data {
    position: absolute;
    transition: all .65s var(--transition);
}

.project__item::after {
    content: '';
    inset: 0;
    background: linear-gradient(180deg, transparent, var(--body-color));
    opacity: 0;
}

.project__img {
    width: 100%;
    vertical-align: middle;
    transition: all 1s var(--transition);
}

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

.project__subtitle, .project__description {
    color: var(--title-color);
    opacity: 0.7;
}

.project__subtitle {
    font-size: var(--small-font-size);
    margin-bottom: .25rem;
}

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

.project__description {
    font-weight: var(--weight-400);
    display: none;
} */

/* WORK HOVER */
/* .project__item:hover::after {
    opacity: 1;
}

.project__item:hover .project__img {
    transform: scale(1.1);
}

.project__item:hover .project__description {
    display: block;
}

.project__item:hover .project__data {
    transform: translateY(-1rem);
} */

/* CONTACT */
.contact__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    column-gap: 4rem;
}

.contact__description, .contact__input {
    font-weight: var(--weight-400);
}

.contact__description {
    margin-bottom: 3rem;
}

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

.contact__form {
    position: relative;
}

.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;
}
.contact__img {
  width: 100%;
}

.textarea {
    height: 120px;
    resize: none;
}

.error__message {
    position: absolute;
    bottom: -12%;
    left: 0;
    font-size: var(--small-font-size);
    font-weight: var(--weight-400);
}

.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(--normal-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(--small-font-size);
    font-weight: var(--weight-400);
    justify-self: flex-end;
}

.icons8 {
    text-decoration: underline;
    color: var(--text-color);
}

/* 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.4s var(--transition);
}

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

/* SHOW SCROLL UP */
.show-scroll {
    bottom: 3rem;
}

/* BREAKPOINTS */
/* For large devices */
@media screen and (max-width: 1200px) {
    .container {
        /* max-width: 960px; */
        max-width: 80%;
    }

    .nav__btns {
        display: none;
    }

    #nav-link-contact {
        display: block;
    }

    .home {
        padding-top: 11rem;    
    }

    .home__container, .about__container {
        grid-template-columns: 1fr;
    }

    .home__container {
        row-gap: 2rem;
    }

    .home__content {
        order: 1;
        width: fit-content;
        justify-self: center;
    }

    .home__img, .about__img {
        margin-inline: auto;
    }

    .home__img {
        border: 0.5rem solid var(--container-color);
        width: 380px;
        height: 380px;
    }
    .about__container {
        row-gap: 2.5rem;
    }

    .about__img {
        height: 100%;
    }

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

    .contact__container {
        column-gap: 2rem;
    }
}

@media screen and (max-width: 992px) {
    .container {
        /* max-width: 720px; */
        max-width: 80%;
    }

    .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;
        right: -100%;
        width: 60vw;
        height: 100vh;
        background-color: var(--container-color);
        padding: 3.5rem;
        transition: all 0.8s 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;
    }

    .nav__socials {
        column-gap: 1rem;
    }

    .nav__toggle {
        font-size: var(--h2-font-size);
    }

    .nav__close, .nav__toggle {
        cursor: pointer;
    }

    .home {
        padding-top: 9rem;
    }

    .home__img {
        width: 320px;
        height: 320px;
    }

    .services__icon {
        font-size: 2.5rem;
    }

    .services__title {
        margin-block: 1.5rem 1rem;
    }

    .contact__container {
        grid-template-columns: 1fr;
        row-gap: 2rem;
    }

    .contact__content {
        order: 1;
    }

    .contact__description {
        margin-bottom: 2rem;
    }

    .footer__social-link {
        font-size: var(--smaller-font-size);
        width: 36px;
        height: 36px;
    }

    .scrollup {
        width: 42px;
        height: 42px;
    }

    .scrollup__icon {
        font-size: 2rem;
    }
}

/* For medium devices */
@media screen and (max-width: 768px) {
    .container {
        /* max-width: 540px; */
        max-width: 80%;
    }

    /* .home__title {
        font-size: 3rem;
    } */

    .home {
        padding-block: 6rem;
    }

    .section {
        padding-block: 4rem;
    }

    .home__img {
        width: 280px;
        height: 280px;
    }

    .tabs__btns {
        flex-wrap: wrap;
        row-gap: 0.75rem;
        column-gap: 1.5rem;
    }

    .tabs__content {
        min-height: 219.031px;
    }


    .section__description {
        margin-bottom: 1.5rem;
    }

    .contact__form {
        display: flex;
        flex-direction: column;
    }

    .btn {
        align-self: center;
    }

    .footer__container {
        row-gap: 1.5rem;
        justify-items: center;
    }

    .footer__copyright {
        justify-self: center;
    }
}

@media screen and (max-width: 576px) {
    .container {
        max-width: 90%;
    }

    .nav__menu {
        width: 100vw;
        padding: 2.75rem;
    }

    /* .home__title {
        font-size: 2rem;
    } */

    .home__img {
        width: 260px;
        height: 260px;
    }

    .tabs__content {
        min-height: 272.469px;
    }

    .services__container,
    .project__container,
    .footer__container {
        grid-template-columns: 1fr;
    }

    .services__item {
        padding: 1.5rem 1rem;
    }
    .section__description {
      max-width: 85%;
    }
}

/* For small devices */
@media screen and (max-width: 350px) {
    .home__img {
        width: 240px;
        height: 240px;
    }

    /* .home__title {
        font-size: 1.75rem;
    } */

    .tabs__content {
        min-height: 219.031px;
    }

    .tabs__description span:last-child {
        display: inline;
    }

    .project__data {
        inset-inline: 1rem;
        bottom: 1rem;
    }

    
}