/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f0f4f8;
    color: #333;
    padding: 20px;
    align-items: center;
}

/* Encabezado */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #1f3b58;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: padding 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 20px;
    transition: padding 0.4s ease;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: 10%;
    /* Transición suave para el avatar */
    transition: width 0.3s ease, height 0.3s ease;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    font-weight: bold;
    /* Transición suave para el título */
    transition: font-size 0.4s ease, margin-bottom 0.4s ease;
}

header p {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 1;
    max-height: 100px;
    overflow: hidden;
    /* Transición suave de opacidad y altura máxima */
    transition: opacity 0.3s ease, max-height 0.4s ease, margin 0.3s ease;
}

header p.desktop-degree {
    display: block;
    font-size: 1.3rem;
    font-weight: 300;
}

header p.mobile-desc {
    display: none;
}

header p.header-links {
    display: block;
    font-size: 1.1rem;
}

header a {
    color: #e6e6e6;
    font-weight: inherit;
}

header a:hover {
    color: #fff;
}

header .header-text {
    justify-items: center;
}

/* Main layout */
main {
    max-width: 90%;
    margin: 200px auto 0 auto;
}

/* Secciones generales */
section {
    margin: 20px 0;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

section h2 {
    font-size: 2rem;
    color: #1f3b58;
    border-bottom: 2px solid #1f3b58;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

/* Estilos para experiencia y educación */
.job,
.education {
    margin-bottom: 15px;
}

.job h3,
.education h3 {
    font-size: 1.5rem;
    color: #333;
}

.job p,
.education p {
    font-size: 1rem;
    color: #777;
}

.job ul,
.education ul {
    margin-top: 10px;
    padding-left: 20px;
}

.job ul li,
.education ul li {
    margin-bottom: 5px;
    font-size: 1rem;
}

.education {
    display: flex;
}

.education .university-logo {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    flex-shrink: 0;
}

.education .university-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Habilidades y lista */
ul {
    list-style-type: disc;
    padding-left: 20px;
}

ul li {
    margin-bottom: 8px;
    font-size: 1rem;
    color: #555;
}

ul.tec li {
    display: inline-block;
    margin-right: 10px;
    border-radius: 10px;
    padding: 5px 10px;
    text-align: center;
    color: white;
}

.php {
    background-color: #4F5B93;
}

.laravel {
    background-color: #FF2D20;
}

.angular {
    background-color: #DD0031;
}

.git {
    background-color: #F05032;
}

.bitbucket {
    background-color: #2684FF;
}

.jira {
    background-color: #0052CC;
}

.typescript {
    background-color: #3178C6;
}

.jquery {
    background-color: #0769AD;
}

.postgresql {
    background-color: #336791;
}

.mysql {
    background-color: #00758F;
}

/* Estilo de los enlaces */
a {
    color: #1f3b58;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

a:hover {
    color: #007acc;
    text-decoration: underline;
}

/* Sección de insignias y certificados */
#badges h3 {
    margin-top: 15px;
    margin-bottom: 10px;
    color: #1f3b58;
}

#badges .other-course ul {
    list-style: none;
    padding-left: 0;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
}

#badges .other-course ul li {
    display: inline-block;
    vertical-align: top;
    margin-bottom: 15px;
    margin-right: 15px;
}

.course {
    display: flex;
    align-items: flex-start;
    width: 350px;
    white-space: normal;
}

.badge-img-square {
    width: 5rem;
    height: auto;
    border-radius: 0%;
    object-fit: contain;
}

.badge-img-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #2d3134;
    object-fit: cover;
}

#badges .other-course .course-info {
    margin-left: 10px;
}

.aws-badges-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 15px;
    list-style: none;
    padding-left: 0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.aws-badges-grid li {
    flex-shrink: 0;
}

.aws-badges-grid li img {
    width: 120px;
    /* Tamaño exacto pedido para AWS */
    height: auto;
    transition: transform 0.2s ease;
    color-scheme: dark !important;
}

.aws-badges-grid li img:hover {
    transform: scale(1.05);
}

/* Sección de contacto */
#contacto p {
    font-size: 1.2rem;
    color: #333;
}

/* Pie de página */
footer {
    text-align: center;
    padding: 10px;
    background-color: #1f3b58;
    color: white;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

header p.desktop-degree {
    display: block;
}

header p.mobile-desc {
    display: none;
}

header p.header-links {
    display: block;
    font-size: 1.1rem;
}

header a {
    color: #e6e6e6;
    font-weight: inherit;
    transition: color 0.3s ease;
}

header a:hover {
    color: #fff;
}

/* Header reducido al scroll */
.header-small {
    height: 100px;
}

.header-small .header-content {
    height: 100%;
    padding: 0px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-small .profile-pic {
    width: 75px;
    height: 75px;
}

.header-small h1 {
    font-size: 2rem;
    margin-bottom: 0;
}

.header-small p {
    opacity: 0;
    max-height: 0;
    margin: 0;
    pointer-events: none;
}

/* Media queries para móviles */
@media (max-width: 768px) {
    .header-content {
        justify-content: center;
        padding: 15px 10px;
    }

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

    header h1 {
        font-size: 1.6rem;
        margin-bottom: 5px;
    }

    /* Reglas de texto en móvil */
    header p.desktop-degree,
    header p.header-links {
        display: none !important;
    }

    header .header-text {
        margin-left: 20px;
        justify-items: center;
    }

    header p.mobile-desc {
        display: block !important;
        font-size: 1.1rem;
        line-height: 1.3;
    }

    /* Estado contraído en móvil */
    header.header-small {
        height: 80px;
    }

    .header-small .header-content {
        justify-content: space-between;
        padding: 8px 10px;
    }

    .header-small .profile-pic {
        width: 50px;
        height: 50px;
    }

    .header-small h1 {
        font-size: 1.3rem;
    }

    .header-small p.mobile-desc {
        opacity: 0;
        max-height: 0;
        margin: 0;
    }

    section h2 {
        font-size: 1.4rem;
    }

    body {
        padding: 10px;
    }

    main {
        margin-top: 130px;
    }

    .university-logo {
        margin-top: .7em;
    }
}