@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700;900&display=swap'); 

:root {
    --primary-color: #00bcd4;
    --secondary-color: #ffffff;
    --dark-bg: #000000;
    --card-bg: #0a0a0a;
    --light-gray: #b0b0b0;
}

/* RESET E GERAL */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Roboto', sans-serif; }
html { scroll-behavior: smooth; }
body { background-color: var(--dark-bg); color: #fff; overflow-x: hidden; line-height: 1.6; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* NAVBAR */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 80px; background: rgba(0,0,0,0.98);
    position: fixed; width: 100%; top: 0; z-index: 1000;
    border-bottom: 1px solid rgba(0, 188, 212, 0.3);
}
.navbar .logo { font-weight: 900; font-size: 1.5rem; color: var(--primary-color); }
.navbar span { color: #fff; font-weight: 400; }

.nav-links { display: flex; list-style: none; gap: 25px; }
.nav-links a { color: #fff; text-decoration: none; font-weight: 700; font-size: 0.9rem; transition: 0.3s; }
.nav-links a:hover { color: var(--primary-color); text-shadow: 0 0 10px var(--primary-color); }

.cv-btn { 
    background: var(--primary-color); color: #000; padding: 10px 20px; 
    border-radius: 5px; font-weight: 900; text-decoration: none; transition: 0.3s;
}
.cv-btn:hover { box-shadow: 0 0 20px var(--primary-color); }

/* HERO SECTION */
.hero-section {
    height: 100vh; display: flex; align-items: center;
    background-image: repeating-linear-gradient(0deg, rgba(0,188,212,0.03) 0, rgba(0,188,212,0.03) 1px, transparent 1px, transparent 40px),
                      repeating-linear-gradient(90deg, rgba(0,188,212,0.03) 0, rgba(0,188,212,0.03) 1px, transparent 1px, transparent 40px);
}
.hero-container { display: flex; align-items: center; justify-content: space-between; }

.hero-content h1 { font-size: 5.5rem; line-height: 1; font-weight: 900; margin-bottom: 20px; text-transform: uppercase; }
.greeting { font-size: 1.5rem; color: var(--light-gray); margin-bottom: 5px; }

/* CORREÇÃO DO TEXTO DINÂMICO */
.role { 
    font-size: 2.2rem; 
    color: var(--primary-color); 
    font-weight: 700; 
    margin-bottom: 20px; 
    min-height: 1.6em; /* Altura de reserva */
    display: block; /* Alterado de flex para block para não quebrar o span vazio */
}

#dynamic-text { 
    border-right: 4px solid var(--primary-color); 
    padding-right: 8px;
    animation: blink 0.7s infinite;
    min-width: 2px;
    display: inline; /* Mantém o comportamento de texto */
}

@keyframes blink { 50% { border-color: transparent; } }

.hero-description { font-size: 1.3rem; color: var(--light-gray); max-width: 550px; margin-bottom: 30px; }

.social-icons i { font-size: 2.5rem; color: var(--primary-color); margin-right: 25px; transition: 0.3s; }
.social-icons i:hover { filter: drop-shadow(0 0 10px var(--primary-color)); transform: translateY(-5px); }

.hero-image img {
    width: 420px; height: 420px; border-radius: 50%;
    border: 5px solid var(--primary-color);
    box-shadow: 0 0 60px rgba(0, 188, 212, 0.6);
    object-fit: cover;
}

/* SEÇÕES GERAIS */
section { padding: 120px 0; border-bottom: 1px solid rgba(0, 188, 212, 0.1); }
h2 { font-size: 3.5rem; color: var(--primary-color); text-align: center; margin-bottom: 60px; text-shadow: 0 0 15px var(--primary-color); }

/* SOBRE MIM */
.about-text p { font-size: 1.5rem; text-align: center; max-width: 950px; margin: 0 auto 25px; color: var(--secondary-color); }

/* HOMELAB CARD */
.project-item.highlight { 
    background: rgba(255,255,255,0.03); padding: 50px; border-radius: 15px; 
    border: 1px solid var(--primary-color); box-shadow: inset 0 0 20px rgba(0,188,212,0.1);
}
.project-item h3 { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 20px; }
.infra-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; list-style: none; margin: 30px 0; }
.infra-list li { font-size: 1.2rem; padding: 15px; border-left: 4px solid var(--primary-color); background: rgba(0,0,0,0.4); }
.infra-list i { color: var(--primary-color); margin-right: 10px; }

/* PROJETOS GRID E CARDS */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; }

.project-card { 
    background: #0a0a0a; padding: 25px; border: 1px solid #222; border-radius: 10px; transition: 0.3s; 
    display: flex; flex-direction: column; justify-content: flex-start; height: 100%;
}
.project-card:hover { border-color: var(--primary-color); transform: translateY(-10px); }
.project-card h3 { color: var(--primary-color); margin-bottom: 10px; font-size: 1.3rem;}
.project-card p { font-size: 0.95rem; margin-bottom: 10px; flex-grow: 1; }

.project-card img {
    width: 100%; height: 160px; border-radius: 8px; margin-bottom: 15px;
    object-fit: contain; background-color: #000; padding: 5px;
}

/* LINKS DE VÍDEO */
.project-card a:not([class*="btn"]) {
    color: #fff !important; opacity: 0.7; font-size: 0.85rem;
    text-decoration: none; display: flex; align-items: center; justify-content: center;
    gap: 6px; margin-bottom: 5px; transition: 0.3s;
}
.project-card a:not([class*="btn"]):hover { opacity: 1; color: var(--primary-color) !important; }

/* BOTÃO PRINCIPAL NOS CARDS */
.btn-link-small, .project-card a[target="_blank"] {
    background: transparent; color: var(--primary-color) !important; border: 1px solid var(--primary-color);
    padding: 10px; border-radius: 5px; margin-top: auto;
    font-size: 0.9rem; text-decoration: none; font-weight: 700;
    display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.3s;
}
.btn-link-small:hover, .project-card a[target="_blank"]:hover {
    background: var(--primary-color); color: #000 !important; box-shadow: 0 0 15px rgba(0, 188, 212, 0.4);
}

/* HABILIDADES */
.skills-container { display: flex; justify-content: center; gap: 50px; flex-wrap: wrap; }
.skills-group { background: #0a0a0a; padding: 40px; width: 450px; border: 1px solid #222; border-radius: 10px; }
.skills-group h3 { font-size: 2rem; color: var(--primary-color); margin-bottom: 20px; border-bottom: 2px solid var(--primary-color); }
.skills-group li { font-size: 1.2rem; margin-bottom: 12px; padding-left: 15px; position: relative; list-style: none; }
.skills-group li::before { content: ">"; color: var(--primary-color); position: absolute; left: 0; font-weight: bold; }

/* CERTIFICAÇÕES */
.cert-list { list-style: none; display: flex; flex-direction: column; align-items: center; gap: 15px; }
.cert-list li { background: #111; padding: 20px; width: 100%; max-width: 800px; font-size: 1.4rem; border-left: 6px solid var(--primary-color); }
.cert-list i { margin-right: 15px; color: var(--primary-color); }

/* CONTATO E RODAPÉ */
.contact-section { text-align: center; padding: 100px 0; }
.contact-container { display: flex; flex-direction: column; align-items: center; }

.opportunity-badge {
    display: inline-block; background: rgba(0, 188, 212, 0.1); color: var(--primary-color);
    padding: 12px 30px; border-radius: 50px; border: 2px solid var(--primary-color);
    font-weight: 900; font-size: 1.05rem; margin-bottom: 50px;
    text-transform: uppercase; letter-spacing: 1.5px;
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.3);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 188, 212, 0.2); }
    50% { box-shadow: 0 0 25px rgba(0, 188, 212, 0.5); }
}

.contact-info { display: flex; flex-direction: column; align-items: center; gap: 20px; font-size: 1.3rem; }
.contact-info a { 
    color: #fff; text-decoration: none; transition: 0.3s; font-weight: bold;
    display: flex; align-items: center; justify-content: flex-start; width: 320px; 
}
.contact-info i { color: var(--primary-color); width: 50px; text-align: center; font-size: 1.6rem; margin-right: 10px; }
.contact-info a:hover { color: var(--primary-color); text-shadow: 0 0 8px var(--primary-color); }

/* --- SUPER AJUSTE DE RESPONSIVIDADE (MOBILE 100%) --- */

@media (max-width: 768px) {
    /* 1. Ajuste da Navegação */
    .navbar {
        padding: 15px 20px;
    }
    .logo { font-size: 1.2rem; }
    .cv-btn { padding: 8px 15px; font-size: 0.8rem; }

    /* 2. Hero Section (Home) */
    .hero-section {
        height: auto;
        padding: 120px 0 60px;
        text-align: center;
    }
    .hero-container {
        flex-direction: column-reverse; /* Foto em cima ou texto em cima? Reverse coloca foto embaixo */
        gap: 40px;
    }
    .hero-content h1 {
        font-size: 2.8rem; /* Reduzi drasticamente para não cortar */
        line-height: 1.1;
    }
    .role {
        font-size: 1.4rem;
        justify-content: center;
        min-height: 3em; /* Mais espaço para frases que quebram linha */
    }
    .hero-image img {
        width: 250px;
        height: 250px;
    }

    /* 3. Seções e Títulos */
    section { padding: 60px 0; }
    h2 { font-size: 2.2rem; margin-bottom: 40px; }

    /* 4. Homelab (O Show) */
    .homelab-gallery {
        grid-template-columns: 1fr; /* Uma imagem por linha no celular */
    }
    .gallery-item:first-child, .gallery-item:not(:first-child) {
        height: 220px; /* Tamanho padrão para mobile */
    }
    .project-item.highlight { padding: 25px; }
    .infra-list { grid-template-columns: 1fr; }
    .homelab-footer {
        flex-direction: column;
        gap: 20px;
    }

    /* 5. Projetos e Habilidades */
    .project-grid { grid-template-columns: 1fr; }
    .skills-group { width: 100%; padding: 25px; }

    /* 6. Certificações */
    .cert-list li {
        font-size: 1rem;
        padding: 15px;
    }

    /* 7. Contato (Onde o LinkedIn estava fugindo) */
    .contact-info a {
        width: 100%;
        max-width: 300px;
        font-size: 1.1rem;
        justify-content: center; /* Centraliza ícone + texto */
    }
    .opportunity-badge {
        font-size: 0.9rem;
        padding: 10px 15px;
        line-height: 1.4;
    }
}

/* Ajuste para telas MUITO pequenas (iPhone SE / Antigos) */
@media (max-width: 400px) {
    .hero-content h1 { font-size: 2.2rem; }
    .role { font-size: 1.2rem; }
}

/* GALERIA HOMELAB - IMPACTO VISUAL */
.homelab-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(0, 188, 212, 0.3);
    transition: 0.4s;
    cursor: pointer;
    height: 250px; /* Altura fixa para manter o alinhamento */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Garante que a imagem preencha o espaço sem deformar */
    transition: 0.5s;
}

/* GALERIA HOMELAB - OPÇÃO B (MOSAICO COM HOVER) */
.homelab-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Duas colunas */
    gap: 20px;
    margin: 40px 0;
}

/* O item da galeria (o container) */
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(0, 188, 212, 0.3);
    transition: 0.4s ease;
    cursor: pointer;
}

/* DESTAQUE: Primeira imagem ocupa as 2 colunas */
.gallery-item:first-child {
    grid-column: 1 / -1; 
    height: 450px; 
}

/* Imagens secundárias */
.gallery-item:not(:first-child) {
    height: 280px;
}

/* A Imagem em si */
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* A LEGENDA (OVERLAY) - Começa invisível e lá embaixo */
.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 70%);
    display: flex;
    align-items: flex-end;
    padding: 25px;
    opacity: 0; /* Invisível */
    transform: translateY(20px); /* Levemente para baixo */
    transition: 0.4s ease;
}

.gallery-item .overlay span {
    color: var(--primary-color);
    font-weight: 900;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* --- EFEITOS AO PASSAR O MOUSE (HOVER) --- */

.gallery-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px rgba(0, 188, 212, 0.4);
    transform: translateY(-5px);
}

/* Zoom na imagem */
.gallery-item:hover img {
    transform: scale(1.08);
}

/* Mostra a legenda e sobe ela */
.gallery-item:hover .overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Ajuste Mobile */
@media (max-width: 768px) {
    .homelab-gallery { grid-template-columns: 1fr; }
    .gallery-item:first-child { height: 300px; }
    .gallery-item:not(:first-child) { height: 250px; }
}