/* ==========================================
   RESET E CONFIGURAÇÕES GLOBAIS
   ========================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* ==========================================
   UTILITÁRIOS
   ========================================== */

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

/* ==========================================
   HEADER FIXO
   ========================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: -0.5px;
}

.nav {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #2d3748;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #1a202c;
}

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

/* ==========================================
   SEÇÃO HERO
   ========================================== */

.hero {
    margin-top: 90px;
    padding: 8rem 0 6rem;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #4a5568;
    margin-bottom: 3rem;
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================
   BOTÕES
   ========================================== */

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: #2d3748;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #1a202c;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(45, 55, 72, 0.2);
}

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

.btn-secondary:hover {
    background-color: #2d3748;
    color: #ffffff;
    transform: translateY(-2px);
}

/* ==========================================
   SEÇÕES GERAIS
   ========================================== */

section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.section-description {
    text-align: center;
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================
   SEÇÃO SOBRE MIM
   ========================================== */

.about {
    background-color: #ffffff;
}

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

.about-text {
    font-size: 1.1rem;
    color: #4a5568;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    text-align: justify;
}

.about-text:last-child {
    margin-bottom: 0;
}

/* ==========================================
   SEÇÃO TECNOLOGIAS
   ========================================== */

.technologies {
    background-color: #f7fafc;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.tech-card {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e0;
}

.tech-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.tech-icon img,
.tech-icon svg {
    width: 48px;
    height: 48px;
    transition: all 0.3s ease;
}

.tech-card:hover .tech-icon {
    transform: scale(1.1);
}

.tech-card:hover .tech-icon img,
.tech-card:hover .tech-icon svg {
    transform: scale(1.1);
}

.tech-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.tech-description {
    font-size: 0.95rem;
    color: #718096;
    line-height: 1.6;
}

/* ==========================================
   SEÇÃO PROJETOS
   ========================================== */

.projects {
    background-color: #ffffff;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.project-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.project-header {
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.project-description {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background-color: #edf2f7;
    color: #2d3748;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background-color: #2d3748;
    color: #ffffff;
}

.project-actions {
    margin-top: auto;
}

.btn-project {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #2d3748;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-project:hover {
    background-color: #1a202c;
    transform: translateX(5px);
}

/* ==========================================
   SEÇÃO CONTATO
   ========================================== */

.contact {
    background-color: #f7fafc;
}

.contact-intro {
    text-align: center;
    font-size: 1.15rem;
    color: #4a5568;
    max-width: 700px;
    margin: 0 auto 4rem;
    line-height: 1.8;
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background-color: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.contact-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, transparent 100%);
    transition: all 0.4s ease;
    z-index: 0;
}

.contact-link-github:hover::before {
    background: linear-gradient(135deg, rgba(36, 41, 46, 0.03) 0%, rgba(36, 41, 46, 0.08) 100%);
}

.contact-link-linkedin:hover::before {
    background: linear-gradient(135deg, rgba(10, 102, 194, 0.03) 0%, rgba(10, 102, 194, 0.08) 100%);
}

.contact-link-email:hover::before {
    background: linear-gradient(135deg, rgba(234, 67, 53, 0.03) 0%, rgba(234, 67, 53, 0.08) 100%);
}

.contact-link:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.contact-link-github:hover {
    border-color: #24292e;
}

.contact-link-linkedin:hover {
    border-color: #0a66c2;
}

.contact-link-email:hover {
    border-color: #ea4335;
}

.contact-icon-wrapper {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.contact-icon-wrapper-github {
    background: linear-gradient(135deg, #f6f8fa 0%, #e1e4e8 100%);
    color: #24292e;
}

.contact-icon-wrapper-linkedin {
    background: linear-gradient(135deg, #e8f4fd 0%, #d0e8f8 100%);
    color: #0a66c2;
}

.contact-icon-wrapper-email {
    background: linear-gradient(135deg, #fdecea 0%, #fadbd8 100%);
    color: #ea4335;
}

.contact-link-github:hover .contact-icon-wrapper-github {
    color: #ffffff;
    transform: rotate(5deg) scale(1.1);
}

.contact-link-linkedin:hover .contact-icon-wrapper-linkedin {
    color: #ffffff;
    transform: rotate(-5deg) scale(1.1);
}

.contact-link-email:hover .contact-icon-wrapper-email {
    color: #ffffff;
    transform: rotate(5deg) scale(1.1);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
    z-index: 1;
}

.contact-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    transition: color 0.3s ease;
}

.contact-handle {
    font-size: 0.95rem;
    color: #718096;
    transition: color 0.3s ease;
}

.contact-link:hover .contact-text {
    color: #2d3748;
}

.contact-link:hover .contact-handle {
    color: #4a5568;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    background-color: #1a202c;
    color: #cbd5e0;
    padding: 3rem 0;
}

.footer-content {
    text-align: center;
}

.footer-copyright {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #e2e8f0;
    font-weight: 500;
}

.footer-legal {
    font-size: 0.875rem;
    color: #a0aec0;
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================
   RESPONSIVIDADE - TABLET
   ========================================== */

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 1.5rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }

    .nav {
        gap: 1.5rem;
    }

    .hero {
        padding: 6rem 0 4rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .section-title {
        font-size: 2rem;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .tech-icon {
        width: 36px;
        height: 36px;
    }
    
    .tech-icon img,
    .tech-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .contact-icon-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .contact-icon-wrapper svg {
        width: 28px;
        height: 28px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-links {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   RESPONSIVIDADE - MOBILE
   ========================================== */

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .nav {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-description {
        font-size: 1rem;
        margin-bottom: 2.5rem;
    }

    .tech-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tech-icon {
        width: 32px;
        height: 32px;
    }
    
    .tech-icon img,
    .tech-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .contact-icon-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .contact-icon-wrapper svg {
        width: 24px;
        height: 24px;
    }

    .about-text {
        font-size: 1rem;
        text-align: left;
    }

    .footer {
        padding: 2rem 0;
    }

    .footer-copyright {
        font-size: 0.9rem;
    }

    .footer-legal {
        font-size: 0.8rem;
    }
}

/* ==========================================
   ANIMAÇÕES SUAVES
   ========================================== */

@media (prefers-reduced-motion: no-preference) {
    .tech-card,
    .project-card,
    .contact-link {
        animation: fadeInUp 0.6s ease-out backwards;
    }

    .tech-card:nth-child(1) { animation-delay: 0.1s; }
    .tech-card:nth-child(2) { animation-delay: 0.2s; }
    .tech-card:nth-child(3) { animation-delay: 0.3s; }
    .tech-card:nth-child(4) { animation-delay: 0.4s; }
    .tech-card:nth-child(5) { animation-delay: 0.5s; }
    .tech-card:nth-child(6) { animation-delay: 0.6s; }
    .tech-card:nth-child(7) { animation-delay: 0.7s; }
    .tech-card:nth-child(8) { animation-delay: 0.8s; }

    .project-card:nth-child(1) { animation-delay: 0.1s; }
    .project-card:nth-child(2) { animation-delay: 0.2s; }
    .project-card:nth-child(3) { animation-delay: 0.3s; }

    .contact-link:nth-child(1) { animation-delay: 0.1s; }
    .contact-link:nth-child(2) { animation-delay: 0.2s; }
    .contact-link:nth-child(3) { animation-delay: 0.3s; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   ESTADOS DE FOCO PARA ACESSIBILIDADE
   ========================================== */

a:focus,
button:focus {
    outline: 2px solid #2d3748;
    outline-offset: 2px;
}

/* ==========================================
   SCROLL SUAVE PARA SEÇÕES
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
