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

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --text-dark: #374151;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --gradient: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    --shadow: 0 10px 25px rgba(0,0,0,0.1);
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --footer-bg: #1f2937;
    --hero-overlay: rgba(0, 0, 0, 0);
    --glass-bg: linear-gradient(160deg, rgba(255,255,255,0.70) 0%, rgba(255,255,255,0.45) 50%, rgba(255,255,255,0.55) 100%);
    --glass-bg-hover: linear-gradient(160deg, rgba(255,255,255,0.78) 0%, rgba(255,255,255,0.52) 50%, rgba(255,255,255,0.60) 100%);
    --glass-border: rgba(255,255,255,0.40);
    --glass-border-hover: rgba(255,255,255,0.55);
    --glass-shadow-inset: rgba(255,255,255,0.45);
    --glass-nav-bg: linear-gradient(180deg, rgba(248,250,252,0.07) 0%, rgba(248,250,252,0.03) 100%);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-color: #3b82f6;
    --secondary-color: #60a5fa;
    --accent-color: #93c5fd;
    --dark-color: #e5e7eb;
    --light-color: #0f172a;
    --text-dark: #e5e7eb;
    --text-light: #94a3b8;
    --border-color: #334155;
    --gradient: linear-gradient(135deg, #1e40af 0%, #0369a1 100%);
    --shadow: 0 10px 25px rgba(0,0,0,0.5);
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --footer-bg: #020617;
    --hero-overlay: rgba(0, 0, 0, 0.3);
    --glass-bg: linear-gradient(160deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.03) 50%, rgba(255,255,255,0.06) 100%);
    --glass-bg-hover: linear-gradient(160deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.09) 100%);
    --glass-border: rgba(255,255,255,0.12);
    --glass-border-hover: rgba(255,255,255,0.20);
    --glass-shadow-inset: rgba(255,255,255,0.15);
    --glass-nav-bg: linear-gradient(180deg, rgba(15,23,42,0.07) 0%, rgba(15,23,42,0.03) 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: white;
    padding: 8px;
    z-index: 100;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* Header Hero Section */
.hero {
    background: var(--gradient);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><polygon points="0,100 0,0 1000,0 1000,80"/></svg>');
    background-size: cover;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--hero-overlay);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid rgba(255,255,255,0.2);
    margin: 0 auto 30px;
    display: block;
    object-fit: cover;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    background: #ddd;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero .subtitle {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.contact-item a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s;
}

.contact-item a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
}

.social-links a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s;
    text-decoration: none;
}

.social-links a:hover {
    background: white;
    color: var(--primary-color);
    transform: scale(1.1);
}

.btn-download {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.3);
    cursor: pointer;
}

.btn-download:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.nav-tabs {
    background: var(--glass-nav-bg);
    -webkit-backdrop-filter: blur(8px) saturate(120%) brightness(1.02);
    backdrop-filter: blur(8px) saturate(120%) brightness(1.02);
    border-bottom: 1px solid var(--glass-border);
    box-shadow:
        inset 0 1px 0 0 var(--glass-shadow-inset),
        0 4px 20px -4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-top: -50px;
    border-radius: 15px 15px 0 0;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.nav-list {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

.nav-item {
    flex: 1;
    min-width: 150px;
}

.nav-link {
    display: block;
    padding: 20px 15px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.nav-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

/* Content Sections */
.content {
    background: transparent;
    margin-bottom: 0;
    min-height: 600px;
    transition: background-color 0.3s ease;
    overflow: hidden;
}

.section {
    padding: 40px 60px;
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Sección especial para el diagrama */
.section.diagram-section {
    padding: 0;
    height: 700px;
    position: relative;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.section.diagram-section.active {
    display: block;
}

/* Estilos del diagrama de habilidades */
.skills-network {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.network-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.network {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1000px;
    max-height: 600px;
}

.node {
    position: absolute;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    user-select: none;
    z-index: 10;
    color: white;
    font-size: 12px;
    min-width: 44px;
    min-height: 44px;
    will-change: transform;
}

.node:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    z-index: 20;
}

.node.active {
    transform: scale(1.15);
    box-shadow: 0 10px 35px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.8);
    z-index: 30;
}

/* Categorías principales */
.frontend { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.backend { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.database { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.automation { background: linear-gradient(135deg, #2563eb, #1e40af); }
.tools { background: linear-gradient(135deg, #1d4ed8, #1e3a8a); }
.methodologies { background: linear-gradient(135deg, #0284c7, #075985); }

.center-node {
    font-size: 14px;
    padding: 12px 20px;
    font-weight: 700;
}

.tech-node {
    font-size: 10px;
    padding: 6px 12px;
}

.connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.2), rgba(255,255,255,0.5), rgba(255,255,255,0.2));
    transform-origin: left center;
    z-index: 1;
    transition: all 0.3s ease;
}

.connection.active {
    background: linear-gradient(90deg, rgba(255,255,255,0.6), rgba(255,255,255,1), rgba(255,255,255,0.6));
    height: 2px;
    box-shadow: 0 0 8px rgba(255,255,255,0.5);
}

.diagram-legend {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 10px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 12px;
}

.diagram-title {
    position: absolute;
    top: 20px;
    right: 20px;
    text-align: right;
    color: white;
}

.diagram-title h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.diagram-title p {
    font-size: 12px;
    opacity: 0.8;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 11px;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin-right: 8px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section h2 {
    color: var(--dark-color);
    font-size: 2rem;
    margin-bottom: 30px;
    position: relative;
    padding-left: 20px;
}

.section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 30px;
    background: var(--gradient);
    border-radius: 2px;
}

/* Cards */
.card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(12px) saturate(200%) brightness(1.1);
    backdrop-filter: blur(12px) saturate(200%) brightness(1.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid var(--glass-border);
    box-shadow:
        inset 0 1px 0 0 var(--glass-shadow-inset),
        inset 0 -1px 0 0 rgba(255,255,255,0.04),
        0 4px 20px -4px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

.job-card {
    position: relative;
    padding-left: 40px;
}

.job-card::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 25px;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
}

.job-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.job-meta {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 15px;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.skill-category h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: var(--gradient);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Lists */
.styled-list {
    list-style: none;
    padding: 0;
}

.styled-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding-left: 25px;
}

.styled-list li:last-child {
    border-bottom: none;
}

.styled-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Footer */
footer {
    background: var(--footer-bg);
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 0;
    transition: background-color 0.3s ease;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.whatsapp-float i {
    margin: 0;
    line-height: 60px;
}

@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Dark Mode Toggle Button */
.theme-toggle {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 100px;
    right: 30px;
    background: var(--card-bg);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    text-align: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.theme-toggle i {
    margin: 0;
}

/* Scroll to Top Button - Oculto en desktop, visible solo en móvil */
.scroll-top-mobile {
    display: none;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    background: none;
    border: none;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Carousel Navigation */
.mobile-nav-dots {
    display: none;
}

.carousel-indicator {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .contact-info {
        flex-direction: column;
        gap: 10px;
        font-size: 0.9rem;
    }

    .profile-image {
        width: 120px;
        height: 120px;
    }

    /* WhatsApp button ajustado para móvil */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
        font-size: 24px;
    }

    /* Theme toggle ajustado para móvil */
    .theme-toggle {
        width: 50px;
        height: 50px;
        bottom: 75px;
        right: 15px;
        font-size: 20px;
    }

    /* Scroll to Top Button - Solo visible en móvil */
    .scroll-top-mobile {
        position: fixed;
        width: 50px;
        height: 50px;
        bottom: 135px;
        right: 15px;
        background: var(--gradient);
        color: white;
        border: none;
        border-radius: 50%;
        text-align: center;
        font-size: 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        cursor: pointer;
    }

    .scroll-top-mobile:hover,
    .scroll-top-mobile:active {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }

    /* === MOBILE CAROUSEL NAVIGATION === */

    /* Hide default nav, show carousel nav */
    .nav-tabs {
        margin-top: -30px;
        border-radius: 15px 15px 0 0;
        position: sticky;
        top: 0;
        z-index: 100;
        padding: 0;
        overflow: visible;
    }

    .nav-list {
        display: none;
    }

    .hamburger {
        display: none;
    }

    /* Mobile navigation dots */
    .mobile-nav-dots {
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        -ms-flex-pack: center;
        justify-content: center;
        -webkit-box-align: center;
        -webkit-align-items: center;
        -ms-flex-align: center;
        align-items: center;
        gap: 8px;
        padding: 15px 10px;
        background: var(--card-bg);
        border-radius: 15px 15px 0 0;
        -webkit-flex-wrap: wrap;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    }

    .nav-dot {
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -webkit-align-items: center;
        -ms-flex-align: center;
        align-items: center;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        -ms-flex-pack: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(37, 99, 235, 0.1);
        color: var(--text-light);
        font-size: 0.9rem;
        -webkit-transition: all 0.3s ease;
        transition: all 0.3s ease;
        cursor: pointer;
        border: 2px solid transparent;
    }

    .nav-dot.active {
        background: var(--primary-color);
        color: white;
        transform: scale(1.1);
        box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
    }

    .nav-dot:not(.active):hover {
        background: rgba(37, 99, 235, 0.2);
        color: var(--primary-color);
    }

    /* Current section indicator */
    .carousel-indicator {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 10px 15px;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.05));
        font-weight: 600;
        color: var(--primary-color);
        font-size: 0.95rem;
        border-bottom: 1px solid var(--border-color);
    }

    .carousel-indicator i {
        font-size: 1rem;
    }

    /* Carousel container */
    .content {
        overflow-x: scroll;
        overflow-y: hidden;
        -webkit-scroll-snap-type: x mandatory;
        -ms-scroll-snap-type: x mandatory;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
        -webkit-scroll-behavior: smooth;
        scroll-behavior: smooth;
        min-height: auto;
        height: calc(100vh - 200px);
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .content::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    /* Each section as a carousel slide */
    .section {
        -webkit-box-flex: 0;
        -webkit-flex: 0 0 100%;
        -ms-flex: 0 0 100%;
        flex: 0 0 100%;
        width: 100%;
        min-width: 100%;
        -webkit-scroll-snap-align: start;
        -ms-scroll-snap-align: start;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        display: block !important;
        padding: 20px 15px;
        overflow-y: scroll;
        overflow-x: hidden;
        height: 100%;
        max-height: none;
        -webkit-animation: none !important;
        animation: none !important;
        -webkit-overflow-scrolling: touch;
    }

    .section.diagram-section {
        padding: 0;
        height: 100%;
        overflow: hidden;
    }

    /* Swipe hint animation */
    .swipe-hint {
        position: fixed;
        bottom: 100px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 10px 20px;
        border-radius: 20px;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 8px;
        z-index: 1000;
        animation: swipeHintFade 3s ease forwards;
        pointer-events: none;
    }

    .swipe-hint i {
        animation: swipeArrow 1s ease infinite;
    }

    @keyframes swipeHintFade {
        0%, 70% { opacity: 1; }
        100% { opacity: 0; visibility: hidden; }
    }

    @keyframes swipeArrow {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(5px); }
    }

    /* Navigation arrows */
    .carousel-arrows {
        display: flex;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        gap: 15px;
        z-index: 100;
    }

    .carousel-arrow {
        width: 45px;
        height: 45px;
        border-radius: 50%;
        background: var(--primary-color);
        color: white;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
        transition: all 0.2s ease;
    }

    .carousel-arrow:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
    }

    .carousel-arrow:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        transform: none;
    }

    .carousel-arrow.prev {
        background: var(--card-bg);
        color: var(--primary-color);
        border: 2px solid var(--primary-color);
    }

    .section h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    /* Cards en móvil */
    .card {
        padding: 20px 15px;
        margin-bottom: 15px;
    }

    .job-card {
        padding-left: 30px;
    }

    .job-card h3 {
        font-size: 1.1rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .skill-tag {
        font-size: 0.85rem;
        padding: 5px 10px;
    }

    /* Diagrama de skills en móvil */
    .node {
        font-size: 9px;
        padding: 6px 10px;
        min-width: 40px;
        min-height: 40px;
    }

    .center-node {
        font-size: 10px;
        padding: 8px 12px;
    }

    .tech-node {
        font-size: 8px;
        padding: 5px 8px;
    }

    .diagram-legend {
        display: none;
    }

    .diagram-title {
        top: 10px;
        right: 10px;
    }

    .diagram-title h3 {
        font-size: 14px;
    }

    .diagram-title p {
        font-size: 10px;
    }

    /* Footer en móvil */
    footer {
        padding: 20px 15px;
        font-size: 0.85rem;
    }

    /* Listas */
    .styled-list li {
        padding: 8px 0 8px 20px;
        font-size: 0.95rem;
    }
}

/* Pantallas muy pequeñas (teléfonos) */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .hero .subtitle {
        font-size: 0.9rem;
    }

    .contact-item {
        font-size: 0.85rem;
    }

    .social-links a {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .btn-download {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .nav-tabs::before {
        font-size: 1rem;
    }

    .section h2 {
        font-size: 1.3rem;
        padding-left: 15px;
    }

    .section h2::before {
        width: 3px;
        height: 25px;
    }

    .job-card h3 {
        font-size: 1rem;
    }

    .job-meta {
        font-size: 0.85rem;
    }

    .card p, .card li {
        font-size: 0.9rem;
    }

    /* Diagrama aún más compacto */
    .section.diagram-section {
        height: 350px;
    }

    .network {
        width: 95%;
        height: 95%;
    }

    .node {
        font-size: 7px;
        padding: 4px 6px;
        min-width: 35px;
        min-height: 35px;
    }

    .center-node {
        font-size: 8px;
        padding: 6px 8px;
    }

    .tech-node {
        font-size: 6px;
        padding: 3px 5px;
    }

    .diagram-title {
        display: none;
    }
}

/* Tablets */
@media (min-width: 481px) and (max-width: 768px) {
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
}

/* Tablets landscape y desktop pequeño */
@media (min-width: 769px) {
    .hero {
        padding: 80px 0;
    }
}

/* Desktop grande */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }

    .section {
        padding: 50px 80px;
    }
}

/* Touch devices - áreas táctiles más grandes */
@media (pointer: coarse) {
    .nav-link {
        padding: 25px 15px;
        min-height: 44px;
    }
}

/* Landscape en móvil */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 30px 0;
    }

    .section.diagram-section {
        height: 400px;
    }
}

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

.pulse {
    animation: pulse 2s infinite;
}

/* Project Gallery Styles */
.project-gallery {
    background: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.gallery-main {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-main img:hover {
    transform: scale(1.02);
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 10px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.gallery-thumbs .thumb {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.gallery-thumbs .thumb:hover {
    opacity: 0.9;
}

.gallery-thumbs .thumb.active {
    opacity: 1;
    border-color: var(--primary-color);
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.image-modal.active {
    display: flex;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    z-index: 2001;
}

.modal-close:hover {
    color: var(--primary-color);
}

/* Project Icon Display (replaces gallery for projects without screenshots) */
.project-icon-display {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 250px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(59, 130, 246, 0.04));
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.project-icon-display i {
    font-size: 120px;
    color: var(--primary-color);
    opacity: 0.25;
    transition: all 0.3s ease;
}

.project-icon-display:hover i {
    opacity: 0.4;
    transform: scale(1.05);
}

[data-theme="dark"] .project-icon-display {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.05));
}

/* Featured Project Card */
.project-featured {
    border-left: 4px solid var(--primary-color);
}

.project-featured:hover {
    border-left-color: var(--accent-color);
}

/* Responsive Gallery */
@media (max-width: 768px) {
    .gallery-main {
        height: 200px;
    }

    .gallery-thumbs .thumb {
        width: 50px;
        height: 38px;
    }

    .project-featured > div {
        flex-direction: column;
    }
}

/* Glass effect: reduce blur on mobile for performance */
@media (max-width: 768px) {
    .nav-tabs {
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }

    .card {
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
    }
}

/* ======================
   NEURAL NETWORK BACKGROUND
   ====================== */

.neural-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

@media (pointer: coarse), (max-width: 768px) {
    .neural-canvas {
        display: none !important;
    }
}

/* ======================
   LIGHTING & GLOW EFFECTS
   ====================== */

/* Ambient floating orbs */
.ambient-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(100px);
}

.ambient-orb--1 {
    width: 500px;
    height: 500px;
    background: rgba(37, 99, 235, 0.10);
    top: 10%;
    left: 15%;
    animation: orbDrift1 20s ease-in-out infinite;
}

.ambient-orb--2 {
    width: 400px;
    height: 400px;
    background: rgba(124, 58, 237, 0.08);
    top: 55%;
    right: 10%;
    animation: orbDrift2 25s ease-in-out infinite;
}

.ambient-orb--3 {
    width: 450px;
    height: 450px;
    background: rgba(37, 99, 235, 0.06);
    bottom: 10%;
    left: 5%;
    animation: orbDrift3 22s ease-in-out infinite;
}

@keyframes orbDrift1 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(60px, -40px); }
    50% { transform: translate(-30px, 50px); }
    75% { transform: translate(40px, 30px); }
}

@keyframes orbDrift2 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-50px, 30px); }
    50% { transform: translate(40px, -60px); }
    75% { transform: translate(-20px, -30px); }
}

@keyframes orbDrift3 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(30px, 50px); }
    50% { transform: translate(-50px, -20px); }
    75% { transform: translate(20px, -40px); }
}

/* Specular highlight on cards (glass shine) */
.card {
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-shadow-inset), transparent);
    pointer-events: none;
    border-radius: 15px 15px 0 0;
    z-index: 1;
}

/* Card hover glow (blue aura) */
.card:hover {
    box-shadow:
        inset 0 1px 0 0 var(--glass-shadow-inset),
        inset 0 -1px 0 0 rgba(255,255,255,0.06),
        0 8px 32px -4px rgba(0,0,0,0.25),
        0 0 20px -5px rgba(37, 99, 235, 0.15);
}

[data-theme="dark"] .card:hover {
    box-shadow:
        inset 0 1px 0 0 var(--glass-shadow-inset),
        inset 0 -1px 0 0 rgba(255,255,255,0.06),
        0 8px 32px -4px rgba(0,0,0,0.35),
        0 0 20px -5px rgba(37, 99, 235, 0.25);
}

/* Button glow sweep */
.btn-download,
.social-links a {
    position: relative;
    overflow: hidden;
}

.btn-download::after,
.social-links a::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.btn-download:hover::after,
.social-links a:hover::after {
    left: 100%;
}

/* Cursor glow - subtle radial light that follows the mouse */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
}

[data-theme="dark"] .cursor-glow {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.18) 0%, transparent 70%);
}

/* Hide lighting effects on mobile */
@media (pointer: coarse), (max-width: 768px) {
    .ambient-orb,
    .cursor-glow {
        display: none !important;
    }
}

/* ======================
   CUSTOM CURSOR EFFECTS
   ====================== */

/* Hide native cursor on devices with fine pointer */
@media (pointer: fine) {
    * {
        cursor: none !important;
    }
}

.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, border-color 0.2s;
}

.cursor-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9997;
}

[data-theme="dark"] .cursor-canvas {
    mix-blend-mode: screen;
}

.cursor-dot.hovering {
    width: 20px;
    height: 20px;
}

.cursor-ring.hovering {
    width: 56px;
    height: 56px;
    border-color: var(--primary-color);
}

.cursor-dot.clicking {
    width: 8px;
    height: 8px;
}

.cursor-ring.clicking {
    width: 32px;
    height: 32px;
}

/* Hide cursor effects on touch/mobile devices */
@media (pointer: coarse), (max-width: 768px) {
    .cursor-dot,
    .cursor-ring,
    .cursor-canvas {
        display: none !important;
    }
}

/* ================================
   SKILL ICON CARDS
   ================================ */
.skill-icons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.skill-icon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    cursor: default;
    gap: 6px;
}

.skill-icon-card i {
    font-size: 1.8rem;
}

.skill-icon-card img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.skill-icon-card span {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
    line-height: 1.1;
}

.skill-icon-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
    border-color: var(--primary-color);
    background: var(--glass-bg-hover);
}

.skill-icon-card:hover span {
    color: var(--primary-color);
}

/* ================================
   CATEGORY CARDS FOR PROJECTS
   ================================ */
.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.category-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.2);
    border-color: rgba(37, 99, 235, 0.3);
}

.category-card:hover::before {
    opacity: 1;
}

.category-card-all {
    border: 2px solid rgba(37, 99, 235, 0.25);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(59, 130, 246, 0.04));
}

.category-card-all::before {
    opacity: 1;
}

.category-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.category-card-header h4 {
    color: var(--primary-color);
    font-size: 1rem;
    margin: 0;
}

.category-badge {
    background: var(--gradient);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.category-tech-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    justify-content: center;
}

.tech-icon-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.06);
    transition: all 0.3s ease;
}

.tech-icon-item i {
    font-size: 1.2rem;
}

.tech-icon-item img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.category-card:hover .tech-icon-item {
    background: rgba(37, 99, 235, 0.12);
    transform: scale(1.1);
}

.category-card-desc {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: center;
    margin: 0;
}

/* Category card active state (set by JS) */
.category-card.active {
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.25);
    transform: scale(1.03);
}

.category-card.active::before {
    opacity: 1;
}

/* ================================
   RESPONSIVE - SKILL ICONS & CATEGORY CARDS
   ================================ */
@media (max-width: 768px) {
    .skill-icon-card {
        width: 68px;
        height: 68px;
    }

    .skill-icon-card i {
        font-size: 1.5rem;
    }

    .skill-icon-card span {
        font-size: 0.6rem;
    }

    .category-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-card {
        padding: 15px;
    }

    .tech-icon-item {
        width: 34px;
        height: 34px;
    }

    .tech-icon-item i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .skill-icons-grid {
        gap: 8px;
    }

    .skill-icon-card {
        width: 60px;
        height: 60px;
    }

    .skill-icon-card i {
        font-size: 1.3rem;
    }

    .category-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}
