:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --success: #10b981;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --glass: rgba(255, 255, 255, 0.25);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 3.2rem;
}

body {
    font-family: 'Inter Tight', Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Background */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: -1;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Main Header */
.main-header {
    width: 100%;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 1000;
    background: transparent;
    border-bottom: 1px solid rgba(100, 116, 139, 0.12);
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.main-header__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-header__title {
    font-family: 'Space Grotesk', Arial, Helvetica, sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary);
    letter-spacing: 0.03em;
}

.main-header__nav {
    display: flex;
    gap: 1.5rem;
}

.main-header__link {
    font-family: 'Inter Tight', Arial, Helvetica, sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    transition: color 0.2s, background 0.2s;
}

.main-header__link:hover,
.main-header__link:focus {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.07);
}

@media (max-width: 700px) {
    .main-header__container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.6rem 0.7rem;
    }

    .main-header__nav {
        gap: 0.8rem;
    }
}

/* Mobile Main Header */
.main-header__menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2001;
}

.main-header__menu-btn span {
    width: 28px;
    height: 3px;
    margin: 4px 0;
    background: var(--primary);
    border-radius: 2px;
    display: block;
    transition: all 0.3s;
}

/* Mobile Menu (Hidden by default) */
.main-header__mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 70vw;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-secondary);
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.10);
    padding: 3.5rem 2rem 2rem 2rem;
    flex-direction: column;
    gap: 2rem;
    z-index: 2000;
    transition: transform 0.3s;
    transform: translateX(100%);
}

.main-header__mobile-menu.open {
    display: flex;
    transform: translateX(0);
}

.main-header__mobile-link {
    font-family: 'Inter Tight', Arial, Helvetica, sans-serif;
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    margin: 1rem 0;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    text-align: left;
}

.main-header__mobile-link:hover {
    background: var(--gradient-1);
    color: #fff;
}

/* Hides normal nav and shows 3 lines in mobile */
@media (max-width: 700px) {
    .main-header__nav {
        display: none;
    }

    .main-header__menu-btn {
        display: flex;
    }

    .main-header__container {
        flex-direction: row;
        align-items: center;
        padding: 0.6rem 0.7rem;
    }
}

/* Header */
.header {
    text-align: center;
    padding: 3rem 0;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow-lg);
    margin-bottom: 1.5rem;
}

.header h1 {
    font-family: 'Space Grotesk', Arial, Helvetica, sans-serif;
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.header .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1rem;
}

.header .tagline {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
    font-style: italic;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    z-index: -1;
    transition: transform 0.3s ease;
}

.social-link:hover {
    transform: translateY(-5px) rotate(10deg);
    box-shadow: var(--shadow-lg);
}

.social-link:hover::before {
    transform: scale(1.2);
}

.social-link.x {
    background: #000000;
}

.social-link.x i.fa-twitter {
    color: #fff;
}

.social-link.linkedin {
    background: #0077b5;
}

.social-link.instagram {
    background: var(--gradient-2);
}

.social-link.email {
    background: var(--success);
}

.social-link.whatsapp {
    background: #25d366;
}

/* Main Content */
.content {
    display: grid;
    gap: 3rem;
    margin: 3rem 0;
}

/* Glass Cards */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.card-title {
    font-family: 'Space Grotesk', Arial, Helvetica, sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title i {
    font-size: 1.8rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* About Section */
.about-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about-text strong {
    color: var(--primary);
    font-weight: 600;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.5);
}

.stat-number {
    font-family: 'Space Grotesk', Arial, Helvetica, sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

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

/* Skills */
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: var(--gradient-1);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: default;
}

.skill-tag:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.project-card:hover {
    box-shadow: var(--shadow-lg);
}

.project-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

.project-title {
    font-family: 'Space Grotesk', Arial, Helvetica, sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.project-link:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

/* Education */
.education-grid {
    display: grid;
    gap: 2rem;
    margin-top: 1.5rem;
}

.education-card {
    padding: 1.5rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.education-card:hover {
    transform: translateY(-5px);
}

.education-title {
    font-family: 'Space Grotesk', Arial, Helvetica, sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.education-degree {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.education-period {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
}

@media (min-width: 768px) {
    .education-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Certifications */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.certification-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
    text-align: center;
}

.certification-card:hover {
    transform: scale(1.05);
}

.certification-img {
    width: 100%;
    aspect-ratio: calc(1188 / 921);
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 1rem;
    background: #fff;
    padding: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.certification-title {
    font-family: 'Space Grotesk', Arial, Helvetica, sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.certification-company {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.certification-date {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Modal Certifications (Open Full Screen) */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding: 20px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(117, 79, 168, 0.97);
    backdrop-filter: blur(8px);
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    animation: zoomIn 0.3s ease-out;
}

.modal-close {
    position: absolute;
    right: 35px;
    top: 25px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

.certification-img:hover {
    transform: scale(1.02);
    filter: brightness(1.05);
}

@keyframes zoomIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Certifications Carousel */
.certifications-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem -1rem;
    padding: 0 1rem;
}

.certifications-carousel {
    flex: 1;
    overflow: hidden;
    position: relative;
    margin: 0 -0.75rem;
}

.certifications-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.5s ease-in-out;
}

.carousel-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
    opacity: 0.7;
    z-index: 2;
}

.carousel-button:hover {
    background: var(--primary-dark);
    opacity: 1;
    transform: scale(1.1);
}

.carousel-button:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    opacity: 0.3;
    transform: scale(1);
}

/* Ajuste del tamaño de las tarjetas para el carrusel */
.certifications-track .certification-card {
    flex: 0 0 calc(33.333% - 1rem);
    margin: 0;
    min-width: 0;
    /* Permite que las tarjetas se reduzcan si es necesario */
}

@media (max-width: 1024px) {
    .certifications-track .certification-card {
        flex: 0 0 calc(50% - 0.75rem);
    }
}

@media (max-width: 640px) {
    .certifications-track .certification-card {
        flex: 0 0 100%;
    }

    .certifications-wrapper {
        margin: 2rem -0.5rem;
    }
}

/* Contact */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateX(5px);
}

.contact-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.0rem;
    line-height: 1;
    overflow: hidden;
    flex-shrink: 0;
}

.contact-text {
    flex: 1;
}

.contact-label {
    font-size: 0.9rem;
    color: var(--text-light);
    display: block;
}

.contact-value {
    font-family: 'Inter Tight', Arial, Helvetica, sans-serif;
    font-weight: 500;
    color: var(--text-primary);
}

/* Call To Action Button */
.cta-button {
    display: block;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-1);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'Space Grotesk', Arial, Helvetica, sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
    margin: 2rem auto;
    width: fit-content;
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-lg);
    background: var(--gradient-2);
}

.cta-button i {
    transition: transform 0.3s ease;
}

.cta-button:hover i {
    transform: translateX(5px);
}

/* Footer */
.footer {
    width: 100%;
    margin-top: 3rem;
    /* Espacio arriba para separación */
    padding: 1.2rem 0 0.8rem 0;
    /* Espaciado vertical */
    background: transparent;
    /* Fondo invisible */
    color: var(--text-light);
    /* Color suave y acorde a tu paleta */
    text-align: center;
    font-family: 'Inter Tight', Arial, Helvetica, sans-serif;
    font-size: 0.98rem;
    letter-spacing: 0.02em;
    border-top: 1px solid rgba(100, 116, 139, 0.12);
    /* Línea sutil de separación */
    box-shadow: none;
    position: static;
}

.footer small {
    font-size: 0.95rem;
    letter-spacing: 0.03em;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .header h1 {
        font-size: 2.5rem;
    }

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

    .social-links {
        gap: 0.8rem;
    }

    .social-link {
        width: 45px;
        height: 45px;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .glass-card {
        padding: 1.2rem;
        margin: 0 0.5rem;
        width: calc(100% - 1rem);
        border-radius: 15px;
    }

    .content {
        gap: 2rem;
        margin: 2rem 0;
    }

    .certifications-grid,
    .contact-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.8rem;
    }

    .header h1 {
        font-size: 2rem;
    }

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

    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .glass-card {
        padding: 1rem;
        margin: 0 0.3rem;
        width: calc(100% - 0.6rem);
    }

    .content {
        gap: 1.5rem;
        margin: 1.5rem 0;
    }

    .card-title {
        font-size: 1.3rem;
    }

    .about-text {
        font-size: 0.95rem;
    }

    .skill-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .contact-item {
        padding: 0.8rem;
    }
}