/* Variáveis de Cores */
:root {
    --bg-color: #0f1725;
    --text-color: #ffffff;
    --primary-color: #2c7bfa;
    --secondary-color: #1e293b;
    --accent-color: #60a5fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
    z-index: 0;
}

/* Melhorando o destaque das tags de negrito (strong) */
strong {
    color: var(--accent-color);
    font-weight: 700;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Fundo Animado (Blobs Flutuantes) */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none; /* Garante que não bloqueie os cliques do site */
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px); /* Borrão bem forte para ficar sutil e não poluir */
    opacity: 0.25; /* Transparência baixa para manter a leitura do texto */
    animation: float 15s infinite alternate ease-in-out;
}

.blob-1 {
    width: 40vw;
    height: 40vw;
    background-color: var(--primary-color);
    top: -10%;
    left: -10%;
}

.blob-2 {
    width: 35vw;
    height: 35vw;
    background-color: var(--accent-color);
    bottom: -10%;
    right: -10%;
    animation-delay: -7s; /* Começa a animação de um ponto diferente */
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5vw, 10vh) scale(1.1); }
    100% { transform: translate(-5vw, -5vh) scale(0.9); }
}

/* Partículas de Código Flutuantes */
.code-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

.code-particles span {
    position: absolute;
    bottom: -50px;
    left: var(--x);
    color: var(--primary-color);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.8rem;
    font-weight: bold;
    opacity: 0;
    animation: floatCode 12s linear infinite;
    animation-delay: var(--d);
}

@keyframes floatCode {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.15; } /* Opacidade bem baixa para ser sutil */
    90% { opacity: 0.15; }
    100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

/* Navegação */
header {
    background-color: rgba(15, 23, 37, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--secondary-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.1);
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    font-size: 1.15rem;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Seções Gerais */
section {
    padding: 100px 0;
}

h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image picture {
    display: flex;
    justify-content: center;
    width: 100%;
}

.hero-content p {
    color: #cbd5e1; /* Cor um pouco mais suave no texto normal para o negrito saltar aos olhos */
    font-size: 1.05rem;
    text-align: justify;
}

.hero-image img {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 20px; /* Foto quadrada com cantos levemente arredondados */
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 25px rgba(44, 123, 250, 0.4);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.highlight {
    background: linear-gradient(120deg, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary-color);
    filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.4)); /* Brilho suave */
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.btn:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Habilidades & Projetos (Grid) */
.skills-grid, .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.skill-card, .project-card {
    background-color: var(--secondary-color);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #334155;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.skill-card:hover, .project-card:hover {
    transform: translateY(-5px);
}

/* Estilo da Imagem do Projeto */
.project-img {
    width: 100%;
    height: 180px; /* Altura fixa para manter um padrão */
    object-fit: cover; /* Faz a imagem preencher o espaço sem distorcer */
    border-radius: 6px;
    margin-bottom: 15px;
}

.skill-card h3, .project-card h3 {
    margin-bottom: 15px;
    color: var(--accent-color);
}

.skill-card ul {
    list-style: none;
}

.skill-card li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
    color: var(--text-color);
}

.skill-card li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Ajuste de tamanho e alinhamento dos ícones das linguagens */
.skill-card li i {
    font-size: 1.2rem;
    margin: 0 4px;
    vertical-align: middle;
}

.project-links {
    margin-top: auto; /* Empurra os links sempre para o final do card */
    font-size: 0.9rem;
}

.project-links a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Contato */
#contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

#contact-form input, #contact-form textarea {
    width: 100%;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid var(--secondary-color);
    background-color: var(--secondary-color);
    color: var(--text-color);
    outline: none;
    resize: none;
}

#contact-form input:focus, #contact-form textarea:focus {
    border-color: var(--primary-color);
}

/* Botões do Formulário de Contato */
.contact-buttons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap; /* Permite que os botões quebrem de linha em telas muito pequenas */
}

.contact-buttons .btn {
    flex: 1; /* Faz os botões dividirem o espaço igualmente */
    justify-content: center;
    text-align: center;
}

/* Estilo Específico do Botão do WhatsApp */
.whatsapp-btn {
    border-color: #25D366; /* Cor oficial do WhatsApp */
    color: #25D366;
}

.whatsapp-btn:hover {
    background-color: #25D366;
    color: #fff;
    border-color: #25D366;
}

/* Modal de Sucesso */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 37, 0.85);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--secondary-color);
    border: 1px solid #334155;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(-20px);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative; /* Necessário para prender a imagem absoluta aqui dentro */
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

/* Estilo da Logo de Fundo no Modal */
.modal-logo-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Faz a logo cobrir 100% do fundo da caixa */
    z-index: 0;
    opacity: 0.5; /* Deixa levemente transparente */
}

.modal-body {
    padding: 40px 30px;
    text-align: center;
    position: relative;
    z-index: 1; /* Mantém o texto ACIMA da imagem */
    background-color: rgba(15, 23, 37, 0.65); /* Fundo escuro suave para o texto */
    backdrop-filter: blur(8px); /* Cria o desfoque (Efeito de Vidro) */
    -webkit-backdrop-filter: blur(8px); /* Para funcionar no Safari/iPhones */
}

.modal-body p { margin: 15px 0 25px 0; color: #cbd5e1; }
.modal-body .btn { width: 100%; justify-content: center; }

/* Modal de Imagem Expandida (Lightbox) */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 37, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    border: 2px solid var(--primary-color);
}

.lightbox-overlay.active .lightbox-img {
    transform: scale(1);
}

.close-lightbox {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-lightbox:hover {
    color: var(--primary-color);
}

footer {
    text-align: center;
    padding: 20px;
    background-color: var(--secondary-color);
}

/* Animações de Scroll (Reveal) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsividade Básica (Mobile) */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    .hero {
        padding-top: 140px; /* Espaço extra pois a barra superior ficou mais alta */
    }
    .hero .container {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 20px;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-image img {
        max-width: 250px;
        border-radius: 50%; /* Volta a ser perfeitamente redonda no celular */
    }
}
