/* RESET & BASES */
html {
    scroll-behavior: smooth;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

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

/* HEADER */
header {
    background: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0a66c2;
}

nav a {
    margin-left: 25px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #0a66c2;
}

/* HERO */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.highlight {
    color: #ffd166;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background: #ffd166;
    color: #333;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.hero-image {
    flex: 1;
    text-align: center;
}

.photo-placeholder {
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    margin: 0 auto;
}

/* FORMAS GEOMÉTRICAS ABSTRATAS */
.floating-geo {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 1;
    opacity: 0.7;
    transition: all 0.4s ease;
}

/* EFEITO HOVER SUAVE */
.floating-geo:hover {
    opacity: 1;
    background: rgba(255, 209, 102, 0.2);
    border-color: rgba(255, 209, 102, 0.3);
    transform: scale(1.2);
}

/* POSIÇÕES OTIMIZADAS (não sobre a foto) */
.geo-1 {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    top: 15%;
    right: 15%;
    animation: float1 8s infinite ease-in-out;
    background: rgba(102, 126, 234, 0.15);
}

.geo-2 {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    bottom: 20%;
    left: 10%;
    animation: float2 10s infinite ease-in-out;
    background: rgba(118, 75, 162, 0.15);
    animation-delay: 1s;
}

.geo-3 {
    width: 45px;
    height: 45px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    bottom: 15%;
    right: 10%;
    animation: float3 12s infinite ease-in-out;
    background: rgba(255, 209, 102, 0.15);
    animation-delay: 2s;
}

/* ANIMAÇÕES MAIS SUAVES E CONTIDAS */
@keyframes float1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(15px, -20px) rotate(120deg); }
    66% { transform: translate(-10px, 10px) rotate(240deg); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-10px, 15px) rotate(-120deg); }
    66% { transform: translate(5px, -10px) rotate(-240deg); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(12px, 12px) rotate(120deg); }
    66% { transform: translate(-8px, 5px) rotate(240deg); }
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
    .floating-geo {
        width: 35px !important;
        height: 35px !important;
        opacity: 0.6;
    }
    
    .geo-1 { top: 10%; right: 5%; }
    .geo-2 { bottom: 15%; left: 5%; }
    .geo-3 { bottom: 10%; right: 3%; }
}

@media (max-width: 480px) {
    .floating-geo {
        width: 30px !important;
        height: 30px !important;
        opacity: 0.5;
    }
}

/* SOBRE */
.sobre {
    padding: 80px 0;
    background: white;
}

.sobre h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    font-size: 2.2rem;
}

.sobre-content {
    max-width: 800px;
    margin: 0 auto;
}

.sobre-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.sobre-text strong {
    color: #0a66c2;
    display: block;
    margin-top: 30px;
    margin-bottom: 10px;
}

.sobre-text a {
    color: #0a66c2;
    text-decoration: none;
    font-weight: 600;
}

.sobre-text a:hover {
    text-decoration: underline;
}

/* PROJETOS */
.projetos {
    padding: 80px 0;
    background: #f8f9fa;
}

.projetos h2 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 50px;
    font-size: 1.1rem;
}

.projetos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* FOOTER */
footer {
    background: #333;
    color: white;
    padding: 60px 0 30px;
    text-align: center;
}

footer h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.footer-subtitle {
    color: #aaa;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.contato-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.contato-btn {
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.whatsapp { background: #25D366; }
.email { background: #ea4335; }
.linkedin { background: #0a66c2; }
.github { background: #333; border: 2px solid #666; }

.contato-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.footer-links {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-links span {
    color: #666;
}

.copyright {
    margin-top: 30px;
    color: #666;
    font-size: 0.9rem;
}

.footer-impact {
    text-align: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.footer-impact h3 {
    color: #60a5fa;
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-impact .impact-phrase {
    font-size: 1.8rem;
    color: #f8fafc;
    margin: 25px 0;
    padding: 15px;
    background: rgba(96, 165, 250, 0.1);
    border-radius: 10px;
    border-left: 5px solid #60a5fa;
    font-style: italic;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* RESPONSIVO */
@media (max-width: 768px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .photo-placeholder {
        width: 200px;
        height: 200px;
        font-size: 5rem;
    }
    
    .contato-links {
        flex-direction: column;
        align-items: center;
    }
    
    .contato-btn {
        width: 80%;
        max-width: 250px;
        justify-content: center;
    }
}

/* FOTO */
.hero-photo {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);

    box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.3),
    inset 0 0 0 5px rgba(255, 255, 255, 0.2);

    border: 5px solid transparent;
    background: 
    linear-gradient(white, white) padding-box,
    linear-gradient(135deg, #667eea 0%, #764ba2 100%) border-box;

    transition: all 0.4s ease;

    transform: perspective(1000px) translateZ(50px);
}

.hero-image .photo-placeholder {
    display: none;
}

.hero-photo:hover {
    transform: perspective(1000px) translateZ(60px) scale(1.02);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.4),
        inset 0 0 0 5px rgba(255, 255, 255, 0.3);
}

/* ========== ESTILOS PARA CARDS DE PROJETOS ========== */
.projetos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.projeto-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.projeto-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.projeto-imagem {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ========== ESTILO PARA LOGOS  ========== */
/* ========== ANIMAÇÃO PARA LOGOS ========== */
/* ========== ANIMAÇÃO EXTREMA ESQUERDA-DIREITA ========== */
.projeto-imagem img[src*="Logo"],
.projeto-imagem img[src*="logo"],
.projeto-imagem img[src*=".png"]:not([src*="perfil"]):not([src*="certificacoes"]),
.projeto-imagem img[src*=".ico"],
.projeto-imagem img[src*="favicon"] {
    width: auto !important;
    height: auto !important;
    max-width: 140px !important;
    max-height: 140px !important;
    object-fit: contain !important;
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 20px !important;
    border-radius: 50% !important;
    border: 3px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
    
    /* ANIMAÇÃO EXTREMA */
    animation: extremo-horizontal 3s ease-in-out infinite !important;
}

/* Animação que vai da esquerda para a direita */
@keyframes extremo-horizontal {
    0% {
        transform: translateX(-100px); 
    }
    20% {
        transform: translateX(-50px); 
    }
    40% {
        transform: translateX(0); 
    }
    60% {
        transform: translateX(50px); 
    }
    80% {
        transform: translateX(100px); 
    }
    100% {
        transform: translateX(-100px); 
    }
}


.projeto-imagem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.projeto-card:hover .projeto-imagem img {
    transform: scale(1.05);
}

.projeto-placeholder {
    font-size: 60px;
    color: rgba(255,255,255,0.8);
}

.projeto-conteudo {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.projeto-conteudo h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.projeto-conteudo p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.projeto-tecnologias {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tech-tag {
    background: #f0f0f0;
    color: #555;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.projeto-links {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.projeto-link {
    padding: 10px 20px;
    background: #0a66c2;
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.projeto-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(10, 102, 194, 0.3);
    background: #004182;
}

/* Responsividade */
@media (max-width: 768px) {
    .projetos-grid {
        grid-template-columns: 1fr;
    }
    
    .projeto-imagem {
        height: 180px;
    }
}

/* ========== LOADING STATE PARA PROJETOS ========== */

#projetos-container:empty {
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
}

#projetos-container:empty::before {
    content: "";
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0a66c2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

#projetos-container:empty::after {
    content: "Carregando projetos...";
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsividade do loading */
@media (max-width: 768px) {
    #projetos-container:empty::before {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }
    
    #projetos-container:empty::after {
        font-size: 1rem;
    }
}

/* CONTAINER DA FOTO COM EFEITO */
.photo-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.hero-logo,
.hero-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    transition: opacity 1.5s ease-in-out;
}

.hero-logo {
    opacity: 1;
    z-index: 2;
    background: white;
    padding: 20px;
    object-fit: contain;
    border: 5px solid white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.hero-photo {
    opacity: 0;
    z-index: 1;
    border: 5px solid white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: opacity 1.5s ease-in-out;
}

/* Quando o logo desaparece, a foto aparece */
.hero-logo.fade-out {
    opacity: 0;
}

.hero-photo.fade-in {
    opacity: 1;
}

/* Efeito hover (opcional) */
.photo-container:hover .hero-photo {
    transform: scale(1.02);
    transition: transform 0.4s ease;
}

/* Responsivo */
@media (max-width: 768px) {
    .photo-container {
        width: 200px;
        height: 200px;
    }
}