* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-y: scroll; }
html, body { margin: 0; padding: 0; overflow-x: hidden; width: 100%; max-width: 100vw; }
body { font-family: 'Arial', sans-serif; color: #f0f0f0; background-color: #140d1c; }

#Todo {
    margin: 0 10%;
    padding-top: 2%;
}

/* INICIO */
#inicio { width: 100%; height: 93vh; display: flex; flex-direction: column; }
#banderasIdiomas { height: 3vh; display: flex; flex-direction: row; justify-content: end; }
.bandera { width: 45px; height: 27px; cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.bandera:hover { transform: scale(1.2) rotate(5deg); box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3); }

#ContenidoInicio { display: flex; justify-content: space-between; align-items: center; flex-direction: row; height: 94vh; }
#InformacionInicio { flex-basis: 49%; width: 45%; flex-grow: 1; display: flex; flex-direction: column; height: 100%; justify-content: center; }
#NombreInformacionInicio {
    font-size: 6rem;
    font-weight: bold;
    line-height: 1.1;
    background: linear-gradient(90deg, #fbff00, #bbff00, #fbff00);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientScroll 3s infinite linear;
}
#DescripcionInformacionInicio {
    font-size: 3rem;
    font-weight: bold;
    line-height: 1.1;
    background: linear-gradient(90deg, #fbff00, #bbff00, #fbff00);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientScroll 3s infinite linear;
    margin-bottom: 5%;
    margin-top: 5%;
}

#divbotonContacto { margin-right: 8%; }
.botonContacto {
    position: relative;
    margin: 0;
    padding: 17px 35px;
    outline: none;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    text-transform: uppercase;
    background-color: transparent;
    border: 1px solid #bbff00;
    border-radius: 10px;
    color: #fbff00;
    font-weight: 400;
    font-family: inherit;
    z-index: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.02, 0.01, 0.47, 1);
}
.botonContacto::after {
    background: #bbff00;
    content: "";
    height: 155px;
    left: -75px;
    opacity: 0.4;
    position: absolute;
    top: -50px;
    transform: rotate(35deg);
    transition: all 550ms cubic-bezier(0.19, 1, 0.22, 1);
    width: 50px;
    z-index: -10;
}
.botonContacto:hover::after {
    left: 120%;
    transition: all 550ms cubic-bezier(0.19, 1, 0.22, 1);
}

#FotosInicio { position: relative; flex-basis: 49%; flex-grow: 1; width: 45%; display: flex; justify-content: center; align-items: center; }
#fotoInicio { width: 100%; height: auto; z-index: 2; }
#fotoInicio1 { width: 100%; height: auto; z-index: 2; mask-image: linear-gradient(black 70%, transparent); }
#Fotosfondo { position: absolute; width: 100%; height: auto; z-index: 1; }
#Fotosdelante { position: absolute; width: 100%; height: auto; z-index: 3; }

/* QUIEN SOY */
#seccion_quien_soy { display: flex; flex-direction: row; margin-top: 10%; margin-bottom: 15%; }
#contenedor_foto { display: flex; width: 30%; align-items: center; }
#imagen_perfil { width: 40vh; height: 40vh; object-fit: cover; border-radius: 50%; border: 2px solid white; }
#contenedor_informacion { margin-left: 10%; margin-right: 2%; }
#titulo_Quien_Soy { font-size: 6vh; font-weight: bold; color: #fbff00; text-align: left; margin-bottom: 20px; }
#descripcion_Quien_Soy { font-size: 2vh; line-height: 1.8; text-align: left; }

/* TITULOS */
.TituloGenerico {
    font-size: 6vh;
    font-weight: bold;
    color: #fbff00;
    text-align: center;
    margin-bottom: 3%;
    margin-top: 10%;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* FORMACIONES */
#seccion_Formacion_Academica { margin-bottom: 15%; }
.Formaciones { display: flex; flex-direction: column; align-items: center; width: 100%; gap: 20px; }
.formacion {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: transform 0.3s;
}
.formacion:hover { transform: scale(1.02); }
.ImagenFormacion img { width: 12vh; height: 12vh; object-fit: contain; background: black; border-radius: 10px; }
.formacion-content { margin-left: 20px; color: white; }
.formacion-Lugar { font-size: 1.5rem; font-weight: bold; color: #bbff00; }
.formacion-titulo { font-size: 1.2rem; font-weight: bold; color: #fbff00; margin: 5px 0; }
.formacion-fechas { font-size: 1rem; font-style: italic; color: #ccc; margin-bottom: 5px; }
.formacion-descripcion { font-size: 1rem; color: #e0e0e0; }

/* PROYECTOS */
#Proyectos { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between; padding: 4vh 2vh; }
.Divproyecto {
    background-color: #21152e;
    border-radius: 12px;
    color: white;
    border: 1px solid #fbff00;
    margin-bottom: 2vh;
    padding: 2vh;
    display: flex;
    flex-direction: row;
    width: 48%;
}
.DivproyectoInformacion { width: 100%; padding-right: 2vh; }
.DivproyectoTitulo { font-size: 2.2vh; font-weight: bold; color: white; margin-bottom: 10px; }
.DivproyectoDescripcion { font-size: 16px; margin-bottom: 20px; }
.DivproyectoLenguajes { display: flex; flex-wrap: wrap; margin-bottom: 20px; }
.Divlenguaje {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    margin-right: 10px;
    margin-bottom: 10px;
    border-radius: 20px;
    font-weight: bold;
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}
.Divlenguajeimagen { width: 20px; height: 20px; margin-right: 8px; }
.DivproyectoBotones { display: flex; flex-direction: row; gap: 10px; }
.BotonproyectoPreview, .BotonproyectoDescargar {
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}
.BotonproyectoPreview { background-color: #007bff; }
.BotonproyectoPreview:hover { background-color: #0056b3; }
.BotonproyectoDescargar { background-color: #28a745; }
.BotonproyectoDescargar:hover { background-color: #1e7e34; }
.DivproyectoFoto { width: 40%; text-align: center; }
.proyectoFoto { width: 100%; height: auto; border-radius: 8px; }

/* EXPERIENCIA */
.empleos { display: flex; flex-direction: column; width: 100%; margin: 0 auto; padding: 0 2%; }
.Divempleo { position: relative; width: 100%; padding-left: 40px; margin-bottom: 30px; }
.Divempleo::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 0;
    bottom: -30px;
    width: 4px;
    background-color: #a3e635;
    border-radius: 2px;
}
.Divempleo:last-child::before { bottom: 0; }
.LineaPunto {
    position: absolute;
    left: 6px;
    top: 20px;
    width: 24px;
    height: 24px;
    background-color: #a3e635;
    border: 5px solid #140d1c;
    border-radius: 50%;
    z-index: 2;
}
.DivempleoOtro { background: #222; padding: 25px; border-radius: 10px; box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3); }
.DivempleoFecha { font-size: 14px; color: #ffea00; margin-bottom: 5px; font-weight: bold; }
.tituloLinea { font-size: 18px; color: #a3e635; margin: 5px 0; }
.textoLinea { font-size: 16px; color: #fff; margin-bottom: 10px; }
.LinkLinea { display: inline-block; font-size: 14px; color: #ffea00; text-decoration: none; font-weight: bold; margin-top: 10px; }
.LinkLinea:hover { text-decoration: underline; }

/* IDIOMAS */
.seccion_idiomas { margin-bottom: 10%; }
.IdiomasGrid { display: flex; justify-content: center; gap: 50px; flex-wrap: wrap; }
.IdiomaContenedorGlobal { display: flex; flex-direction: column; align-items: center; width: 180px; }
.IdiomaCircular { position: relative; width: 150px; height: 150px; display: flex; justify-content: center; align-items: center; }
.circular-chart { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; }
.circle-bg { fill: none; stroke: #2a2a2a; stroke-width: 3.8; }
.circle { fill: none; stroke-width: 2.8; stroke-linecap: round; animation: progress 1.5s ease-out forwards; }
.porcentaje-texto { position: relative; z-index: 2; font-size: 2rem; font-weight: bold; color: white; margin: 0; padding: 0; line-height: 1; }
.idioma-nombre { margin-top: 15px; font-size: 1.3rem; font-weight: bold; text-align: center; }
@keyframes progress { 0% { stroke-dasharray: 0 100; } }

/* COMPETENCIAS */
.seccion_competencias { margin-bottom: 10%; }
.CompetenciasGrid { display: flex; flex-wrap: wrap; gap: 30px; justify-content: center; padding: 0 5%; }
.CompetenciaIcono {
    position: relative;
    width: 80px;
    height: 80px;
    background: #222;
    border: 3px solid;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.CompetenciaIcono img { width: 45px; height: 45px; object-fit: contain; }
.CompetenciaIcono:hover { transform: scale(1.15) translateY(-5px); background: #333; box-shadow: 0 10px 15px rgba(0,0,0,0.5); }
.CompetenciaTooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: #fbff00;
    color: #140d1c;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    white-space: nowrap;
    transition: 0.3s;
    z-index: 10;
    box-shadow: 0 5px 10px rgba(0,0,0,0.3);
}
.CompetenciaTooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #fbff00 transparent transparent transparent;
}
.CompetenciaIcono:hover .CompetenciaTooltip { visibility: visible; opacity: 1; bottom: 125%; }

/* HOBBIES */
#seccion_Hobbies { margin-bottom: 10%; }
#Hobbies { display: flex; justify-content: space-between; align-items: center; gap: 30px; }
#Hobbies .pelota-container {
    flex: 1;
    height: 50vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    border: 2px dashed rgba(251, 255, 0, 0.3);
    border-radius: 20px;
    background: rgba(0,0,0,0.1);
}
#Hobbies .texto-container { flex: 1; padding: 0 20px; font-size: 1.2rem; line-height: 1.6; }
#pelota { cursor: grab; position: absolute; }

/* OTROS DATOS */
.seccion_otros_datos { margin-bottom: 10%; padding: 0 5%; }
.ListaOtrosDatos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
}
.ListaOtrosDatos li {
    background: #222;
    padding: 15px 25px;
    border-radius: 12px;
    border: 2px solid #a3e635;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
.ListaOtrosDatos li::before {
    content: "✔";
    color: #a3e635;
    font-size: 1.6rem;
    position: static;
}

/* CONTACTO FINAL */
.seccion_contacto_scroll {
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    background: #e8ea00;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0;
    padding: 0;
}
.contacto-sticky {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.contenido-contacto {
    width: min(1200px, calc(100% - 80px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ContactoLayout {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}
.ContactoIzquierda {
    color: #140d1c;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.contacto-titulo {
    margin: 0 0 28px 0;
    color: #140d1c;
    font-size: clamp(3rem, 5vw, 5.2rem);
    line-height: 0.95;
    text-transform: none;
    letter-spacing: 0;
    text-align: left;
    font-weight: 800;
}
.ContactoTextoIntro {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #2a2a2a;
    margin-bottom: 28px;
    max-width: 520px;
}
.ListaContacto {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ListaContacto li {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: clamp(1.05rem, 1.45vw, 1.7rem);
    font-weight: 700;
    color: #140d1c;
    line-height: 1.3;
}
.ListaContacto li a {
    color: #140d1c !important;
    text-decoration: none;
    font-weight: 700;
    transition: 0.2s ease;
}
.ListaContacto li a:hover {
    color: #000 !important;
    text-decoration: underline;
}
.IconoContacto {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}
.ContactoDerecha {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.FotoContacto {
    display: block;
    width: min(100%, 540px);
    max-height: 72vh;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 24px 35px rgba(0, 0, 0, 0.18));
}

/* ANIMACIONES GLOBALES */
.oculto_escala { opacity: 0; transform: scale(0.7); transition: opacity 0.3s ease-out, transform 0.5s ease-out; }
.oculto_derecha { opacity: 0; transform: translateX(50px); transition: opacity 0.3s ease-out, transform 0.5s ease-out; }
.oculto_invisible { opacity: 0; transform: scale(0.5) rotate(0deg) translateY(0px); filter: blur(30px); transition: opacity 0.5s ease-out, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.5s ease-out; }
.movimientolineadeltiempo { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.aparece {
    opacity: 1 !important;
    transform: scale(1) !important;
    transform: translateY(0) !important;
    transform: translateX(0) !important;
    transform: scale(1) rotate(0) translateY(0) !important;
    filter: blur(0) !important;
}

@keyframes gradientScroll {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* RESPONSIVE */
@media screen and (max-width: 768px) {
    #Todo { margin: 0 5%; padding-top: 4%; }

    #inicio { height: 100vh; margin-bottom: 100%; overflow: hidden; }
    #ContenidoInicio { flex-direction: column-reverse; justify-content: center; height: 80vh; }
    #InformacionInicio { width: 90%; text-align: center; justify-content: top; }
    #NombreInformacionInicio { font-size: 2.5rem; }
    #DescripcionInformacionInicio { font-size: 1.5rem; }
    #FotosInicio { width: 90%; height: auto; flex-direction: column; align-items: center; }
    #fotoInicio { width: 76.5%; max-width: 350px; }
    #divbotonContacto { margin-right: 0; display: flex; justify-content: center; }

    #seccion_quien_soy { flex-direction: column; align-items: center; justify-content: center; }
    #contenedor_foto { width: 100%; justify-content: center; margin-bottom: 8%; }
    #contenedor_informacion { margin-left: 0; margin-right: 0; }
    #titulo_Quien_Soy { text-align: center; }

    .formacion { flex-direction: column; text-align: center; }
    .formacion-content { margin-left: 0; margin-top: 15px; }

    .Divproyecto { width: 100%; flex-direction: column; }
    .DivproyectoFoto { width: 100%; margin-top: 20px; }

    #Hobbies { flex-direction: column; }
    #Hobbies .pelota-container { width: 100%; height: 40vh; }

    .TituloGenerico { font-size: 4vh; margin: 10vh 0 5vh 0; }

    .seccion_contacto_scroll {
        min-height: 100svh;
        height: auto;
        padding: 40px 0;
    }

    .contacto-sticky,
    .contenido-contacto {
        height: auto;
    }

    .contenido-contacto {
        width: min(100%, calc(100% - 30px));
    }

    .ContactoLayout {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }

    .ContactoIzquierda {
        order: 2;
        align-items: center;
    }

    .ContactoDerecha {
        order: 1;
    }

    .contacto-titulo {
        text-align: center;
        font-size: clamp(2.4rem, 9vw, 4rem);
        margin-bottom: 20px;
    }

    .ContactoTextoIntro {
        font-size: 1rem;
        margin-left: auto;
        margin-right: auto;
    }

    .ListaContacto li {
        justify-content: center;
        font-size: 1.05rem;
    }

    .FotoContacto {
        width: min(100%, 300px);
        max-height: 34vh;
    }
}