:root{
    --primario: #333;
    --secundario: #667eea;
    --tercero: #764ba2;
    --blanco: white;
    --blancooscuro: #f8f9fa;
    --gris: #666;
    

}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--primario);
    overflow-x: hidden;
}

*,*::before, *::after {
    box-sizing: inherit;
}
 
  /* Header y Navegación */
        .navbar {
            position: fixed;
            top: 0;
            width: 100%;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            z-index: 1000;
            padding: 1rem 0;
            transition: all 0.3s ease;
        }

        .navbar.scrolled {
            background: rgba(255, 255, 255, 0.98);
            box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
        }

        .nav-contenedor {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.5rem;
            font-weight: bold;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .nav-menu {
            display: flex;
            list-style: none;
            gap: 2rem;
        }

        .nav-menu a {
            text-decoration: none;
            color: #333;
            font-weight: 500;
            transition: color 0.3s ease;
            position: relative;
        }

        .nav-menu a:hover {
            color: #667eea;
        }

        .nav-menu a::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: -5px;
            left: 0;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            transition: width 0.3s ease;
        }

        .nav-menu a:hover::after {
            width: 100%;
        }

        .mobile-menu {
            display: none;
            flex-direction: column;
            cursor: pointer;
        }

        .mobile-menu span {
            width: 25px;
            height: 3px;
            background: #333;
            margin: 3px 0;
            transition: 0.3s;
        }

        /* Hero Section */
        .hero {
            height: 100vh;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            color: white;
            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 1000"><polygon fill="rgba(255,255,255,0.1)" points="0,1000 1000,0 1000,1000"/></svg>');
            background-size: cover;

        }

        .hero-contenedor {
            position: relative;
            z-index: 2;
            max-width: 800px;
            padding: 0 2rem;
        }

        .hero h1 {
            font-size: 3rem;
            margin-bottom: 1rem;
            opacity: 0;
            animation: fadeInUp 1s ease forwards;
        }

        .hero p {
            font-size: 1.3rem;
            margin-bottom: 2rem;
            opacity: 0;
            animation: fadeInUp 1s ease 0.3s forwards;
        }

        .cta-button {
            display: inline-block;
            padding: 15px 30px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            text-decoration: none;
            border-radius: 50px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            transition: all 0.3s ease;
            opacity: 0;
            animation: fadeInUp 1s ease 0.6s forwards;
        }

        .cta-button:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }

        /* Secciones */
        .seccion {
            padding: 80px 0;
        }

        .contenedor {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 2rem;
            display: grid;
            
        }

        .seccion-titulo {
            text-align: center;
            font-size: 2.5rem;
            margin-bottom: 3rem;
            position: relative;
        }

        .seccion-titulo::after {
            content: '';
            position: absolute;
            width: 50px;
            height: 3px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
        }

        /* Sobre Mí */
        .sobre {
            background: #f8f9fa;
        }

        .sobre-contenedor {
            display: grid;
            grid-template-columns: 1fr 2fr;
            gap: 4rem;
            align-items: center;
        }

        .sobre-image {
            text-align: center;
        }

        .profile-img {
            width: 250px;
            height: 250px;
            border-radius: 50%;
            object-fit: cover;
            border: 5px solid white;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        }

        .sobre-text p {
            font-size: 1.1rem;
            margin-bottom: 1.5rem;
            color: #666;
            text-align: justify;
        }

        /* Habilidades */
        .skills-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 2rem;
        }

        .skill-categoria {
            background: white;
            padding: 2rem;
            border-radius: 15px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease;
        }

        .skill-categoria:hover {
            transform: translateY(-5px);
        }

        .skill-categoria h3 {
            color: #667eea;
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .skill-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }

        .skill-bar {
            width: 100%;
            height: 8px;
            background: #e9ecef;
            border-radius: 4px;
            overflow: hidden;
            margin-top: 5px;
        }

        .skill-progress {
            height: 100%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 4px;
            transition: width 2s ease;
        }

        /* Proyectos */
        .proyecto {
            background: #f8f9fa;
        }

        .proyecto-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 2rem;

        }

        .proyecto-card {
            background: white;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
        }

        .proyecto-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
        }

        .proyecto-image {
           position: relative;
           height: 200px;
           overflow: hidden;
        }
        .proyecto-img{
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }
        .proyecto-card:hover .proyecto-image{
            transform: scale(1.1);
        }
        .proyecto-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(102, 126, 234, 0.9);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
         .proyecto-card:hover .proyecto-overlay {
            opacity: 1;
        }
        .proyecto-buttons{
            display: flex;
            gap: 1rem;
        }
        .proyecto-btn{
            padding: 10px 20px;
            border-radius: 25px;
            text-decoration: none;
            font-weight: 500;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.9rem;
        }
        .demo-btn{
            background: var(--blanco);
            color: var(--secundario);
            border: 2px solid var(--blanco);
        }

        .demo-btn:hover{
            background: transparent;
            color: var(--blanco);
        }
        .proyecto-contenedor {
            padding: 1.5rem;
        }

        .proyecto-contenedor h3 {
            color: #333;
            margin-bottom: 1rem;
        }

        .proyecto-contenedor p {
            color: #666;
            margin-bottom: 1.5rem;
        }

        .proyecto-tech {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 1.5rem;
        }

        .tech-tag {
            background: #e9ecef;
            color: #495057;
            padding: 0.3rem 0.8rem;
            border-radius: 20px;
            font-size: 0.8rem;
        }

        .proyecto-links {
            display: flex;
            gap: 1rem;
        }

        .proyecto-link {
            color: #667eea;
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .proyecto-link:hover {
            color: #764ba2;
        }

        /* Educación */

        
        .educacion-timeline {
            position: relative;
            max-width: 800px;
            margin: 0 auto;
        }

        .educacion-timeline::before {
            content: '';
            position: absolute;
            left: 50%;
            top: 0;
            bottom: 0;
            width: 2px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            transform: translateX(-50%);
        }

        .timeline-item {
            position: relative;
            margin-bottom: 2rem;
            width: 50%;
        }

        .timeline-item:nth-child(odd) {
            left: 0;
            padding-right: 2rem;
        }

        .timeline-item:nth-child(even) {
            left: 50%;
            padding-left: 2rem;
        }

        .timeline-contenedor {
            background: white;
            padding: 1.5rem;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            position: relative;
        }

        .timeline-contenedor::before {
            content: '';
            position: absolute;
            top: 20px;
            width: 0;
            height: 0;
            border: 10px solid transparent;
        }

        .timeline-item:nth-child(odd) .timeline-contenedor::before {
            right: -20px;
            border-left-color: white;
        }

        .timeline-item:nth-child(even) .timeline-contenedor::before {
            left: -20px;
            border-right-color: white;
        }

        .timeline-date {
            color: #667eea;
            font-weight: bold;
            margin-bottom: 0.5rem;
        }
        .timeline-text{
            text-align: justify;
            margin-bottom: 1rem;
            
        }

        /* Contacto */
        .contactos {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        .contacto-contenedor {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 4rem;
        }

        .contactos-info h3 {
            margin-bottom: 2rem;
        }

        .contactos-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1.5rem;
            
            
        }

        .contactos-form {
            background: rgba(255, 255, 255, 0.1);
            padding: 2rem;
            border-radius: 15px;
            backdrop-filter: blur(10px);
            box-sizing: border-box;
            max-width: 450px;
            width: 90%;
            margin: 0 auto;
            
        }

        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
        }

        .form-group input,
        .form-group textarea {
            width: 100%;
            padding: 0.8rem;
            border: none;
            border-radius: 5px;
            background: rgba(255, 255, 255, 0.9);
            color: #333;
            margin-bottom: 20px;
            box-sizing: border-box;
        }

        .form-group textarea {
            height: 120px;
            resize: vertical;
        }

        .submit-btn {
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: 2px solid rgba(255, 255, 255, 0.3);
            padding: 0.8rem 2rem;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .submit-btn:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        /* Footer */
        .footer {
            background: #333;
            color: white;
            text-align: center;
            padding: 2rem 0;
        }

        .social-links {
            display: flex;
            justify-content: center;
            gap: 1rem;
            margin-bottom: 1rem;
        }

        .social-links a {
            color: white;
            font-size: 1.5rem;
            transition: color 0.3s ease;
        }

        .social-links a:hover {
            color: #667eea;
        }

        /* Animaciones */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .fade-in {
            opacity: 0;
            transform: translateY(30px);
            transition: all 0.6s ease;
        }

        .fade-in.visible {
            opacity: 1;
            transform: translateY(0);
        }

        /* Responsive */
@media (max-width: 768px) {

    

    .nav-menu {
        position: fixed;
        top: 70px; /* Ajusta según la altura de tu navbar */
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
        display: none; /* Oculto por defecto */
        flex-direction: row; /* Horizontal en lugar de vertical */
        overflow-x: auto; /* Scroll horizontal */
        overflow-y: hidden;
        padding: 1rem 0;
        gap: 0;
        z-index: 999;
        
        /* Estilos para el scroll */
        scrollbar-width: thin;
        scrollbar-color: #667eea transparent;
    }
    
    .nav-menu::-webkit-scrollbar {
        height: 4px;
    }
    
    .nav-menu::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .nav-menu::-webkit-scrollbar-thumb {
        background: #667eea;
        border-radius: 2px;
    }
    
    .nav-menu li {
        flex-shrink: 0; /* Evita que los elementos se compriman */
        min-width: max-content; /* Mantiene el ancho natural del texto */
    }
    
    .nav-menu a {
        display: block;
        padding: 0.8rem 1.5rem;
        white-space: nowrap; /* Evita que el texto se rompa */
        color: #333;
        text-decoration: none;
        font-weight: 500;
        transition: all 0.3s ease;
        border-radius: 25px;
        margin: 0 0.5rem;
    }
    
    .nav-menu a:hover {
        background: rgba(102, 126, 234, 0.1);
        color: #667eea;
    }
    
    /* Mostrar el menú cuando esté activo */
    .nav-menu.active {
        display: flex;
    }
    
    /* Estilos para el botón hamburguesa */
    .mobile-menu {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        padding: 5px;
        transition: all 0.3s ease;
    }
    
    .mobile-menu span {
        width: 25px;
        height: 3px;
        background: #333;
        margin: 3px 0;
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    
    /* Animación del botón hamburguesa cuando está activo */
    .mobile-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .mobile-menu.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* Indicador visual de scroll */
    .nav-menu::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.8));
        pointer-events: none;
    }


    

    .hero h1 {
        font-size: 2.5rem;
    }

    .sobre-contenedor {
       grid-template-columns: 1fr;
       text-align: center;
     }

    .contacto-contenedor {
        grid-template-columns: 1fr;
     }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 2rem !important;
        padding-right: 0 !important;
    }

    .educacion-timeline::before {
        left: 10px;
    }

    .timeline-contenedor::before {
        left: -20px !important;
        border-right-color: white !important;
        border-left-color: transparent !important;
    }

    
}



/* Estilos para desktop (mantener oculto el mobile-menu) */
@media (min-width: 769px) {
    .mobile-menu {
        display: none;
    }
    
    .nav-menu {
        display: flex !important;
    }

    .contactos-form{
       max-width: 100%;
        width: 90%;

    }

}
@media (max-width: 992px) {
    .contactos-form {
        max-width: 100%;
        width: 90%;
        
    }
}

