:root {
    --bg: #050810;
    --card: rgba(15, 23, 42, 0.8);
    --primary: #38bdf8;
    --text: #f1f5f9;
    --muted: #94a3b8;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
html { scroll-behavior: smooth; }
body { background: radial-gradient(circle at center, #111827 0%, #050810 100%); color: var(--text); overflow-x: hidden; }

/* NAVBAR E LOGO */
.navbar { position: fixed; top: 0; width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 8%; background: rgba(5, 8, 16, 0.95); backdrop-filter: blur(10px); z-index: 1000; border-bottom: 1px solid rgba(56, 189, 248, 0.1); }
.logo { font-size: 1.6rem; font-weight: 700; }
.code-icon { color: var(--primary); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { text-decoration: none; color: #fff; transition: 0.3s; font-size: 0.9rem; }
.nav-links a:hover { color: var(--primary); }

/* LANGAUGE */
.lang-selector button { background: none; border: none; cursor: pointer; opacity: 0.6; transition: 0.3s; }
.lang-selector button:hover { opacity: 1; transform: scale(1.1); }
.lang-selector img { width: 25px; border-radius: 2px; }

/* SEÇÕES GERAL */
section { padding: 120px 10% 80px; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.section-title { font-size: 2.5rem; margin-bottom: 60px; text-align: center; width: 100%; }
.section-title::after { content: ''; display: block; width: 50px; height: 4px; background: var(--primary); margin: 15px auto; border-radius: 2px; }

/* --- HERO SECTION SIMPLIFICADA --- */
.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100vh;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.profile-pic {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    margin-bottom: 15px;
    object-fit: cover;
}

.hero-inner h1 {
    font-size: 3.5rem; /* Tamanho moderado */
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.hero-inner h1 span {
    color: var(--primary);
}

.hero-inner p {
    font-size: 1.2rem;
    color: var(--muted);
    margin-bottom: 25px;
}

/* Botões */
.hero-btns {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary);
    color: #050810;
    border: 1px solid var(--primary);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background: rgba(56, 189, 248, 0.1);
    transform: translateY(-2px);
}

/* Ajuste Responsivo */
@media (max-width: 768px) {
    .hero-inner h1 { font-size: 2.5rem; }
    .hero-inner p { font-size: 1rem; }
}
/* SOBRE MIM (CENTRALIZADO) */
.about-container-text { max-width: 2000px; text-align: center; font-size: 1.15rem; line-height: 1.8; margin-bottom: 50px; }
.about-highlights {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

.h-card {
    background: var(--card);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.05);
    text-align: center;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Espaçamento entre o Ícone e o Título */
.h-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 20px; /* Aumentei aqui para afastar do título */
}

.h-card span {
    font-weight: 700;
    font-size: 1.2rem;
    display: block;
    margin-bottom: 8px; /* Espaço entre o título e o texto de baixo */
}

.h-card p {
    color: var(--muted);
    font-size: 0.9rem;
}
/* CURRÍCULO - VERSÃO COMPACTA */
.curriculum-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 25px; /* Reduzido de 40px */
    width: 100%; 
}

.resume-item { 
    display: flex; 
    gap: 15px; /* Reduzido de 20px */
    background: var(--card); 
    padding: 18px; /* Reduzido de 25px */
    border-radius: 12px; 
    margin-bottom: 15px; 
    border-left: 3px solid var(--primary); /* Linha levemente mais fina */
    align-items: flex-start;
}

.resume-content {
    display: flex;
    flex-direction: column;
    gap: 2px; /* Espaço mínimo entre linhas */
    width: 100%;
}

.inst-name {
    color: var(--primary);
    font-size: 0.85rem; /* Menor */
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
}

.course-name {
    color: #fff;
    font-size: 0.95rem; /* Menor */
    font-weight: 600;
    display: block;
}

.resume-content .year {
    color: var(--muted);
    font-size: 0.8rem; /* Bem discreto */
    font-style: italic;
    display: block;
}

.comp-logo { 
    width: 40px; /* Reduzido de 50px */
    height: 40px; 
    background: #fff; 
    border-radius: 6px; 
    padding: 4px; 
    object-fit: contain; 
    flex-shrink: 0; 
}

.res-desc { 
    font-size: 0.8rem; /* Reduzido de 0.9rem */
    color: var(--muted); 
    margin-top: 6px; 
    line-height: 1.3;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 6px;
}

/* Títulos da seção menores para combinar */
#curriculum h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

/* Ajuste Responsivo */
@media (max-width: 768px) {
    .curriculum-grid { gap: 15px; }
}

/* SKILLS 6 BOXES */
.skills-grid-6 { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 25px; 
    width: 100%; 
}

.skill-group { 
    background: var(--card); 
    padding: 25px; 
    border-radius: 15px; 
    border: 1px solid rgba(255,255,255,0.05); 
}

.skill-group i { 
    color: var(--primary); 
    font-size: 1.5rem; 
    margin-bottom: 10px; 
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

/* Ajuste Unificado para Span e Links */
.skill-tags span, 
.skill-tags a {
    display: inline-block;          /* Permite animar o movimento (transform) */
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 6px 14px;              /* Um pouco mais de respiro */
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text);             /* Garante que o texto apareça */
    text-decoration: none;
    cursor: pointer;
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;      /* A animação suave de transição */
}

/* Animação de Hover (Para ambos) */
.skill-tags span:hover, 
.skill-tags a:hover {
    transform: translateY(-5px);    /* O pulo para cima */
    background: var(--primary);     /* Fica azul */
    color: #050810;                 /* Texto escuro para ler no azul */
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.4); /* O brilho */
}

/* PROJETOS 6 CARDS - AJUSTADO (RÁPIDO E SUTIL) */
.projects-grid-6 { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 25px; 
    width: 100%; 
}

.project-card { 
    display: block;          /* ESSENCIAL: Faz o link <a> ocupar o espaço todo do card */
    text-decoration: none;   /* ESSENCIAL: Remove sublinhado do texto */
    height: 300px; 
    border-radius: 15px; 
    background-size: cover; 
    background-position: center; 
    position: relative; 
    overflow: hidden; 
    border: 1px solid rgba(56,189,248,0.1); 
    transition: transform 0.2s ease-out, border-color 0.2s ease-out; 
    cursor: pointer;
}

/* Garante que os títulos h3 dentro do link não mudem de cor ou estilo */
.project-card h3 {
    color: #fff;
    margin: 0;
    font-size: 1.3rem;
    text-decoration: none;
}

.project-card:hover {
    transform: translateY(-8px); /* Aumentado levemente para destacar o clique */
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.2); /* Brilho sutil no hover */
}

.p-overlay { 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(to top, rgba(5, 8, 16, 0.95), transparent); 
    display: flex; 
    flex-direction: column; 
    justify-content: flex-end; 
    padding: 25px; 
    transition: opacity 0.2s ease-out; 
}

.p-overlay p { 
    font-size: 0.9rem; 
    color: var(--muted); 
    margin-top: 5px; 
    opacity: 0; 
    transform: translateY(5px); 
    transition: all 0.2s ease-out; 
}

/* Ícone de link que aparece no hover */
.proj-link-icon {
    color: var(--primary);
    margin-top: 10px;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.2s ease-out;
}

.project-card:hover .p-overlay p,
.project-card:hover .proj-link-icon { 
    opacity: 1; 
    transform: translateY(0); 
}

/* Ajuste para telas menores */
@media (max-width: 992px) {
    .projects-grid-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .projects-grid-6 { grid-template-columns: 1fr; }
}

/* CONTATO */
.contact-wrapper { width: 100%; max-width: 800px; background: var(--card); padding: 40px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.05); }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-form input, .contact-form textarea { padding: 15px; background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; color: #fff; font-size: 1rem; transition: 0.3s; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--primary); outline: none; }
.btn-submit { background: var(--primary); color: #000; border: none; padding: 15px; border-radius: 10px; font-weight: 700; cursor: pointer; transition: 0.3s; }
.btn-submit:hover { transform: scale(1.02); box-shadow: 0 5px 15px rgba(56,189,248,0.3); }

/* BOTÃO VOLTA AO TOPO - FIXO E ESTILIZADO */
#backToTop {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 50px !important;
    height: 50px !important;
    background-color: var(--primary) !important; /* O seu azul #38bdf8 */
    color: #050810 !important; /* Ícone preto para contraste */
    border: none !important;
    border-radius: 50% !important; /* Deixa redondo */
    cursor: pointer !important;
    z-index: 9999 !important; /* Fica acima de tudo */
    
    /* Centralização do ícone */
    display: none; /* O JS vai mudar para 'flex' */
    align-items: center;
    justify-content: center;
    
    /* Interatividade e Estilo */
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.6) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

#backToTop:hover {
    transform: scale(1.1) translateY(-5px) !important; /* Aumenta e sobe */
    background-color: #ffffff !important; /* Brilha em branco no hover */
    box-shadow: 0 0 30px rgba(56, 189, 248, 1) !important;
}

/* Garante que o ícone FontAwesome herde a cor */
#backToTop i {
    font-size: 1.2rem !important;
    font-weight: 900 !important;
}

/* FOOTER */
.main-footer { padding: 60px 8%; background: #030712; border-top: 1px solid rgba(255,255,255,0.05); text-align: center; }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.social-icons { display: flex; gap: 20px; }
.social-icons a { color: var(--muted); font-size: 1.5rem; transition: 0.3s; }
.social-icons a:hover { color: var(--primary); }

/* --- ESTRELAS/COMETAS (VERSÃO ORIGINAL) --- */
.star-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.star {
    position: absolute;
    height: 1px; /* Ainda mais fino para ser elegante */
    background: linear-gradient(-45deg, var(--primary), transparent);
    animation: shoot 6s ease-in-out infinite; /* Aumentado para 6s para ser mais lento */
    opacity: 0;
}

/* Posicionamento fixo inicial para o disparo */
.star:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.star:nth-child(2) { top: 30%; left: 40%; animation-delay: 1.2s; }
.star:nth-child(3) { top: 60%; left: 20%; animation-delay: 2.5s; }
.star:nth-child(4) { top: 80%; left: 70%; animation-delay: 0.5s; }
.star:nth-child(5) { top: 40%; left: 80%; animation-delay: 3s; }

@keyframes shoot {
    0% {
        transform: translateX(0) rotate(45deg);
        width: 0;
        opacity: 0;
    }
    10% {
        opacity: 0.5; /* Brilho mais suave */
        width: 80px;  /* Rastro menor */
    }
    50% {
        opacity: 0.3;
        transform: translateX(250px) rotate(45deg); /* Distância curta e elegante */
        width: 120px;
    }
    100% {
        transform: translateX(400px) rotate(45deg);
        width: 0;
        opacity: 0;
    }
}

/* --- RESPONSIVIDADE TOTAL --- */

@media (max-width: 1024px) {
    .about-highlights { grid-template-columns: repeat(2, 1fr); }
    .skills-grid-6, .projects-grid-6 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* Navbar Mobile */
    .navbar { padding: 1rem 5%; }
    .nav-links { display: none; } /* Idealmente aqui você teria um menu hambúrguer */

    /* Hero Section */
    .hero-inner h1 { font-size: 2.2rem; }
    .hero-inner p { font-size: 1rem; }
    .profile-pic { width: 150px; height: 150px; }

    /* Seções */
    section { padding: 80px 5% 60px; }
    .section-title { font-size: 2rem; }

    /* Sobre Mim */
    .about-highlights { grid-template-columns: 1fr; }
    .about-container-text { font-size: 1rem; text-align: justify; }

    /* Currículo */
    .curriculum-grid { grid-template-columns: 1fr; gap: 15px; }
    .resume-item { flex-direction: column; align-items: center; text-align: center; }
    .resume-content { align-items: center; }

    /* Skills e Projetos */
    .skills-grid-6, .projects-grid-6 { grid-template-columns: 1fr; }
    .project-card { height: 250px; }

    /* Contato */
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero-btns { flex-direction: column; width: 100%; }
    .btn { width: 100%; text-align: center; }
    
    /* Ajuste fino para os cards de currículo no celular */
    .resume-item { padding: 15px; }
    .inst-name { font-size: 0.8rem; }
}