/* ----------------------------------- */
/* 1. CONFIGURAÇÃO BASE & VARIÁVEIS */
/* ----------------------------------- */
/* No início do seu style.css */

/* Garante que nenhum elemento force o scroll horizontal, 
   mesmo que o layout tente quebrar */
body {
    overflow-x: hidden !important; 
    /* O restante do código body, como background-color, permanece */
}

/* Garante que a largura de qualquer elemento não exceda a tela */
img, video {
    max-width: 100%;
    height: auto;
}
:root {
    --bg-dark: #0a0a0f;
    --bg-card: #13131f;
    --bg-card-hover: #1c1c2e;
    --primary: #8a2be2;
    --primary-glow: rgba(138, 43, 226, 0.5);
    --secondary: #00d4ff;
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --gradient-main: linear-gradient(135deg, #8a2be2 0%, #00d4ff 100%);

    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;

    --transition: all 0.3s ease;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ----------------------------------- */
/* 2. TIPOGRAFIA & UTILITÁRIOS */
/* ----------------------------------- */
.title-h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

/* ----------------------------------- */
/* 3. HEADER & NAV */
/* ----------------------------------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header.scrolled {
    padding: 15px 0;
    background: rgba(10, 10, 15, 0.95);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.logo span {
    color: var(--primary);
}

/* Pequeno ícone Java dentro do logo */
/* .java-icon removed to avoid unused styles */

.nav-list {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-main);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.btn-contact {
    padding: 10px 25px;
    background: var(--gradient-main);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--primary-glow);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    transition: var(--transition);
}

/* ----------------------------------- */
/* 4. HERO SECTION */
/* ----------------------------------- */
.section-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    opacity: 0.4;
    z-index: -1;
    filter: blur(80px);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-tag {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(138, 43, 226, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 50px;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-content .subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--text-main);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: var(--primary);
    color: var(--text-main);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}

.btn-secondary:hover {
    border-color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* Code Card Visual */
.code-card {
    background: #1e1e2e;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.code-card:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

.code-header {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.code-content pre {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #a9b7c6;
}

.keyword {
    color: #cc7832;
}

.var {
    color: #9876aa;
}

.string {
    color: #6a8759;
}

.prop {
    color: #d0d0ff;
}

/* ----------------------------------- */
/* 5. SERVICES SECTION */
/* ----------------------------------- */
.section-services {
    padding: 100px 0;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition);
}

.card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card-icon-box {
    width: 60px;
    height: 60px;
    background: rgba(138, 43, 226, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--primary);
}

.card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ----------------------------------- */
/* 6. PORTFOLIO SECTION */
/* ----------------------------------- */
.section-works {
    padding: 100px 0;
    background: #0d0d14;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/10;
}

.project-image {
    width: 100%;
    height: 100%;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card:hover img {
    transform: scale(1.1);
}

.btn-project {
    padding: 10px 20px;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
}

.btn-project:hover {
    background: var(--primary);
    color: white;
}

/* ----------------------------------- */
/* 7. ABOUT SECTION */
/* ----------------------------------- */
.section-about {
    padding: 100px 0;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
}

.about-image {
    border-radius: 20px;
    width: 100%;
    max-width: 450px;
    box-shadow: 20px 20px 0 rgba(255, 255, 255, 0.05);
}

.experience-badge {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--primary);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.experience-badge .years {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.about-subtitle {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

.about-text {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.skill-item {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-item i {
    color: var(--primary);
}

/* ----------------------------------- */
/* 8. CTA SECTION */
/* ----------------------------------- */
.section-cta {
    padding: 80px 0;
}

.cta-box {
    background: linear-gradient(135deg, #1c1c2e 0%, #13131f 100%);
    padding: 60px;
    border-radius: 24px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cta-box h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.cta-box p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* ----------------------------------- */
/* 9. FOOTER */
/* ----------------------------------- */
.footer {
    background: #050508;
    padding: 60px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 15px;
    max-width: 300px;
}

.footer-col h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ----------------------------------- */
/* 10. ANIMATIONS */
/* ----------------------------------- */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: all 0.8s ease;
}

.reveal-up {
    transform: translateY(50px);
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0);
}

/* ----------------------------------- */
/* 11. RESPONSIVE */
/* ----------------------------------- */
@media (max-width: 992px) {
    .title-h1 {
        font-size: 2.8rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        margin-bottom: 40px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-container {
        grid-template-columns: 1fr;
    }

    .about-image-wrapper {
        order: -1;
        text-align: center;
    }

    .about-image {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }

    .nav-list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: #13131f;
        flex-direction: column;
        justify-content: center;
        transition: 0.4s ease;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-list.active {
        right: 0;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .cta-box {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    .title-h1 {
        font-size: 2.2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
@media (max-width: 600px) {
    /* Força a seção de serviços para 1 card por linha */
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    /* Força o portfólio para 1 coluna por linha */
    .gallery-container {
        grid-template-columns: 1fr;
    }

    /* Otimização da Tipografia para caber melhor */
    .section-title {
        font-size: 2rem;
    }
    
    .title-h1 {
        font-size: 2.5rem;
    }
    
    /* Reduz o padding lateral do container para evitar apertar demais */
    .container {
        padding: 0 15px;
    }

    /* Centraliza os botões (aplica-se a 992px, mas reforça aqui) */
    .hero-buttons {
        justify-content: center;
    }
    

    /* 2. Redução Fina do Título */
    .title-h1 {
        font-size: 2.1rem; 
    }
    /* ----------------------------------- */
/* 11. RESPONSIVE - AJUSTE CELULAR */
/* ----------------------------------- */

@media (max-width: 600px) {
    
    /* 1. DESATIVAÇÃO DO EFEITO 3D NA CAIXA DE CÓDIGO (HERO) */
    .hero-visual {
        /* Garante que o elemento visual não empurre a tela */
        transform: none !important; 
        display: flex;
        justify-content: center;
    }

    .code-card {
        /* ZERA qualquer transform residual do 3D */
        transform: none !important; 
        max-width: 350px; 
    }

    /* 2. REDUÇÃO DO TÍTULO (H1) PARA CABER NO S23 */
    .title-h1 {
        font-size: 2.1rem; /* Ajuste fino */
    }
    
    /* Outras regras de responsividade já existentes */
}
}