* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primaria: #4f46e5;
    --secundaria: #7c3aed;
    --escuro: #0f172a;
    --maisEscuro: #0a0f1c;
    --claro: #e2e8f0;
    --vidro: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--escuro);
    color: var(--claro);
}

.navegacao {
    position: fixed;
    top: 0;
    background: rgba(15, 23, 42, 0.8);
    width: 100%;
    z-index: 100;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.menu {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 3rem;
}

.menu-link {
    text-decoration: none;
    color: var(--claro);
    font-weight: 500;
    position: relative;
    padding: 0.5rem;
}

/* botão hamburguer escondido no desktop */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* MOBILE */
@media (max-width: 768px) {

    .foto-perfil {
        width: 220px;
        height: 220px;
    }

    h1 {
        font-size: 1.5rem;
        margin: 20px 0;
        line-height: 1.2;
    }

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

    .menu-toggle {
        display: block;
    }

    .menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.95);
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 1.5rem 0;
        display: none;
    }

    .menu.ativo {
        display: flex;
    }
}

nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primaria);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%
}

.cabecalho {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding-top: 70px; /* ADICIONADO para evitar sobreposição com o menu fixo */
    text-align: center;
}

.foto-perfil {
    width: 350px;
    height: 350px;
    max-width: 90%;
    box-shadow: 5px 10px 20px rgba(79, 70, 229, 0.3);
    border-radius: 50%;
    border: 4px solid var(--vidro);
    animation: flutuar 4s ease-in-out infinite;
}

h1 {
    font-size: 3.5rem;
    color: var(--primaria);
    font-weight: bold;
    margin: 40px;
}

.social-sidebar {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 10;
}

.social-sidebar a {
    color: #e2e8f0;
    font-size: 1.8rem;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    text-align: center;
}

.social-sidebar a:hover {
    color: #7c3aed;
    transform: scale(1.2);
}

.cabecalho-subtitulo {
    font-size: 1.5rem;
    color: var(--claro);
}

.sobre {
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sobre-titulo {
    font-size: 3rem;
    color: var(--claro);
    margin-bottom: 40px;
}

.sobre-descricao {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 16px;
    border: 1px solid var(--vidro);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.05);
}

.sobre-paragrafo {
    text-align: center;
    font-size: 1rem;
}

.tech-btn {
    background-color: transparent;
    border: none;
    cursor: default;
    padding: 0.5rem;
    transition: transform 0.2s ease-in-out;
}

.tech-btn img {
    width: 40px;
    height: 40px;
    filter: drop-shadow(1px 1px 3px rgba(0,0,0,0.3));
}

.tech-btn:hover {
    transform: scale(1.1);
}

.projetos {
    padding: 6rem 2rem;
}


a {
    text-decoration: none;
    color: var(--claro);
 }
      

.projetos-titulo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--claro);
    margin-bottom: 40px;
}

.projetos-card.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.projetos-card:hover {
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
    transform: translateY(-10px) scale(1.03);
}

.projetos-card-img {
    height: 355px;
    width: 100%;
    object-fit: cover;
}

.caixa-textos-projetos {
    padding: 1.5rem;
}

.info-projetos {
    margin-bottom: 5px;
}

.paragrafo-projetos {
    color: rgba(226, 232, 240, 0.8);
    line-height: 1.25rem;
}

.botoes-tecnologias {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-tec {
    padding: 0.3rem 0.7rem;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: bold;
    color: white;
    background-color: #4a5568; /* Cor base genérica */
    text-transform: uppercase;
}

.btn-tec.html { background-color: #e34c26; }
.btn-tec.css { background-color: #264de4; }
.btn-tec.js { background-color: #f0db4f; color: #000; }
.btn-tec.php { background-color: #8892be; }

.btn-repo {
    background-color: #6b46c1;
    padding: 0.3rem 0.7rem;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn-repo:hover {
    background-color: #553c9a;
}

.contato {
    padding: 6rem 2rem
}

.contato-titulo {
    /* text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px; */

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--claro);
    margin-bottom: 40px;
}

.formulario-contato {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    padding: 2rem;
    border: 1px solid var(--vidro);
    border-radius: 16px;
}

.campo-form {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--claro);
    border: 1px solid var(--vidro);
    outline: none;
}

.campo-form:focus {
    border-color: var(--secundaria);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.3);
}

.grupo-form {
    margin-bottom: 1.5rem;
}

.botao-enviar {
    background: linear-gradient(45deg, var(--primaria), var(--secundaria));
    width: 100%;
    color: var(--claro);
    padding: 1rem 2rem;
    border: none;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.botao-enviar:hover {
    transform: translateY(-4px);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.4);
}

.particulas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.5;
    background: 
        radial-gradient(circle at 10% 20%, var(--primaria) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, var(--secundaria) 0%, transparent 20%),
        var(--maisEscuro)
    ;
}

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

.projetos-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.projetos-container {
    display: flex;
    overflow-x: auto; /* Permite o scroll horizontal */
    scroll-behavior: smooth; /* ESSENCIAL para a animação de rolagem */
    gap: 2rem;
    padding: 1rem;
    /* Adiciona "snap" para que a rolagem pare nos cards */
    scroll-snap-type: x mandatory; 
    /* Esconde a barra de rolagem visualmente */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.projetos-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari e Opera */
}

.projetos-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(5px);
    border: 1px solid var(--vidro);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Transição mais suave */
    cursor: pointer;

    /* Define a largura e impede que o card encolha */
    flex-shrink: 0;
    width: calc(33.333% - 1.5rem);
    min-width: 320px;
    
    /* Alinha o card no início do container ao "snappar" */
    scroll-snap-align: start;
}

@media (max-width: 1200px) {
    .projetos-card {
        /* Ajusta para 2 cards por linha */
        width: calc(50% - 1rem); 
    }
}

/* Para telas de até 768px (Celulares e tablets em modo retrato) */
@media (max-width: 768px) {

    .projetos-wrapper {
        gap: 0.5rem;
        padding: 0;
    }

    .projetos-container {
        padding: 0.5rem;
        gap: 1rem;
    }

    .projetos-card {
        width: 100%;          /* ocupa toda largura disponível */
        min-width: 100%;      /* garante 1 card por vez */
        margin: 0 auto;
    }

    .projetos-card-img {
        width: 100%;
        height: 200px;           /* altura fixa elegante */
        object-fit: cover;       /* preenche o espaço */
        object-position: center; /* corta centralizado */
    }

    .arrow-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid var(--vidro);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        flex-shrink: 0;
    }

    .arrow-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Opcional: Ocultar setas em telas muito pequenas (o usuário usa o toque) */
@media (max-width: 576px) {
    .arrow-btn {
        display: none;
    }
}

.arrow-btn {
    width: 50px;
    height: 50px;
    border-radius: 100%;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(79, 70, 229, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.arrow-btn:hover {
    background-color: rgba(79, 70, 229, 0.4);
    border-color: rgba(79, 70, 229, 0.4);
}

.footer {
    padding: 2rem;
    background-color: #0f172a;
    color: #e2e8f0;
    text-align: center;
}

.footer-text {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: center;
    font-size: 1.5rem;
}

.footer-link {
    color: #e2e8f0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #7c3aed; /* cor roxa da sua paleta */
}

/* =============================================== */
/*              ESTILOS DO MODAL                   */
/* =============================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.9); /* Fundo escuro semi-transparente */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-content {
    background-color: var(--escuro);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--vidro);
    width: 90%;
    max-width: 800px; /* Largura máxima do modal */
    max-height: 90vh; /* Altura máxima, com rolagem interna */
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--claro);
    font-size: 3rem;
    cursor: pointer;
}

/* Estilos para o conteúdo dentro do modal */
#modal-body h3 {
    font-size: 3rem;
    color: var(--primaria);
    margin-bottom: 1.5rem;
}

#modal-body p {
    font-size: 1.6rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

#modal-body .modal-section-title {
    font-size: 2rem;
    color: var(--claro);
    border-bottom: 2px solid var(--secundaria);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

#modal-body .modal-gallery img,
#modal-body .modal-gallery video {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

#modal-body .modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

#modal-body .modal-btn {
    background: linear-gradient(45deg, var(--primaria), var(--secundaria));
    color: var(--claro);
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

#modal-body .modal-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.4);
}

#modal-body .modal-btn.github {
    background: #333;
}

