/* [ESTILOS GENERALES] */

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Cambria, "Times New Roman", serif;
    background: linear-gradient(135deg, #f4f4f9, #dce3f4);
    line-height: 1.4;
    color: #333333;
    padding-top: 50px;
}

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

/* [HEADER - BARRA DE NAVEGACIÓN FIJA] */

header {
    background-color: #264653;
    color: white;
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 20px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* [BARRA DE NAVEGACIÓN] */

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
}

header h1 {
    color: #ffffff;
    font-size: 1.8rem;
    text-shadow: 2px 2px 6px #2a9d8f;
}

nav {
    width: 100%;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    color: #2a9d8f;
    text-decoration: underline;
}

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

/* [SECCIONES] */

section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

h2 {
    font-size: 2.3rem;
    color: #264653;
    margin-bottom: 30px;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #2a9d8f;
    margin: 15px auto;
    border-radius: 2px;
}

p {
    font-size: 1.2rem;
    margin: 20px auto;
    max-width: 1000px;
    line-height: 1.6;
    text-align: center;
}

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

/* [SECCIÓN SOBRE MÍ] */

#sobre-mi {
    padding-top: 80px;
}

.perfil-contenedor {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 40px auto;
    max-width: 800px;
}

.foto-perfil {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 5px solid #2a9d8f;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    z-index: 1;
}

.perfil-info {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(30px);
    width: 300px;
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
    border-left: 4px solid #2a9d8f;
}

.perfil-contenedor:hover .perfil-info {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(20px);
}

.perfil-contenedor:hover .foto-perfil {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.perfil-info::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 12px;
    border-style: solid;
    border-color: transparent white transparent transparent;
}

.info-titulo {
    color: #264653;
    font-size: 1.6rem;
    margin-bottom: 8px;
    text-align: left;
}

.info-subtitulo {
    color: #2a9d8f;
    font-style: italic;
    text-align: left;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.info-lista {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    text-align: left;
}

.info-lista li {
    padding: 10px 0;
    display: flex;
    align-items: center;
    font-size: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.info-lista li:last-child {
    border-bottom: none;
}

.info-lista i {
    color: #2a9d8f;
    width: 25px;
    text-align: center;
    margin-right: 10px;
    font-size: 1.2rem;
}

.btn-ver {
    display: inline-block;
    background-color: #264653;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-ver:hover {
    background-color: #1a3340;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-ver i {
    margin-right: 8px;
}

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

/* [SECCIÓN HABILIDADES] */

.habilidades {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-top: 40px;
}

.habilidad-carta {
    background-color: white;
    width: 250px;
    padding: 25px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.habilidad-carta:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.habilidad-carta h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #264653;
}

.progreso-contenedor {
    width: 100%;
    background-color: #f0f0f0;
    border-radius: 5px;
    margin-top: 15px;
}

.progreso-barra {
    height: 20px;
    border-radius: 5px;
    background-color: #2a9d8f;
    position: relative;
    transition: width 1s ease-in-out;
}

.progreso-texto {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

/* [SECCIÓN TECNOLOGÍAS] */

.tecnologias {
    background-color: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-top: 40px;
}

.tecnologias-grilla {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
}

.tecnologias-item {
    width: 100px;
    text-align: center;
    transition: all 0.3s ease;
}

.tecnologias-item:hover {
    transform: translateY(-5px);
}

.tecnologias-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 10px;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.tecnologias-item:hover img {
    filter: grayscale(0%);
}

.tecnologias-item p {
    font-size: 0.9rem;
    color: #555;
    margin-top: 5px;
}

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

/* [SECCIÓN PROYECTOS] */

.proyectos {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
}

.proyecto-carta {
    background-color: white;
    width: 300px;
    padding: 25px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: auto;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.proyecto-carta:hover,
.proyecto-carta:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background-color: #2a9d8f;
    color: white;
}

.proyecto-carta h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #2a9d8f;
    transition: color 0.3s ease;
}

.proyecto-imag {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.proyecto-carta:hover .proyecto-imag {
    transform: scale(1.03);
}

.proyecto-carta:hover h3 {
    color: white;
}

.proyecto-carta p {
    font-size: 1rem;
    margin: 15px 0;
    color: #555;
    transition: color 0.3s ease;
}

.proyecto-carta:hover p {
    color: white;
}

.proyecto-carta-link {
    text-decoration: none;
    color: inherit;
}

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

/* [SECCIÓN UBICACIÓN] */

.mapa-contenedor {
    width: 100%;
    max-width: 700px;
    height: 350px;
    margin: 40px auto 0;
    border-radius: 10px;
    overflow: hidden;
    border: 5px solid #2a9d8f;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.mapa-contenedor:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.mapa-contenedor iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* [PIE DE PÁGINA - FOOTER] */

footer {
    background-color: #264653;
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
}

footer p {
    margin-bottom: 15px;
    color: white;
}

footer a {
    color: white;
    margin: 0 10px;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

footer a:hover {
    color: #2a9d8f;
    transform: translateY(-3px);
}


/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

/* [RESPONSIVE < 768px] */
@media (max-width: 768px) {

    /* [BARRA DE NAVEGACIÓN] */

    header {
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
    }

    header nav {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        gap: 10px;
    }

    header h1 {
        font-size: 1.4rem;
        text-align: center;
        width: 100%;
    }

    nav ul {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 5px;
        padding: 0;
        margin: 0;
    }

    nav ul li {
        margin: 0;
    }

    nav ul li a {
        font-size: 0.85rem;
        padding: 5px 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: white;
        text-decoration: none;
        display: block;
        text-align: center;
    }

    nav ul li a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: #2a9d8f;
    }

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

    /* [SOBRE MÍ] */

    .perfil-contenedor {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .foto-perfil {
        width: 250px;
        height: 250px;
    }

    .perfil-info {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        max-width: 300px;
        margin: 20px auto 0;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    }

    .perfil-info::before {
        content: none;
    }

    .perfil-contenedor:hover .perfil-info,
    .perfil-contenedor:hover .foto-perfil {
        transform: none;
        box-shadow: none;
    }

    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

    /* [SECCIONES] */

    .habilidades,
    .proyectos {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .habilidad-carta,
    .proyecto-carta {
        width: 100%;
        max-width: 350px;
        margin-bottom: 20px;
        padding: 15px;
        border-radius: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0);
    }

    .proyecto-carta h3 {
        font-size: 1.4em;
    }

    .proyecto-carta p {
        font-size: 1em;
    }

    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

    /* [#TECNOLOGÍAS] */

    .tecnologias-item {
        width: 70px;
    }

    .tecnologias-item img {
        width: 40px;
        height: 40px;
    }

    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

    /* [#UBICACIÓN] */

    #ubicacion h2 {
        font-size: 1.5em;
        margin-bottom: 10px;
    }

    .mapa-contenedor {
        width: 100%;
        height: 200px;
    }

    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

    /* [PIE DE PÁGINA - FOOTER] */


    footer {
        padding: 20px 10px;
    }

    footer p {
        font-size: 0.95rem;
    }

    footer a {
        font-size: 1.2em;
    }

}