/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variáveis */
:root {
    --primary-dark: #212A3E;
    --primary-light: #F8F9FA;
    --accent-blue: #007BFF;
    --accent-orange: #FFC107;
    --accent-green: #28a745;
    --text-dark: #343A40;
    --text-light: #BDC3C7;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-strong: rgba(0, 0, 0, 0.25);
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --nav-height-expanded: 55px;
    --nav-height-shrunk: 40px;
}

/* Estilos globais */
body {
    font-family: var(--font-body);
    line-height: 1.6;
    background-color: var(--primary-light);
    color: var(--text-dark);
    scroll-behavior: smooth;
    padding-top: var(--nav-height-expanded);
    transition: padding-top 0.3s ease;
}

body.scrolled {
    padding-top: var(--nav-height-shrunk);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navegação */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--primary-dark);
    height: var(--nav-height-expanded);
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow-medium);
    transition: height 0.3s ease;
}

body.scrolled .main-nav {
    height: var(--nav-height-shrunk);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.logo {
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.3em;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

body.scrolled .logo {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-emoji {
    font-size: 1.2em;
    margin-right: 6px;
    transition: all 0.3s ease;
}

.nav-text {
    font-size: 0.9em;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Estado encolhido - apenas emojis */
body.scrolled .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    margin: 0;
}

body.scrolled .nav-emoji {
    margin-right: 0;
    font-size: 1.4em;
}

body.scrolled .nav-links {
    gap: 10px;
}

/* Menu hambúrguer */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger-lines {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hamburger-lines span {
    width: 20px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero-section {
    background-color: var(--primary-dark);
    color: #fff;
    padding: 80px 20px 60px;
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    width: 100%;
}

.profile-pic {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 25%;
    margin-bottom: 20px;
    border: 4px solid var(--accent-blue);
    box-shadow: 
        0 8px 20px var(--shadow-medium),
        inset 0 0 0 2px rgba(255,255,255,0.1);
    display: block;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s ease;
    filter: contrast(1.1) brightness(1.05);
}

.profile-pic:hover {
    transform: scale(1.03);
    box-shadow: 
        0 12px 30px var(--shadow-medium),
        inset 0 0 0 2px rgba(255,255,255,0.2);
}

.hero-section h1 {
    font-family: var(--font-heading);
    font-size: 3.2em;
    margin-bottom: 10px;
    color: #fff;
}

.hero-section h2 {
    font-size: 1.4em;
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 1.1em;
    max-width: 600px;
    margin: 0 auto 30px auto;
    color: var(--text-light);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Botões */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px var(--shadow-light);
    letter-spacing: 0.5px;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-medium);
}

.button.primary {
    background-color: var(--accent-blue);
    color: #fff;
}

.button.primary:hover {
    background-color: #0056b3;
}

.button.secondary {
    background-color: var(--accent-orange);
    color: var(--primary-dark);
}

.button.secondary:hover {
    background-color: #e0a800;
}

.button.small {
    padding: 8px 16px;
    font-size: 0.8em;
    text-transform: none;
    letter-spacing: normal;
    border-radius: 6px;
}

.button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.button.disabled:hover {
    transform: none;
    box-shadow: 0 4px 10px var(--shadow-light);
}

/* Seções */
section {
    padding: 60px 0;
    text-align: center;
    background-color: var(--primary-light);
}

section:nth-child(even) {
    background-color: #EFEFEF;
}

h2 {
    font-family: var(--font-heading);
    font-size: 2.5em;
    margin-bottom: 30px;
    color: var(--primary-dark);
    position: relative;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--accent-blue);
    border-radius: 2px;
}

/* Sobre Mim */
.about-section p {
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto 20px auto;
    text-align: left;
}

/* Habilidades */
.skills-section .skills-category {
    display: inline-block;
    width: 22%;
    vertical-align: top;
    margin: 0 1.5%;
    background-color: #fff;
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow-light);
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border: 1px solid #e1e5e9;
}

.skills-section .skills-category:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

.skills-section h3 {
    color: var(--accent-blue);
    margin-bottom: 20px;
    font-size: 1.3em;
    font-weight: 600;
}

.skills-section ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.skills-section li {
    background-color: #E2E8F0;
    color: var(--text-dark);
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 500;
    font-size: 0.85em;
    transition: all 0.3s ease;
    border: 1px solid #d1d9e0;
}

.skills-section li:hover {
    background-color: var(--accent-blue);
    color: #fff;
    transform: translateY(-2px);
}

/* Projetos - Estilos Aprimorados */
.projects-section .project-card {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 6px 20px var(--shadow-light);
    margin-bottom: 40px;
    padding: 0;
    text-align: left;
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

.projects-section .project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px var(--shadow-medium);
}

.projects-section .project-card.featured {
    border-left: 5px solid var(--accent-blue);
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.project-header {
    padding: 25px 30px 15px;
    border-bottom: 1px solid #e1e5e9;
    position: relative;
    background: linear-gradient(135deg, #fafbfc 0%, #fff 100%);
}

.project-badge {
    position: absolute;
    top: 15px;
    right: 20px;
    background-color: var(--accent-blue);
    color: white;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

.project-badge:contains("IA/OCR") {
    background-color: var(--accent-orange);
    box-shadow: 0 2px 8px rgba(255,193,7,0.3);
}

.project-badge:contains("React/TS") {
    background-color: var(--accent-green);
    box-shadow: 0 2px 8px rgba(40,167,69,0.3);
}

.project-header h3 {
    color: var(--primary-dark);
    font-size: 1.5em;
    margin: 0;
    padding-right: 120px;
    line-height: 1.3;
    font-weight: 700;
}

.project-content {
    padding: 25px 30px;
}

.project-content > p {
    font-size: 1em;
    margin-bottom: 25px;
    color: var(--text-dark);
    line-height: 1.7;
}

.project-features {
    margin: 25px 0;
}

.project-features h4 {
    color: var(--accent-blue);
    font-size: 1.1em;
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.project-features h4::before {
    content: '▶';
    margin-right: 8px;
    font-size: 0.8em;
}

.project-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-features li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    font-size: 0.95em;
    line-height: 1.6;
    border-bottom: 1px solid #f1f3f4;
}

.project-features li:last-child {
    border-bottom: none;
}

.project-features li::before {
    content: '✓';
    color: var(--accent-blue);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.1em;
}

.tech-stack {
    margin: 25px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    border: 1px solid #90caf9;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(21,101,192,0.3);
}

.project-info {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border-left: 4px solid var(--accent-blue);
}

.project-info h4 {
    color: var(--accent-blue);
    font-size: 1.1em;
    margin-bottom: 15px;
    font-weight: 600;
}

.project-details {
    display: grid;
    gap: 10px;
}

.detail-item {
    font-size: 0.9em;
    line-height: 1.5;
    padding: 5px 0;
}

.detail-item strong {
    color: var(--primary-dark);
    font-weight: 600;
    display: inline-block;
    min-width: 100px;
}

.project-actions {
    padding: 20px 30px 25px;
    border-top: 1px solid #e1e5e9;
    background: linear-gradient(135deg, #fafbfc 0%, #f1f3f4 100%);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.project-actions .button.secondary {
    background-color: transparent;
    color: var(--accent-blue);
    border: 2px solid var(--accent-blue);
}

.project-actions .button.secondary:hover {
    background-color: var(--accent-blue);
    color: white;
}

/* Experiência e Educação */
.job-entry, .course-entry {
    background-color: #fff;
    border-left: 4px solid var(--accent-blue);
    padding: 25px;
    margin-bottom: 25px;
    text-align: left;
    box-shadow: 0 4px 15px var(--shadow-light);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.job-entry:hover, .course-entry:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

.job-entry h3, .course-entry h3 {
    color: var(--primary-dark);
    font-size: 1.5em;
    margin-bottom: 8px;
    font-weight: 600;
}

.job-entry ul {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
}

.job-entry li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    line-height: 1.6;
}

.job-entry li::before {
    content: '▸';
    color: var(--accent-blue);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2em;
}

/* Footer */
.footer-section {
    background-color: var(--primary-dark);
    color: #fff;
    padding: 50px 20px 30px;
    text-align: center;
}

.footer-section h2 {
    color: #fff;
    margin-bottom: 20px;
}

.footer-section h2::after {
    background-color: var(--accent-blue);
}

.footer-section a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: #fff;
}

.social-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border: 2px solid var(--accent-blue);
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 1.2em;
}

.social-links a:hover {
    background-color: var(--accent-blue);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow-medium);
}

.copyright {
    margin-top: 30px;
    font-size: 0.9em;
    color: var(--text-light);
}

/* Botão Voltar ao Topo */
#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 99;
    font-size: 22px;
    background-color: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-medium);
    font-weight: bold;
}

#backToTopBtn:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--shadow-strong);
}

/* Responsividade */
@media (max-width: 992px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }

    .skills-section .skills-category {
        width: 45%;
        margin: 0 2.5% 25px 2.5%;
    }

    .project-header h3 {
        font-size: 1.3em;
        padding-right: 100px;
    }
}

@media (max-width: 768px) {
    body, body.scrolled {
        padding-top: 60px;
    }

    .main-nav {
        height: 60px;
    }

    body.scrolled .main-nav {
        height: 60px;
    }

    .logo {
        font-size: 1.2em;
    }

    body.scrolled .logo {
        opacity: 1;
        transform: scale(1);
        pointer-events: auto;
    }

    .hamburger-menu {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-dark);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 15px var(--shadow-medium);
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 12px;
        width: 100%;
        justify-content: flex-start;
        border-radius: 8px;
    }

    .nav-text {
        opacity: 1 !important;
        width: auto !important;
    }

    .nav-emoji {
        margin-right: 10px !important;
        font-size: 1.2em !important;
    }

    .hero-section h1 {
        font-size: 2.5em;
    }

    .profile-pic {
        width: 140px;
        height: 140px;
        border: 3px solid var(--accent-blue);
    }

    .skills-section .skills-category {
        width: 90%;
        margin: 0 auto 25px auto;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .project-header {
        padding: 20px 20px 12px;
    }
    
    .project-header h3 {
        font-size: 1.2em;
        padding-right: 80px;
    }
    
    .project-badge {
        top: 12px;
        right: 15px;
        font-size: 0.7em;
        padding: 4px 10px;
    }
    
    .project-content {
        padding: 20px;
    }

    .project-info {
        padding: 15px;
        margin: 20px 0;
    }
    
    .project-actions {
        padding: 15px 20px;
        flex-direction: column;
    }
    
    .project-actions .button.small {
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }

    .detail-item strong {
        min-width: 80px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 2em;
    }

    .project-header h3 {
        font-size: 1.1em;
        padding-right: 70px;
    }

    .tech-tag {
        font-size: 0.75em;
        padding: 4px 10px;
    }

    .project-features li {
        font-size: 0.9em;
    }
}