/* ==========================================================================
   1. VARIABLES Y CONFIGURACIÓN BASE
   ========================================================================== */
:root {
    --bg-primary: #0a0a0c;
    --bg-secondary: #121216;
    --bg-card: #1a1a22;
    --accent: #00e676;
    --accent-hover: #00b357;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --border: #2a2a35;
    --max-width: 1100px;
    --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius: 12px;
    --transition: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

body.light-mode {
    --bg-primary: #f9fafb;
    --bg-secondary: #f3f4f6;
    --bg-card: #ffffff;
    --accent: #00c853;
    --accent-hover: #009624;
    --text-main: #111827;
    --text-muted: #4b5563;
    --border: #e5e7eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.modal-open {
    overflow: hidden;
}

/* ==========================================================================
   2. ANIMACIONES GLOBALES
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0, 230, 118, 0.05);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 230, 118, 0.12);
    }
}

@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

@keyframes progressGlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes typePulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes floatBg {
    0% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(-10px, 10px);
    }
    50% {
        transform: translate(10px, -10px);
    }
    75% {
        transform: translate(-5px, -5px);
    }
    100% {
        transform: translate(0, 0);
    }
}

@keyframes successBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ===== ANIMACIÓN DE FLOTACIÓN PARA TARJETAS DE PROYECTOS ===== */
@keyframes floatProject {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.animate-on-load {
    opacity: 0;
    animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.highlight {
    background: linear-gradient(
        90deg,
        var(--accent) 0%,
        #a8ff78 25%,
        var(--accent) 50%,
        #a8ff78 75%,
        var(--accent) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

.hero h1 {
    animation: typePulse 2.5s ease-in-out infinite;
}

header {
    animation: fadeInUp 0.4s ease forwards;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(0, 230, 118, 0.15), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(0, 230, 118, 0.1), transparent),
        radial-gradient(2px 2px at 60% 20%, rgba(0, 230, 118, 0.12), transparent),
        radial-gradient(2px 2px at 80% 80%, rgba(0, 230, 118, 0.08), transparent),
        radial-gradient(2px 2px at 10% 90%, rgba(0, 230, 118, 0.1), transparent),
        radial-gradient(2px 2px at 90% 10%, rgba(0, 230, 118, 0.06), transparent);
    pointer-events: none;
    animation: floatBg 20s linear infinite;
}

/* ==========================================================================
   3. COMPONENTES REUTILIZABLES
   ========================================================================== */
.btn-primary, .btn-secondary, .btn-submit {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    font-family: var(--font);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary::after, .btn-submit::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:active::after, .btn-submit:active::after {
    width: 300px;
    height: 300px;
}

.btn-primary, .btn-submit {
    background-color: var(--accent);
    color: #000;
    border: none;
}

.btn-primary:hover, .btn-submit:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
    transform: translateY(-2px);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background-color: var(--accent);
    margin: 0.5rem auto 0;
    border-radius: 2px;
    animation: pulseGlow 1.5s ease-in-out infinite;
}

/* ==========================================================================
   4. NAVEGACIÓN
   ========================================================================== */
header {
    background-color: var(--bg-primary);
    opacity: 0.95;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 2rem;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
    margin-left: auto;
}

.nav-links a, .nav-btn-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font);
    font-size: 1.05rem;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.nav-btn-link {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-about-box {
    border: 2px solid var(--accent) !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: 6px;
    background-color: rgba(0, 230, 118, 0.03) !important;
    transition: all 0.25s ease !important;
}

.nav-about-box:hover {
    background-color: var(--accent) !important;
    color: #000 !important;
    transform: scale(1.02) !important;
    box-shadow: 0 0 25px rgba(0, 230, 118, 0.2) !important;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    position: absolute;
    right: 2rem;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================================================
   5. HERO SECTION
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 2rem;
    background: radial-gradient(circle at 80% 20%, rgba(0, 230, 118, 0.05), transparent 40%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.2rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
    animation: pulseGlow 2s ease-in-out infinite;
}

.stat-item:nth-child(2) {
    animation-delay: 0.2s;
}
.stat-item:nth-child(3) {
    animation-delay: 0.4s;
}
.stat-item:nth-child(4) {
    animation-delay: 0.6s;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0, 230, 118, 0.03), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-item:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 30px rgba(0, 230, 118, 0.12);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    font-weight: 500;
}

/* ==========================================================================
   6. INFINITE MARQUEE - TECNOLOGÍAS
   ========================================================================== */
.tech-section {
    max-width: var(--max-width);
    margin: 0 auto 5rem;
    text-align: center;
}

.tech-main-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-main);
}

.tech-marquee-wrapper {
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    padding: 0.5rem 0;
}

.tech-marquee {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.tech-marquee-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: marqueeScroll 30s linear infinite;
    will-change: transform;
}

.tech-marquee-track:hover {
    animation-play-state: paused;
}

.tech-marquee-track .tech-card {
    flex-shrink: 0;
    width: 140px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    font-family: var(--font);
    cursor: pointer;
    outline: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.tech-marquee-track .tech-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent), transparent, var(--accent));
    background-size: 300% 300%;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.25s ease;
}

.tech-marquee-track .tech-card:hover::after {
    opacity: 0.3;
    animation: progressGlow 1s ease-in-out infinite;
}

.tech-marquee-track .tech-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 8px 25px rgba(0, 230, 118, 0.12);
}

.tech-marquee-track .tech-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.tech-marquee-track .tech-icon {
    width: 52px;
    height: 52px;
    object-fit: contain;
    display: block;
    filter: grayscale(20%);
    transition: filter 0.2s ease, transform 0.2s ease;
    animation: floatIcon 3s ease-in-out infinite;
}

.tech-marquee-track .tech-card:hover .tech-icon {
    filter: grayscale(0%);
    transform: scale(1.1) rotate(2deg);
}

/* ==========================================================================
   7. SECCIÓN DE PROYECTOS (CON IMÁGENES Y ANIMACIÓN DE FLOTACIÓN)
   ========================================================================== */
.projects {
    background-color: var(--bg-secondary);
    padding: 6rem 2rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.project-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    animation: floatProject 4s ease-in-out infinite;
    will-change: transform;
}

.project-card:nth-child(2) {
    animation-delay: 0.5s;
}

.project-card:nth-child(3) {
    animation-delay: 1s;
}

.project-card:hover {
    animation-play-state: paused;
    transform: translateY(-6px) scale(1.01);
    border-color: var(--accent);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.project-card.featured {
    border: 1px dashed var(--accent);
    position: relative;
}

.project-card.featured::before {
    content: "⭐ Destacado";
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.8rem;
    border-radius: 4px;
    z-index: 1;
}

/* ===== IMAGEN PROFESIONAL - ENTRA COMPLETAMENTE EN EL CUADRO ===== */
.project-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--bg-secondary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
    display: block;
    background: var(--bg-secondary);
}

.project-card:hover .project-image img {
    transform: scale(1.03);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.8rem 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.project-badge {
    display: inline-block;
    background: var(--accent);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    height: 70px;
    overflow: hidden;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tags span {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--accent-hover);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.25s ease;
}

.tech-tags span:hover {
    border-color: var(--accent);
    background-color: rgba(0, 230, 118, 0.05);
}

.project-links {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.project-link {
    display: inline-block;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.project-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.1);
}

/* ==========================================================================
   8. SECCIÓN DE CONTACTO
   ========================================================================== */
.contact {
    padding: 6rem 2rem;
    background-color: var(--bg-primary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.contact-form-wrapper, .contact-social-wrapper {
    text-align: left;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.contact h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.contact p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-main);
    font-family: var(--font);
    font-size: 1rem;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    transform: scale(1.01);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.05);
}

.btn-submit {
    width: 100%;
    font-size: 1rem;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.social-item:hover {
    transform: translateX(6px) scale(1.02);
}

.social-item.whatsapp:hover { border-color: #25d366; box-shadow: 0 0 30px rgba(37, 211, 102, 0.1); }
.social-item.whatsapp:hover svg { color: #25d366; }
.social-item.instagram:hover { border-color: #e1306c; box-shadow: 0 0 30px rgba(225, 48, 108, 0.1); }
.social-item.instagram:hover svg { color: #e1306c; }

/* ==========================================================================
   9. MODALES
   ========================================================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 5, 8, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 92%;
    max-width: 700px;
    max-height: 85vh;
    padding: 3rem 2.5rem 2.5rem;
    position: relative;
    z-index: 2001;
    overflow-y: auto;
    text-align: left;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s, transform 0.3s ease;
}

.modal-close:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.modal-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    width: 100%;
}

.modal-tech-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    align-self: center;
}

#modal-fallback-container {
    align-self: center;
}

#modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    display: none;
}

#modal-desc {
    width: 100%;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* ==========================================================================
   10. CV EN LA MODAL
   ========================================================================== */
.cv-container {
    width: 100%;
}

.cv-header {
    border-bottom: 2px solid var(--border);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.cv-name {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

.cv-role {
    font-size: 1.25rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: 0.25rem;
}

.cv-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem 1.5rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cv-meta span strong {
    color: var(--text-main);
}

.cv-section-title {
    font-size: 1.25rem;
    color: var(--text-main);
    margin: 2rem 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 3px solid var(--accent);
    padding-left: 10px;
}

.cv-block {
    margin-bottom: 1.5rem;
}

.cv-block-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.cv-block-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.cv-block-subtitle {
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 500;
}

.cv-date {
    font-size: 0.85rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
    color: var(--text-muted);
    white-space: nowrap;
}

.cv-list {
    list-style: none;
    padding-left: 0;
}

.cv-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.cv-list li::before {
    content: "•";
    color: var(--accent);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.cv-tags-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.cv-tag {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.25s ease;
}

.cv-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.cv-block-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.skill-box {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.skill-box:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.skill-box strong {
    color: var(--accent);
    display: block;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   11. FOOTER
   ========================================================================== */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ==========================================================================
   12. RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }

    .logo {
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }
    .hero p {
        font-size: 1rem;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-item {
        padding: 1rem 0.8rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 500px;
        margin: 0 auto;
    }

    .project-info p {
        height: auto;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .tech-card:not(.nav-btn-link) {
        width: 120px;
        padding: 1rem;
    }

    .cv-block-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .cv-name {
        font-size: 1.8rem;
    }

    .modal-content {
        padding: 2rem 1.5rem;
    }

    .tech-marquee-track .tech-card {
        width: 120px;
        padding: 1rem;
    }
    .tech-marquee-track .tech-icon {
        width: 40px;
        height: 40px;
    }
    .tech-marquee-track {
        gap: 1rem;
        animation-duration: 25s;
    }

    .project-card {
        animation-duration: 3.5s;
    }
    .project-card:nth-child(2) { animation-delay: 0.4s; }
    .project-card:nth-child(3) { animation-delay: 0.8s; }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    .hero-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }
    .stat-item {
        padding: 0.8rem 0.5rem;
    }
    .stat-number {
        font-size: 1.3rem;
    }
    .stat-label {
        font-size: 0.75rem;
    }
    .logo {
        font-size: 1.1rem;
    }
    .tech-card {
        width: 100px;
        padding: 0.8rem;
    }
    .tech-icon {
        width: 40px;
        height: 40px;
    }
    .projects-grid {
        max-width: 100%;
        gap: 1.2rem;
    }
    .tech-marquee-track .tech-card {
        width: 100px;
        padding: 0.8rem;
    }
    .tech-marquee-track .tech-icon {
        width: 34px;
        height: 34px;
    }
    .tech-marquee-track {
        gap: 0.8rem;
        animation-duration: 20s;
    }
}

/* ==========================================================================
   MEJORAS PARA EL CV EN LA MODAL
   ========================================================================== */
@media (max-width: 600px) {
    .cv-container .cv-block-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   MODAL DE CONFIRMACIÓN DE CORREO ENVIADO
   ========================================================================== */
.success-modal .modal-content {
    max-width: 450px;
    text-align: center;
    padding: 3rem 2.5rem;
}

.success-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    width: 100%;
}

.success-icon {
    font-size: 4rem;
    line-height: 1;
    animation: successBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.success-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.success-message {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.success-btn {
    margin-top: 0.5rem;
    background-color: var(--accent);
    color: #000;
    border: none;
    padding: 0.75rem 2.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.success-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.3);
}

.success-modal .modal-close {
    top: 0.8rem;
    right: 1.2rem;
}

@media (max-width: 480px) {
    .success-modal .modal-content {
        padding: 2rem 1.5rem;
    }
    .success-icon {
        font-size: 3rem;
    }
    .success-title {
        font-size: 1.4rem;
    }
}