/* --- CONFIGURAÇÃO GLOBAL (DARK MODE) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
}

html {
    scroll-behavior: smooth;
}

body {
    color: #f4f4f4; /* Cor da fonte clara */
    font-family: 'Open Sans', Arial, sans-serif;
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Exo 2', Arial, sans-serif;
    font-weight: 700;
    color: #fff; /* Títulos em branco */
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* --- MENU FLUTUANTE (DARK MODE) --- */
.navbar {
    background-color: #000;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: fixed;
    z-index: 100;
    top: 1rem; 
    width: 90%;
    max-width: 1100px;
    left: 50%;
    border-radius: 1rem;
    transform: translate(-50%, -150%); 
    transition: transform 0.3s ease-in-out;
    overflow: hidden;
}

.navbar.navbar-visible {
    transform: translate(-50%, 0);
}

.navbar .container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-size: 1.5rem;
    color:#7f0fff;
}

.navbar nav ul { list-style: none; display: flex; }
.navbar nav li { margin-left: 1.5rem; }
.navbar nav a {
    color: #00e1ff ;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease; 
}
.navbar nav a:hover {
    color: #fff; 
}

.navbar::after {
    content: ''; 
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: .3rem;
    background: linear-gradient(
        to right,
        #7f0fff,
        #ccc, 
        #00e1ff
    );
}

/* --- SECÇÃO "SOBRE MIM" (COM VÍDEO) --- */
.hero-full {
    height: 90vh; 
    display: flex;
    align-items: center; 
    position: relative;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
}
.hero-full::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2;
}
.hero-content {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 3;
}

.hero-texto {
    flex: 0 1 60%; 
    padding-right: 2rem; 
    color: #fff;
}

.hero-texto h2 { font-size: 2.8rem; margin-bottom: 1rem; }
.hero-texto p { font-size: 1.2rem; margin-bottom: 1rem; }

.hero-imagem {
    flex: 0 1 35%; 
    text-align: center;
}
.hero-imagem img {
    max-width: 350px;
    width: 100%;
    height: auto; 
    border-radius: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 2px solid #b6b4b4;
}

/* --- ESTILOS GERAIS DAS SECÇÕES (DARK MODE) --- */
.secao {
    padding: 4rem 0;
    border-bottom: 1px solid #333; /* Borda escura */
}
.secao h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}


/* --- SECÇÃO PROJETOS (DARK MODE) --- */
.projeto-card {
    background: #000000;
    border: 1px solid #b6b4b4;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 1rem;
    display: flex;
    margin-bottom: 2.5rem;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}
.projeto-card:hover {
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.projeto-imagem {
    flex: 0 0 30%; 
    background-color: #2a2a2a; 
}
.projeto-imagem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.projeto-texto {
    flex: 1; 
    padding: 2rem;
    max-height: 300px;
    overflow-y: auto;
}
.projeto-texto p {
    margin-bottom: 1.5rem;
    color: #ccc;
}
.btn-projeto {
    display: inline-block;
    background: #7f0fff;
    color: #ccc;
    padding: 0.7rem 1.2rem;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #ccc;
    border-radius: 1rem;
    transition: background-color 0.3s ease;
    margin-right: 0.5rem;
}
.btn-projeto:hover {
    background-color: #ccc;
    color: #7f0fff;
    border: 1px solid #7f0fff
}


/* --- SECÇÃO ARTIGOS (DARK MODE) --- */
.artigos-grid-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.artigo-preview-card {
    text-decoration: none;
    background: #000000;
    border: 1px solid #b6b4b4;
    color: #f4f4f4;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 1rem ;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.artigo-preview-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.artigo-preview-card h3 {
    padding: 1rem;
    font-size: 1.1rem;
    text-align: center;
    transition: color 0.3s ease;
    color: #fff;
}
.artigo-preview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
    border: 1px solid #00e1ff;
}
.artigo-preview-card:hover h3 {
    color: #00e1ff;
}


/* --- PÁGINA DE ARTIGO (DARK MODE) --- */
.secao-artigo {
    padding-top: 8rem; 
    padding-bottom: 4rem;
}
.container-artigo {
    max-width: 800px;
    margin: 0 auto;
    width: 90%;
}
.btn-voltar {
    display: inline-block;
    margin-bottom: 1.5rem;
    text-decoration: none;
    font-weight: bold;
    color: #ccc;
}
.btn-voltar:hover {
    color: #fff;
}
.artigo-imagem-capa {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 1rem;
    margin-bottom: 2rem;
    border: 1px solid #333;
}

#artigo-conteudo p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #f4f4f4;
}
#artigo-conteudo ul, 
#artigo-conteudo ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

#artigo-conteudo pre {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-left: 5px solid #555;
    color: #f4f4f4;
    padding: 1rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    border-radius: 1rem;
}
#artigo-conteudo code {
    font-family: Consolas, 'Courier New', monospace;
}
#artigo-conteudo table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
#artigo-conteudo th {
    background-color: #333;
    color: #fff;
    padding: 0.75rem 1rem;
    text-align: left;
}
#artigo-conteudo td {
    padding: 0.75rem 1rem;
    border: 1px solid #333;
    line-height: 1.6;
}
#artigo-conteudo tbody tr:nth-child(even) {
    background-color: #1c1c1c;
}
#artigo-conteudo blockquote {
    border-left: 5px solid #444;
    margin: 1.5rem 0;
    padding: 0.5rem 1.5rem;
    font-style: italic;
    color: #ccc;
    background-color: #1c1c1c;
    border-radius: 1rem;
}


/* --- RODAPÉ (Já era Dark Mode) --- */
.secao-footer {
    background: #333333ab;
    color: #f4f4f4;
    padding: 4rem 0 2rem 0;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}
.footer-info,
.footer-social {
    flex: 1;
    min-width: 250px;
    margin: 1rem;
}
.footer-info h3,
.footer-social h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}
.footer-info p {
    margin-bottom: 0.5rem;
    color: #f4f4f4;
}
.footer-info a {
    color: #f4f4f4;
    text-decoration: none;
}
.footer-info a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
}
.social-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #444; 
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 0.7rem 1.2rem;
    margin: 0.5rem .5rem 0.5rem 0;
    border-radius: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.social-box:hover {
    background-color: #555;
    transform: translateY(-3px); 
}
.social-box ion-icon {
    font-size: 1.2rem;
    margin-left: 0.5rem;
}

.footer-copyright {
    text-align: center;
    border-top: 3px solid #b6b4b4;
    border-radius: 1rem;
    padding-top: 2rem;
}
#link {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.1s ease;
}
#link:hover {
    color: #00e1ff;
}


/* --- (ADICIONAR) Fundo de Partículas Flutuantes --- */
.particle-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: -1;
}

.particle {
    position: absolute;
    bottom: 0;
    background-color: #c8a2c8; 
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0;
    animation: float-particles 20s infinite ease-in-out;
}

@keyframes float-particles {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10%, 90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-110vh) translateX(-10vw);
        opacity: 0;
    }
}

/* Variação Aleatória */
.particle:nth-child(1) { width: 5px; height: 5px; left: 10%; animation-delay: 0s; animation-duration: 25s; }
.particle:nth-child(2) { width: 8px; height: 8px; left: 20%; animation-delay: -5s; animation-duration: 20s; }
.particle:nth-child(3) { width: 3px; height: 3px; left: 30%; animation-delay: -3s; animation-duration: 30s; }
.particle:nth-child(4) { width: 6px; height: 6px; left: 40%; animation-delay: -7s; animation-duration: 22s; }
.particle:nth-child(5) { width: 4px; height: 4px; left: 50%; animation-delay: -10s; animation-duration: 28s; }
.particle:nth-child(6) { width: 7px; height: 7px; left: 60%; animation-delay: -2s; animation-duration: 18s; }
.particle:nth-child(7) { width: 3px; height: 3px; left: 70%; animation-delay: -12s; animation-duration: 26s; }
.particle:nth-child(8) { width: 6px; height: 6px; left: 80%; animation-delay: -8s; animation-duration: 21s; }
.particle:nth-child(9) { width: 4px; height: 4px; left: 90%; animation-delay: -1s; animation-duration: 23s; }
.particle:nth-child(10) { width: 8px; height: 8px; left: 15%; animation-delay: -6s; animation-duration: 27s; }

/* 1. O container da citação */
.secao-citacao {
    border-bottom: none; 
}

/* 2. O <blockquote> (bloco da citação) */
.secao-citacao blockquote {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-style: italic;
    font-size: 1rem;
    line-height: 1.7;
    color: #f4f4f4;
}

/* 3. A citação (o autor) */
.secao-citacao cite {
    display: block;
    margin-top: 1.5rem;
    font-style: normal;
    font-family: 'Exo 2', Arial, sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #7f0fff; 
}

/* --- (ADICIONAR) Lógica do Menu Hambúrguer --- */
#menu-hamburger {
    display: none; 
    cursor: pointer;
}

#menu-hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background: #00e1ff; 
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}


/* --- MEDIA QUERIES (Adaptação Móvel) --- */

/* Bloco para tablets */
@media (max-width: 992px) {
    .artigos-grid-preview {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- (BLOCO CORRIGIDO E UNIFICADO) ---
   Este bloco agora contém TODAS as regras para telemóvel (768px),
   incluindo o layout do "hero", projetos, e o menu hambúrguer 
   com o tema escuro correto.
*/
@media (max-width: 768px) {

    /* --- AJUSTES DO HERO (SOBRE MIM) --- */
    .hero-content {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1rem;
        gap: 1.5rem;
    }
    .hero-texto {
        padding-right: 0;
        margin-bottom: 0;
        flex: 0 1 auto;
        order: 1; /* Texto vem primeiro */
    }
    .hero-texto h2 {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }
    .hero-texto p {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }
    .hero-imagem {
        flex: 0 1 auto;
        margin-bottom: 1.5rem;
        order: 2; /* Imagem vem depois */
    }
    .hero-imagem img {
        max-width: 200px;
        height: auto;
    }

    /* --- AJUSTES DOS PROJETOS --- */
    .projeto-card {
        flex-direction: column;
    }
    .projeto-imagem {
        flex-basis: auto; 
        height: 250px;
    }
    .projeto-texto {
        padding: 1.5rem;
        max-height: none;
        overflow-y: visible;
    }
    
    /* --- AJUSTES DOS ARTIGOS --- */
    .artigos-grid-preview {
        grid-template-columns: 1fr;
    }

    /* --- AJUSTES DO RODAPÉ --- */
    .footer-content {
        flex-direction: column;
    }
    .footer-info,
    .footer-social {
        margin: 1rem 0;
    }

    /* --- AJUSTES DO MENU HAMBÚRGUER (CORRIGIDO) --- */
    .navbar .container {
        padding: 1rem 1.5rem;
    }

    #menu-hamburger {
        display: block; 
    }

    /* (ADICIONADO) Garante que o menu não seja cortado */
    .navbar.nav-open {
        overflow: visible;
    }

    .navbar nav {
        display: none; 
        position: absolute;
        top: calc(100% + 0.5rem); 
        left: 0;
        width: 100%;
        
        /* CORREÇÃO DO TEMA: Fundo escuro */
        background: #000; 
        
        border-radius: 1rem; 
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        overflow: hidden;
        border: 1px solid #b6b4b4; /* Borda para destacar */
    }
    
    .navbar.nav-open nav {
        display: block;
    }
    
    .navbar nav ul {
        flex-direction: column; 
        margin: 0;
        padding: 0.5rem 0; 
    }

    .navbar nav li {
        margin: 0;
        width: 100%;
        text-align: center;
    }

    .navbar nav a {
        display: block; 
        padding: 1rem; 
        color: #00e1ff; 
    }
    .navbar nav a:hover {
        color: #fff; 
        /* CORREÇÃO DO TEMA: Hover escuro */
        background: #1e1e1e; 
    }
    
    /* Animação do "X" */
    .navbar.nav-open #menu-hamburger span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .navbar.nav-open #menu-hamburger span:nth-child(2) {
        opacity: 0;
    }
    .navbar.nav-open #menu-hamburger span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* --- (ADICIONADO) Barra de Scroll Personalizada --- */

/* 1. Funciona no Firefox */
html {
    /* (ATENÇÃO) Esta regra já existe no topo, mas o Firefox 
       precisa dela para o scrollbar-color. Não faz mal repetir. */
    scrollbar-color: #7f0fff #1e1e1e;
    scrollbar-width: thin;
}

/* 2. Funciona no Chrome, Edge, Safari */
::-webkit-scrollbar {
    width: 12px;
}
::-webkit-scrollbar-track {
    background: #1e1e1e; 
    border-radius: 1rem;
}
::-webkit-scrollbar-thumb {
    background-color: #7f0fff; 
    border-radius: 1rem;
    border: 3px solid #1e1e1e; 
}
::-webkit-scrollbar-thumb:hover {
    background-color: #00e1ff;
}