* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, 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);
    /* Ajuste de padding-top para o conteúdo não ficar atrás do menu fixo */
    padding-top: 5.5rem; 
}

/* NOVO: Wrapper para a fixação (Fundo e posição fixa em 100% da largura) */
.navegacao-wrapper {
    position: fixed;
    top: 0;
    background: rgba(15, 23, 42, 0.95);
    width: 100%;
    z-index: 100;
}

/* Antigo .navegacao, agora focado no layout interno e centralizado */
.navegacao {
    display: flex;
    justify-content: space-between; /* LOGO na esquerda, MENU na direita */
    align-items: center;
    max-width: 1200px; /* Limita a largura do conteúdo interno */
    margin: 0 auto; /* Centraliza a nav */
    padding: 1.5rem 2rem; /* Espaçamento interno (top/bottom e left/right) */
}

/* NOVO: Estilo para a imagem da logo */
.logo-img {
    height: 30px; /* Tamanho da logo: Pequena para não ser intrusiva */
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

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

.menu {
    display: flex;
    list-style: none;
    gap: 3rem;
    margin-left: auto; /* Garante que o menu fique o mais à direita possível */
}

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

.menu-link:focus { 
    outline: 2px solid var(--secundaria);
    outline-offset: 3px;
    border-radius: 2px;
}

.menu-link::after {
    content: '';
    height: 2px;
    width: 0;
    position: absolute;
    bottom: 0;
    left: 0;
    background: linear-gradient(98deg, var(--primaria), var(--secundaria));
    transition: width 0.5s ease;
}

.menu-link:hover::after,
.menu-link.active::after { 
    width: 100%;
}

.cabecalho {
    min-height: calc(100vh - 5.5rem); 
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 2rem;
}

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

h1 {
    font-size: 3.5rem;
    color: var(--primaria);
    font-weight: bold;
    margin: 20px 0 10px 0;
    text-align: center;
}

.cabecalho-sub-titulo {
    font-size: 1.5rem;
    color: var(--claro);
    text-align: center;
}

.sobre {
    padding: 6rem 2rem;
}

.sobre-titulo {
    font-size: 3rem;
    color: var(--claro);
    text-align: center;
    margin-bottom: 2rem;
}

.sobre-caixa {
    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: 1.2rem;
}

.skills {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.skills-titulo {
    text-align: center;
    font-size: 3rem;
    color: var(--claro);
    margin-bottom: 3rem;
}

.skills-grupo {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid var(--vidro);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.skills-sub-titulo {
    font-size: 2rem;
    color: var(--secundaria);
    margin-bottom: 1.5rem;
    text-align: center;
}

.skills-caixa {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.projetos {
    padding: 6rem 2rem;
}

.projetos-caixa {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.projetos-titulo {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
}

.projetos-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(5px);
    border: 1px solid var(--vidro);
    overflow: hidden;
    transition: all 0.5s ease;
    cursor: pointer;
}

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

.projeto-imagem{
    height: 200px; 
    width: 100%;
    /* Ajuste para compactação (Solução 1 do pedido anterior) */
    object-fit: contain; 
    background-color: var(--maisEscuro); 
}

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

.info-projetos {
    font-size: 1.5rem;
    padding: 0 0 0.5rem 0;
    margin-bottom: 5px;
    color: var(--primaria);
}

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

/* NOVO: Estilo para centralizar o botão "Ver Mais" */
.ver-mais-projetos {
    text-align: center;
    margin-top: 3rem; 
}

/* Estilo para o novo botão de GitHub (baseado no estilo do .botao-form) */
.botao-github {
    /* Herda o gradiente de cor do .botao-form */
    background: linear-gradient(45deg, var(--primaria), var(--secundaria));
    color: var(--claro);
    
    
    /* Estilo do link */
    text-decoration: none;
    font-weight: bold;
    
    /* Espaçamento e Formato */
    padding: 1rem 2rem;
    border-radius: 8px;
    display: inline-block; /* Permite centralização via text-align */
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Estilo para o ícone */
.botao-github i {
    margin-left: 0.5rem;
}

/* Efeito Hover (para interação) */
.botao-github:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.6); /* Sombra que reforça o link */
}

.contatos {
    padding: 6rem 2rem;
}

.contatos-titulo {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
}

.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;
    resize: vertical;
}

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

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

.botao-form {
    color: var(--claro);
    background: linear-gradient(45deg, var(--primaria), var(--secundaria));
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    transition: all 0.5s ease;
}

/* Estilo para o ícone no botão do WhatsApp */
.botao-form i {
    margin-right: 0.5rem;
}

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

.rodape {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--vidro);
    margin-top: 4rem;
    background-color: var(--maisEscuro);
    color: rgba(226, 232, 240, 0.7);
}

.redes-sociais {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* NOVO: Estilo para o ícone de e-mail na seção de contato.
   Reutilizamos a classe .redes-sociais mas garantimos o tamanho do ícone */
.contatos-extras .redes-sociais a i {
    font-size: 2rem; 
}


.redes-sociais a {
    color: var(--claro);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.redes-sociais a:hover {
    color: var(--secundaria);
    transform: scale(1.2);
}

.particulas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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);
    }
}

/* * * RESPONSIVIDADE * * */

@media (max-width: 768px) {
    /* Ajuste de padding-top para o mobile */
    body {
        padding-top: 4.5rem; 
    }
    
    .cabecalho {
        min-height: calc(100vh - 4.5rem); 
        padding-top: 2rem;
    }


    .navegacao {
        /* Permite quebra de linha no mobile */
        flex-wrap: nowrap; 
        justify-content: space-between;
        align-items: center; /* Centraliza logo e menu */
        padding: 0.8rem 1rem;
    }

    .logo-img {
        height: 25px; /* Reduz ligeiramente a logo no mobile */
    }

    .menu {
        /* Garante que o menu ocupe a largura total abaixo da logo */
        width: auto;
        margin-left: 1rem; 
        justify-content: flex-end; /* Distribui links horizontalmente */
        gap: 0.75rem; 
        padding: 0;
        /* Adicionei 'overflow-x: auto' aqui para caso o menu queira quebrar */
        overflow-x: auto;
    }

    .menu-link {
        font-size: 0.85rem;
        padding: 0.5rem 0.2rem;
        white-space: nowrap; /* Impede a quebra de texto dos links */
    }

    /* Outros ajustes de responsividade */
    .foto-perfil {
        max-width: 200px;
        height: 200px;
    }

    h1 {
        font-size: 2rem;
    }

    .cabecalho-sub-titulo {
        font-size: 1rem;
    }

    .sobre, .skills, .projetos, .contatos {
        padding: 4rem 1.5rem;
    }
    
    .sobre-titulo, .skills-titulo, .projetos-titulo, .contatos-titulo {
        font-size: 2.5rem;
    }
    
    .sobre-paragrafo {
        font-size: 1rem;
    }
    
    .skills-sub-titulo {
        font-size: 1.5rem;
    }
    
    .skills-caixa {
        gap: 0.5rem;
        justify-content: center;
    }

    .projetos-caixa {
        grid-template-columns: 1fr;
    }

    .rodape p {
        font-size: 0.9rem;
    }
    
    /* Responsividade para o botão do GitHub CENTRALIZADO no mobile */
    .ver-mais-projetos {
        text-align: center;
        margin-top: 2rem;
        padding: 0 1rem;
    }
    .botao-github {
        max-width: 90%; 
        width: 100%; /* Força 100% da largura disponível para melhor toque */
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}


@media (min-width: 769px) and (max-width: 1024px) {
    .navegacao {
        padding: 1.5rem 2rem; /* Mantém o padding do desktop, mas sem forçar 1200px */
    }

    h1 {
        font-size: 3rem;
    }
    
    .projetos-caixa {
        grid-template-columns: repeat(2, 1fr);
    }
}