:root {
    --primary: #1a5cff;
    --primary-dark: #0a3db8;
    --primary-light: #4a80ff;
    --secondary: #4a73ee;
    --accent: #00c2ba;
    --bg-light: #ffffff;
    --bg-dark: #05070f;
    --text-light: #0a0e1a;
    --text-dark: #f0f4ff;
    --text-muted: #6b7280;
    --glass: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.06);
    --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --easing: cubic-bezier(0.4, 0, 0.2, 1);
}

html.light {
    --bg-dark: #ffffff;
    --text-dark: #0a0e1a;
    --text-muted: #6c757d;
    --glass: rgba(0, 0, 0, 0.02);
    --glass-border: rgba(0, 0, 0, 0.06);
    --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    transition: background-color 0.4s var(--easing),
        color 0.3s var(--easing),
        border-color 0.3s var(--easing),
        transform 0.4s var(--easing),
        opacity 0.3s var(--easing);
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* Tipografía refinada */
h1,
h2,
h3,
h4,
h5,
h6,
.font-display {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Custom Scrollbar - Ejecutivo */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Glassmorphism Refinado */
.glass {
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Text Gradient Mejorado */
.text-gradient {
    background: linear-gradient(135deg, var(--text-dark) 0%, var(--primary) 70%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientShine 8s ease infinite;
}

@keyframes gradientShine {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Hero Animation - Sutil y elegante */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.hero-blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(26, 92, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(100px);
    animation: slowMove 25s infinite alternate;
}

@keyframes slowMove {
    0% {
        transform: translate(-15%, -15%) scale(1);
    }

    100% {
        transform: translate(15%, 15%) scale(1.2);
    }
}

/* Portfolio Grid - Limpio y profesional */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    grid-auto-rows: 8px;
    gap: 28px;
}

.project-card-small {
    grid-row-end: span 28;
}

.project-card-medium {
    grid-row-end: span 42;
}

.project-card-large {
    grid-row-end: span 52;
}

/* Transiciones corporativas */
.hover-scale {
    transition: all 0.4s var(--easing);
}

.hover-scale:hover {
    transform: translateY(-8px);
}

/* Custom Button - Refinado */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--easing);
    box-shadow: 0 4px 15px rgba(26, 92, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 92, 255, 0.3);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s var(--easing);
}

.btn-primary:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Estilos de cards ejecutivos */
.portfolio-card {
    transition: all 0.4s var(--easing);
    box-shadow: var(--card-shadow);
}

.portfolio-card:hover {
    box-shadow: 0 35px 60px -15px rgba(26, 92, 255, 0.15);
}

/* Scrollbar oculto elegante */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.overflow-x-auto {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 1024px) {
    .overflow-x-auto {
        overflow-x: visible;
    }
}

/* Line clamp para textos */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Filtros activos */
.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(26, 92, 255, 0.3);
}

/* Badge premium */
.badge-premium {
    background: linear-gradient(135deg, rgba(26, 92, 255, 0.1), rgba(0, 194, 186, 0.05));
    border: 1px solid rgba(26, 92, 255, 0.2);
    backdrop-filter: blur(8px);
}

/* Stats elegantes */
.stat-number {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-dark), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Cards de servicio mejoradas */
.service-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    transition: all 0.4s var(--easing);
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px -20px rgba(26, 92, 255, 0.2);
}

/* Inputs corporativos */
input,
select,
textarea {
    transition: all 0.3s var(--easing);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 92, 255, 0.1);
    outline: none;
}

/* Enlaces de navegación */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s var(--easing);
}

.nav-link:hover::after {
    width: 100%;
}

/* Botón de back to top */
#back-to-top {
    transition: all 0.4s var(--easing);
    box-shadow: 0 4px 15px rgba(26, 92, 255, 0.3);
}

#back-to-top:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(26, 92, 255, 0.4);
}

/* Utilidades adicionales ejecutivas */
.text-xxs {
    font-size: 0.625rem;
    line-height: 1rem;
}

.tracking-tighter {
    letter-spacing: -0.03em;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

/* Animación de fade elegante */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s var(--easing) forwards;
}

/* Divider elegante */
.divider-elegant {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
    margin: 1rem 0;
}