:root {
    --header-height: 3.5rem;

    --main-color: #2a602c;
    --main-color-alt: #c1e0c2;
    --main-color-light: #b1ffb3;
    --title-color: #241f33;
    --text-color: #6e6a7c;
    --text-color-light: #9591a1;
    --white-color: #fff;
    --body-color: #fff;
    --container-color: #fff;
    --shadow-color: rgba(42, 96, 44, 0.1);

    --body-font: "Syne", sans-serif;
    --biggest-font-size: 2rem;
    --h1-font-size: 1rem;
    --h2-font-size: 1.25rem;
    --h3-font-size: 1rem;
    --regular-font-size: 0.9rem;
    --small-font-size: 0.8rem;
    --smaller-font-size: 0.75rem;

    --font-regular: 400;
    --font-medium: 500;
    --font-bold: 600;

    --z-tooltip: 10;
    --z-fixed: 100;
    --z-modal: 1000;
}

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

html {
    scroll-behavior: smooth;
}

body,
input,
textarea,
button {
    font-family: var(--body-font);
    font-optical-sizing: auto;
    font-style: normal;
    font-size: var(--regular-font-size);
}

body {
    background-color: var(--body-color);
    color: var(--text-color);
    transition: background-color 0.4sa;
}

input,
button,
textarea {
    border: none;
    outline: none;
}

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

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Reusable components */

.container {
    max-width: 1200px;
    margin-inline: 1.5rem;
}

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

.section {
    padding-block: 5rem 1rem;
}

.section__title {
    font-size: var(--h1-font-size);
    text-align: center;
    margin-bottom: 2rem;
}

.perfil {
    width: 250px;
    height: 250px;
    background-color: var(--body-color);
    border: 8px solid var(--main-color);
    border-radius: 50%;
    display: grid;
    place-items: center;
    transition: background-color 0.4s;
}

.perfil__content {
    width: 180px;
    height: 180px;
    border: 10px solid var(--main-color);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    background: linear-gradient(180deg, var(--main-color), var(--main-color-light));
}

.main {
    overflow: hidden;
}

.hidden {
    display: none;
}

/* Header and Nav */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-color: var(--main-color);
    z-index: var(--z-fixed);
    transition: background-color 0.4s, box-shadow 0.4s;
}

.nav {
    position: relative;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    color: var(--white-color);
    font-weight: var(--font-bold);
    transition: color 0.4s;
}

.nav__toggle,
.nav__close {
    display: inline-flex;
    font-size: 1.25rem;
    cursor: pointer;
}

.nav__toggle {
    color: var(--white-color);
    transition: color 0.4s;
}

@media screen and (max-width: 1150px) {
    .nav__menu {
        position: fixed;
        top: -100%;
        left: 0;
        right: 0;
        background-color: var(--body-color);
        width: 100%;
        box-shadow: 0 12px 24px var(--shadow-color);
        padding-block: 5rem 4rem;
        transition: top 0.4s;
    }
}

.nav__list {
    display: flex;
    flex-direction: column;
    row-gap: 2.5rem;
    text-align: center;
}

.nav__link {
    color: var(--main-color-alt);
    font-weight: var(--font-bold);
    transition: color 0.4s;
}

.nav__link:hover {
    color: var(--main-color-light);
}

.nav__close {
    color: var(--title-color);
    position: absolute;
    top: 1.15rem;
    right: 1.5rem;
}

.show-menu {
    top: 0;
}

.scroll-header {
    background-color: var(--body-color);
    box-shadow: 0 2px 16px var(--shadow-color);
}

.scroll-header :is(.nav__logo, .nav__toggle) {
    color: var(--title-color);
}

.button {
    display: inline-block;
    background-color: var(--main-color);
    color: var(--white-color);
    font-weight: var(--font-bold);
    padding: 1rem 2rem;
    transition: background-color 0.4s, box-shadow 0.4s;
}

.button:hover {
    background: var(--main-color-alt);
    box-shadow: 0 8px 24px var(--shadow-color);
}

/* Home */
.home {
    position: relative;
    border-bottom: 8px solid var(--main-color);
}

.home__rectangle {
    width: 100%;
    height: 220px;
    background-color: var(--main-color);
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

.home__container {
    padding-block: 1rem 3rem;
}

.home__perfil {
    justify-self: center;
}

.home__content {
    row-gap: 3rem;
}

.home__data {
    row-gap: 0.75rem;
    text-align: center;
}

.home__name {
    font-size: var(--biggest-font-size);
}

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

.home__social {
    display: flex;
    justify-content: center;
    column-gap: 1rem;
}

.home__social-link {
    font-size: 1.5rem;
    color: var(--title-color);
    transition: color 0.4s;
}

.home__social-link:hover {
    color: var(--main-color);
}

.home__button {
    justify-self: center;
}

/* About */
.about__page {
    padding-bottom: 4rem;
}

.about__perfil {
    justify-self: center;
}

.about__content {
    row-gap: 4rem;
}

.about__data {
    row-gap: 2rem;
}

.about__info {
    row-gap: 0.75rem;
    text-align: center;
}

.about__name {
    font-size: var(--h1-font-size);
}

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

.about__button {
    justify-content: center;
}

.about__skills-title {
    font-size: var(--h3-font-size);
    text-align: center;
    margin-bottom: 2rem;
}

.about__skills-img {
    width: 35px;
    transition: transform 0.4s;
}

.about__skills-img:hover {
    transform: translateY(-0.5rme);
}

.about__skills-content {
    grid-template-columns: repeat(5, max-content);
    justify-content: center;
    align-items: center;
    gap: 2rem 1.5rem;
}

/* Services */
.services__container {
    row-gap: 2rem;
}

.services__card {
    background-color: var(--container-color);
    padding: 3.5rem 1.5rem;
    box-sizing: 0 12px 24px var(--shadow-color);
    text-align: center;
    transition: background-color 0.4s;
}

.services__icon {
    display: inline-block;
    font-size: 3rem;
    color: var(--main-color);
    margin-bottom: 1.5rem;
}

.services__title {
    font-size: var(--h2-font-size);
    margin-bottom: 1rem;
}

.services__description {
    margin-bottom: 3rem;
}

.services__button {
    cursor: pointer;
}

.services__modal {
    position: fixed;
    inset: 0;
    background-color: rgba(42, 96, 44, 0.3);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: grid;
    place-items: center;
    padding: 2rem 1.5rem;
    opacity: 0;
    visibility: hidden;
    z-index: var(--z-modal);
    transition: opacity 0.4s, visibility 0.4s;
}

.services__modal-content {
    max-height: 420px;
    position: relative;
    background-color: var(--container-color);
    padding: 3.5rem 1.5rem;
    border-bottom: 6px solid var(--main-color);
    overflow: auto;
}

.services__modal-content::-webkit-scrollbar {
    width: 0.6rem;
}

.services__modal-content::-webkit-scrollbar-thumb {
    background-color: var(--text-color-light);
}

.services__modal-title {
    font-size: var(--h2-font-size);
    margin-bottom: 2.5rem;
}

.services__modal-list {
    margin-left: 1rem;
}

.services__modal-item {
    text-align: initial;
    list-style: square;
}

.services__modal-item::marker {
    color: var(--main-color);
}

.services__modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    color: var(--main-color);
    cursor: pointer;
}

.active-modal {
    opacity: 1;
    visibility: visible;
}

/* Work */
.work__container {
    row-gap: 2rem;
}

.work__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 12px 24px var(--shadow-color);
    border: 1px solid var(--shadow-color);
    padding: 2rem;
    border-radius: 1rem;
}

.work__link {
    display: inline-block;
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
    width: 100%;
}

.work__img {
    filter: grayscale(1);
    transition: filter 0.5s, transform 0.5s;
    min-width: 100%;
}

.work__icon {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 2rem;
    color: var(--main-color);
    transition: transform 0.4s;
}

.work__link:hover .work__img {
    transform: scale(1.1);
    filter: none;
}

.work__link:hover .work__icon {
    transform: translate(0.5rem, -0.5rem) rotate(-30deg);
}

.work__title {
    font-size: var(--h2-font-size);
    margin-bottom: 0.25rem;
    width: 100%;
}

.work__subtitle {
    margin-bottom: 0.5rem;
    width: 100%;
}

/* Testimonials */
.testimonial {
    padding: 2rem 0;
}
.testimonial__container {
    position: relative;
}

.testimonial__swiper {
    padding-bottom: 2rem;
}

.testimonial__card {
    background-color: var(--container-color);
    padding: 2rem 1.25rem 2.5rem 1.25rem;
    border-inline: 8px solid var(--main-color);
    box-shadow: 0 12px 24px var(--shadow-color);
    text-align: center;
    transition: background-color 0.4s;
}

.swiper-pagination-bullets.swiper-pagination-horizontal {
    bottom: -1rem;
}

.swiper-pagination-bullet {
    background-color: var(--main-color-light);
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background-color: var(--main-color);
}

/* Contact */
.contact__container {
    padding-bottom: 4rem;
}

.contact__button {
    justify-self: center;
}

.contact__page {
    padding-bottom: 1rem 4rem;
}

.contact__form {
    position: relative;
}

.contact__box {
    position: relative;
    width: 100%;
    height: 58px;
}

.contact__input {
    width: 100%;
    height: 100%;
    background-color: var(--body-color);
    border: 3px solid var(--text-color-light);
    padding: 0.5rem 1.5rem;
    color: var(--title-color);
    font-weight: var(--font-bold);
    transition: border-color 0.4s, background-color 0.4s;
}

.contact__input:hover {
    border-color: var(--title-color);
}

.contact__input:-webkit-autofill {
    transition: background-color 6000s, color 6000s;
}

.contact__label {
    position: absolute;
    top: -16px;
    left: 16px;
    font-size: var(--small-font-size);
    font-weight: var(--font-bold);
    color: var(--title-color);
    background-color: var(--body-color);
    padding: 8px;
    transition: background-color 0.4s;
}

.contact__area {
    height: 10rem;
}

.contact__area textarea {
    resize: none;
    padding-top: 1.25rem;
}

.contact__send {
    padding-block: 1.25rem;
    cursor: pointer;
}

.contact__message {
    font-size: var(--small-font-size);
    font-weight: var(--font-bold);
    color: var(--title-color);
}

/* Rodapé */
.footer {
    background-color: var(--main-color);
}

.footer__container {
    padding-block: 4rem 2rem;
    text-align: center;
    row-gap: 5rem;
}

.footer__content {
    row-gap: 2rem;
}

.footer__content a,
.footer__copy {
    color: var(--white-color);
}

.footer__logo {
    font-size: var(--h1-font-size);
    font-weight: var(--font-bold);
    justify-self: center;
}

.footer__links,
.footer__social {
    display: flex;
    justify-content: center;
}

.footer__links {
    flex-wrap: wrap;
    gap: 2rem;
}

.footer__link {
    font-weight: var(--font-bold);
}

.footer__logo:hover,
.footer__link:hover {
    text-decoration: underline;
}

.footer__social {
    column-gap: 1rem;
}

.footer__social-link {
    font-size: 1.5rem;
    transition: transform 0.4s;
}

.footer__social-link:hover {
    transform: translateY(-0.25rem);
}

.footer__copy {
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
}

/* Scroll bar */
::-webkit-scrollbar {
    width: 0.6rem;
    background-color: #d1e0d1;
}

::-webkit-scrollbar-thumb {
    width: 0.6rem;
    background-color: var(--main-color-light);
}

::-webkit-scrollbar-thumb:hover {
    width: 0.6rem;
    background-color: var(--main-color);
}

/* Scroll up */
.scrollup {
    position: fixed;
    right: 1rem;
    bottom: -50%;
    background-color: var(--container-color);
    box-shadow: 0 12px 24px var(--shadow-color);
    display: inline-flex;
    padding: 6px;
    font-size: 1.25rem;
    color: var(--title-color);
    z-index: var(--z-tooltip);
    transition: bottom 0.4s, transform 0.4s, background-color 0.4s;
}

.scrollup:hover {
    transform: translateY(-0.5rem);
}

.show-scroll {
    bottom: 3rem;
}

/* Breakpoints */
@media screen and (max-width: 320px) {
    .container {
        margin-inline: 1rem;
    }

    .services__modal {
        padding-inline: 0.5rem;
    }

    .about__skills-content {
        grid-template-columns: repeat(4, max-content);
    }
}

@media screen and (min-width: 576px) {
    .services__container {
        grid-template-columns: 320px;
        justify-content: center;
    }

    .services__modal-content {
        width: 400px;
    }

    .work__container {
        grid-template-columns: 350px;
        justify-content: center;
    }

    .about__container {
        grid-template-columns: 400px;
        justify-content: center;
    }
}

@media screen and (min-width: 768px) {
    .services__container {
        grid-template-columns: repeat(2, 320px);
    }

    .work__container {
        grid-template-columns: repeat(2, 350px);
    }

    .testimonial__container {
        width: 470px;
        margin-inline: auto;
    }

    .contact__page {
        grid-template-columns: 670px;
        justify-content: center;
    }

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

    .contact__area {
        height: 18rem;
    }

    .contact__message {
        bottom: 5rem;
    }

    .contact__send {
        justify-self: center;
        margin-top: 1.5rem;
    }
}

@media screen and (min-width: 1150px) {
    .container {
        margin-inline: auto;
    }

    .section {
        padding-block: 7rem 2rem;
    }

    .section__title {
        margin-bottom: 3.5rem;
    }

    .nav {
        height: calc(var(--header-height) + 2rem);
        column-gap: 3rem;
    }

    .nav__toggle,
    .nav__close {
        display: none;
    }

    .nav__menu {
        margin-left: auto;
    }

    .nav__list {
        flex-direction: row;
        align-items: center;
        column-gap: 3rem;
    }

    .perfil {
        width: 500px;
        height: 500px;
        border-width: 15px;
    }

    .perfil__content {
        width: 360px;
        height: 360px;
        border-width: 20px;
    }

    .home__rectangle {
        width: 30vw;
        height: 100%;
    }

    .home__container {
        position: relative;
        grid-template-columns: 500px 300px;
        align-items: center;
        column-gap: 4rem;
        padding-block: 3.5rem 8rem;
    }

    .home__content {
        row-gap: 4rem;
    }

    .home__data {
        row-gap: 1rem;
        text-align: initial;
    }

    .home__social {
        flex-direction: column;
        row-gap: 1.5rem;
        position: absolute;
        top: -4rem;
        bottom: 0;
        right: 0;
    }

    .home__social-link {
        color: var(--main-color);
    }

    .home__button {
        justify-self: flex-start;
    }

    .services__container {
        grid-template-columns: repeat(3, 345px);
    }

    .services__card {
        padding-block: 4.5rem;
    }

    .services__modal-content {
        max-height: 480px;
        padding: 5.5rem 2rem;
    }

    .services__modal-close {
        font-size: 2rem;
    }

    .work__container {
        grid-template-columns: repeat(3, 350px);
        row-gap: 4rem;
    }

    .testimonial__card {
        padding-block: 3rem 3.5rem;
    }

    .contact__container {
        grid-template-columns: repeat(2, max-content);
        justify-content: center;
        align-items: center;
        column-gap: 25rem;
        padding-block: 1rem 5rem;
    }

    .contact__container .section__title {
        text-align: initial;
        margin: 0;
    }

    .footer__container {
        row-gap: 6rem;
        padding-block: 3.5rem;
    }

    .footer__content {
        grid-template-columns: 1fr 2fr 1fr;
        align-items: center;
    }

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

    .footer__links {
        column-gap: 3rem;
    }

    .footer__social {
        column-gap: 1.5rem;
    }

    .scrollup {
        right: 3rem;
    }

    .about__container {
        grid-template-columns: 500px 440px;
        align-items: center;
        column-gap: 8rem;
        padding-top: 2rem;
    }

    .about__data {
        row-gap: 3.5rem;
    }

    .about__info {
        text-align: initial;
    }

    .about__button {
        justify-self: flex-start;
    }

    .about__skills-title {
        text-align: initial;
    }

    .about__skills-content {
        grid-template-columns: repeat(7,max-content);
        justify-content: initial;
    }

    .about__skills-img {
        width: 40px;
    }
}


@media screen and (min-width: 1500px) {
    .home__rectangle {
        width: 33vw;
    }
}

@media screen and (min-width: 2048px) {
    .home__rectangle {
        width: 40vw;       
    }
}