/* CSS OTIMIZADO - dutrasistemas.com */
/* Minifique este arquivo usando cssminifier.com para melhor performance */

/* ===================================
   RESET & VARIÁVEIS
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: #252525;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-purple: #8b5cf6;
    --border: #333;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
}

/* ===================================
   LOADING SCREEN
   =================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 20px;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===================================
   PARTÍCULAS DE FUNDO
   =================================== */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    opacity: 0.3;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent);
    border-radius: 50%;
    animation: float-particle 20s infinite;
    will-change: transform, opacity;
}

@keyframes float-particle {
    0%, 100% { transform: translate(0, 0); opacity: 0; }
    50% { opacity: 1; }
}

/* ===================================
   ESTILOS GLOBAIS
   =================================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

html {
    scroll-behavior: smooth;
}

/* ===================================
   HEADER & NAVEGAÇÃO
   =================================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    will-change: box-shadow;
}

[data-theme="light"] header {
    background: rgba(255, 255, 255, 0.95);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    position: relative;
}

.logo img {
    height: 45px;
    width: auto;
    transition: transform 0.3s;
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: var(--accent);
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 25px;
    width: 60px;
    height: 30px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.theme-toggle:hover {
    border-color: var(--accent);
}

.theme-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: var(--accent);
    border-radius: 50%;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: white;
}

[data-theme="light"] .theme-toggle-slider {
    transform: translateX(30px);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* ===================================
   BOTÃO VOLTAR AO TOPO
   =================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-hover);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 2rem;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: float 20s infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-50px, 50px); }
}

.hero-content {
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease;
}

.hero-text h2 {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    animation: fadeInUp 1.2s ease;
}

.hero-text p {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
    animation: fadeInUp 1.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-image {
    display: flex;
    justify-content: center;
    animation: fadeIn 1.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-image img {
    width: clamp(250px, 35vw, 350px);
    height: clamp(250px, 35vw, 350px);
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--accent);
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.3);
    transition: transform 0.3s;
}

.hero-image img:hover {
    transform: scale(1.05) rotate(5deg);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s;
    animation: fadeInUp 1.6s ease;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

/* ===================================
   CONTADOR DE ESTATÍSTICAS
   =================================== */
.stats-section {
    background: var(--bg-secondary);
    padding: 4rem 2rem;
    margin-top: -2rem;
}

.stats-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.2);
    border-color: var(--accent);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===================================
   SEÇÕES GERAIS
   =================================== */
section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent);
    margin: 1rem auto;
    border-radius: 2px;
}

/* ===================================
   CERTIFICAÇÕES
   =================================== */
.certifications {
    background: var(--bg-secondary);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.cert-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: var(--transition);
    text-align: center;
}

.cert-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.cert-card i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
    transition: transform 0.3s;
}

.cert-card:hover i {
    transform: scale(1.2) rotate(10deg);
}

/* ===================================
   PROJETOS COM EFEITO 3D
   =================================== */
.projects {
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--accent);
}

.project-image {
    width: 100%;
    height: 220px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover .project-image::after {
    opacity: 1;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-tag {
    background: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
    transition: var(--transition);
}

.tech-tag:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

/* ===================================
   HABILIDADES COM PROGRESS BARS
   =================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-item {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.skill-item i {
    font-size: 2rem;
    color: var(--accent);
}

.skill-item h3 {
    font-size: 1.2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-purple));
    border-radius: 10px;
    width: 0;
    transition: width 1.5s ease;
}

.skill-item.visible .progress-fill {
    width: var(--progress-width);
}

/* ===================================
   DEPOIMENTOS
   =================================== */
.testimonials {
    background: var(--bg-secondary);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 4rem;
    color: var(--accent);
    opacity: 0.2;
    font-family: Georgia, serif;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.testimonial-text {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.author-info h4 {
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.author-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===================================
   TIMELINE
   =================================== */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--accent);
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: 50%;
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 50%;
}

.timeline-content {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    width: 90%;
    margin-right: 2rem;
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: var(--accent);
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.2);
    transform: scale(1.05);
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: 0;
    margin-left: 2rem;
}

.timeline-year {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    border: 4px solid var(--bg-primary);
    z-index: 1;
    transition: var(--transition);
}

.timeline-item:hover .timeline-dot {
    transform: translateX(-50%) scale(1.5);
    box-shadow: 0 0 20px var(--accent);
}

/* ===================================
   SOBRE
   =================================== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: clamp(1rem, 2vw, 1.1rem);
}

/* ===================================
   CONTATO
   =================================== */
.contact {
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: clamp(1rem, 2vw, 1.2rem);
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.contact-item:hover {
    border-color: var(--accent);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.2);
}

.contact-item i {
    color: var(--accent);
    font-size: clamp(1.5rem, 3vw, 1.8rem);
    transition: transform 0.3s;
}

.contact-item:hover i {
    transform: scale(1.2) rotate(10deg);
}

.contact-item a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--accent);
}

/* ===================================
   FOOTER
   =================================== */
footer {
    background: var(--bg-primary);
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

footer .footer-brand {
    font-size: clamp(1.3rem, 2.5vw, 1.5rem);
    font-weight: bold;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

footer .footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

footer .footer-links a:hover {
    color: var(--accent);
}

/* ===================================
   RESPONSIVIDADE
   =================================== */
@media (max-width: 768px) {
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    }

    nav ul.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        padding-left: 50px;
        padding-right: 0;
        justify-content: flex-start;
    }

    .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }

    .timeline-dot {
        left: 20px;
        transform: translateX(0);
    }

    .timeline-item:hover .timeline-dot {
        transform: translateX(0) scale(1.5);
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================================
   PERFORMANCE OPTIMIZATIONS
   =================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Contenção de layout para evitar reflow */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* GPU acceleration para elementos animados */
.project-card,
.skill-item,
.cert-card,
.testimonial-card,
.stat-item {
    will-change: transform;
}

/* Remove will-change após animação */
.project-card:not(:hover),
.skill-item:not(:hover),
.cert-card:not(:hover),
.testimonial-card:not(:hover),
.stat-item:not(:hover) {
    will-change: auto;
}