html {
    scroll-behavior: smooth;
}

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

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #222222;
    --text-secondary: #666666;
    --accent: #2563eb;
    --border: #e5e5e5;
    --shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --text-primary: #e5e5e5;
    --text-secondary: #a3a3a3;
    --accent: #3b82f6;
    --border: #404040;
    --shadow: rgba(0, 0, 0, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    min-width: 300px;
}

/* ===========================
   HEADER E NAVEGAÇÃO
   =========================== */

header {
    background-color: var(--bg-secondary);
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav h1 {
    font-size: 1.5rem;
    color: var(--accent);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 70px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.40);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-links a:hover {
    color: var(--accent);
}

.theme-toggle {
    background: var(--bg-primary);
    border: 2px solid var(--border);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--accent);
}

/* ===========================
   MENU HAMBURGUER
   =========================== */

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 102;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Removida a animação de X - mantém os 3 risquinhos sempre */

/* Overlay para fechar o menu ao clicar fora */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 98;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* ===========================
   MAIN E SEÇÕES
   =========================== */

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

section {
    margin-bottom: 3rem;
    scroll-margin-top: 110px;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* ===========================
   HERO
   =========================== */

.hero {
    text-align: center;
    padding: 4rem 2rem;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===========================
   SOBRE
   =========================== */

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: center;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin: 0 auto;
}

/* ===========================
   HABILIDADES
   =========================== */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px var(--shadow);
}

.skill-card h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

/* ===========================
   PROJETOS/EXPERIÊNCIA
   =========================== */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    margin-bottom: 0.5rem;
}

/* ===========================
   CONTATO
   =========================== */

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.contact-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px var(--shadow);
}

.contact-card img {
    filter: brightness(0) saturate(100%) invert(68%) sepia(56%) saturate(2645%) hue-rotate(92deg) brightness(95%) contrast(85%);
}

[data-theme="light"] .contact-card img {
    filter: brightness(0) saturate(100%) invert(68%) sepia(56%) saturate(2645%) hue-rotate(92deg) brightness(95%) contrast(85%);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

button[type="submit"] {
    background: var(--accent);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

button[type="submit"]:hover {
    opacity: 0.9;
}

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

footer {
    background: var(--bg-secondary);
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* ===========================
   MEDIA QUERIES - RESPONSIVIDADE
   =========================== */

@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
    }

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

    /* Mostra o botão hamburguer */
    .hamburger {
        display: flex;
    }

    /* Reposiciona o nav para mobile */
    nav {
        position: relative;
    }

    /* Move a logo para a direita */
    .logo-container {
        order: 2;
        margin-left: auto;
    }

    .logo {
        height: 50px;
    }

    /* Menu lateral */
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--bg-secondary);
        flex-direction: column;
        justify-content: flex-start;
        padding: 5rem 2rem 2rem;
        gap: 1.5rem;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px var(--shadow);
        z-index: 99;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        width: 100%;
        padding: 0.75rem 0;
        font-size: 1.2rem;
        border-bottom: 1px solid var(--border);
    }

    .theme-toggle {
        width: 100%;
        margin-top: 1rem;
        padding: 1rem 1rem;
        font-size: 1.1rem;
    }

    /* Ajusta scroll margin para mobile */
    section {
        scroll-margin-top: 90px;
    }
}