/* ================ Google FONTES ================ */
@import url('https://fonts.googleapis.com/css2?family=Montserrat+Alternates:wght@400;500;600&display=swap');

/* PALETA DE COR */
:root {
    --header-height: 3.5rem;

    --hue:38;
    --first-color: hsl(var(--hue), 55%, 65%);
    --first-color-alt: hsl(var(--hue), 82%, 56%);
    --first-color-light: hsl(var(--hue), 40%, 80%); 
    --title-color: hsl(var(--hue), 24%, 16%);
    --text-color: hsl(var(--hue), 8%, 45%);
    --text-color-light: hsl(var(--hue), 8%, 60%);
    --white-color: hsl(0, 0%, 100%);
    --body-color: hsl(0, 0%, 100%);
    --container-color: hsl(0, 0%, 100%);
    --shadow-color: hsla(var(--hue), 90%, 30%, .1);

    /* ====== Font and typography ====== */
    /* .5rem == 8px | 1rem == 16px*/
    --body-font: "Montserrat Alternates", sans-serif;
    --biggest-font-size: 2rem;
    --h1-font-size: 1.5rem;
    --h2-font-size: 1.25rem;
    --h3-font-size: 1rem;
    --normal-font-size: .938rem;
    --small-font-size: .813rem;
    --smaller-font-size: .75rem;

    /* ====== Font Weight ====== */
    --font-regular: 400;
    --font-medium: 500;
    --font-semi-bold: 600;

    /* ====== Z index ====== */
    --z-tooltip: 10;
    --z-fixed: 100;
    --z-modal: 1000;
}

/* ====== Responsive typography ====== */
@media screen and (min-width: 1150px) {
    :root {
        --biggest-font-size: 4.5rem;
        --h1-font-size: 2.25rem;
        --h2-font-size: 1.5rem;
        --h3-font-size: 1.25rem;
        --normal-font-size: 1.125rem;
        --small-font-size: .875rem;
        --smaller-font-size: .813rem;
    }
}

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

html {
    scroll-behavior: smooth;
}

body,
input,
textarea,
button {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
}

body {
    background-color: var(--body-color);
    color: var(--text-color);
    transition: background-color .4s;
}

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

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

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}
/* ====== / Base ====== */

/* ====== Reusable CSS Classes ====== */
.container {
    max-width: 1120px;
    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;
}

.main {
    overflow: hidden; /* animation do ScrollReveal*/
}

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

.perfil-img {
    width: 150px;
}

.perfil-content {
    width: 180px;
    height: 180px;
    border: 10px solid var(--first-color);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    background: linear-gradient(189deg,
                hsl(var(--hue), 90%, 80%),
                hsl(var(--hue), 90%, 30%));
}
/* ====== / Reusable CSS Classes ====== */

/* ====== Header & Nav ====== */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-color: transparent;
    z-index: var(--z-fixed);
    transition: background-color .4s, box-shadow .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-semi-bold);
    transition: color .4s;
}

.nav-toggle,
.nav-close {
    display: inline-flex;
    font-size: 1.25rem;
    cursor: pointer;
}

.nav-toggle {
    color: var(--white-color);
    transition: color .4s;
}

.nav-close {
    color: var(--title-color);
}
/* Navigation for mobile devices */
@media screen and (max-width: 1150px) {
    .nav-menu {
        position: fixed;
        top: -100%;
        left: 0;
        background-color: var(--body-color);
        width: 100%;
        box-shadow: 0 12px 24px var(--shadow-color);
        padding-block: 5rem 4rem;
        transition: top .4s;
    }
}

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

.nav-link {
    color: var(--title-color);
    font-weight: var(--font-semi-bold);
    transition: color .4s;
}

.nav-link:hover {
    color: var(--first-color);
}

.nav-close {
    position: absolute;
    top: 1.15rem;
    right: 1.5rem;
}

/* Show menu */
.show-menu {
    top: 0;
}

/* Change background header */
.bg-header {
    background-color: var(--body-color);
    box-shadow: 0 2px 16px var(--shadow-color);
}

.bg-header :is(.nav-logo, .nav-toggle, .change-theme) {
    color: var(--text-color);
}
/* ====== / Header & Nav ====== */

/* ====== Button ====== */
.button {
    display: inline-block;
    background-color: var(--first-color);
    color: var(--white-color);
    font-weight: var(--font-semi-bold);
    padding: 1rem 2rem;
    border-radius: .25rem;
    border: solid 2px var(--first-color);
    transition: background-color .4s, box-shadow .4s, border .4s;
}

.button:hover {
    background-color: var(--first-color-alt);
    box-shadow: 0 8px 24px hsla(var(--hue), 90%, 30%, .3);
    border: solid 2px var(--first-color-alt);
}
/* ====== / Button ====== */

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

.home-rectangle {
    width: 100%;
    height: 220px;
    background-color: var(--first-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: .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(--text-color);
    transition: color .4s;
}

.home-social-link:hover {
    color: var(--first-color);
}

.home-button {
    justify-self: center;
}
/* ====== / Home ====== */

/* ====== About ====== */
.about-page {
    padding-bottom: 4rem;
}

.about-container {
    align-items: center;
    gap: 2.5rem;
}

.about-perfil {
    width: 100%;
    max-width: 340px;
    justify-self: center;
    display: grid;
    place-items: center;
    transition: background-color .4s;
}

.about-content {
    width: 100%;
}

.about-img {
    width: 100%;
    max-width: 320px;
    margin-inline: auto;
    -webkit-mask-image: linear-gradient(to bottom, hsl(var(--hue), 65%, 61%) 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, hsl(var(--hue), 65%, 61%) 60%, transparent 100%);
    border-radius: .3rem;
    object-fit: contain;
}

.about-data {
    row-gap: 2rem;
}

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

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

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

.about-description {
    line-height: 1.7;
}

.about-description strong {
    color: var(--first-color);
}

.about-button {
    justify-self: center;
}

.about-buttons {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.about-buttons-row {
    grid-column: 1 / -1;
    margin-top: .5rem;
}

.button-download {
    background: transparent;
    color: var(--first-color);
}

.button-download:hover {
    color: var(--white-color);
}
/* ====== / About ====== */

/* ====== Services ====== */
.services-container {
    row-gap: 2rem;
}

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

.services-icon {
    display: inline-block;
    font-size: 3rem;
    color: var(--first-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: hsla(var(--hue), 90%, 30%, .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 .4s, visibility .4s;
}

.services-modal-content {
    max-height: calc(100vh - 4rem);
    position: relative;
    background-color: var(--container-color);
    padding: 3.5rem 1.5rem;
    border-bottom: 6px solid var(--first-color);
    overflow-y: auto;
    overflow-x: hidden;
}

.services-modal-content::-webkit-scrollbar {
    width: .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-link:hover {
    text-decoration: underline;
}

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

.services-modal-item::marker {
    color: var(--first-color);
}

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

/* Active modal */
.active-modal {
    opacity: 1;
    visibility: visible;
}
/* ====== / Services ====== */

/* ====== Work ====== */
.work-container {
    row-gap: 2rem;
}

.work-link {
    display: inline-block;
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.work-img {
    filter: grayscale(1);
    transition: filter .5s, transform .5s;
}

.work-icon {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 2rem;
    color: var(--first-color);
    transition: transform .4s;
}

.work-link:hover .work-img{
    transform: scale(1.1);
    filter: none;
}

.work-link:hover .work-icon {
    transform: translate(.5rem, -.5rem) rotate(-50deg);
}

.work-title {
    font-size: var(--h3-font-size);
    margin-bottom: .25rem;
}

.work-link-disabled {
    pointer-events: none;
}
/* ====== / Work ====== */

/* ====== Contact ====== */
.contact-container {
    padding-bottom: 4rem;
}

.contact-page{
    padding-block: 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: 2px solid var(--text-color-light);
    padding: .5rem 1.5rem;
    color: var(--title-color);
    font-weight: var(--font-semi-bold);
    transition: border-color .4s, background-color .4s;
}

.contact-input:focus {
    border-color: var(--first-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-semi-bold);
   color: var(--title-color);
   background-color: var(--body-color);
   padding: 8px;
   transition: background-color .4s;
}

.contact-area {
    height: 10rem;
}

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

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

.contact-message {
    position: absolute;
    bottom: -2rem;
    left: 0;
    font-size: var(--small-font-size);
    font-weight: var(--font-semi-bold);
    color: var(--title-color);
}

/* ====== Footer ====== */
.footer {
    background-color: var(--first-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-semi-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-semi-bold);
}

.footer-logo:hover,
.footer-link:hover {
    text-decoration: underline;
}

.footer-social {
    column-gap: 1rem;
}

.footer-social-link {
    font-size: 1.5rem;
    transition: transform .4s;
}

.footer-social-link:hover {
    transform: translateY(-.25rem);
}

.footer-copy {
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
}
/* ====== / Footer ====== */

/* ====== Scroll bar ====== */
::-webkit-scrollbar{
    width: .6rem;
    background-color: hsl(var(--hue), 20%, 85%);
}

::-webkit-scrollbar-thumb {
    background-color: hsl(var(--hue), 20%, 65%);
}

::-webkit-scrollbar-thumb:hover {
    background-color: hsl(var(--hue), 20%, 55%);
}
/* ====== / Scroll bar ====== */

/* ====== 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 .4s, transform .4s, background-color .4s;
}

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

.show-scroll {
    bottom: 3rem;
}
/* ====== / Scroll UP ====== */

/* ====== Theme ====== */
.nav-actions {
    display: flex;
    align-items: center;
    column-gap: 1rem;
}

.change-theme {
    color: var(--white-color);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color .4s;
}

/* Dark Theme */
body.dark-theme {
    --title-color: hsl(var(--hue), 24%, 85%);
    --text-color: hsl(var(--hue), 8%, 70%);
    --body-color: hsl(var(--hue), 16%, 8%);
    --container-color: hsl(var(--hue), 16%, 12%);
    --shadow-color: hsla(var(--hue), 32%, 4%, .4);
}

.dark-theme .bg-header {
    box-shadow: 0 12px 24px var(--shadow-color);
}

.dark-theme .services-modal {
    background-color: hsla(var(--hue), 90%, 8%, .2);
}

.dark-theme::-webkit-scrollbar {
    background-color: hsl(var(--hue), 16%, 15%);
}

.dark-theme::-webkit-scrollbar-thumb {
    background-color: hsl(var(--hue), 16%, 25%);
}

.dark-theme::-webkit-scrollbar-thumb:hover {
    background-color: hsl(var(--hue), 16%, 35%);
}

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

    .services-modal {
        padding-inline: .5rem;
    }
}

/* Médio */
@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: minmax(320px, 420px);
        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);
    }

    .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) + 1.5rem);
        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;
    }

    .change-theme {
        color: var(--title-color);
    }

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

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

    .perfil-img {
        width: 300px;
    }

    .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(--first-color);
    }

    .home-social-link:hover {
        justify-self: flex-start;
    }

    .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: calc(100vh - 6rem);
        padding: 4.5rem 2rem;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .services-modal-close {
        font-size: 2rem;
    }

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

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

    .scrollup {
        right: 3rem;
    }

    .about-container {
    grid-template-columns: minmax(300px, 380px) minmax(420px, 1fr);
    align-items: center;
    column-gap: 4rem;
    row-gap: 2rem;
    padding-top: 2rem;
    }

    .about-perfil {
        max-width: 360px;
    }

    .about-img {
        max-width: 340px;
    }

    .about-content {
        max-width: 680px;
    }

    .about-data {
        row-gap: 3rem;
    }

    .about-info {
        text-align: initial;
    }

    .about-buttons {
        justify-content: center;
    }
}

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

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

/* ========== SCROLL REVEAL ANIMATION ========== */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity .8s ease, transform .8s ease;
}

.reveal.show-reveal {
    opacity: 1;
    transform: translateY(0);
}

/* ========== HOME ANIMATION ========== */
@keyframes homeAnimation {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-perfil,
.home-name,
.home-profession,
.home-social,
.home-button {
    opacity: 0;
    animation: homeAnimation .8s ease forwards;
}

.home-perfil {
    animation-delay: .2s;
}

.home-name {
    animation-delay: .4s;
}

.home-profession {
    animation-delay: .6s;
}

.home-social {
    animation-delay: .8s;
}

.home-button {
    animation-delay: 1s;
}