/* --- RESET BÁSICO E CONFIGURAÇÕES GLOBAIS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
    text-decoration: none;
    list-style: none;
    outline: none;
}

/* --- VARIÁVEIS DE CORES --- */
:root {
    --purple-200: #a273f3; /* Roxo claro (destaque) */
    --purple-500: #6b36c8; /* Roxo médio */
    --purple-800: #441f88; /* Roxo escuro */
    --gray-200: #cccccc; /* Cinza claro */
    --gray-400: #505861; /* Cinza médio */
    --black-800: #171717; /* Preto quase absoluto */
    --white: #F9F9F9;    /* Branco puro */
    --gray-chumbo: #505050; /* Cinza chumbo */
    --azul-petroleo: #003b5c; 

    --cor-primaria: var(--black-800); 
    --cor-secundaria: rgba(255, 255, 255, 0.05); 
    --cor-destaque: var(--purple-200); 
    --cor-texto: var(--white); 
    --cor-texto-secundario: var(--gray-200); 
    --cor-borda: var(--gray-400); 
    --font-principal: 'Poppins', sans-serif; 
}

html {
    scroll-behavior: smooth; 
    width: 100%;
}

body {
    background-image: url('../img/background_04.jpg'); 
    background-size: cover; 
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    color: var(--cor-texto); 
    font-family: var(--font-principal);
    line-height: 1.6; 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
}

/* Overlay para escurecer o background e melhorar legibilidade */
body::before {
    content: "";
    position: fixed; 
    inset: 0; 
    background-color: rgba(0, 0, 0, 0.65);
    z-index: -1; 
}

/* Garante que todos os elementos de texto herdem a cor padrão, a menos que especificado */
h1, h2, h3, h4, h5, h6,
p, span, a, label, li {
    color: inherit; /* Herda a cor do pai (body ou elemento específico) */
}

button, a {
    cursor: pointer;
    font-family: var(--font-principal); /* Garante que botões e links usem a fonte Poppins */
}

/* --- Estilos Reutilizáveis (Classes Auxiliares) --- */
.flex {
    display: flex;
    justify-content: center; /* Centraliza horizontalmente por padrão */
    align-items: center; /* Centraliza verticalmente por padrão */
}

.botao {
    display: inline-block; 
    padding: 0.8rem 2rem; 
    border: 2px solid var(--cor-destaque); 
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    color: var(--cor-destaque); 
    background-color: transparent; 
    transition: all 0.3s ease; /* Transição suave para hover */
}

.botao:hover {
    color: var(--white); /* Texto branco no hover */
    background-color: var(--cor-destaque);
    transform: translateY(-3px); 
    box-shadow: 0 5px 15px rgba(162, 115, 243, 0.4); /* Sombra no hover com cor de destaque */
}

.highlight {
    color: var(--cor-destaque); 
}

/* Efeito de sublinhado ao passar o mouse */
.hover-underline {
    color: var(--cor-destaque);
    position: relative;
}

.hover-underline::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px; 
    left: 0;
    background-color: var(--cor-destaque);
    transition: width 0.3s ease-out;
}

.hover-underline:hover::after {
    width: 100%;
}

/* --- HEADER (Cabeçalho de Navegação) --- */
.menu_container {
    position: sticky; /* Fixo no topo ao rolar */
    top: 0;
    width: 100%;
    background-color: rgba(23, 23, 23, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); 
    z-index: 1000; 
    padding: 1rem 0;
}

.menu_content {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    max-width: 1120px; 
    width: 100%;
    margin: 0 auto; 
    padding: 0 1.5rem; 
}

#titulo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white); /* Cor do título */
    transition: color 0.3s ease;
}

#titulo a:hover {
    color: var(--cor-destaque); /* Cor de destaque no hover */
}

.menu_list {
    display: flex;
    gap: 2rem; /* Espaçamento entre os itens do menu */
}

.menu_list li a {
    color: var(--gray-200); /* Cor dos links do menu */
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.menu_list li a:hover {
    color: var(--white);
    background-color: rgba(107, 54, 200, 0.3);
}

/* --- MAIN (Conteúdo Principal) --- */
main {
    flex: 1; 
}

/* --- SEÇÃO HOME --- */
.home_container {
    min-height: calc(100vh - 8rem); /* Altura mínima da viewport menos header e um pouco de espaço */
    max-width: 1120px;
    margin: 2rem auto; /* Espaçamento superior e inferior, centralizado */
    padding: 2rem 1.5rem;
    display: flex; /* Ativa Flexbox */
    flex-wrap: wrap; 
    justify-content: center; 
    align-items: center;
    gap: 4rem; 
}

#home_texto {
    flex: 1; 
    min-width: 320px; 
    text-align: left; 
    max-width: 500px; 
}

#home_texto h4 {
    font-size: 1.4rem;
    color: var(--cor-destaque);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

#home_texto h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

/* Estilos para o efeito de máquina de escrever */
.typewriter_container {
    display: inline-block; 
    position: relative; 
}

#typewriter {
    border-right: 2px solid var(--white);
    padding-left: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    min-height: 2rem; 
    animation: blinkCursor 0.8s step-end infinite;
}

@keyframes blinkCursor {
    from, to { border-color: transparent }
    50% { border-color: var(--white); }
}

#home_texto p {
    font-size: 1.1rem;
    color: var(--gray-200);
    margin-bottom: 2.5rem;
}

#home_texto .botao {
    width: auto; 
    margin: 0 auto; 
    display: block;
    max-width: 200px; 
}

#home_imagem {
    flex-shrink: 0; /* Não encolhe */
    width: 350px; 
    height: 350px;
    border-radius: 50%;
    overflow: hidden; 
    border: 3px solid var(--purple-500); 
    box-shadow: 0 0 25px rgba(162, 115, 243, 0.7);
    display: flex; 
    justify-content: center;
    align-items: center;
}

#home_imagem img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

/* --- SEÇÃO SOBRE --- */
.sobre_container {
    max-width: 1120px;
    margin: 6rem auto; /* Espaçamento entre seções */
    padding: 3rem 2rem;
    background-color: var(--cor-secundaria); /* Fundo MUITO levemente transparente */
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4); /* Sombra suave para dar profundidade */
    display: flex; /* Ativa Flexbox */
    flex-wrap: wrap; /* Permite quebrar em linha */
    justify-content: center; /* Centraliza os itens */
    align-items: center; /* Alinha itens verticalmente */
    gap: 4rem; /* Espaço entre a imagem e o texto/info do GitHub */
}

.sobre_container img { 
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--cor-destaque); /* Borda com roxo destaque */
    box-shadow: 0 0 20px rgba(162, 115, 243, 0.7); /* Sombra luminosa */
    flex-shrink: 0; /* Não encolhe */
}

#about_texto {
    flex: 1; /* Permite que o texto cresça */
    min-width: 300px; 
    text-align: left;
    max-width: 600px; 
}

#about_texto h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--white);
}

#about_texto p {
    font-size: 1.1rem;
    color: var(--gray-200);
    margin-bottom: 2rem;
}

.sobre_github {
    display: flex; 
    gap: 2rem; 
    align-items: center;
    justify-content: center; 
    flex-wrap: wrap; 
    margin-top: 1rem;
}

.sobre_github p {
    margin: 0; 
    font-size: 1.1rem;
    color: var(--gray-200);
}

/* --- SEÇÃO CONTATO --- */
.contato_container {
    max-width: 1120px;
    margin: 6rem auto;
    padding: 3rem 2rem;
    background-color: var(--cor-secundaria); 
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4); 
    display: flex; 
    flex-wrap: wrap; 
    gap: 3rem; 
    justify-content: center;
    align-items: flex-start; 
}

#redes_sociais {
    flex: 1; 
    min-width: 280px; 
    padding-right: 2rem; 
    border-right: 1px solid var(--gray-400); 
    text-align: left; 
}

#redes_sociais h4 {
    font-size: 2.2rem;
    color: var(--cor-destaque);
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
}

#redes_sociais p {
    font-size: 1.1rem;
    color: var(--gray-200);
    margin-bottom: 2rem;
}

#icones_redes_sociais {
    display: flex;
    justify-content: center; 
    gap: 1.5rem;
    margin-top: 2rem;
}

.social_icon {
    display: inline-block;
    
    transition: transform 0.3s ease, filter 0.3s ease; 
}

.social_icon img {
    width: 48px; 
    height: 48px; 
    display: block;
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%); /* Garante que os ícones fiquem brancos */
}

.social_icon:hover {
    transform: translateY(-5px); 
    filter: brightness(0)
            saturate(100%)
            invert(20%)
            sepia(24%)
            saturate(4557%)
            hue-rotate(242deg)
            brightness(89%)
            contrast(108%); 
}

/* Formulário de Contato */
#formulario {
    flex: 1; 
    min-width: 280px;
    display: flex;
    flex-direction: column; 
    gap: 1rem; 
    text-align: left; 
}

#formulario label {
    font-size: 1.1rem;
    color: var(--white);
    margin-bottom: 0.2rem;
    font-weight: 500;
}

#formulario input,
#formulario textarea {
    width: 100%;
    padding: 1rem; /* Aumentei o padding */
    border: 1px solid var(--gray-400);
    border-radius: 8px; 
    background-color: var(--black-800); 
    color: var(--white);
    font-family: var(--font-principal);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#formulario input:focus,
#formulario textarea:focus {
    border-color: var(--cor-destaque);
    box-shadow: 0 0 8px rgba(162, 115, 243, 0.6);
}

#formulario textarea {
    min-height: 120px;
    resize: vertical; /* Permite redimensionar verticalmente */
}

#formulario span { /* Mensagens de erro de validação */
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

#formulario .botao {
    margin-top: 1.5rem;
    align-self: flex-start;
    width: auto;
}

/* --- FOOTER (Rodapé da Página) --- */
footer {
    background-color: rgba(23, 23, 23, 0.9); 
    color: var(--gray-200);
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.9rem;
    margin-top: auto; 
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
}

/* --- ESTILOS PARA PÁGINA DE SUCESSO (se tiver) --- */
.home_container_sucess {
    min-height: calc(100vh - 12rem); /* Ajustado para deixar espaço para header e footer */
    max-width: 1120px;
    margin: 2rem auto;
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
}

#home_sucess h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--cor-destaque);
    margin-bottom: 1rem;
}

#home_sucess h4 {
    font-size: 1.5rem;
    color: var(--white);
    padding: 1rem;
}

#menu_content_sucess {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1120px;
    padding: 0 1.5rem;
    margin-bottom: 2rem;
}

#menu_content_sucess a {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cor-destaque);
}

/* --- RESPONSIVIDADE (MEDIA QUERIES) --- */
@media screen and (max-width: 960px) {
    /* Ajustes para telas menores (tablets e alguns celulares grandes) */
    .menu_content {
        padding: 0 1rem;
    }

    .menu_list {
        gap: 1rem;
    }

    .menu_list li a {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }

    #titulo a {
        font-size: 1.6rem;
    }

    .home_container {
        flex-direction: column-reverse; 
        gap: 2.5rem;
        min-height: auto; 
        margin-top: 1rem;
        padding: 1.5rem 1rem;
    }

    #home_texto {
        text-align: center; 
    }

    #home_texto .botao {
        margin: 0 auto; /* Centraliza o botão */
    }

    #home_imagem {
        width: 280px;
        height: 280px;
    }

    .sobre_container {
        flex-direction: column; /* Conteúdo em coluna */
        gap: 2.5rem;
        margin: 4rem auto;
        padding: 2.5rem 1.5rem;
    }

    .sobre_container img {
        width: 220px;
        height: 220px;
    }

    #about_texto {
        text-align: center; /* Centraliza o texto */
    }

    #about_texto h2 {
        font-size: 2rem;
    }

    .sobre_github {
        flex-direction: column;
        gap: 0.8rem;
    }

    .contato_container {
        flex-direction: column; 
        gap: 2.5rem;
        margin: 4rem auto;
        padding: 2.5rem 1.5rem;
    }

    #redes_sociais {
        padding-right: 0;
        border-right: none; 
        padding-bottom: 2rem; 
        border-bottom: 1px solid var(--gray-400); 
        text-align: center; /* Centraliza o texto */
    }

    #formulario {
        padding-left: 0;
    }

    #formulario .botao {
        align-self: center; 
    }

    /* Home - Página Sucess */
    #home_sucess h1 {
        font-size: 2rem;
    }
    #home_sucess h4 {
        font-size: 1.1rem;
    }
}

@media screen and (max-width: 600px) {
    /* Ajustes para telas de celular menores */
    #home_texto h1 {
        font-size: 2.5rem;
    }

    #home_texto h4 {
        font-size: 1.2rem;
    }

    #home_imagem {
        width: 220px;
        height: 220px;
    }

    .sobre_container img {
        width: 180px;
        height: 180px;
    }

    #about_texto h2 {
        font-size: 1.8rem;
    }

    #redes_sociais h4 {
        font-size: 1.8rem;
    }

    #redes_sociais p {
        font-size: 1rem;
    }
    .social_icon {
        width: 4rem; 
        height: 4rem; 
        padding: 0; 
    }
    .social_icon img {
        width: 100%; 
        height: 100%; 
    }
}

@media screen and (max-width: 400px) {
    /* Ajustes para celulares muito pequenos */
    .menu_list li a {
        font-size: 0.9rem;
    }
    #titulo a {
        font-size: 1.4rem;
    }
    #home_texto h1 {
        font-size: 2rem;
    }
    #home_texto p {
        font-size: 0.95rem;
    }
    #home_imagem {
        width: 200px;
        height: 200px;
    }
    .sobre_container img {
        width: 150px;
        height: 150px;
    }
    #about_texto h2 {
        font-size: 1.6rem;
    }

    
}