/* RESET BÁSICO */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* DEFINICIONES GENERALES */
body {
    font-family: 'Lexend', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* BANNER SUPERIOR */
.top-banner {
    background: linear-gradient(90deg, #4a00e0, #8e2de2);
    color: white;
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
}

/* HEADER PRINCIPAL */
.header-principal {
    background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%);
    color: white;
    padding-bottom: 40px;
}

/* NAVEGACIÓN */
.nav-principal {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(26, 35, 126, 0.95);
    backdrop-filter: blur(5px);
}

.logo-container {
    display: flex;
    flex-direction: column;
}

.logo {
    font-family: 'Fira Sans', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.tagline {
    font-size: 14px;
    opacity: 0.9;
}

.nav-lista {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-lista a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-lista a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* HERO SECTION */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.hero-texto {
    flex: 1;
    min-width: 300px;
}

.hero-texto h2 {
    font-size: 36px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.highlight {
    color: #ffcc80;
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: rgba(255, 204, 128, 0.3);
    z-index: -1;
}

.hero-texto p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-btn {
    display: inline-block;
    background-color: #ff9800;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #ff9800;
}

.hero-btn:hover {
    background-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.hero-imagen {
    flex: 1;
    min-width: 300px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hero-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-img:hover {
    transform: scale(1.05);
}

/* SECCIONES GENERALES */
.seccion-contenedor {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.fondo-seccion {
    background-color: #f0f4f8;
}

.seccion-titulo {
    font-family: 'Fira Sans', sans-serif;
    font-size: 36px;
    text-align: center;
    margin-bottom: 15px;
    color: #1a237e;
    position: relative;
    padding-bottom: 15px;
}

.seccion-titulo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #4a00e0, #8e2de2);
    border-radius: 2px;
}

.seccion-descripcion {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    color: #666;
    font-size: 18px;
}

/* SOBRE MÍ */
.sobre-mi-contenido {
    display: flex;
    gap: 50px;
    align-items: center;
    flex-wrap: wrap;
}

.sobre-mi-texto {
    flex: 2;
    min-width: 300px;
}

.sobre-mi-texto p {
    margin-bottom: 20px;
    font-size: 17px;
}

.sobre-mi-estadisticas {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
    min-width: 250px;
}

.estadistica {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

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

.numero {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #4a00e0;
    margin-bottom: 5px;
}

.texto {
    font-size: 16px;
    color: #666;
}

/* PROYECTOS */
.proyectos-contenedor {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.proyecto-tarjeta {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    flex: 1 1 300px;
    max-width: 350px;
    position: relative;
}

.proyecto-tarjeta:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.proyecto-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #4a00e0;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

.proyecto-badge.destacado {
    background-color: #4a00e0;
}

.proyecto-imagen {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%); 
}

.proyecto-imagen img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    width: auto;
    height: auto;
    transition: all 0.5s ease;
}

.proyecto-tarjeta:hover .proyecto-imagen img {
    transform: translate(-50%, -50%) scale(1.08);
}

.proyecto-titulo {
    padding: 20px 20px 10px;
    font-size: 22px;
    color: #1a237e;
}

.proyecto-desc {
    padding: 0 20px 15px;
    color: #666;
    font-size: 15px;
}

.proyecto-tecnologias {
    padding: 0 20px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tecnologia {
    background-color: #e8eaf6;
    color: #3949ab;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

/* HABILIDADES */
.habilidades-contenedor {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
}

.habilidad-categoria {
    flex: 1 1 300px;
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.habilidad-categoria h3 {
    margin-bottom: 20px;
    color: #1a237e;
    font-size: 22px;
}

.habilidad {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.habilidad-nombre {
    flex: 1;
    min-width: 100px;
    font-weight: 500;
}

.habilidad-bar {
    flex: 3;
    height: 10px;
    background-color: #e8eaf6;
    border-radius: 5px;
    overflow: hidden;
}

.habilidad-progreso {
    height: 100%;
    background: linear-gradient(90deg, #4a00e0, #8e2de2);
    border-radius: 5px;
    transition: width 1s ease;
}

.habilidad-porcentaje {
    flex: 0 0 40px;
    text-align: right;
    font-weight: 600;
    color: #4a00e0;
}

/* HOBBIES */
.hobbies-contenedor {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
    margin-bottom: 50px;
}

.hobbie-tarjeta {
    flex: 1 1 200px;
    max-width: 250px;
    background: white;
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.hobbie-tarjeta:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.hobbie-icono {
    font-size: 40px;
    margin-bottom: 15px;
}

.hobbie-tarjeta h3 {
    margin-bottom: 10px;
    color: #1a237e;
}

.hobbie-tarjeta p {
    color: #666;
    font-size: 14px;
}

.hobbie-destacado {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hobbie-destacado-imagen {
    flex: 1;
    min-width: 300px;
    border-radius: 15px;
    overflow: hidden;
    background-color: #000;
}

.hobbie-img {
    width: 100%;
    height: 300px;
    object-fit: contain; 
    transition: transform 0.5s ease;
}

.hobbie-img:hover {
    transform: scale(1.05);
}

.hobbie-destacado-texto {
    flex: 2;
    min-width: 300px;
}

.hobbie-destacado-texto h3 {
    color: #1a237e;
    margin-bottom: 15px;
    font-size: 24px;
}

.hobbie-destacado-texto p {
    margin-bottom: 15px;
    font-size: 16px;
}

/* CONTACTO */
.contacto-contenedor {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: flex-start;
}

.contacto-info {
    flex: 1;
    min-width: 300px;
}

.info-item {
    margin-bottom: 30px;
}

.info-item h3 {
    color: #1a237e;
    margin-bottom: 15px;
    font-size: 22px;
}

.redes-sociales {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.red-social {
    display: inline-block;
    background-color: #e8eaf6;
    color: #3949ab;
    padding: 8px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.red-social:hover {
    background-color: #3949ab;
    color: white;
    transform: translateY(-3px);
}

.contacto-formulario {
    flex: 1;
    min-width: 300px;
}

.form-contacto {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-contacto h3 {
    color: #1a237e;
    margin-bottom: 10px;
    font-size: 24px;
}

.form-contacto label {
    font-weight: 500;
    color: #555;
}

.form-contacto input,
.form-contacto textarea {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Lexend', sans-serif;
    font-size: 16px;
    transition: border 0.3s ease;
}

.form-contacto input:focus,
.form-contacto textarea:focus {
    outline: none;
    border-color: #4a00e0;
}

.form-btn {
    background: linear-gradient(90deg, #4a00e0, #8e2de2);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(74, 0, 224, 0.2);
}

/* FOOTER */
.footer-principal {
    background-color: #1a237e;
    color: white;
    padding: 50px 20px 20px;
}

.footer-contenido {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-logo h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.footer-enlaces h4 {
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-enlaces ul {
    list-style: none;
}

.footer-enlaces li {
    margin-bottom: 8px;
}

.footer-enlaces a {
    color: #bbdefb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-enlaces a:hover {
    color: white;
}

.footer-cita .cita {
    font-style: italic;
    margin-bottom: 15px;
    font-size: 16px;
}

.footer-cita .copyright {
    margin-bottom: 10px;
    font-size: 14px;
    opacity: 0.9;
}

.footer-cita .disclaimer {
    font-size: 12px;
    opacity: 0.7;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    opacity: 0.8;
}

/* BOTONES FLOTANTES */
.boton-flotante {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(90deg, #ff9800, #ffb74d);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
    z-index: 100;
    transition: all 0.3s ease;
}

.boton-flotante:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 152, 0, 0.4);
}

.boton-volver {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: #4a00e0;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 24px;
    box-shadow: 0 5px 15px rgba(74, 0, 224, 0.3);
    z-index: 100;
    transition: all 0.3s ease;
}

.boton-volver:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(74, 0, 224, 0.4);
}

/* MEDIA QUERIES */

/* =========================
   RESPONSIVE: Tablet
   (hasta 1024px)
========================= */
@media screen and (max-width: 1024px) {
    .hero-texto h2 {
        font-size: 32px;
    }
    
    .seccion-titulo {
        font-size: 32px;
    }
    
    .proyecto-tarjeta {
        flex: 1 1 280px;
    }
}

/* =========================
   RESPONSIVE: Tablet pequeña
   (hasta 768px)
========================= */
@media screen and (max-width: 768px) {
    .top-banner {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .nav-principal {
        justify-content: center;
        gap: 15px;
        padding: 15px;
    }
    
    .logo {
        text-align: center;
        width: 100%;
    }
    
    .nav-lista {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-texto h2 {
        font-size: 28px;
    }
    
    .seccion-contenedor {
        padding: 40px 15px;
    }
    
    .seccion-titulo {
        font-size: 28px;
    }
    
    .sobre-mi-contenido {
        flex-direction: column;
        text-align: center;
    }
    
    .contacto-contenedor {
        flex-direction: column;
    }
    
    .boton-flotante,
    .boton-volver {
        bottom: 20px;
        right: 20px;
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .boton-volver {
        left: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

/* =========================
   RESPONSIVE: Celular
   (hasta 480px)
========================= */
@media screen and (max-width: 480px) {
    .top-banner {
        font-size: 11px;
    }
    
    .nav-principal {
        padding: 10px;
    }
    
    .nav-lista a {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .hero-texto h2 {
        font-size: 24px;
    }
    
    .hero-texto p {
        font-size: 16px;
    }
    
    .seccion-titulo {
        font-size: 24px;
    }
    
    .proyectos-contenedor {
        gap: 20px;
    }
    
    .proyecto-tarjeta {
        flex: 1 1 100%;
    }
    
    .hobbie-destacado {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .footer-contenido {
        flex-direction: column;
        gap: 30px;
    }
}