/* ========================================
   CSS VARIABLES - PALETA DE COLORES OSCUROS CON AZUL
   ======================================== */
:root {
    /* Colores Principales */
    --color-bg-primary: #0a0e27;
    --color-bg-secondary: #151b3d;
    --color-bg-tertiary: #1e2749;
    --color-bg-card: #1a2142;

    /* Azules */
    --color-blue-dark: #1e40af;
    --color-blue-primary: #2563eb;
    --color-blue-light: #3b82f6;
    --color-blue-lighter: #60a5fa;
    --color-blue-glow: rgba(37, 99, 235, 0.3);

    /* Acentos */
    --color-accent: #8b5cf6;
    --color-accent-light: #a78bfa;

    /* Textos */
    --color-text-primary: #e5e7eb;
    --color-text-secondary: #9ca3af;
    --color-text-muted: #6b7280;

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    --gradient-glow: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, transparent 70%);

    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.4);

    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Tipografía */
    --font-primary: 'Poppins', sans-serif;
    --font-code: 'Fira Code', monospace;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

ul {
    list-style: none;
}

button {
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.section__header {
    text-align: center;
    margin-bottom: 4rem;
}

.section__subtitle {
    display: inline-block;
    color: var(--color-blue-lighter);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    padding: 0.5rem 1.5rem;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 50px;
    border: 1px solid rgba(37, 99, 235, 0.3);
}

.section__title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-text-primary);
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--color-blue-lighter);
    border: 2px solid var(--color-blue-primary);
}

.btn-secondary:hover {
    background: var(--color-blue-primary);
    color: white;
    transform: translateY(-3px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ========================================
   ANIMATED BACKGROUND
   ======================================== */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--color-bg-primary);
    overflow: hidden;
    will-change: transform;
}

.particles-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: var(--gradient-glow);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
    will-change: transform, opacity;
}

.particles-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
    will-change: transform, opacity;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-normal);
}

.header.scrolled {
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav__logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-code);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.code-bracket {
    color: var(--color-blue-lighter);
    font-size: 1.8rem;
}

.logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav__list {
    display: flex;
    gap: 2.5rem;
}

.nav__link {
    position: relative;
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: var(--transition-normal);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-normal);
}

.nav__link:hover,
.nav__link.active {
    color: var(--color-blue-lighter);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

.nav__toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--color-blue-lighter);
    cursor: pointer;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
}

.hero__container {
    width: 100%;
}

.hero__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero__greeting {
    display: block;
    color: var(--color-blue-lighter);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.hero__subtitle {
    font-size: 1.8rem;
    color: var(--color-blue-lighter);
    margin-bottom: 1.5rem;
    min-height: 60px;
}

.typing-text {
    font-family: var(--font-code);
}

.cursor {
    color: var(--color-blue-lighter);
    animation: blink 1s infinite;
}

.hero__description {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.hero__buttons {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.hero__socials {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-card);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 12px;
    color: var(--color-blue-lighter);
    font-size: 1.2rem;
    transition: var(--transition-normal);
}

.social-link:hover {
    background: var(--color-blue-primary);
    border-color: var(--color-blue-primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* Hero Image */
.hero__image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container {
    position: relative;
    width: 400px;
    height: 400px;
}

.image-blob {
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morph 8s ease-in-out infinite, rotate 20s linear infinite;
    opacity: 0.3;
    filter: blur(20px);
}

.profile-img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    border: 4px solid var(--color-blue-primary);
    box-shadow: var(--shadow-lg);
    animation: morph 8s ease-in-out infinite;
}

.floating-card {
    position: absolute;
    width: 70px;
    height: 70px;
    background: var(--color-bg-card);
    border: 2px solid var(--color-blue-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--color-blue-lighter);
    box-shadow: var(--shadow-glow);
    animation: float-card 3s ease-in-out infinite;
}

.floating-card svg {
    width: 35px;
    height: 35px;
}

.card-1 {
    top: 10%;
    right: -10%;
    animation-delay: 0s;
}

.card-2 {
    bottom: 20%;
    right: -15%;
    animation-delay: 1s;
}

.card-3 {
    bottom: 10%;
    left: -10%;
    animation-delay: 2s;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--color-blue-primary);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--color-blue-lighter);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 2s ease-in-out infinite;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about__cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.info-card {
    background: var(--color-bg-card);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition-normal);
    min-height: 100%;
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
    border-color: var(--color-blue-primary);
}

.info-card__icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 1rem;
}

.info-card__content {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.info-card__content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
    font-weight: 700;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.info-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--color-text-secondary);
}

.info-list i {
    color: var(--color-blue-lighter);
    font-size: 1rem;
}

.education-item,
.experience-item {
    color: var(--color-text-secondary);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.education-item h4,
.experience-item h4 {
    color: var(--color-blue-lighter);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.institution,
.company {
    color: var(--color-text-primary);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.period {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 8px;
}

.description {
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Certificate Button */
.certificate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    margin-top: auto;
    background: var(--color-bg-tertiary);
    border: 1.5px solid rgba(37, 99, 235, 0.3);
    border-radius: 12px;
    color: var(--color-blue-lighter);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    align-self: center;
}

.certificate-btn:hover {
    background: var(--color-blue-primary);
    border-color: var(--color-blue-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.certificate-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.certificate-btn:hover i {
    transform: scale(1.1);
}

/* ========================================
   PROJECTS SECTION
   ======================================== */
.projects__filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    background: var(--color-bg-card) !important;
    border: 1px solid rgba(37, 99, 235, 0.3) !important;
    border-radius: 50px;
    color: var(--color-text-secondary) !important;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-normal);
    box-shadow: none !important;
}

.filter-btn:hover {
    background: var(--color-blue-primary);
    border-color: var(--color-blue-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.filter-btn.active {
    background: var(--color-blue-primary) !important;
    border-color: var(--color-blue-primary) !important;
    color: white !important;
    box-shadow: var(--shadow-glow) !important;
}

.projects__wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.projects__container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    flex: 1;
}

@media screen and (max-width: 1024px) {
    .projects__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .projects__container {
        grid-template-columns: 1fr;
    }
}

.project-card {
    background: var(--color-bg-card);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-normal);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    display: flex;
    flex-direction: column;
    height: 420px;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
    border-color: var(--color-blue-primary);
}

.project-card.hidden {
    display: none !important;
}

.project__image {
    position: relative;
    height: 140px;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.project__icon {
    font-size: 3rem;
    color: white;
    opacity: 0.3;
}

.project__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: var(--transition-normal);
}

.project-card:hover .project__overlay {
    opacity: 1;
}

/* En touch devices, botones siempre visibles */
@media (hover: none) and (pointer: coarse) {
    .project__overlay {
        opacity: 1 !important;
        background: transparent !important;
        padding: 0.8rem;
        justify-content: flex-end;
        align-items: flex-start;
        pointer-events: none;
        gap: 0.5rem;
    }

    .project__link {
        background: rgba(10, 14, 39, 0.85);
        backdrop-filter: blur(8px);
        border: 1.5px solid var(--color-blue-primary);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        pointer-events: auto;
        order: 2;
        /* Botón info siempre al final (derecha) */
    }

    /* Enlace web va a la izquierda */
    .project__link[href] {
        order: 1;
    }

    /* Desactivar TODOS los efectos en botones táctiles */
    .project__link:hover,
    .project__link:active,
    .project__link:focus,
    .project__link:visited {
        transform: none !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
        background: rgba(10, 14, 39, 0.85) !important;
        outline: none;
    }

    /* Muy sutil feedback solo al presionar */
    .project__link:active {
        transform: scale(0.98) !important;
        opacity: 0.9;
    }

    /* FORZAR que el overlay NO cambie en ningún estado */
    .project-card:hover .project__overlay,
    .project-card:active .project__overlay,
    .project-card:focus .project__overlay {
        opacity: 1 !important;
        background: transparent !important;
    }

    /* Eliminar transformación de tarjeta completamente */
    .project-card:hover,
    .project-card:active,
    .project-card:focus {
        transform: none !important;
        box-shadow: var(--shadow-md);
    }

    /* Eliminar efectos de tap en toda la tarjeta y elementos */
    .project-card,
    .project-card *,
    .project__image,
    .project__content {
        -webkit-tap-highlight-color: transparent !important;
    }
}

.project__link {
    width: 50px;
    height: 50px;
    background: var(--color-blue-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition-normal);
}

.project__link:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

.project__content {
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.project__categories {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}

.project__category {
    display: inline-block;
    padding: 0.25rem 0.8rem;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid var(--color-blue-primary);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--color-blue-lighter);
}

.project__title {
    font-size: 1.2rem;
    color: var(--color-text-primary);
    margin-bottom: 0.6rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.project__description {
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 0.8rem;
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    flex: 1;
}

.project__tech {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    margin-top: auto;
    overflow: hidden;
    position: relative;
    padding-bottom: 0.3rem;
}

.project__tech::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, transparent, var(--color-bg-card));
    pointer-events: none;
    opacity: 1;
    transition: var(--transition-normal);
}

.project-card:hover .project__tech::after {
    opacity: 0;
}

.project__tech-scroll {
    display: flex;
    gap: 0.4rem;
    animation: none;
    white-space: nowrap;
}

.project-card:hover .project__tech-scroll {
    animation: scroll-tech 8s linear infinite;
}

@keyframes scroll-tech {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 0.2rem));
    }
}

.tech-tag {
    padding: 0.25rem 0.6rem;
    background: var(--color-bg-tertiary);
    border-radius: 5px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}

.nav-arrow {
    width: 55px;
    height: 55px;
    min-width: 55px;
    background: var(--color-bg-card);
    border: 2px solid var(--color-blue-primary);
    border-radius: 50%;
    color: var(--color-blue-lighter);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
    cursor: pointer;
    z-index: 10;
    flex-shrink: 0;
}

.nav-arrow:hover {
    background: var(--color-blue-primary);
    color: white;
    transform: scale(1.15);
    box-shadow: var(--shadow-glow);
}

.nav-arrow:active {
    transform: scale(1.05);
}

.projects__dots {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1rem;
}

.dot {
    width: 12px;
    height: 12px;
    background: var(--color-bg-tertiary);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-normal);
}

.dot.active {
    background: var(--color-blue-primary);
    width: 30px;
    border-radius: 6px;
}

/* ========================================
   SKILLS SECTION
   ======================================== */
.skills__categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.skill-category {
    background: var(--color-bg-card);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 20px;
    padding: 1.5rem;
    transition: var(--transition-normal);
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
    border-color: var(--color-blue-primary);
}

.category__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.category__header i {
    font-size: 2rem;
    color: var(--color-blue-lighter);
}

.category__header h3 {
    font-size: 1.1rem;
    color: var(--color-text-primary);
    font-weight: 600;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    flex: 1;
    align-content: start;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.8rem 0.5rem;
    background: var(--color-bg-tertiary);
    border-radius: 10px;
    transition: var(--transition-normal);
    min-height: 60px;
    justify-content: center;
}

.skill-item:hover {
    background: var(--color-bg-secondary);
    transform: translateY(-5px);
}

.skill-item i,
.skill-item img,
.skill-item svg {
    font-size: 2rem;
    color: var(--color-blue-lighter);
    width: 32px;
    height: 32px;
}

.skill-item svg {
    flex-shrink: 0;
}

.skill-item span {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    text-align: center;
    line-height: 1.2;
    font-weight: 500;
}

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

.stat-item {
    text-align: center;
    padding: 2rem;
    background: var(--color-bg-card);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 20px;
    transition: var(--transition-normal);
}

.stat-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
    border-color: var(--color-blue-primary);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--color-text-secondary);
    font-size: 1rem;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact__content {
    max-width: 1200px;
    margin: 0 auto;
}

.contact__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto 3rem;
}

/* Modern Contact Cards */
.contact__card-modern {
    position: relative;
    background: var(--color-bg-card);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact__card-modern:hover {
    transform: translateY(-8px);
    border-color: var(--color-blue-primary);
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.2),
        0 0 40px rgba(37, 99, 235, 0.1);
}

/* Animated Background */
.contact__card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.contact__card-modern:hover .contact__card-bg {
    opacity: 1;
}

.contact__card-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Icon Wrapper with Pulse Effect */
.contact__icon-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.contact__icon-circle {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    position: relative;
    z-index: 2;
    transition: all 0.4s ease;
}

.contact__card-modern:hover .contact__icon-circle {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
}


/* Card Content */
.contact__title {
    color: var(--color-text-primary);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.contact__label {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.contact__value {
    color: var(--color-blue-lighter);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    word-break: break-word;
    transition: all 0.3s ease;
    display: inline-block;
}

.contact__value:hover {
    color: var(--color-blue-primary);
    transform: scale(1.05);
}

/* Copy Button */
.contact__copy-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--color-bg-tertiary);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 12px;
    color: var(--color-text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact__copy-btn:hover {
    background: var(--color-blue-primary);
    border-color: var(--color-blue-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.contact__copy-btn.copied {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.contact__copy-btn.copied i {
    animation: checkmark 0.4s ease;
}

@keyframes checkmark {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* Contact Actions (for phone card) */
.contact__actions {
    display: flex;
    gap: 0.8rem;
    width: 100%;
}

.contact__actions .contact__copy-btn {
    flex: 1;
}

.contact__whatsapp-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: #25D366;
    border: 1px solid #25D366;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact__whatsapp-btn:hover {
    background: #1ebe57;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

/* Copy Notification */
.copy-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-blue-primary);
    border-radius: 12px;
    color: var(--color-text-primary);
    font-weight: 500;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(37, 99, 235, 0.2);
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.copy-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.copy-notification i {
    font-size: 1.3rem;
    color: var(--color-blue-lighter);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid rgba(37, 99, 235, 0.2);
    padding: 2.5rem 0 1.5rem;
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

.footer__left {
    flex: 1;
    max-width: 500px;
}

.footer__right {
    display: flex;
    align-items: center;
}

.footer__logo {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: var(--font-code);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.8rem;
}

.footer__text {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.footer__social {
    display: flex;
    gap: 0.8rem;
}

.footer__social-link {
    width: 42px;
    height: 42px;
    background: var(--color-bg-card);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-blue-lighter);
    font-size: 1rem;
    transition: var(--transition-normal);
}

.footer__social-link:hover {
    background: var(--color-blue-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.footer__copy {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-align: center;
    margin: 0;
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 55px;
    height: 55px;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: white;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes float {

    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translate3d(30px, -30px, 0) scale(1.05);
        opacity: 0.6;
    }
}

@keyframes morph {

    0%,
    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes float-card {

    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(0, -20px, 0);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes scroll-wheel {
    0% {
        opacity: 1;
        top: 8px;
    }

    100% {
        opacity: 0;
        top: 24px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Animate elements on scroll */
[data-animate] {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

[data-animate].animate {
    opacity: 1;
    transform: translateY(0);
}

[data-animate="fade-left"] {
    transform: translateX(-50px);
}

[data-animate="fade-left"].animate {
    transform: translateX(0);
}

[data-animate="fade-right"] {
    transform: translateX(50px);
}

[data-animate="fade-right"].animate {
    transform: translateX(0);
}

/* ========================================
   PROJECT MODAL
   ======================================== */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.project-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.project-modal__container {
    position: relative;
    background: var(--color-bg-card);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
    z-index: 10001;
}

.project-modal.active .project-modal__container {
    transform: scale(1) translateY(0);
}

.project-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid var(--color-blue-primary);
    border-radius: 50%;
    color: var(--color-blue-lighter);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
    z-index: 10002;
}

.project-modal__close:hover {
    background: var(--color-blue-primary);
    color: white;
    transform: rotate(90deg);
}

.project-modal__content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.project-modal__icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-glow);
}

.project-modal__title {
    font-size: 2rem;
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.project-modal__category {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.modal-category-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid var(--color-blue-primary);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--color-blue-lighter);
    font-weight: 600;
}

.project-modal__description {
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    text-align: left;
}

.project-modal__technologies {
    width: 100%;
    margin-bottom: 2rem;
}

.project-modal__technologies h4 {
    color: var(--color-text-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-modal__technologies h4 i {
    color: var(--color-blue-lighter);
}

.project-modal__tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.project-modal__tech-item {
    padding: 0.5rem 1rem;
    background: var(--color-bg-tertiary);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: var(--transition-normal);
}

.project-modal__tech-item:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--color-blue-primary);
    color: var(--color-blue-lighter);
    transform: translateY(-2px);
}

.project-modal__link {
    width: 100%;
}

.project-modal__link .btn {
    width: 100%;
    justify-content: center;
    font-size: 1rem;
}

/* Scrollbar personalizada para el modal */
.project-modal__container::-webkit-scrollbar {
    width: 8px;
}

.project-modal__container::-webkit-scrollbar-track {
    background: var(--color-bg-tertiary);
    border-radius: 10px;
}

.project-modal__container::-webkit-scrollbar-thumb {
    background: var(--color-blue-primary);
    border-radius: 10px;
}

.project-modal__container::-webkit-scrollbar-thumb:hover {
    background: var(--color-blue-lighter);
}