/* Paleta de Colores y Variables */
:root {
    --fondo-gradiente:linear-gradient(135deg, #81b2a9 0%, #a48ba7 45%, #768f9a 100%);
    --fondo-principal: #f1dff8; /* Un lila/rosa ultra claro */
    --texto-oscuro: #2C1A4D; /* Morado muy oscuro para leer bien */
    --lila-pastel: #E2D1F9;
    --rosa-pastel: #FFC4D9;
    --azul-claro: #AEC6CF;
    --blanco-tarjetas: #ffffff;
    --sombra-suave: rgba(177, 156, 217, 0.2);
    --verde-menta: #8ee5cc;
}

/* Reset básico para que se vea igual en todos los navegadores */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: var(--fondo-gradiente);
    
    background-attachment: fixed; /* El fondo se queda fijo al hacer scroll */
    min-height: 100vh;
    color: var(--texto-oscuro);
    line-height: 1.6;
}

/* --- Navegación --- */
header {
    background-color: var(--blanco-tarjetas);
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px var(--sombra-suave);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--texto-oscuro);
}

.menu {
    list-style: none;
    display: flex;
    gap: 20px;
}

.menu a {
    text-decoration: none;
    color: var(--texto-oscuro);
    font-weight: 600;
    transition: color 0.3s ease;
}

.menu a:hover {
    color: var(--rosa-pastel);
}
.nav-principal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
/* --- Secciones Generales --- */
section {
    padding: 80px 50px;
    text-align: center;
}

h2 {
    font-size: 32px;
    margin-bottom: 40px;
    color: var(--texto-oscuro);
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    width: 50%;
    height: 4px;
    background-color: var(--lila-pastel);
    display: block;
    margin: 10px auto 0;
    border-radius: 2px;
}

/* --- Habilidades --- */
.skills-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.skill-tag {
    background-color: var(--blanco-tarjetas);
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    box-shadow: 0 4px 10px var(--sombra-suave);
    border: 2px solid var(--lila-pastel);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background-color: var(--lila-pastel);
    transform: scale(1.1);
}

/* --- Proyectos --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.project-card {
    background-color: var(--blanco-tarjetas);
    padding: 30px;
    border-radius: 20px;
    border: 3px solida var(--verde-menta);
    box-shadow: 0 4px 15px rgba(142, 229, 204, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 5px solid var(--azul-claro);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(142,229,204,0.8);
}

.project-card h3 {
    margin-bottom: 15px;
    color: var(--texto-oscuro);
}

/* --- Footer --- */
footer {
    background-color: var(--texto-oscuro);
    color: var(--fondo-principal);
    text-align: center;
    padding: 50px 20px;
    margin-top: 50px;
}

footer h2 {
    color: var(--fondo-principal);
}

footer h2::after {
    background-color: var(--rosa-pastel);
}

.social-links {
    margin: 20px 0;
}

.social-links a {
    color: var(--lila-pastel);
    text-decoration: none;
    margin: 0 15px;
    font-size: 18px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--azul-claro);
}

/* --- Estilos para las Imágenes de las Tarjetas --- */
.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 8px var(--sombra-suave);
}



/* =========================================
   NUEVOS ESTILOS PARA HABILIDADES Y EDUCACIÓN (COLORIDOS)
   ========================================= */

/* --- HABILIDADES --- */
.skills-container-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    align-items: end;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

@media (max-width: 768px) {
    .skills-container-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.skill-item-box {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skill-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    font-family: sans-serif;
    display: flex;
    justify-content: center;
    width: 100%;
    position: relative;
}

.percent {
    position: absolute;
    right: 0;
    color: #777;
    font-weight: normal;
}

.progress-bar-bg {
    background-color: #e0e0e0;
    border-radius: 20px;
    height: 18px;
    width: 100%;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-bar-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 1s ease-in-out;
}

/* COLORES DE HABILIDADES */
.skill-js { background-color: #22B5D8; }    /* Cian */
.skill-html { background-color: #8DC63F; }  /* Verde Lima */
.skill-css { background-color: #F8B133; }   /* Amarillo Mango */
.skill-java { background-color: #D36C2F; }  /* Naranja */
.skill-python { background-color: #6A388F; } /* Morado */


/* --- EDUCACIÓN Y LIDERAZGO --- */
.education-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px;
}

@media (max-width: 992px) {
    .education-container { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .education-container { grid-template-columns: 1fr; }
}

.item-educacion {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
    justify-content: space-between;
    border: 1.5px solid var(--verde-menta);
    box-shadow: 0 4px 15px rgba(142, 229, 204, 0.4); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.item-educacion:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(142, 229, 204, 0.8);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.fecha-badge {
    font-size: 0.8rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    color: #fff;
}

.item-educacion h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 5px;
}

.item-educacion p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.btn-certificado {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.85rem;
    color: #fff;
}

/* TEMAS DE COLOR PARA LAS TARJETAS */
.color-cian .card-icon { color: #22B5D8; }
.color-cian .fecha-badge { background-color: #22B5D8; }
.color-cian .btn-certificado { background-color: #22B5D8; }
.color-cian .btn-certificado:hover { background-color: #1a8a9a; }

.color-verde .card-icon { color: #8DC63F; }
.color-verde .fecha-badge { background-color: #8DC63F; }
.color-verde .btn-certificado { background-color: #8DC63F; }
.color-verde .btn-certificado:hover { background-color: #6a9c33; }

.color-amarillo .card-icon { color: #F8B133; }
.color-amarillo .fecha-badge { background-color: #F8B133; }
.color-amarillo .btn-certificado { background-color: #F8B133; }
.color-amarillo .btn-certificado:hover { background-color: #e2a02b; }

.color-naranja .card-icon { color: #D36C2F; }
.color-naranja .fecha-badge { background-color: #D36C2F; }
.color-naranja .btn-certificado { background-color: #D36C2F; }
.color-naranja .btn-certificado:hover { background-color: #bc592a; }

.color-morado .card-icon { color: #6A388F; }
.color-morado .fecha-badge { background-color: #6A388F; }
.color-morado .btn-certificado { background-color: #6A388F; }
.color-morado .btn-certificado:hover { background-color: #552d70; }

/* --- habilidades blandas --- */
.soft-container {
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
}

@media (max-width: 992px) {
    .soft-container { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .soft-container { grid-template-columns: 1fr; }
}
.item-soft {
    background: #acf7f6;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid #ddd;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    justify-content: space-between;
}

.item-soft:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.soft-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.item-soft h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 5px;
}

.item-soft p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}


/* --- ESTILOS PARA LOS LOGOS DE HABILIDADES --- */
.skill-icon {
    width: 22px;
    height: 22px;
    margin-right: 8px; /* Separación entre el logo y la palabra */
    vertical-align: middle;
}

/* Ajuste para alinear perfectamente el icono con el texto */
.skill-name {
    display: flex;
    justify-content: center;
    align-items: center; /* Esto centra verticalmente el icono y el texto */
}




/* =========================================
   AJUSTES PARA CELULARES (RESPONSIVE DESIGN)
   ========================================= */
@media (max-width: 768px) {
    
    /* 1. Evitamos que la pantalla se desborde hacia los lados */
    body, html {
        overflow-x: hidden;
        width: 100%;
    }

    /* 2. Arreglamos el encabezado y el menú */
    header {
        flex-direction: column; /* Pone el nombre arriba y los botones abajo */
        padding: 15px;
        gap: 15px;
    }

    .menu {
        flex-wrap: wrap; /* Permite que los enlaces bajen de línea si no caben */
        justify-content: center; /* Centra los botones */
        gap: 10px;
    }

    .menu a {
        font-size: 0.85rem; /* Hace la letra un poquitín más pequeña */
        text-align: center;
    }

    /* 3. Ajustamos los espacios de las secciones para celulares */
    section {
        padding: 50px 20px; /* Menos espacio a los lados para aprovechar la pantalla */
    }

    /* 4. Ajustamos el tamaño del subtítulo de la máquina de escribir */
    .intro-text h2 {
        font-size: 1.5rem; 
    }
}

/* --- BOTÓN DE IDIOMA --- */
.btn-idioma {
    background-color: var(--lila-pastel);
    color: var(--texto-oscuro);
    padding: 6px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border: 2px solid var(--texto-oscuro); /* Borde estilo tech */
    box-shadow: 2px 2px 0px var(--texto-oscuro); /* Sombrita sólida retro */
    transition: all 0.2s ease;
    display: inline-block;
}

.btn-idioma strong {
    color: var(--rosa-pastel);
    background-color: var(--texto-oscuro);
    padding: 2px 6px;
    border-radius: 10px;
}

.btn-idioma:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0px var(--texto-oscuro);
    background-color: var(--azul-claro);
}
