/* Paleta de colores:
   - Primario (fondo/texto principal): #333 (gris oscuro)
   - Secundario (acentos/iconos): #007bff (azul brillante, puedes cambiarlo)
   - Fondo de página: #f4f7f6 (gris claro sutil)
   - Bordes/divisores: #eee (gris muy claro)
   - Texto de subtítulos: #555 (gris medio)
*/

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0; /* Cambiado de 20px a 0 para que el padding lo maneje el contenedor */
    background-color: #f4f7f6;
    color: #333;
    display: flex; /* Mantenemos flex */
    flex-direction: column; /* ¡Aquí está la clave! Hace que los elementos se apilen verticalmente */
    min-height: 100vh; /* Asegura que el body ocupe al menos toda la altura de la ventana */
    align-items: center;
}

/*
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f4f7f6; Fondo suave para toda la página
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start; Alinea al inicio del contenedor 
    min-height: 100vh; Asegura que ocupe al menos el alto de la ventana
}
*/

.container {
    max-width: 900px;
    width: 100%;
    background-color: #fff;
    padding: 40px 50px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); /* Sombra sutil */
    margin: 30px 0; /* Espacio superior e inferior */
}

/* --- Encabezado de Perfil --- */

.header-content {
    text-align: left; /* Alinea el texto a la izquierda dentro de este div */
    flex-grow: 1; /* Permite que este div ocupe el espacio restante */
}

.profile-header {
    /* text-align: center;  <-- ¡ELIMINA O COMENTA ESTA LÍNEA! */
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
    /* --- ¡NUEVO! --- */
    display: flex; /* Habilitamos Flexbox */
    align-items: center; /* Alinea los ítems verticalmente al centro */
    gap: 40px; /* Espacio entre la foto y el texto/enlaces */
    /* --- FIN NUEVO --- */
}

/*
.profile-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee; Línea divisoria
}
*/

.profile-pic {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #007bff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* margin-bottom: 20px; <-- ¡ELIMINA O COMENTA ESTA LÍNEA! */
    flex-shrink: 0; /* Evita que la imagen se encoja si hay poco espacio */
}

/*
.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #007bff; Borde alrededor de la foto 
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}
*/

.profile-header h1 {
    font-size: 2.2em;
    margin: 0 0 5px; /* Ajustado para eliminar el margin-top si es necesario */
    color: #333;
    font-weight: 700;
}

/*
.profile-header h1 {
    font-size: 2.8em;
    margin: 10px 0 5px;
    color: #333;
    font-weight: 700;
}
*/

.profile-header .tagline {
    font-size: 1.3em;
    color: #555;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 300;
}

/*
.social-links a {
    text-align: left;
}
*/

.social-links a {
    color: #007bff;
    font-size: 1.8em;
    margin: 0 12px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #0056b3; /* Un poco más oscuro al pasar el ratón */
}

/* --- Secciones Generales --- */
.section {
    margin-bottom: 30px;
}

.section h2 {
    font-size: 2em;
    color: #007bff; /* Color de acento para los títulos de sección */
    margin-bottom: 20px;
    border-bottom: 2px solid #eee; /* Subrayado sutil */
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    font-weight: 700;
}

.icon-left {
    margin-right: 10px;
    font-size: 0.9em;
    color: #555; /* Color del icono */
}

/* --- Secciones Específicas --- */
.about-me p {
    font-size: 1.1em;
    text-align: justify;
}

.job, .degree, .project-item {
    margin-bottom: 25px;
    padding-left: 15px; /* Indentación para las viñetas */
    border-left: 3px solid #007bff; /* Barra lateral de acento */
    position: relative;
}

.job::before, .degree::before, .project-item::before {
    content: '';
    position: absolute;
    left: -6px; /* Ajusta la posición del círculo */
    top: 8px;
    width: 10px;
    height: 10px;
    background-color: #007bff; /* Color del círculo */
    border-radius: 50%;
}


.job h3, .degree h3, .project-item h3 {
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 5px;
    color: #333;
    font-weight: 600;
}

.company, .institution {
    font-weight: 400;
    color: #555;
    margin-bottom: 5px;
    font-size: 1.05em;
}

.dates {
    font-style: italic;
    color: #777;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.job ul {
    list-style-type: disc; /* Viñetas normales */
    margin-left: 20px;
    padding: 0;
}

.job ul li {
    margin-bottom: 8px;
}

/* --- Habilidades --- */
.skills-category {
    margin-bottom: 20px;
}

.skills-category h3 {
    font-size: 1.3em;
    color: #007bff; /* Color de acento para categorías de habilidad */
    margin-bottom: 10px;
    border-bottom: 1px dashed #eee; /* Línea de guiones */
    padding-bottom: 5px;
}

.skill-list {
    list-style-type: none; /* Sin viñetas predeterminadas */
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Espacio entre los elementos de habilidad */
}

.skill-list li {
    background-color: #e9f7ff; /* Fondo claro para cada habilidad */
    color: #007bff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.95em;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.skill-list li:hover {
    background-color: #cce9ff;
    transform: translateY(-2px);
}

/* --- Proyectos --- */
.project-description {
    margin-top: 5px;
    margin-bottom: 10px;
    font-size: 1.05em;
    color: #555;
}

.project-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.project-link a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* --- Contacto --- */
.contact ul {
    list-style-type: none;
    padding: 0;
}

.contact ul li {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.contact ul li a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact ul li a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* --- Divisor Gráfico --- */
.divider {
    height: 1px;
    background: linear-gradient(to right, #eee, #007bff, #eee); /* Degradado sutil */
    margin: 40px 0; /* Espacio alrededor del divisor */
    border-radius: 5px;
}

/* --- Pie de Página --- */
footer {
    text-align: center;
    margin-top: auto; /* Esto empuja el footer hacia abajo */
    padding: 20px; /* Añadimos padding aquí en lugar del body */
    border-top: 1px solid #eee;
    color: #777;
    font-size: 0.9em;
    width: 100%; /* Asegura que ocupe todo el ancho disponible */
    box-sizing: border-box; /* Incluye padding y borde en el ancho total */
}

/*
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #777;
    font-size: 0.9em;
}
*/

/* --- Media Queries para Responsividad (Dispositivos Móviles) --- */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 30px 25px;
        margin: 20px 0;
    }

    .profile-header h1 {
        font-size: 2.2em;
    }

    .profile-header .tagline {
        font-size: 1.1em;
    }

    .social-links a {
        font-size: 1.5em;
        margin: 0 8px;
    }

    .section h2 {
        font-size: 1.7em;
    }

    .job h3, .degree h3, .project-item h3 {
        font-size: 1.2em;
    }

    .company, .institution, .dates, .project-description {
        font-size: 1em;
    }

    .job ul {
        margin-left: 15px;
    }

    .skill-list li {
        padding: 6px 12px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }

    .profile-pic {
        width: 120px;
        height: 120px;
    }

    .profile-header h1 {
        font-size: 1.8em;
    }

    .profile-header .tagline {
        font-size: 1em;
    }

    .section h2 {
        font-size: 1.5em;
    }
}