:root {
    --primary-color: #0056b3; /* Un azul profesional */
    --secondary-color: #e2e6ea; /* Gris claro para secciones alternas */
    --text-color: #333;
    --heading-color: #222;
    --white: #fff;
    --light-grey: #f4f4f4;
    --dark-grey: #666;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-grey);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
    padding: 20px 0;
}

header {
    background: var(--primary-color);
    color: var(--white);
    padding-top: 20px;
    border-bottom: 5px solid #004085;
    text-align: center;
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--white);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.header-info h1 {
    margin: 10px 0 5px;
    font-size: 2.5em;
    color: var(--white);
}

.header-info h2 {
    margin: 0 0 10px;
    font-size: 1.5em;
    color: var(--secondary-color);
}

.header-info p {
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto;
}

header nav {
    background: #004085;
    padding: 10px 0;
    margin-top: 20px;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

header nav ul li {
    margin: 0 15px;
}

header nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: bold;
    padding: 8px 15px;
    transition: background-color 0.3s ease;
    border-radius: 5px;
}

header nav ul li a:hover {
    background-color: #002d5a;
}

.section {
    padding: 40px 0;
    border-bottom: 1px solid #ddd;
}

.section:last-of-type {
    border-bottom: none;
}

.section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--heading-color);
    font-size: 2.2em;
    position: relative;
    padding-bottom: 10px;
}

.section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

.bg-light {
    background-color: var(--secondary-color);
}

.job-entry {
    background: var(--white);
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease-in-out;
}

.job-entry:hover {
    transform: translateY(-5px);
}

.job-entry h3 {
    margin: 0 0 5px;
    color: var(--primary-color);
    font-size: 1.6em;
}

.job-entry h4 {
    margin: 0 0 10px;
    color: var(--dark-grey);
    font-size: 1.2em;
}

.job-entry .dates {
    font-style: italic;
    color: #777;
    margin-bottom: 15px;
}

.job-entry ul {
    list-style: disc;
    margin-left: 20px;
    padding: 0;
}

.job-entry ul li {
    margin-bottom: 8px;
    align-content: flex-end;
}

/* Estilos para Tecnologías */
#tecnologias h3 {
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.8em;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 5px;
}

#tecnologias ul {
    list-style: disc;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    white-space: wrap; 
    overflow-x: auto; /* Permite desplazamiento horizontal si es necesario */
    word-wrap: break-word;
    
}

#tecnologias ul li {
    display: inline;
    background: var(--white);
    padding: 8px 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-size: 0.95em;
    white-space: wrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    word-wrap: break-word;
    
    
}

/* Estilos para Contacto */
.contact-methods {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
    color: var(--text-color);
}

.contact-item i {
    font-size: 1.5em;
    color: var(--primary-color);
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #003d80;
    text-decoration: underline;
}

.contact-item small {
    display: block;
    font-size: 0.8em;
    color: #888;
    margin-top: 5px;
}

footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}


footer nav {
    background: #004085;
    padding: 10px 0;
    margin-top: 20px;
}

footer nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

footer nav ul li {
    margin: 0 15px;
}

footer nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: bold;
    padding: 8px 15px;
    transition: background-color 0.3s ease;
    border-radius: 5px;
}

footer nav ul li a:hover {
    background-color: #002d5a;
}

/* Media Queries para Responsividad */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    header nav ul {
        flex-direction: column;
        align-items: center;
    }

    header nav ul li {
        margin: 5px 0;
    }

    .section h2 {
        font-size: 1.8em;
    }

    .job-entry h3 {
        font-size: 1.4em;
    }

    .job-entry h4 {
        font-size: 1em;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
    }
}