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

body {
    font-family: 'Inter', sans-serif;
    background: #0b0e1e; /* Azul muy oscuro, pero menos negro */
    image-rendering: crisp-edges; /* pixel art feeling */
}
.font-pixel {
    font-family: 'Press Start 2P', monospace;
}
/* Efecto de bordes pixelados (opcional) */
.pixel-border {
    box-shadow: 4px 4px 0px #2a3a5c, 8px 8px 0px rgba(0,0,0,0.2);
    transition: all 0.15s ease;
}
.pixel-border:hover {
    box-shadow: 2px 2px 0px #4a6a9c, 4px 4px 0px rgba(0,0,0,0.2);
    transform: translate(2px, 2px);
}
/* Efecto Flip para el portafolio (Metroidvania style) */
.flip-card {
    background-color: transparent;
    width: 100%;
    height: 260px;
    perspective: 1200px;
}
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 1.5rem;
    border: 2px solid #4a6a9c;
    box-shadow: 6px 6px 0px #1a1f33;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.flip-card-front {
    background: linear-gradient(145deg, #141a2e, #1e2746);
}
.flip-card-back {
    background: #1b2442;
    color: #e2e8ff;
    transform: rotateY(180deg);
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    border-color: #7aa2f7;
}
/* Scroll suave */
html {
    scroll-behavior: smooth;
}
/* Animaciones de entrada suaves */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
}
.animate-float {
    animation: float 5s ease-in-out infinite;
}
/* Tabs personalizados */
.tab-btn.active {
    background-color: #2a3f6e !important;
    color: #ffd966 !important;
    border-bottom: 4px solid #ffb347;
}


.skill-tag-pixel {
    background: #1a2542;
    border: 2px solid #4a6a9c;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #c0e0ff;
    transition: all 0.2s ease;
    box-shadow: 3px 3px 0px #0a0e1a;
    display: inline-flex;
    align-items: center;
}

.skill-tag-pixel:hover {
    background: #2a3f6e;
    border-color: #ffb347;
    color: #ffddaa;
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px #0a0e1a;
}

/* Animación sutil para las barras de progreso */
@keyframes fillBar {
    from { width: 0%; }
    to { width: var(--target-width); }
}

.skill-bar {
    animation: fillBar 1.5s ease-out forwards;
}

/* Hover effect en cards de skills */
#habilidades .bg-\[\#111b2c\]\/90:hover {
    box-shadow: 0 0 30px rgba(122, 162, 247, 0.3);
}

#habilidades .h-full {
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #habilidades .font-pixel {
        font-size: 1.5rem;
    }
    .skill-tag-pixel {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 768px) {
    .mobile-link {
        transform: translateX(0);
        animation: slideIn 0.3s ease-out forwards;
        opacity: 0;
    }
    
    .mobile-link:nth-child(1) { animation-delay: 0.05s; }
    .mobile-link:nth-child(2) { animation-delay: 0.1s; }
    .mobile-link:nth-child(3) { animation-delay: 0.15s; }
    .mobile-link:nth-child(4) { animation-delay: 0.2s; }
    .mobile-link:nth-child(5) { animation-delay: 0.25s; }
    .mobile-link:nth-child(6) { animation-delay: 0.3s; }
    
    @keyframes slideIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Fondo más oscuro cuando el menú está abierto */
    #mobileMenu:not(.hidden) {
        animation: fadeIn 0.3s ease-out;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}