/* --- CONFIGURAÇÕES GLOBAIS E VARIÁVEIS --- */
:root {
    --bg-color: #101214;
    --surface-color: #181A1D;
    --primary-color: #0A2540; /* Azul Marinho / Petróleo */
    --primary-light: #3399FF; /* Azul mais claro para links e destaques */
    --text-color: #F0F0F0;
    --text-secondary: #A0A0A0;
    --font-family: 'Space Grotesk', sans-serif;
    --border-radius: 1rem;
    --transition: all 0.3s ease-in-out;
    /* Cores das Tags */
    --tag-ml: #3399FF; /* Azul */
    --tag-analise: #FFAB00; /* Dourado */
    --tag-automacao: #E53935; /* Vermelho */
    --tag-visao: #8c00ff; /* Roxo */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background-color: var(--bg-color); color: var(--text-color); font-family: var(--font-family); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 6rem 0; }
h2 { font-size: 2.5rem; margin-bottom: 2rem; }

/* --- BARRA DE ROLAGEM PERSONALIZADA E SUTIL --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background-color: var(--surface-color); border-radius: 10px; border: 2px solid var(--bg-color); }
::-webkit-scrollbar-thumb:hover { background-color: var(--primary-color); }

/* --- ESTILO PARA TEXTO EM DESTAQUE --- */
.highlight-text {
    color: var(--primary-light);
    font-weight: 500;
}
/* --- CABEÇALHO --- */
#header { width: 100%; position: fixed; top: 0; left: 0; z-index: 100; background: rgba(16, 18, 20, 0.8); backdrop-filter: blur(10px); transition: var(--transition); }
#header.scrolled { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
#header nav { height: 4.5rem; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--text-color); text-decoration: none; }
.logo span { color: var(--primary-light); }
.menu { display: flex; list-style: none; gap: 2rem; }
.menu a {color: var(--text-secondary); text-decoration: none; font-size: 1rem; position: relative; transition: var(--transition);}
.menu a::after {content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--primary-light); border-radius: 2px; transition: width .3s ease;}
.menu a:hover { color: var(--primary-light);}
.menu a:hover::after {width: 100%;}

/* --- SEÇÃO HERO --- */
#hero { min-height: 100vh; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; background-color: var(--bg-color); }
#particles-js { position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: 1; }
.hero-content { position: relative; z-index: 2; text-align: center; }
.hero-text h1 { font-size: 4.5rem; margin: 0.5rem 0; }
.hero-text h3 { font-size: 1.8rem; color: var(--text-secondary); font-weight: 400; }
.typing-effect { color: var(--primary-light); font-weight: 500; }
.subtitle { margin: 1.5rem auto; max-width: 500px; color: var(--text-secondary); }
.btn { display: inline-block; padding: 1rem 2.5rem; background: var(--primary-light); color: white; border-radius: 50px; text-decoration: none; font-weight: 500; transition: var(--transition); }
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(51, 153, 255, 0.2); }
.btn.btn-secondary { background: transparent; border: 1px solid var(--primary-light); color: var(--primary-light); margin-top: 1rem; padding: 0.8rem 2rem; font-size: 0.9rem;} /* Botão ajustado */
.btn.btn-secondary:hover { background: var(--primary-light); color: white; }
.scroll-down-arrow { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 3; color: var(--text-secondary); font-size: 2rem; animation: bounce 2s infinite; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); } 40% { transform: translate(-50%, -15px); } 60% { transform: translate(-50%, -5px); } }

/* --- SEÇÃO SOBRE MIM (LAYOUT INVERTIDO) --- */
#about { background-color: var(--bg-color); display: flex; align-items: center; min-height: 100vh; padding: 6rem 0; }
.about-container { display: grid; grid-template-columns: 1fr minmax(280px, 35%); gap: 4rem; align-items: flex-start; }
.about-right-column { display: flex; flex-direction: column; gap: 2rem; align-items: center; }
.about-image img { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface-color); }
.about-text p:last-of-type { margin-bottom: 1rem; } /* Diminui a distância abaixo do último parágrafo */
.about-text p { color: var(--text-secondary); margin-bottom: 1.5rem; line-height: 1.7; text-align: justify; }
.about-text a:not(.btn) { color: var(--primary-light); text-decoration: none; position: relative; font-weight: 500; transition: color .3s ease; }
.about-text a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: -3px; height: 2px; width: 0; background: var(--primary-light); border-radius: 2px; transition: width .3s ease; }
.about-text a:not(.btn):hover::after { width: 100%; }
.tech-stack { width: 100%; }
.tech-stack h4 { margin-bottom: 1rem; font-size: 1.2rem; text-align: center; }
.tools-container { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.tool-category-card { background-color: var(--surface-color); padding: 0.7rem 0.9rem; border-radius: var(--border-radius); transition: var(--transition); text-align: center; flex: 1 1 120px; min-width: 120px; } /* Padding ajustado */
.tool-category-card:hover { transform: translateY(-5px); background-color: #202225; }
.tool-category-card h5 { display: flex; align-items: center; justify-content: center; gap: 0.3rem; font-size: 0.9rem; color: var(--primary-light); margin-bottom: 0.5rem; font-weight: 500; }
.tool-category-card h5 i { font-size: 1.1rem; }
.tool-category-card p { color: var(--text-secondary); line-height: 1.5; font-size: 0.8rem; margin: 0; }

/* --- SEÇÃO DE PROJETOS --- */
#projects { background-color: var(--surface-color); }
#projects h2 { text-align: center; }
.legend { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 3rem; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; color: var(--text-secondary); }
.tag-color { display: inline-block; width: 18px; height: 18px; border-radius: 50%; }
.tag-color.ml { background-color: var(--tag-ml); }
.tag-color.analise { background-color: var(--tag-analise); }
.tag-color.automacao { background-color: var(--tag-automacao); }
.tag-color.visao { background-color: var(--tag-visao); }

.projects-grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.project-link { text-decoration: none; color: inherit; }
.project-tags { position: absolute; top: 1rem; right: 1rem; z-index: 2; display: flex; gap: 0.5rem; }
.project-card { position: relative; border-radius: var(--border-radius); overflow: hidden; aspect-ratio: 1 / 1; cursor: pointer; display: block; }
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.project-card .project-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.5rem; background: linear-gradient(to top, rgba(10, 37, 64, 0.95), transparent); color: white; transform: translateY(100%); opacity: 0; transition: var(--transition); }
.project-card .project-overlay h3 { font-size: 1.2rem; }
.project-card .project-overlay p { font-size: 0.9rem; color: var(--text-color); opacity: 0.8; margin-top: 0.5rem; }
.project-link:hover .project-card img { transform: scale(1.05); }
.project-link:hover .project-card .project-overlay { transform: translateY(0); opacity: 1; }

/* --- RODAPÉ --- */
.footer { text-align: center; padding: 4rem 0; background-color: var(--bg-color); }
.footer h2 { font-size: 2rem; }
.footer p { color: var(--text-secondary); margin-bottom: 2rem; max-width: 500px; margin-left: auto; margin-right: auto; }
.social-icons { display: flex; justify-content: center; gap: 2rem; margin-bottom: 2rem; }
.social-icons a { font-size: 2rem; color: var(--text-secondary); transition: var(--transition); }
.social-icons a:hover { color: var(--primary-light); transform: scale(1.2); }
.copyright { font-size: 0.9rem; }

/* --- PÁGINA DE DETALHES DO PROJETO E CERTIFICADOS --- */
.page-header { text-align: center; margin-bottom: 4rem; }
.page-header h1 { font-size: 3rem; margin-bottom: 1rem; }
.page-header p { font-size: 1.2rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }
.project-detail-header h1 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
}

.project-detail-header p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-top: 0;
    margin-bottom: 3rem;
}
.project-detail-section, .certifications-section { padding-top: 8rem; padding-bottom: 4rem; }
.project-content { max-width: 800px; margin: 0 auto; }
.project-content img { width: 100%; border-radius: var(--border-radius); margin-bottom: 2rem; }
.project-content h3 { font-size: 1.8rem; color: var(--primary-light); margin-top: 2rem; margin-bottom: 1.5rem; }
.project-content p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 1.5rem; text-align: justify; }
.back-to-home { display: inline-block; margin-top: 3rem; color: var(--primary-light); text-decoration: none; font-weight: 500; position: relative; }
.back-to-home::after { content: "";  position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--primary-light); border-radius: 2px; transition: width .3s ease; }
.back-to-home:hover::after { width: 100%; }

/* --- ESTILOS DA PÁGINA DE CERTIFICADOS --- */
.certifications-list { display: flex; flex-direction: column; gap: 2rem; max-width: 900px; margin: 0 auto; }
.certificate-card { display: grid; grid-template-columns: 1fr 200px; gap: 2rem; background-color: var(--surface-color); padding: 2rem; border-radius: var(--border-radius); align-items: center; }
.certificate-info .institution { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.certificate-info .institution img { width: 50px; height: 50px; border-radius: 50%; }
.certificate-info .institution span { font-size: 1.2rem; font-weight: 500; }
.certificate-info h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.certificate-info p { color: var(--text-secondary); margin: 0; }
.certificate-preview a { display: block; border-radius: var(--border-radius); overflow: hidden; }
.certificate-preview img { width: 100%; height: auto; display: block; transition: var(--transition); }
.certificate-preview a:hover img { transform: scale(1.05); }

/* --- ANIMAÇÕES E RESPONSIVIDADE --- */
.reveal { opacity: 0; transform: translateY(50px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
    .about-container { grid-template-columns: 1fr; text-align: center; }
    .about-text { order: 1; }
    .about-right-column { order: 2; }
    .about-text p { text-align: center; }
}

@media (max-width: 768px) {
    h1, .hero-text h1 { font-size: 3rem; }
    h2 { font-size: 2rem; }
    .menu { display: none; }
    .page-header h1 { font-size: 2.5rem; }
    .certificate-card { grid-template-columns: 1fr; text-align: center; }
    .certificate-info .institution { justify-content: center; }
    .certificate-preview { max-width: 250px; margin: 1rem auto 0 auto; }
}
/* --- CORREÇÃO MENU RESPONSIVO (ISOLADO) --- */
.btn-mobile-nav {
    display: none;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    z-index: 101;
}

@media (max-width: 768px) {
    .btn-mobile-nav { display: block; }

    #header .menu {
        display: flex; /* Sobrescreve o display:none que você já tinha */
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--surface-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: 0.4s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
        z-index: 100;
    }

    #header .menu.active {
        right: 0;
    }

    #header .menu li {
        margin: 0; /* Reset para o mobile */
    }

    #header .menu a {
        font-size: 1.5rem;
    }
}