/* --- CONFIGURAÇÕES GERAIS E VARIÁVEIS --- */
:root {
    /* Tema Escuro (padrão) */
    --bg-color: #0b0d17;
    --card-bg: rgba(255, 255, 255, 0.05);
    --primary: #00f2ea;     /* Ciano Neon */
    --secondary: #ff0055;   /* Rosa Neon */
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --gradient-main: linear-gradient(135deg, var(--primary), #00c3ff);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efeito "bounce" */
}

/* Tema Claro */
body.light-mode {
    --bg-color: #f5f5f5;
    --card-bg: rgba(0, 0, 0, 0.08);
    --primary: #0099cc;     /* Azul */
    --secondary: #cc3366;   /* Vermelho */
    --text-main: #1a1a1a;
    --text-muted: #666666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html {
    background-color: var(--bg-color);
    transition: background-color 0.5s ease;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: transparent;
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;
    transition: color 0.5s ease;
}

/* --- BACKGROUND ANIMADO (Blobs) --- */
.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
    animation: moveBlob 20s infinite alternate;
}
.blob-1 { top: -10%; left: -10%; width: 500px; height: 500px; background: var(--secondary); }
.blob-2 { bottom: -10%; right: -10%; width: 600px; height: 600px; background: var(--primary); animation-delay: -5s; }
.blob-3 { top: 40%; left: 40%; width: 300px; height: 300px; background: #7000ff; animation-duration: 25s; }

/* Blobs no tema claro com opacidade reduzida */
body.light-mode .bg-blob {
    opacity: 0.15;
}

@keyframes moveBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* --- ANIMAÇÃO GLOW CONSTANTE --- */
@keyframes glow {
    0%, 100% { 
        color: #f1fa8c;
        text-shadow: 0 0 10px rgba(241, 250, 140, 0.8),
                     0 0 20px rgba(0, 242, 234, 0.6);
    }
    50% { 
        color: #00f2ea;
        text-shadow: 0 0 20px rgba(0, 242, 234, 0.8),
                     0 0 40px rgba(0, 242, 234, 0.6),
                     0 0 60px rgba(0, 242, 234, 0.4);
    }
}

.glow-text {
    animation: glow 2s ease-in-out infinite;
    font-weight: 700;
}

/* --- TEMA TOGGLE --- */
.theme-toggle {
    background: none;
    border: 2px solid var(--primary);
    color: var(--primary);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
    margin-left: auto;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(20deg);
    box-shadow: 0 0 20px var(--primary);
}

/* --- HEADER E NAVEGAÇÃO --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    background: rgba(11, 13, 23, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

body.light-mode header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
    position: relative;
}

.logo span { color: var(--primary); }
.logo::after {
    content: '_';
    animation: blink 1s infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: 0.3s;
}

/* Animação do link hover */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--primary);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--primary);
}

.nav-links a:hover::after { width: 100%; }

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 0;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    max-width: 1200px;
    width: 100%;
    align-items: center;
}

.hero-text h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 10px;
    font-family: 'Fira Code', monospace;
}

.hero-text h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #a5a5a5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#typewriter {
    font-family: 'Fira Code', monospace;
    color: var(--primary);
    -webkit-text-fill-color: var(--primary);
    -webkit-background-clip: initial;
    background: none;
    text-shadow: 0 0 8px rgba(0, 242, 234, 0.4);
    white-space: nowrap;
    display: inline-block;
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    margin-left: 6px;
    background-color: var(--primary);
    animation: blink 0.7s infinite;
    box-shadow: 0 0 8px var(--primary);
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 500px;
}

/* Botões Animados */
.btn-group { display: flex; gap: 20px; }

.btn {
    padding: 12px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: 0 0 10px rgba(0, 242, 234, 0.1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: var(--primary);
    z-index: -1;
    transition: 0.4s;
}

.btn-primary:hover {
    color: #000;
    box-shadow: 0 0 20px var(--primary);
}

.btn-primary:hover::before { left: 0; }

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: #fff;
    color: #000;
    transform: translateY(-3px);
}

/* Imagem Hero Flutuante */
.hero-img-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.hero-img {
    width: 400px;
    height: 400px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 40px rgba(0, 242, 234, 0.2);
    animation: morph 8s ease-in-out infinite;
    z-index: 2;
}

@keyframes morph {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

.code-card {
    position: absolute;
    background: rgba(11, 13, 23, 0.9);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 3;
}

.code-card.c1 { top: 10%; right: 10%; animation: float 5s infinite 1s; }
.code-card.c2 { bottom: 10%; left: 0%; animation: float 7s infinite 2s; }

/* --- SEÇÕES GERAIS --- */
section { padding: 100px 20px; max-width: 1200px; margin: 0 auto; }

.section-header {
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
}

.section-header h2 {
    font-size: 2.5rem;
    position: relative;
    z-index: 2;
}

.section-header::before {
    content: attr(data-text);
    position: absolute;
    top: -20px;
    left: -20px;
    font-size: 4rem;
    opacity: 0.05;
    font-weight: 800;
    z-index: 1;
    white-space: nowrap;
}

/* --- SCROLL REVEAL CLASSES (Usadas no JS) --- */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- SKILLS CARDS --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px -10px rgba(0, 242, 234, 0.3);
}

.skill-card i {
    font-size: 3rem;
    margin-bottom: 15px;
    background: linear-gradient(45deg, var(--primary), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: 0.4s;
}

.skill-card:hover i {
    transform: scale(1.2) rotate(5deg);
}

/* --- SERVICES CARDS --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 242, 234, 0.1) 0%, transparent 70%);
    transition: 0.4s;
    opacity: 0;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px -10px rgba(0, 242, 234, 0.3);
}

.service-card:hover::before {
    opacity: 1;
    top: -25%;
    left: -25%;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: rgba(0, 242, 234, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    transition: 0.4s;
    }

.service-icon i {
    font-size: 2.5rem;
    background: linear-gradient(45deg, var(--primary), #00c3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-card:hover .service-icon {
    background: rgba(0, 242, 234, 0.2);
    transform: scale(1.1);
}

/* --- TÍTULOS E LEGENDA (Ajuste de legibilidade) --- */
.service-card h3,
.skill-card h3 {
    font-size: 1.45rem;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* Sombra leve apenas no tema escuro para destacar texto sobre o fundo */
body:not(.light-mode) .service-card h3,
body:not(.light-mode) .skill-card h3,
body:not(.light-mode) .section-header h2 {
    text-shadow: 0 6px 18px rgba(0,0,0,0.55);
}

/* Remover sombra no tema claro e ajustar cor */
body.light-mode .service-card h3,
body.light-mode .skill-card h3,
body.light-mode .section-header h2 {
    text-shadow: none;
    color: var(--text-main);
}

.section-header h2 {
    color: var(--text-main);
    font-weight: 800;
}

/* Navegação legível */
.nav-links a {
    color: var(--text-main);
    font-weight: 600;
}

.logo {
    color: var(--text-main);
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* --- IMAGENS DOS CARDS --- */
.skill-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 242, 234, 0.4));
    transition: 0.4s;
}

.skill-card:hover .skill-img {
    transform: scale(1.3) rotate(10deg);
}

.service-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 242, 234, 0.3));
    transition: 0.4s;
}

.service-card:hover .service-img {
    transform: scale(1.2) rotate(8deg);
}

/* --- PROJETOS (3D TILT EFFECT) --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.1s; /* Rápido para o tilt JS */
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-inner {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-img-container {
    width: 100%;
    aspect-ratio: 3 / 2;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: 0.5s;
}

.project-card:hover .project-img {
    transform: scale(1.1);
}

.tech-tags span {
    font-size: 0.75rem;
    padding: 5px 12px;
    background: rgba(0, 242, 234, 0.1);
    color: var(--primary);
    border-radius: 20px;
    margin-right: 5px;
    font-family: 'Fira Code', monospace;
}

/* --- MODAL DE PROJETOS --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 300ms ease, visibility 300ms ease;
}
.modal.active { 
    opacity: 1; 
    visibility: visible; 
    pointer-events: auto; 
}
.modal-content {
    background: #111; /* Fundo sólido mais escuro */
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    padding: 0; /* Sem padding container */
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    transform: scale(0.92) translateY(16px);
    opacity: 0;
    filter: blur(8px);
    transition: transform 350ms cubic-bezier(0.2, 0.8, 0.2, 1), 
                opacity 250ms ease, 
                filter 350ms ease;
}
.modal.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
    filter: blur(0);
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: 0.3s;
}
.modal-close:hover { background: var(--secondary); transform: rotate(90deg); }

.modal-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0;
    margin-bottom: 0;
}
.modal-body {
    padding: 30px;
}
.modal-title { 
    font-size: 2rem; 
    margin-bottom: 10px;
    color: #fff;
}
.modal-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    background: rgba(0, 242, 234, 0.05);
    padding: 5px 12px;
    border-radius: 8px;
}
.modal-desc { 
    color: #ccc; 
    margin-bottom: 25px; 
    line-height: 1.6;
    font-size: 1.05rem;
}
.modal-subtitle {
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    color: var(--text-main);
    opacity: 0.9;
    margin-bottom: 10px;
}
.modal-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}
.modal-features li {
    background: rgba(0, 242, 234, 0.08);
    border: 1px solid rgba(0, 242, 234, 0.18);
    color: var(--primary);
    padding: 10px 12px;
    border-radius: 10px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
}
.modal-visit {
    width: 100%;
    justify-content: center;
    margin-top: 25px;
    background: var(--primary);
    color: #0b0d17;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.modal-visit:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 0 30px rgba(0, 242, 234, 0.4);
}
.modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* Grade de vídeos para modal da cidade */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 10px;
}
.video-grid iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: #000;
}

/* --- CONTATO --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    background: var(--card-bg);
    padding: 50px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-info h3 { font-size: 2rem; margin-bottom: 20px; }
.contact-item { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; font-size: 1.1rem; }
.contact-item i { color: var(--primary); font-size: 1.5rem; }
.contact-item { cursor: pointer; text-decoration: none; color: inherit; }
.contact-item:hover { opacity: 0.9; }
.contact-item:link, .contact-item:visited { color: inherit; }
.contact-item:hover i { color: var(--secondary); }
.contact-item:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 4px;
    border-radius: 6px;
}
.contact-location {
    background: transparent;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 15px;
}
.contact-location:focus {
    outline: 2px solid var(--secondary);
    outline-offset: 4px;
}

form input, form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    transition: 0.3s;
}

form input:focus, form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 242, 234, 0.2);
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

body.light-mode footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* --- FORMULÁRIOS TEMA CLARO --- */
body.light-mode input,
body.light-mode textarea {
    background-color: rgba(0, 0, 0, 0.06) !important;
    color: var(--text-main) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

body.light-mode input::placeholder,
body.light-mode textarea::placeholder {
    color: rgba(0, 0, 0, 0.5) !important;
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 900px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-img { width: 300px; height: 300px; margin: 0 auto; }
    .btn-group { justify-content: center; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .nav-links { display: none; } /* Menu simplificado para mobile */
    .section-header::before { display: none; }
}
