/* Variáveis CSS */
:root {
    --purple-dark: #2d1b69;
    --purple-main: #6d28d9;
    --purple-light: #a78bfa;
    --purple-accent: #c084fc;
    --bg-dark: #111827;
    --text-light: #f3f4f6;
    --text-primary-dark: #f3f4f6;  /* Texto principal no modo escuro */
    --text-secondary-dark: #d1d5db; /* Texto secundário no modo escuro */
    --text-tertiary-dark: #9ca3af; /* Texto terciário no modo escuro */
    --text-primary-light: #1f2937; /* Texto principal no modo claro */
    --text-secondary-light: #4b5563; /* Texto secundário no modo claro */
    --text-tertiary-light: #6b7280; /* Texto terciário no modo claro */
    --z-background: 0;
    --z-content: 10;
    --z-navbar: 50;
    --z-dropdown: 60;
    --z-floating: 70;
    --z-modal: 80;
    --z-toast: 90;
    --z-overlay: 100;
}

/* Estilos para o modo claro */
html.light {
    --bg-dark: #f9fafb;
    --text-light: #1f2937;
}

html.light body {
    background: linear-gradient(135deg, #f9fafb 0%, #e2e8f0 100%);
    color: #1f2937;
}

html.light .bg-gray-800 {
    background-color: #e5e7eb;
}

html.light .bg-gray-900 {
    background-color: #f3f4f6;
}

html.light .text-gray-300 {
    color: var(--text-secondary-light);
}

html.light .text-gray-400 {
    color: var(--text-tertiary-light);
}

/* Ajustes específicos para descrições em diferentes seções no modo claro */
html.light .project-description {
    color: var(--text-secondary-light);
}

html.light .timeline-description {
    color: var(--text-secondary-light);
}

html.light #contato p {
    color: var(--text-secondary-light);
}

html.light label {
    color: var(--text-secondary-light) !important;
}

/* Consistência de cores em cards e elementos interativos */
html.light .skill-card,
html.light .project-card,
html.light .timeline-content {
    background: rgba(229, 231, 235, 0.7);
    border-color: rgba(209, 213, 219, 0.4);
}

html.light .skill-level {
    background-color: #d1d5db;
}

html.light .project-tag {
    background-color: rgba(139, 92, 246, 0.15);
}

/* Estilos gerais - otimizados para performance */
body {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a103f 100%);
    overflow-x: hidden;
    /* Adicionando will-change para melhorar a performance de scroll */
    will-change: scroll-position;
}

/* Estilos para o header/navbar */
header.sticky {
    position: sticky;
    top: 0;
    z-index: var(--z-navbar); /* Usar variável de z-index */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background-color: rgba(17, 24, 39, 0.9); /* bg-gray-900 com transparência */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

header.header-hidden {
    transform: translateY(-100%);
}

header.header-scrolled {
    background-color: rgba(17, 24, 39, 0.95); /* Mais opaco quando rola */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

html.light header {
    background-color: rgba(243, 244, 246, 0.9);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

html.light header.header-scrolled {
    background-color: rgba(249, 250, 251, 0.95); /* Versão clara mais opaca quando rola */
}

#mobile-menu {
    z-index: var(--z-dropdown); /* Usar variável de z-index */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* Ajuste para garantir que os elementos do navbar apareçam corretamente */
.nav-link {
    position: relative;
    color: #d1d5db;
    font-weight: 500;
    transition: color 0.3s;
    padding-bottom: 0.25rem;
    z-index: 1002; /* Garantir que os links estejam clicáveis */
}

.nav-link:hover {
    color: var(--purple-accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--purple-accent);
    transition: width 0.3s ease;
}

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

.section-title {
    position: relative;
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-light);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--purple-main), var(--purple-accent));
    border-radius: 2px;
}

/* Terminal styling - otimizado */
.terminal-window {
    background-color: #1e1e2e;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    transform: perspective(1000px) rotateX(2deg);
    transition: transform 0.5s;
}

.terminal-window:hover {
    transform: perspective(1000px) rotateX(0deg);
}

.terminal-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #2d2d3f;
    border-bottom: 1px solid #3d3d5a;
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-button.red {
    background-color: #ff5f56;
}

.terminal-button.yellow {
    background-color: #ffbd2e;
}

.terminal-button.green {
    background-color: #27c93f;
}

.terminal-title {
    margin-left: 1rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

.terminal-content {
    padding: 1rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.terminal-line {
    display: flex;
    margin-bottom: 0.5rem;
}

.terminal-prompt {
    color: var(--purple-light);
    margin-right: 0.5rem;
}

.terminal-text {
    color: var(--text-light);
}

.terminal-output {
    color: #a3a3c2;
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background-color: var(--purple-accent);
    animation: blink 1.2s steps(1) infinite;
}

/* Otimizando a animação de blink para usar steps em vez de keyframes complexos */
@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    50.1%, 100% {
        opacity: 0;
    }
}

/* Floating animation for coder illustration - otimizada */
.coder-illustration {
    position: relative;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.coder-illustration::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    background: url('https://raw.githubusercontent.com/gist/patevs/b007a0e98fb216438d4cbf559fac4166/raw/88f20c9d749d756be2b8e5ee1c87b8c909c546a4/programming.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: hue-rotate(260deg) brightness(1.2);
    animation: float 4s ease-in-out infinite;
    /* Usando will-change para otimizar a animação */
    will-change: transform;
}

/* Simplificando a animação de float para usar menos keyframes */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Social links - otimizados */
.social-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #2d2d3f;
    color: var(--purple-light);
    font-size: 1.25rem;
    transition: all 0.3s;
}

.social-link:hover {
    background-color: var(--purple-main);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(109, 40, 217, 0.4);
}

/* Form elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-input {
    padding: 0.75rem;
    background-color: #2d2d3f;
    border: 1px solid #3d3d5a;
    border-radius: 0.375rem;
    color: var(--text-light);
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--purple-main);
    box-shadow: 0 0 0 2px rgba(109, 40, 217, 0.2);
}

/* Botões */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(90deg, var(--purple-main), var(--purple-dark));
    color: white;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(109, 40, 217, 0.4);
}

/* Removendo a animação de brilho para melhor performance */
.btn-primary::before {
    display: none;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.875rem;
    }
    
    .terminal-window {
        transform: none;
    }
    
    /* Desabilitar animações em dispositivos móveis para melhor performance */
    .skill-card:hover, 
    .project-card:hover, 
    .btn-primary:hover,
    .social-link:hover {
        transform: none;
        box-shadow: none;
    }
    
    .skill-card::before {
        display: none;
    }
    
    .coder-illustration::before {
        animation: none;
    }
    
    .terminal-cursor {
        animation: blink 1.5s steps(1) infinite;
    }
    
    /* Desativar efeitos de fundo para melhorar performance em dispositivos móveis */
    .bg-highlight::before {
        display: none;
    }
}

/* Estilos para os cards de habilidades - otimizados */
.skill-card {
    background: rgba(45, 27, 105, 0.3);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 0.5rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(109, 40, 217, 0.3);
    border-color: var(--purple-light);
}

/* Simplificando o efeito de borda superior */
.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--purple-main), var(--purple-accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--purple-accent);
    margin-bottom: 1rem;
}

.skill-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.skill-level {
    width: 100%;
    height: 6px;
    background-color: #2d2d3f;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--purple-main), var(--purple-accent));
    border-radius: 3px;
    transition: width 1s ease;
}

/* Estilos para os cards de projetos - otimizados */
.project-card {
    background: rgba(45, 27, 105, 0.3);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -10px rgba(109, 40, 217, 0.4);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid rgba(167, 139, 250, 0.2);
    transition: transform 0.5s;
}

/* Simplificando o efeito de imagem para melhor performance */
.project-card:hover .project-image {
    transform: scale(1.03);
}

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--purple-light);
}

.project-description {
    color: #d1d5db;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

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

.project-tag {
    background-color: rgba(109, 40, 217, 0.2);
    color: var(--purple-light);
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.project-links {
    display: flex;
    justify-content: space-between;
}

.project-link {
    display: inline-flex;
    align-items: center;
    color: var(--purple-light);
    font-weight: 500;
    transition: color 0.3s;
}

.project-link:hover {
    color: var(--purple-accent);
}

.project-link i {
    margin-left: 0.5rem;
}

/* Animações de entrada - otimizada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease-out forwards;
    /* Usar will-change para otimizar a animação */
    will-change: opacity, transform;
}

/* Efeito de destaque de fundo para as seções - otimizado */
.bg-highlight {
    position: relative;
    overflow: hidden;
}

/* Simplificando a animação de fundo para melhor performance */
.bg-highlight::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(109, 40, 217, 0.05) 0%, transparent 70%);
    z-index: -1;
    animation: rotateBg 30s linear infinite;
    /* Usando uma animação mais lenta e com menos transformações */
    will-change: transform;
}

@keyframes rotateBg {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Partículas de fundo */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: var(--z-background);
}

/* Easter Egg (Konami Code) - otimizado */
.konami-active {
    position: relative;
    overflow: hidden;
}

.konami-active::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(109, 40, 217, 0.05) 0%,
        rgba(192, 132, 252, 0.1) 50%,
        rgba(109, 40, 217, 0.05) 100%
    );
    z-index: 1000;
    pointer-events: none;
}

.konami-emoji {
    position: fixed;
    z-index: 1001;
    top: -20px;
    animation: emojiFloat 5s linear forwards;
    text-shadow: 0 0 10px rgba(109, 40, 217, 0.7);
    pointer-events: none;
}

@keyframes emojiFloat {
    0% {
        top: -50px;
        transform: translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: 100vh;
        transform: translateX(20px);
        opacity: 0;
    }
}

/* Removendo efeito Matrix não utilizado */
.matrix-canvas {
    display: none;
}

/* Efeito de destaque 3D para os cards - otimizado */
.skill-card, .project-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

/* Simplificando os efeitos 3D para melhor performance */
.skill-card:hover, .project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -10px rgba(109, 40, 217, 0.4);
}

/* Borda brilhante para destaque - otimizada e simplificada */
.glowing-border {
    position: relative;
}

.glowing-border::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--purple-main), var(--purple-accent));
    border-radius: 0.75rem;
    z-index: -1;
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s;
    /* Não renderizar em dispositivos móveis */
    display: none;
}

/* Só mostrar o efeito em dispositivos desktop */
@media (min-width: 1024px) {
    .glowing-border::after {
        display: block;
    }
    
    .glowing-border:hover::after {
        opacity: 0.5;
    }
}

/* Estilos do cursor personalizado - DESATIVADOS */
.custom-cursor, .cursor-trail, .trail-dot {
    display: none !important;
}

html, body {
    cursor: auto !important;
}

/* Efeito de hover nos links do nav */
.nav-link:hover {
    text-shadow: 0 0 8px rgba(192, 132, 252, 0.6);
}

/* Efeito de carregamento para o site - otimizado */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--z-overlay); /* Usar variável de z-index */
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loading-overlay.loaded {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(167, 139, 250, 0.2);
    border-radius: 50%;
    border-top-color: var(--purple-accent);
    animation: spin 1s linear infinite;
    /* Otimizando com will-change */
    will-change: transform;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Controles flutuantes */
.control-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(45, 27, 105, 0.7);
    backdrop-filter: blur(4px);
    color: var(--purple-light);
    font-size: 1.2rem;
    cursor: pointer;
    border: 1px solid rgba(167, 139, 250, 0.3);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    z-index: var(--z-floating);
}

/* Estilo específico para controles na navbar */
header .control-button {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    background-color: rgba(45, 27, 105, 0.5);
    animation: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.control-button:hover {
    background-color: var(--purple-main);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(109, 40, 217, 0.4);
}

/* Estilos específicos para o tema claro */
html.light .control-button {
    background-color: rgba(243, 244, 246, 0.8);
    color: var(--text-secondary-light);
    border: 1px solid rgba(209, 213, 219, 0.5);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    animation: none;
}

html.light .control-button:hover {
    background-color: white;
    color: var(--purple-main);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(109, 40, 217, 0.2);
}

html.light .control-container-mobile .control-button {
    background-color: rgba(243, 244, 246, 0.9);
    color: var(--text-secondary-light);
    border: 1px solid rgba(209, 213, 219, 0.7);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

html.light header.header-scrolled {
    background-color: rgba(249, 250, 251, 0.95);
}

/* Animação de pulse apenas para os controles móveis */
.control-container-mobile .control-button {
    animation: pulse 2s infinite;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.control-container-mobile {
    transition: transform 0.3s ease, opacity 0.3s ease;
    will-change: transform, opacity;
    z-index: var(--z-floating);
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.25));
}

.controls-hidden {
    transform: translateY(100px);
    opacity: 0;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(167, 139, 250, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(167, 139, 250, 0);
    }
}

/* Notificações Toast */
.toast {
    position: relative;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    background-color: rgba(45, 27, 105, 0.9);
    backdrop-filter: blur(4px);
    color: white;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    animation: slideIn 0.3s forwards, fadeOut 0.5s forwards 3s;
    display: flex;
    align-items: center;
    max-width: 300px;
    z-index: var(--z-toast); /* Usar variável de z-index */
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.toast-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

@keyframes slideIn {
    to {
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

/* Filtros de Projetos */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    background-color: rgba(45, 27, 105, 0.3);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 9999px;
    color: var(--purple-light);
    font-size: 0.875rem;
    transition: all 0.3s;
    cursor: pointer;
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--purple-main);
    color: white;
    border-color: var(--purple-main);
    box-shadow: 0 4px 10px rgba(109, 40, 217, 0.3);
}

/* Projeto filtrado escondido */
.project-card.hidden-project {
    display: none;
}

/* Timeline */
.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: linear-gradient(to bottom, var(--purple-main), var(--purple-accent));
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 100%;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-content {
    position: relative;
    width: calc(50% - 2rem);
    padding: 1.5rem;
    background: rgba(45, 27, 105, 0.3);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.timeline-date {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--purple-main);
    color: white;
    font-size: 0.875rem;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--purple-light);
}

.timeline-description {
    color: #d1d5db;
    font-size: 0.975rem;
}

html.light .timeline-description {
    color: #4b5563;
}

.timeline-item:nth-child(odd) .timeline-content {
    float: right;
    margin-left: auto;
}

.timeline-item:nth-child(even) .timeline-content {
    float: left;
}

.timeline-item::after {
    content: '';
    display: table;
    clear: both;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 1.5rem;
    left: 50%;
    width: 16px;
    height: 16px;
    background-color: var(--purple-accent);
    border: 3px solid var(--purple-main);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    content: '';
    position: absolute;
    top: 1.5rem;
    left: -0.5rem;
    width: 1rem;
    height: 1rem;
    background-color: rgba(45, 27, 105, 0.3);
    border-left: 1px solid rgba(167, 139, 250, 0.2);
    border-bottom: 1px solid rgba(167, 139, 250, 0.2);
    transform: rotate(45deg);
}

.timeline-item:nth-child(even) .timeline-content::before {
    content: '';
    position: absolute;
    top: 1.5rem;
    right: -0.5rem;
    width: 1rem;
    height: 1rem;
    background-color: rgba(45, 27, 105, 0.3);
    border-right: 1px solid rgba(167, 139, 250, 0.2);
    border-top: 1px solid rgba(167, 139, 250, 0.2);
    transform: rotate(45deg);
}

/* Estilização adicional para o modo claro */
html.light .form-input {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

html.light .skill-card,
html.light .project-card,
html.light .timeline-content {
    background: rgba(229, 231, 235, 0.7);
    border-color: rgba(209, 213, 219, 0.4);
}

html.light .skill-level {
    background-color: #d1d5db;
}

html.light .project-tag {
    background-color: rgba(139, 92, 246, 0.15);
}

/* Estilos para efeitos de animação de código */
.code-block {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    background-color: #1e1e2e;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0;
}

html.light .code-block {
    background-color: #f8fafc;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.code-line {
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre;
}

.code-keyword {
    color: #ff79c6;
}

html.light .code-keyword {
    color: #9333ea;
}

.code-function {
    color: #50fa7b;
}

html.light .code-function {
    color: #2563eb;
}

.code-string {
    color: #f1fa8c;
}

html.light .code-string {
    color: #16a34a;
}

.code-number {
    color: #bd93f9;
}

html.light .code-number {
    color: #db2777;
}

.code-builtin {
    color: #8be9fd;
}

html.light .code-builtin {
    color: #0891b2;
}

.code-comment {
    color: #6272a4;
}

html.light .code-comment {
    color: #94a3b8;
}

.typewriter-cursor {
    display: inline-block;
    width: 0.1em;
    height: 1em;
    background-color: currentColor;
    margin-left: 0.1em;
    animation: blink 1s steps(1) infinite;
}

.highlight-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInChar 0.3s forwards;
}

@keyframes fadeInChar {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Melhorias na responsividade para dispositivos móveis */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
    
    .terminal-window {
        transform: none;
    }
    
    /* Desabilitar animações em dispositivos móveis para melhor performance */
    .skill-card:hover, 
    .project-card:hover, 
    .btn-primary:hover,
    .social-link:hover {
        transform: none;
        box-shadow: none;
    }
    
    .skill-card::before {
        display: none;
    }
    
    .coder-illustration::before {
        animation: none;
        width: 180px;
        height: 180px;
    }
    
    .terminal-cursor {
        animation: blink 1.5s steps(1) infinite;
    }
    
    /* Desativar efeitos de fundo para melhorar performance em dispositivos móveis */
    .bg-highlight::before {
        display: none;
    }
    
    /* Timeline ajustada para mobile */
    .timeline-container::before {
        left: 1rem;
    }
    
    .timeline-content {
        width: calc(100% - 3rem);
        float: right;
        margin-left: 3rem;
    }
    
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        float: right;
        margin-left: 3rem;
    }
    
    .timeline-item::before {
        left: 1rem;
    }
    
    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        left: -0.5rem;
        right: auto;
        border-left: 1px solid rgba(167, 139, 250, 0.2);
        border-bottom: 1px solid rgba(167, 139, 250, 0.2);
        border-right: none;
        border-top: none;
        transform: rotate(45deg);
    }
    
    /* Ajustes nos controles flutuantes para mobile */
    .fixed.top-5.right-5 {
        top: 0.75rem;
        right: 0.75rem;
    }
    
    .control-button {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    /* Ajuste no tamanho dos cards de projeto */
    .project-image {
        height: 160px;
    }
    
    .project-content {
        padding: 1rem;
    }
    
    .project-title {
        font-size: 1.125rem;
    }
    
    .project-description {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }
    
    .project-tags {
        margin-bottom: 1rem;
    }
    
    .project-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    
    .project-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Ajustes nos filtros de projetos */
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.4rem 0.875rem;
        font-size: 0.75rem;
    }
    
    /* Toast mais compacto para mobile */
    .toast {
        max-width: 260px;
        padding: 0.75rem 1rem;
    }
    
    /* Menu mobile aprimorado */
    #mobile-menu {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    #mobile-menu a {
        padding: 0.75rem 0;
        font-size: 1.125rem;
        text-align: center;
        display: block;
    }
    
    /* Ajustes nas seções para melhor espaçamento em mobile */
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    /* Melhorar visibilidade do formulário em mobile */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-input {
        padding: 0.6rem;
        font-size: 1rem;
    }
    
    /* Estilos para os controles flutuantes móveis */
    .control-container-mobile .control-button {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}

/* Ajustes para telas muito pequenas */
@media (max-width: 360px) {
    .section-title {
        font-size: 1.5rem;
    }
    
    .terminal-content {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    
    .skill-card {
        padding: 1rem;
    }
    
    .skill-icon {
        font-size: 2rem;
    }
    
    .coder-illustration {
        height: 240px;
    }
    
    .coder-illustration::before {
        width: 150px;
        height: 150px;
    }
    
    /* Controles ainda mais compactos */
    .control-button {
        width: 32px;
        height: 32px;
    }
}

/* Suporte para telas muito grandes */
@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .terminal-window {
        max-width: 900px;
    }
}

/* Ajustes específicos para o modo claro na navbar */
html.light .nav-link {
    color: var(--text-secondary-light);
}

html.light .nav-link:hover, 
html.light .nav-link.text-purple-400 {
    color: var(--purple-main);
}

html.light #mobile-menu {
    background-color: #f9fafb;
    border-color: #e5e7eb;
}

/* Ajustes para os ícones de controle no tema claro */
html.light .control-button {
    background-color: rgba(243, 244, 246, 0.8);
    color: var(--text-secondary-light);
    border: 1px solid rgba(209, 213, 219, 0.5);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

html.light .control-button:hover {
    background-color: white;
    color: var(--purple-main);
}

/* Ajuste para o ícone do menu hamburguer no tema claro */
html.light #menu-toggle {
    color: var(--text-secondary-light);
}

html.light #menu-toggle:hover {
    color: var(--purple-main);
}

/* Melhorar o menu móvel no tema claro */
html.light #mobile-menu .nav-link {
    border-color: #e5e7eb;
    color: var(--text-secondary-light);
}

html.light #mobile-menu .nav-link:hover {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--purple-main);
}

/* Melhorar o logo no tema claro */
html.light .text-white.light\:text-gray-900 {
    color: var(--text-primary-light);
} 