:root {
    /* Cores claras (tema padrão) */
    --bg: #f8f9fa;
    --text: #212529;
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #4cc9f0;
    --card: #ffffff;
    --header: #ffffff;
    --border: rgba(0, 0, 0, .1);
    --border-radius: 5px;
    --transition: all 0.3s ease;
}

:root[data-theme="dark"] {
    /* Cores escuras */
    --bg: #121212;
    --text: #e1e1e1;
    --primary: #4895ef;
    --secondary: #4361ee;
    --accent: #4cc9f0;
    --card: #1e1e1e;
    --header: #1a1a1a;
    --border: rgba(255, 255, 255, .1);
}

/* Estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    background-color: var(--bg);
    color: var(--text);
    transition: var(--transition);
}

body[data-theme="dark"] {
    background-color: var(--bg);
    color: var(--text);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--header);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

body[data-theme="dark"] .header {
    background-color: var(--header);
}

h1 a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

body[data-theme="dark"] h1 a {
    color: var(--primary);
}

h1 a:hover {
    color: var(--secondary);
}

body[data-theme="dark"] h1 a:hover {
    color: var(--secondary);
}

/* Navegação */
#nav {
    display: flex;
    gap: 1rem;
}

.nav-link {
    padding: .5rem 1rem;
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

body[data-theme="dark"] .nav-link {
    color: var(--text);
}

.nav-link:hover {
    color: var(--primary);
    background-color: rgba(67, 97, 238, .1);
}

body[data-theme="dark"] .nav-link:hover {
    color: var(--primary);
    background-color: rgba(72, 149, 239, .1);
}

.nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

body[data-theme="dark"] .nav-link.active {
    color: var(--primary);
}

/* Botão de tema */
#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
}

/* Posicionamento absoluto para os ícones */
#theme-toggle .sun-icon,
#theme-toggle .moon-icon {
    position: absolute;
    transition: opacity .3s ease, transform .3s ease;
}

/* Tema claro - mostra sol, esconde lua */
[data-theme="light"] .sun-icon {
    opacity: 1;
    transform: scale(1);
}

[data-theme="light"] .moon-icon {
    opacity: 0;
    transform: scale(.8);
}

/* Tema escuro - mostra lua, esconde sol */
[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: scale(.8);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: scale(1);
}

/* Slider principal */
.slider-container {
    margin-top: 80px;
    height: calc(100vh - 80px);
    overflow: hidden;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.5s ease, opacity 0.5s ease;
    pointer-events: none;
  }
  
  .slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }

.slide-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Seção Sobre */
#sobre .slide-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

/* Seção Habilidades */
.habilidades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.habilidade-card {
    background-color: var(--card);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

body[data-theme="dark"] .habilidade-card {
    background-color: var(--card);
}

.habilidade-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, .1);
}

.habilidade-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

body[data-theme="dark"] .habilidade-card h3 {
    color: var(--primary);
}

.habilidade-card ul {
    list-style: none;
}

.habilidade-card li {
    padding: .5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, .1);
}

body[data-theme="dark"] .habilidade-card li {
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

/* Seção Projetos */
.projetos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.projeto-card {
    background-color: var(--card);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

body[data-theme="dark"] .projeto-card {
    background-color: var(--card);
}

.projeto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, .1);
}

.projeto-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

body[data-theme="dark"] .projeto-card h3 {
    color: var(--primary);
}

.projeto-card img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    border: none;
    transition: var(--transition);
}

.projeto-card img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 15px rgba(0, 0, 0, .2);
}

/* Seção Contatos */
.contatos-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.contatos-info a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

body[data-theme="dark"] .contatos-info a {
    color: var(--primary);
}

.contatos-info a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

body[data-theme="dark"] .contatos-info a:hover {
    color: var(--secondary);
}

/* Botão mobile */
#btn-mobile {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: .5rem;
    color: var(--text);
}

body[data-theme="dark"] #btn-mobile {
    color: var(--text);
}

#hamburguer {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    position: relative;
    transition: var(--transition);
}

#hamburguer::after,
#hamburguer::before {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    position: absolute;
    transition: var(--transition);
}

#hamburguer::after {
    top: -8px;
}

#hamburguer::before {
    bottom: -8px;
}

#hamburguer.active {
    transform: rotate(45deg);
}

#hamburguer.active::after {
    transform: rotate(90deg);
    top: 0;
}

#hamburguer.active::before {
    opacity: 0;
}

/* Estilos para os indicadores de slide */
.slider-indicators {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.indicator.active {
    background: var(--primary);
    transform: scale(1.2);
}

.indicator::after {
    content: attr(data-slide);
    position: absolute;
    top: -20px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.indicator:hover::after {
    opacity: 1;
}

/* Responsividade */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }

    #nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--header);
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        box-shadow: var(--shadow);
        clip-path: circle(0 at 90% -10%);
        transition: clip-path .5s ease;
        pointer-events: none;
    }

    body[data-theme="dark"] #nav {
        background-color: var(--header);
    }

    #nav.active {
        clip-path: circle(150% at 90% -10%);
        pointer-events: all;
    }

    .nav-link {
        width: 90%;
        text-align: center;
        padding: 1rem;
    }

    #btn-mobile {
        display: block;
    }

    .slide-content {
        padding: 1rem;
    }

    .slider-indicators {
        bottom: 30px;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }

    .habilidades-grid,
    .projetos-grid {
        grid-template-columns: 1fr;
    }
}

/* Títulos */
h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    position: relative;
    display: inline-block;
}

body[data-theme="dark"] h2 {
    color: var(--primary);
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 4px;
    background-color: var(--accent);
    border-radius: 2px;
}

body[data-theme="dark"] h2::after {
    background-color: var(--accent);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}