* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
    font-family: "Syne", sans-serif;
}

:root {
    --h1-fonts: 6rem;
    --h2-fonts: 3.8rem;
    --p-fonts: 1.1rem;


    /* Tema Claro */
    --bg-color: #f5f5f5;
    /* Fundo 1: Home, Timeline, Contato */
    --second-bg-color: #ffffff;
    /* Fundo 2: Sobre, Portfólio, Rodapé */
    --text-color: #13221f;
    --main-color: #243e38;
    /* Verde da blusa */
    --main2-color: #3b6057;
    /* Verde intermediário */
    --other-color: #5c706b;
    /* Cinza esverdeado */
    --alt-color: #cbdad6;
    /* Bordas */
    --ann-color: #3a4d48;
    /* Textos secundários */
    --other: #1a2b27;
    --bar: rgba(245, 245, 245, 0.7);
    --light-icon-color: #e5a93c;
    --dark-icon-color: #5ebba5;
}

/* Tema Escuro */
body.darkmode {
    --bg-color: #121214;
    /* Fundo 1: Grafite escuro */
    --second-bg-color: #1a1a1e;
    /* Fundo 2: Grafite esverdeado */
    --text-color: #f3f4f6;
    --main-color: #3b6057;
    --main2-color: #4e7a6f;
    --other-color: #9ca3af;
    --alt-color: #26302d;
    --ann-color: #a1a1aa;
    --other: #5ebba5;
    --bar: rgba(18, 18, 20, 0.7);
}

/* Configuração do Snap Scroll (Trava por seção) e Remoção da Barra Lateral */
html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    height: 100%;
}

body {
    height: 100%;
    overflow-y: scroll;
    background: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.4s ease, color 0.4s ease;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar {
    display: none;
}

/* Header Fixo */
header {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 75px;
    padding: 0 10%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: all 0.4s ease;
}

header.sticky {
    height: 65px;
    background: var(--bar);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--alt-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.logo {
    display: inline-flex;
    align-items: center;
    color: var(--text-color); /* Fica preto no modo claro e branco no modo escuro */
    transition: color 0.3s ease;
}

.logo svg {
    width: 48px;
    height: auto;
    display: block;
}

.menulist {
    display: flex;
    align-items: center;
    gap: 30px;
}

.menulist a {
    font-size: 17px;
    font-weight: 500;
    color: var(--other-color);
    transition: color 0.3s ease;
}

.menulist a:hover,
.menulist a.active {
    color: var(--main2-color);
}

/* Dark Mode Switcher */
.dark {
    background-color: var(--second-bg-color);
    width: 70px;
    height: 40px;
    border-radius: 10em;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--alt-color);
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.btn_icon {
    color: var(--light-icon-color);
    font-size: 1rem;
}

.btn_indicator {
    background-color: var(--main-color);
    left: 4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn_icon_container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.darkmode .dark {
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.darkmode .btn_indicator {
    transform: translateX(30px);
    background-color: var(--main2-color);
}

.darkmode .btn_icon {
    color: var(--bg-color);
}

.btn_icon.animated {
    animation: spin 0.5s;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.menu-right {
    display: flex;
    align-items: center;
}

.menu-btn {
    display: inline-block;
    padding: 10px 25px;
    background: linear-gradient(135deg, var(--main-color) 0%, var(--main2-color) 100%);
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    border-radius: 13px;
    transition: all 0.4s ease;
}

.menu-btn:hover {
    box-shadow: 0 4px 15px rgba(36, 62, 56, 0.35);
    transform: translateY(-2px);
}

#menu-icon {
    z-index: 10001;
    font-size: 40px;
    margin-left: 25px;
    cursor: pointer;
    display: none;
    color: var(--text-color);
}

/* Estrutura Geral das Seções */
section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-height: 100vh;
    padding: 100px 14% 60px;
    box-sizing: border-box;
}

.mid-text {
    text-align: center;
    margin-bottom: 2rem;
}

.mid-text h2,
.about-text h2,
.contact-main h2 {
    font-size: var(--h2-fonts);
}

.mid-text h2 span,
.about-text h2 span,
.home-text h1 span,
.contact-main h2 span {
    background: linear-gradient(135deg, var(--main-color) 0%, var(--main2-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 1. Home (Fundo Base) */
.home {
    background-color: var(--bg-color);
    background-image: url(../img/bg.png);
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.home-text {
    position: relative;
    z-index: 2;
    max-width: 650px;
}

.home-text h1 {
    margin: 20px 0;
    font-size: var(--h1-fonts);
}

.home-text h4 {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 35px;
    color: var(--other-color);
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    width: 50px;
    background: var(--second-bg-color);
    border: 1px solid var(--alt-color);
    border-radius: 1.7rem;
    color: var(--ann-color);
    font-size: 18px;
    margin-right: 12px;
    margin-bottom: 40px;
    transition: all 0.4s ease;
}

.social-icons a:hover {
    transform: translateY(-4px) scale(1.05);
    color: var(--main-color);
    border-color: var(--main-color);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.h-bt {
    display: flex;
    align-items: center;
}

.btn1 {
    display: inline-block;
    padding: 18px 35px;
    background: transparent;
    border: 1px solid var(--alt-color);
    color: var(--text-color);
    font-size: 18px;
    font-weight: 500;
    border-radius: 17px;
    margin-right: 20px;
    transition: all 0.4s ease;
}

.btn1:hover {
    letter-spacing: 1px;
    border-color: var(--main-color);
    color: var(--main-color);
}

.btn2 {
    display: inline-block;
    padding: 18px 35px;
    background: linear-gradient(135deg, var(--main-color) 0%, var(--main2-color) 100%);
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    border-radius: 17px;
    box-shadow: 0 4px 15px rgba(36, 62, 56, 0.3);
    transition: all 0.4s ease;
}

.btn2:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 25px rgba(59, 96, 87, 0.45);
}

/* 2. Sobre (Fundo Secundário) */
.about {
    background-color: var(--second-bg-color);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    gap: 2rem;
}

.about-img img {
    width: 100%;
    height: 650px;
    max-width: 520px;
    background: var(--main-color);
    object-fit: cover;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.about-text h2 {
    margin: 22px 0;
}

.about-text h5 {
    font-size: 22px;
    font-weight: 500;
    line-height: 1.7;
    margin-bottom: 30px;
}

.about-text p {
    font-size: var(--p-fonts);
    font-weight: 400;
    line-height: 30px;
    color: var(--ann-color);
    margin-bottom: 35px;
}

/* 3. Trajetória / Timeline (Fundo Base) */
.timeline-section {
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.timeline-container {
    position: relative;
    max-width: 900px;
    width: 100%;
    margin: 1rem auto 0;
    padding: 20px 0 40px 0;
}

.timeline-line {
    position: absolute;
    top: 20px;
    bottom: 10px;
    left: 50%;
    width: 2px;
    background: repeating-linear-gradient(to bottom,
            var(--main-color) 0,
            var(--main-color) 6px,
            transparent 6px,
            transparent 12px);
    transform: translateX(-50%);
}

.timeline-line::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid var(--main-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 35px;
    width: 100%;
    display: flex;
}

.timeline-item:nth-child(even) {
    justify-content: flex-start;
}

.timeline-item:nth-child(odd) {
    justify-content: flex-end;
}

.timeline-dot {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    background: var(--main-color);
    border: 4px solid var(--second-bg-color);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 2px var(--main2-color);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: translate(-50%, -50%) scale(1.25);
    background: var(--main2-color);
}

.timeline-content {
    width: 44%;
    background-color: var(--second-bg-color);
    padding: 22px 26px;
    border-radius: 1.2rem;
    border: 1px solid var(--alt-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-4px);
    border-color: var(--main-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.timeline-date {
    display: inline-block;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, var(--main-color) 0%, var(--main2-color) 100%);
    border-radius: 20px;
    margin-bottom: 10px;
}

.timeline-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 4px;
}

.timeline-content h4 {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--other-color);
    margin-bottom: 10px;
}

.timeline-content p {
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--ann-color);
}

/* 4. Portfólio (Fundo Secundário) */
.portifolio {
    background-color: var(--second-bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.portifolio-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: stretch;
    gap: 2rem;
    margin-top: 1.5rem;
}

.row {
    background-color: var(--bg-color);
    border-radius: 1.2rem;
    border: 1px solid var(--alt-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.row:hover {
    transform: translateY(-5px);
    border-color: var(--main-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.row-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.row-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.row:hover .row-img img {
    transform: scale(1.05);
}

.row-in {
    padding: 22px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex: 1;
}

.row-left {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
}

.row-left h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-color);
}

.row-left h6 {
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--ann-color);
    min-height: 4.2em;
    margin-bottom: 14px;
}

.row-left h3:nth-of-type(2) {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: auto;
    margin-bottom: 8px;
}

.tec {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 35px;
}

.tec img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.row-right a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    width: 46px;
    background: var(--main-color);
    color: #ffffff;
    border-radius: 50%;
    font-size: 20px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    flex-shrink: 0;
}

.row-right a:hover {
    transform: scale(1.1);
    background: var(--main2-color);
}

/* Inversão dos SVGs no Modo Escuro */
body.darkmode .tec img[src*="github"] {
    filter: brightness(0) invert(1);
}

body.darkmode .tec img[src*="chartjs"] {
    filter: invert(1) hue-rotate(180deg);
}

body.darkmode .logo img {
    filter: brightness(0) invert(1);
}

/* 5. Contato + Rodapé Integrado (Fundo Base) */
.contact {
    position: relative;
    background-color: var(--bg-color);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    gap: 2rem;
    padding-bottom: 90px;
}

.contact-main h2 {
    margin: 32px 0;
}

.email,
.num {
    margin-bottom: 25px;
}

.email p,
.num p {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--other-color);
}

.email h6,
.num h6 {
    font-size: 20px;
    font-weight: 600;
}

.contact-form {
    width: 100%;
    max-width: 600px;
    display: grid;
    gap: 1.2rem;
}

.contact-form input,
.contact-form textarea {
    border: 1px solid var(--alt-color);
    outline: none;
    padding: 16px;
    font-size: 0.95rem;
    background: var(--second-bg-color);
    color: var(--text-color);
    border-radius: 0.8rem;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--main-color);
}

form .submit-btn {
    display: inline-block;
    padding: 16px 28px;
    background: linear-gradient(135deg, var(--main-color) 0%, var(--main2-color) 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 14px;
    width: fit-content;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(36, 62, 56, 0.3);
    transition: all 0.4s ease;
}

form .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 96, 87, 0.45);
}

/* Rodapé embutido */
.footer2 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 14%;
    background: transparent;
    border-top: 1px solid var(--alt-color);
}

.footer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.copyright p {
    font-size: 15px;
    font-weight: 500;
    color: var(--ann-color);
    text-align: center;
}

.scroll-top {
    position: absolute;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    width: 48px;
    background: var(--main-color);
    color: #ffffff;
    border-radius: 50%;
    font-size: 22px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.scroll-top:hover {
    transform: translateY(-4px);
    background: var(--main2-color);
}

/* Animações Fade */
.fade {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1),
        transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

.fade.appear {
    opacity: 1;
    transform: translateY(0);
}

/* Responsividade */
@media (max-width: 1580px) {

    header,
    header.sticky,
    .footer2 {
        padding-left: 6%;
        padding-right: 6%;
    }

    section {
        padding: 90px 6% 60px;
    }
}

@media (max-width: 1300px) {

    header,
    header.sticky,
    .footer2 {
        padding-left: 3%;
        padding-right: 3%;
    }

    section {
        padding: 90px 3% 60px;
    }

    :root {
        --h1-fonts: 4.5rem;
        --h2-fonts: 3rem;
        --p-fonts: 1rem;
    }
}

@media (max-width: 1200px) {

    .about,
    .contact {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-img {
        text-align: center;
    }

    .about-img img {
        height: 450px;
        margin: 0 auto;
    }

    .contact-form {
        max-width: 100%;
    }
}

@media (max-width: 1000px) {
    .logo img {
        max-width: 40px;
    }

    .menulist a {
        margin: 0 10px;
        font-size: 16px;
    }

    .menu-btn,
    .btn1 {
        padding: 14px 22px;
        font-size: 15px;
    }
}

@media (max-width: 900px) {
    :root {
        --h1-fonts: 4rem;
        --h2-fonts: 2.8rem;
    }
}

@media (max-width: 800px) {
    #menu-icon {
        display: block;
    }

    .menulist {
        position: absolute;
        width: 100%;
        height: 100vh;
        padding: 80px 40px;
        top: 0;
        left: 100%;
        display: flex;
        flex-direction: column;
        background: var(--second-bg-color);
        transition: all 0.4s ease-in-out;
    }

    .menulist a {
        display: block;
        margin: 0 0 25px 0;
        font-size: 1.5rem;
    }

    .menulist.open {
        left: 0;
    }

    .home {
        background-image: none;
        min-height: 100vh;
    }
}

@media (max-width: 768px) {

    .timeline-line,
    .timeline-dot {
        left: 20px;
    }

    .timeline-item,
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        justify-content: flex-end;
    }

    .timeline-content {
        width: calc(100% - 50px);
    }

    .footer {
        flex-direction: column;
        gap: 1.5rem;
    }

    .scroll-top {
        position: static;
    }
}

@media (max-width: 590px) {
    :root {
        --h1-fonts: 3rem;
        --h2-fonts: 2.2rem;
    }

    .about-img img {
        height: 350px;
        max-width: 100%;
    }

    form .submit-btn {
        width: 100%;
    }
}