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

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

    /*========== Colors ==========*/
    /* Change favorite color */
    --hue-color: 230; /*Purple 250 - Green 142 - Blue 230 - Pink 340*/

    /* HSL color mode */
    --first-color: hsl(var(--hue-color), 69%, 61%);
    --first-color-second: hsl(var(--hue-color), 69%, 61%);
    --first-color-alt: hsl(var(--hue-color), 57%, 53%);
    --first-color-lighter: hsl(var(--hue-color), 92%, 85%);
    --title-color: hsl(var(--hue-color), 8%, 15%);
    --text-color: hsl(var(--hue-color), 8%, 45%);
    --text-color-light: hsl(var(--hue-color), 8%, 65%);
    --input-color: hsl(var(--hue-color), 70%, 96%);
    --body-color: hsl(var(--hue-color), 60%, 99%);
    --container-color: #fff;
    --scroll-bar-color: hsl(var(--hue-color), 12%, 90%);
    --scroll-thumb-color: hsl(var(--hue-color), 12%, 80%);

    /*========== Font and typography ==========*/
    --body-font: 'Inter', sans-serif;

    /* .5rem = 8px, 1rem = 16px, 1.5rem = 24px ... */
    --big-font-size: 2rem;
    --h1-font-size: 1.5rem;
    --h2-font-size: 1.25rem;
    --h3-font-size: 1.125rem;
    --normal-font-size: .938rem;
    --small-font-size: .813rem;
    --smaller-font-size: .75rem;

    /*========== Font weight ==========*/
    --font-medium: 500;
    --font-semi-bold: 600;

    /*========== Margenes Bottom ==========*/
    /* .25rem = 4px, .5rem = 8px, .75rem = 12px ... */
    --mb-0-25: .25rem;
    --mb-0-5: .5rem;
    --mb-0-75: .75rem;
    --mb-1: 1rem;
    --mb-1-5: 1.5rem;
    --mb-2: 2rem;
    --mb-2-5: 2.5rem;
    --mb-3: 3rem;

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

/* Font size for large devices */
@media screen and (min-width: 968px) {
    :root {
        --big-font-size: 3rem;
        --h1-font-size: 2.25rem;
        --h2-font-size: 1.5rem;
        --h3-font-size: 1.25rem;
        --normal-font-size: 1rem;
        --small-font-size: .875rem;
        --smaller-font-size: .813rem;
    }
}

/*========== Variables Dark theme ==========*/
body.dark-theme {
    /* HSL color mode */
    --first-color-second: hsl(var(--hue-color), 30%, 8%);
    --title-color: hsl(var(--hue-color), 8%, 95%);
    --text-color: hsl(var(--hue-color), 8%, 75%);
    --input-color: hsl(var(--hue-color), 29%, 16%);
    --body-color: hsl(var(--hue-color), 28%, 12%);
    --container-color: hsl(var(--hue-color), 29%, 16%);
    --scroll-bar-color: hsl(var(--hue-color), 12%, 48%);
    --scroll-thumb-color: hsl(var(--hue-color), 12%, 36%);
}
/*==================== BOTÃO TEMA ISOLADO ====================*/
.theme-btn-wrapper {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1001;
    background: var(--body-color);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn-wrapper .change-theme {
    font-size: 1.1rem;
    color: var(--first-color);
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
    margin: 0;
}
.theme-btn-wrapper .change-theme:hover {
    color: var(--first-color-alt);
    transform: scale(1.15) rotate(-15deg);
}

/*========== Button Dark/Light ==========*/
.nav__btns {
    display: flex;
    align-items: center;
}

.change-theme {
    font-size: 1.25rem;
    color: var(--title-color);
    margin-right: var(--mb-1);
    cursor: pointer;
    /* sobrescrito se estiver dentro do .theme-btn-wrapper */
}

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

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0 0 var(--header-height) 0;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background: var(--body-color);
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(var(--first-color), 0.1) 0%, transparent 25%),
        radial-gradient(circle at 75% 75%, rgba(var(--first-color-alt), 0.1) 0%, transparent 25%);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(var(--first-color), 0.02) 30%, rgba(var(--first-color), 0.02) 70%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(var(--first-color-alt), 0.02) 30%, rgba(var(--first-color-alt), 0.02) 70%, transparent 70%);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

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

ul {
    list-style: none;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

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

/*==================== REUSABLE CSS CLASSES ====================*/
.section {
    padding: 2rem 0 4rem;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.section__title {
    font-size: var(--h1-font-size);
    color: var(--title-color);
    position: relative;
    overflow: hidden;
}

.section__title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--first-color), var(--first-color-alt));
    transition: all 0.6s ease;
    transform: translateX(-50%);
}

.section.animate-in .section__title::after {
    width: 60px;
}

.section__subtitle {
    display: block;
    font-size: var(--small-font-size);
    margin-bottom: var(--mb-3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.2s;
}

.section.animate-in .section__subtitle {
    opacity: 1;
    transform: translateY(0);
}

.section__title,
.section__subtitle {
    text-align: center;
}

/*==================== LAYOUT ====================*/
.container {
    max-width: 768px;
    margin-left: var(--mb-1-5);
    margin-right: var(--mb-1-5);
}

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

.header {
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: var(--body-color);
}

/*==================== NAV ====================*/
.nav {
    max-width: 968px;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo,
.nav__toggle {
    color: var(--title-color);
    font-weight: var(--font-medium);
}

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

.nav__toggle {
    font-size: 1.1rem;
    cursor: pointer;
}

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

@media screen and (max-width: 767px) {
    .nav__menu {
        position: fixed;
        bottom: -100%;
        left: 0;
        width: 100%;
        background-color: var(--body-color);
        padding: 2rem 1.5rem 4rem;
        box-shadow: 0 -1px 4px rgba(0, 0, 0, .15);
        border-radius: 1.5rem 1.5rem 0 0;
        transition: .3s;
    }
}

.nav__list {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.nav__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: var(--small-font-size);
    color: var(--title-color);
    font-weight: var(--font-medium);
}

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

.nav__icon {
    font-size: 1.2rem;
}

.nav__close {
    position: absolute;
    right: 1.3rem;
    bottom: .5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--first-color);
}

.nav__close:hover {
    color: var(--first-color-alt);
}

/* show menu */
.show-menu {
    bottom: 0;
}

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

/* Change background header */
.scroll-header {
    box-shadow: 0 -1px 4px rgba(0, 0, 0, .15);
}

/*==================== HOME ====================*/
.home__container {
    gap: 1rem;
    position: relative;
    min-height: calc(100vh - var(--header-height));
    padding-bottom: 6rem;
}

.home__container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(var(--first-color), 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.home__content {
    grid-template-columns: .5fr 3fr;
    padding-top: 3.5rem;
    align-items: center;
}

.home__social {
    display: grid;
    grid-template-columns: max-content;
    row-gap: 1rem;
}

.home__social-icon {
    font-size: 1.25rem;
    color: var(--first-color);
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(var(--first-color), 0.1);
    backdrop-filter: blur(10px);
}

.home__social-icon:hover {
    color: #fff;
    background: var(--first-color);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(var(--first-color), 0.3);
}

.home__data {
    grid-column: 1/3;
}

.home__title {
    font-size: var(--big-font-size);
    margin-bottom: var(--mb-0-25);
    background: linear-gradient(135deg, var(--title-color), var(--first-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home__title span {
    background: linear-gradient(135deg, var(--first-color), var(--first-color-alt));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.2); }
}

.home__subtitle {
    font-size: var(--h3-font-size);
    color: var(--text-color);
    font-weight: var(--font-medium);
    margin-bottom: var(--mb-0-75);
    position: relative;
    overflow: hidden;
}

.home__subtitle::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--first-color);
    font-weight: bold;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.home__description {
    margin-bottom: var(--mb-2);
    line-height: 1.8;
    text-align: justify;
}

.home__scroll {
    display: none;
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
}

.home__scroll-button {
    color: var(--first-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 2rem;
    background: rgba(var(--container-color), 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(var(--first-color), 0.1);
    box-shadow: 0 8px 32px rgba(var(--first-color), 0.1);
    position: relative;
    overflow: hidden;
}

.home__scroll-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(var(--first-color), 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.home__scroll-button:hover::before {
    opacity: 1;
}

.home__scroll-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(var(--first-color), 0.2);
    color: var(--first-color-alt);
}

.home__scroll-mouse {
    font-size: 2rem;
    animation: mouseFloat 2s ease-in-out infinite;
    margin-bottom: 0.25rem;
}

@keyframes mouseFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.home__scroll-name {
    font-size: var(--small-font-size);
    color: var(--title-color);
    font-weight: var(--font-medium);
    margin: 0.25rem 0;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.home__scroll-arrow {
    font-size: 1.25rem;
    animation: arrowBounce 2s ease-in-out infinite;
    margin-top: 0.25rem;
}

@keyframes arrowBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/*==================== BUTTONS ====================*/
.button {
    display: inline-block;
    background: linear-gradient(135deg, var(--first-color), var(--first-color-alt));
    color: #FFF;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: var(--font-medium);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(var(--first-color), 0.3);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.button:hover::before {
    left: 100%;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(var(--first-color), 0.4);
}

.button:active {
    transform: translateY(-1px);
}

.button__icon {
    font-size: 1.25rem;
    margin-left: var(--mb-0-5);
    transition: transform 0.3s ease;
}

.button:hover .button__icon {
    transform: translateX(5px);
}

.button--flex {
    display: inline-flex;
    align-items: center;
}

.button--small {
    padding: .75rem 1.5rem;
    font-size: var(--small-font-size);
}

.button--link {
    padding: 0;
    background: transparent;
    color: var(--first-color);
    box-shadow: none;
    border: none;
    backdrop-filter: none;
}

.button--link:hover {
    background: transparent;
    color: var(--first-color-alt);
    transform: translateY(-2px);
    box-shadow: none;
}

/*==================== ABOUT ====================*/
.about__data {
    text-align: center;
}

.about__description {
    text-align: center;
    margin-bottom: var(--mb-2-5);
}

.about__info {
    display: flex;
    justify-content: space-evenly;
    margin-bottom: var(--mb-2-5);
}

.about__info-title {
    font-size: var(--h2-font-size);
    font-weight: var(--font-semi-bold);
    color: var(--title-color);
}

.about__info-name {
    font-size: var(--smaller-font-size);
}

.about__info-title,
.about__info-name {
    display: block;
    text-align: center;
}

.about__buttons {
    display: flex;
    justify-content: center;
}

/*==================== SKILLS ====================*/
.skills__container {
    row-gap: 0;
}

.skills__header {
    display: flex;
    align-items: center;
    margin-bottom: var(--mb-2-5);
    cursor: pointer;
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(var(--first-color), 0.05);
    border: 1px solid rgba(var(--first-color), 0.1);
    transition: all 0.3s ease;
}

.skills__header:hover {
    background: rgba(var(--first-color), 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--first-color), 0.15);
}

.skills__icon,
.skills__arrow {
    font-size: 2rem;
    color: var(--first-color);
}

.skills__icon {
    margin-right: var(--mb-0-75);
    padding: 0.5rem;
    background: linear-gradient(135deg, var(--first-color), var(--first-color-alt));
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(var(--first-color), 0.3);
}

.skills__title {
    font-size: var(--h3-font-size);
    font-weight: var(--font-semi-bold);
}

.skills__subtitle {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

.skills__arrow {
    margin-left: auto;
    transition: .4s;
}

.skills__list {
    row-gap: 1.5rem;
    padding-left: 2.7rem;
}

.skills__titles {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--mb-0-5);
}

.skills__name {
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
}

.skills__bar,
.skills__percentage {
    height: 8px;
    border-radius: 1rem;
}

.skills__bar {
    background-color: var(--first-color-lighter);
    position: relative;
    overflow: hidden;
}

.skills__bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.skills__percentage {
    display: block;
    background: linear-gradient(135deg, var(--first-color), var(--first-color-alt));
    box-shadow: 0 2px 8px rgba(var(--first-color), 0.3);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1s ease-out;
}

.skills__open .skills__percentage {
    transform: scaleX(1);
}

.skills__html {
    width: 90%;
}

.skills__css {
    width: 85%;
}

.skills__js {
    width: 80%;
}

.skills__react {
    width: 75%;
}

.skills__python {
    width: 85%;
}

.skills__opencv {
    width: 70%;
}

.skills__yolo {
    width: 75%;
}

.skills__node {
    width: 65%;
}

.skills__close .skills__list {
    height: 0;
    overflow: hidden;
}

.skills__open .skills__list {
    height: max-content;
    margin-bottom: var(--mb-2-5);
}

.skills__open .skills__arrow {
    transform: rotate(-180deg);
}

/*==================== PORTFOLIO ====================*/
.portfolio__container {
    overflow: initial;
}

.portfolio__content {
    padding: 0 1.5rem;
    background: rgba(var(--container-color), 0.8);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    border: 1px solid rgba(var(--first-color), 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.portfolio__content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(var(--first-color), 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.portfolio__content:hover::before {
    opacity: 1;
}

.portfolio__content:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(var(--first-color), 0.2);
}

.portfolio__img {
    width: 265px;
    border-radius: 1.5rem;
    justify-self: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.portfolio__content:hover .portfolio__img {
    transform: scale(1.05);
}

.portfolio__title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-5);
    background: linear-gradient(135deg, var(--title-color), var(--first-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.portfolio__description {
    margin-bottom: var(--mb-0-75);
    line-height: 1.7;
}

.portfolio__button:hover .button__icon {
    transform: translateX(.25rem);
}

/*==================== CONTACT ====================*/
.contact__container {
    row-gap: 3rem;
}

.contact__information {
    display: flex;
    margin-bottom: var(--mb-2);
    padding: 1.5rem;
    background: rgba(var(--container-color), 0.8);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    border: 1px solid rgba(var(--first-color), 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact__information::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(var(--first-color), 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.contact__information:hover::before {
    opacity: 1;
}

.contact__information:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(var(--first-color), 0.15);
}

.contact__icon {
    font-size: 2rem;
    color: #fff;
    margin-right: var(--mb-0-75);
    padding: 1rem;
    background: linear-gradient(135deg, var(--first-color), var(--first-color-alt));
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(var(--first-color), 0.3);
    transition: all 0.3s ease;
    min-width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact__information:hover .contact__icon {
    transform: scale(1.1) rotate(5deg);
}

.contact__information div {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact__title {
    font-size: var(--h3-font-size);
    font-weight: var(--font-semi-bold);
    color: var(--title-color);
    margin-bottom: 0.25rem;
}

.contact__subtitle {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    line-height: 1.5;
}

.contact__content {
    background: rgba(var(--input-color), 0.8);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1rem 1.5rem 0.5rem;
    margin-bottom: var(--mb-1-5);
    border: 1px solid rgba(var(--first-color), 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact__content::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--first-color), var(--first-color-alt));
    transition: width 0.3s ease;
}

.contact__content:focus-within::before {
    width: 100%;
}

.contact__content:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--first-color), 0.15);
    border-color: var(--first-color);
}

.contact__label {
    font-size: var(--smaller-font-size);
    color: var(--title-color);
    font-weight: var(--font-medium);
    margin-bottom: 0.25rem;
    display: block;
}

.contact__input {
    width: 100%;
    background: transparent;
    color: var(--text-color);
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    border: none;
    outline: none;
    padding: .5rem 0;
    resize: vertical;
    transition: all 0.3s ease;
}

.contact__input::placeholder {
    color: var(--text-color-light);
    opacity: 0.7;
}

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

/* Estilos específicos para textarea */
.contact__input[rows] {
    min-height: 120px;
    font-family: var(--body-font);
}

/* Animação para o formulário */
.contact__form {
    position: relative;
}

.contact__inputs {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: var(--mb-1-5);
}

.contact__form .contact__content {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpForm 0.6s ease forwards;
}

.contact__form .contact__content:nth-child(1) { animation-delay: 0.1s; }
.contact__form .contact__content:nth-child(2) { animation-delay: 0.2s; }
.contact__form .contact__content:nth-child(3) { animation-delay: 0.3s; }
.contact__form .contact__content:nth-child(4) { animation-delay: 0.4s; }

.contact__inputs .contact__content:nth-child(1) { animation-delay: 0.1s; }
.contact__inputs .contact__content:nth-child(2) { animation-delay: 0.2s; }

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

/* Responsividade para inputs */
@media screen and (max-width: 568px) {
    .contact__inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Botão de envio customizado */
.contact__form button {
    margin-top: var(--mb-1);
    width: 100%;
    justify-content: center;
    background: linear-gradient(135deg, var(--first-color), var(--first-color-alt));
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact__form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(var(--first-color), 0.4);
}

.contact__form button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.contact__form button:hover::before {
    left: 100%;
}

/* Efeito de foco melhorado nos inputs */
.contact__input:focus {
    color: var(--title-color);
    transform: translateX(2px);
}

/* Espaçamento melhorado para informações de contato */
.contact__information {
    margin-bottom: var(--mb-2-5);
}

.contact__information:last-child {
    margin-bottom: 0;
}

/*==================== FOOTER ====================*/
.footer {
    padding-top: 2rem;
}

.footer__container {
    row-gap: 3.5rem;
}

.footer__bg {
    background-color: var(--first-color-second);
    padding: 2rem 0 3rem;
}

.footer__title {
    font-size: var(--h1-font-size);
    margin-bottom: var(--mb-0-25);
}

.footer__subtitle {
    font-size: var(--small-font-size);
}

.footer__links {
    display: flex;
    flex-direction: column;
    row-gap: 1.5rem;
}

.footer__link:hover {
    color: var(--first-color-lighter);
}

.footer__social {
    font-size: 1.25rem;
    margin-right: var(--mb-1-5);
}

.footer__social:hover {
    color: var(--first-color-lighter);
}

.footer__copy {
    font-size: var(--smaller-font-size);
    text-align: center;
    color: var(--text-color-light);
    margin-top: var(--mb-3);
}

.footer__title,
.footer__subtitle,
.footer__link,
.footer__social {
    color: #FFF;
}

/*========== SCROLL UP ==========*/
.scrollup {
    will-change: transform, opacity;
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    background-color: var(--first-color);
    opacity: .92;
    padding: 1rem 1.1rem;
    border-radius: 1.2rem;
    z-index: 1002;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
    display: none;
    cursor: pointer;
}

.scrollup:hover {
    background-color: var(--first-color-alt);
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.scrollup:active {
    transform: scale(0.95);
}

.scrollup__icon {
    font-size: 2rem;
    color: #FFF;
    transition: transform 0.3s ease;
}

.scrollup:hover .scrollup__icon {
    transform: translateY(-2px);
}

/* Show scroll */
.show-scroll {
    display: block !important;
    opacity: 1;
    transform: scale(1) rotate(0deg);
    animation: fadeInBounce 0.5s ease-out;
}

.hide-scroll {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.1) rotate(720deg);
    transition: all 0.6s cubic-bezier(.68,-0.55,.27,1.55);
}

/* Animações */
@keyframes fadeInBounce {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-180deg);
    }
    50% {
        transform: scale(1.1) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes spiralOut {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        filter: blur(0px);
    }
    25% {
        opacity: 0.8;
        transform: scale(0.8) rotate(180deg);
        filter: blur(1px);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.5) rotate(360deg);
        filter: blur(2px);
    }
    75% {
        opacity: 0.3;
        transform: scale(0.2) rotate(540deg);
        filter: blur(4px);
    }
    100% {
        opacity: 0;
        transform: scale(0.05) rotate(720deg);
        filter: blur(8px);
    }
}

/* Novas animações para elementos */
@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Efeitos de hover melhorados */
.nav__link:hover {
    transform: translateY(-2px);
}

.portfolio__content,
.skills__header,
.contact__content {
    animation: floatUp 0.6s ease-out forwards;
}

.home__social-icon {
    animation: slideInLeft 0.6s ease-out forwards;
}

.home__data {
    animation: slideInRight 0.8s ease-out forwards;
}

/* Cursor personalizado para elementos interativos */
.button,
.skills__header,
.nav__link,
.scrollup,
.theme-btn-wrapper {
    cursor: pointer;
}

.button:hover,
.skills__header:hover {
    animation: pulse 0.6s ease-in-out;
}

/*========== SCROLL BAR ==========*/
::-webkit-scrollbar {
    width: .60rem;
    background-color: var(--scroll-bar-color);
    border-radius: .5rem;
}

::-webkit-scrollbar-thumb {
    background-color: var(--scroll-thumb-color);
    border-radius: .5rem;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-color-light);
}

/*==================== MEDIA QUERIES ====================*/
/* For small devices */
@media screen and (max-width: 350px) {
    .container {
        margin-left: var(--mb-1);
        margin-right: var(--mb-1);
    }

    .nav__menu {
        padding: 2rem .25rem 4rem;
    }

    .nav__list {
        column-gap: 0;
    }

    .home__content {
        grid-template-columns: .25fr 3fr;
    }

    .home__container {
        min-height: auto;
        padding-bottom: 2rem;
    }

    .skills__title {
        font-size: var(--normal-font-size);
    }

    .about__info {
        flex-direction: column;
        row-gap: 2rem;
    }

    .home__scroll-button {
        padding: 0.75rem;
        gap: 0.25rem;
    }

    .home__scroll-mouse {
        font-size: 1.5rem;
    }

    .home__scroll-name {
        font-size: var(--smaller-font-size);
    }

    .home__scroll-arrow {
        font-size: 1rem;
    }
}

/* For medium devices */
@media screen and (min-width: 568px) {
    .home__content {
        grid-template-columns: max-content 1fr 1fr;
    }

    .home__data {
        grid-column: initial;
    }

    .home__container {
        min-height: calc(100vh - var(--header-height));
    }

    .home__scroll {
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
    }

    .about__container,
    .skills__container,
    .portfolio__content,
    .contact__container,
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 768px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }

    body {
        margin: 0;
    }

    .section {
        padding: 6rem 0 2rem;
    }

    .section__subtitle {
        margin-bottom: 4rem;
    }

    .header {
        top: 0;
        bottom: initial;
    }

    .header,
    .main,
    .footer__container {
        padding: 0 1rem;
    }

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

    .nav__icon,
    .nav__close,
    .nav__toggle {
        display: none;
    }

    .nav__list {
        display: flex;
        column-gap: 2rem;
    }

    .nav__menu {
        margin-left: auto;
    }

    .change-theme {
        margin: 0;
    }

    .home__container {
        row-gap: 5rem;
    }

    .home__content {
        padding-top: 5.5rem;
        column-gap: 2rem;
    }

    .home__scroll {
        display: block;
        opacity: 0;
        animation: fadeInDelay 1s ease 2s forwards;
        left: 50%;
        transform: translateX(-50%);
        bottom: 2rem;
    }

    @keyframes fadeInDelay {
        to {
            opacity: 1;
        }
    }

    .about__container {
        column-gap: 5rem;
    }

    .about__description {
        text-align: initial;
    }

    .about__info {
        justify-content: space-between;
    }

    .about__buttons {
        justify-content: initial;
    }

    .portfolio__img {
        width: 320px;
    }

    .portfolio__content {
        align-items: center;
    }

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

    .footer__bg {
        padding: 3rem 0 3.5rem;
    }

    .footer__links {
        flex-direction: row;
        column-gap: 2rem;
    }

    .footer__socials {
        justify-self: flex-end;
    }

    .footer__copy {
        margin-top: 4.5rem;
    }
}

/* For large devices */
@media screen and (min-width: 1024px) {
    .header,
    .main,
    .footer__container {
        padding: 0;
    }

    .home__social {
        transform: translateX(-6rem);
    }

    .home__container {
        min-height: calc(100vh - var(--header-height));
        padding-bottom: 5rem;
    }

    .home__scroll {
        bottom: 1.5rem;
        left: 50%;
        transform: translateX(-50%);
        animation: fadeInDelay 1s ease-in-out 3s both;
    }

    .portfolio__content,
    .contact__container {
        column-gap: 6rem;
    }

    .home__data {
        padding-top: 8rem;
    }
}
