/* RESET BÁSICO */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* EFECTO DE DESPLAZAMIENTO SUAVE */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #dde2e3;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* NAVEGACIÓN STICKY */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(223, 235, 253, 0.95);
    display: flex;
    justify-content: flex-end;
    padding: 15px 50px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.top-nav a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 30px;
    transition: all 0.3s ease;
}

.top-nav a:hover {
    color: #3498db;
    transform: translateY(-2px);
}

/* CABECERA (HERO) */
header {
    background-color: #dfebfd; 
    padding-top: 120px;
    padding-bottom: 70px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

header h2 {
    font-size: 1.3rem;
    color: #151515;
    font-weight: 300;
}

/* SOBRE MÍ */
.about {
    padding: 80px 0;
}

.about-columns {
    display: flex;
    gap: 80px; 
    align-items: center;
}

.about-text-col {
    flex: 1; 
}

.about-photo-col img {
    width: 250px; 
    height: 320px; 
    border-radius: 10px; 
    object-fit: cover; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); 
}

/* SKILLS */
.skills {
    padding: 60px 0; 
}

.skills-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: #2c3e50;
}

.skills-grid {
    display: flex;
    gap: 30px; 
    justify-content: space-between;
    flex-wrap: wrap; 
}

.skill-category {
    background: #ffffff; 
    border: 2px solid #dfebfd; 
    border-radius: 10px;
    padding: 25px;
    flex: 1; 
    min-width: 250px;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.05); 
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px); 
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; 
}

.skill-tags span {
    background-color: #f0f4f8; 
    color: #333;
    padding: 8px 15px;
    border-radius: 20px; 
    font-size: 0.95rem;
    font-weight: 500;
}

/* PROYECTOS */
.projects {
    padding: 60px 0;
}

.projects-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: #2c3e50;
}

.grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 25px;
    width: 300px;
    transition: all 0.3s ease;
    text-align: center; 
    text-decoration: none; 
    color: inherit;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.btn-detalles {
    color: #3498db;
    font-weight: bold;
    display: inline-block;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.card:hover .btn-detalles {
    color: #1a5276;
    transform: translateX(8px);
}

/* FOOTER */
footer {
    text-align: center;
    padding: 60px 0;
    background-color: #2c3e50;
    color: white;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 60px; 
    margin-top: 20px;
}

.social-links a {
    color: #3498db;
    font-size: 2.5rem; 
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: #ffffff;
    transform: translateY(-5px);
}

/* --- NUEVO: ARREGLO PARA LA NUBE DE GITHUB --- */

.skill-tags span.github-tag {
    padding: 0; /* Quitamos el padding del span para que lo maneje el enlace */
    background-color: transparent; /* El fondo lo pondrá el enlace de dentro */
}

.skill-tags span.github-tag a {
    text-decoration: none;  /* Quita la línea azul */
    color: #333;           /* Color de texto igual a las demás etiquetas */
    background-color: #e1f5fe; /* Azulito claro de fondo */
    padding: 8px 15px;      /* Padding igual a las otras etiquetas */
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

/* Cambio de color al pasar la flecha (Hover) */
.skill-tags span.github-tag a:hover {
    background-color: #3498db; /* Azul corporativo */
    color: #ffffff;           /* Texto en blanco para resaltar */
}

/* --- NUEVO: ESTILOS PARA LAS IMÁGENES CUSTOM DE PROYECTOS --- */

/* Alineación de la imagen y el texto en el título del proyecto */
.card h3 {
    display: flex; /* Activa Flexbox */
    align-items: center; /* Alineación vertical perfecta al centro */
    justify-content: center; /* Mantiene el título centrado en la tarjeta */
    gap: 10px; /* Separación entre la imagen y el texto */
    margin-bottom: 15px; /* Espacio debajo del título */
}

/* Estilo controlado para las imágenes de los proyectos */
.project-icon {
    width: 35px;  /* Controlamos el ancho para que parezca un icono */
    height: 35px; /* Controlamos el alto */
    object-fit: contain; /* Para que la imagen se ajuste sin estirarse */
    background-color: transparent; /* Mantiene el fondo limpio */
}

/* =========================================
   DISEÑO RESPONSIVO (MÓVILES) - INDEX
   ========================================= */
@media (max-width: 768px) {
    /* Ajustes del Menú de Navegación */
    .top-nav {
        justify-content: center;
        padding: 15px;
        flex-wrap: wrap;
        gap: 15px;
    }
    .top-nav a {
        margin-left: 0;
        font-size: 0.8rem;
    }

    /* Ajustes de la Cabecera (Hero) */
    header {
        padding-top: 150px; /* Más espacio arriba por si el menú ocupa dos líneas */
        padding-bottom: 50px;
    }
    header h1 {
        font-size: 2rem;
    }
    header h2 {
        font-size: 1.1rem;
        padding: 0 15px;
    }

    /* Ajustes de Sobre Mí (Poner la foto arriba y el texto abajo) */
    .about-columns {
        flex-direction: column-reverse; /* Foto arriba, texto abajo */
        gap: 30px;
        text-align: center;
    }
    .about-photo-col img {
        width: 200px;
        height: 250px;
    }
    .about-text-col {
        text-align: justify;
    }

    /* Ajustes de Skills */
    .skills-grid {
        flex-direction: column;
    }
    .skill-category {
        min-width: 100%; /* Las tarjetas ocupan todo el ancho */
    }

    /* Ajustes de Proyectos */
    .card {
        width: 100%; /* Las tarjetas de proyectos ocupan todo el ancho */
    }

    /* Ajustes del Footer */
    .social-links {
        gap: 30px; /* Reducimos el espacio entre iconos sociales */
    }
}