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

body {
    background-color: #ffffff;
    color: #3a3a3a;
    font-family: "Roboto", sans-serif;
    line-height: 1.5;
}

img {
    max-width: 100%;
}

h1 {
    color: #0a0a0a;
    font-size: clamp(2.25rem, 7vw, 4.375rem);
    line-height: 1.15;
}

h2 {
    color: #5b3d8f;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 40px;
    text-align: center;
}

h3 {
    color: #212121;
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.3;
}

p {
    color: #3a3a3a;
}

a {
    transition: background-color 0.4s, border-color 0.4s, color 0.4s;
}

/* Foco visible para quienes navegan con teclado */
a:focus-visible {
    outline: 3px solid #1e1e1e;
    outline-offset: 3px;
    border-radius: 4px;
}

footer a:focus-visible {
    outline-color: #ffffff;
}

main:focus {
    outline: none;
}

/* Texto solo para lectores de pantalla */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: -60px;
    left: 8px;
    z-index: 100;
    padding: 8px 12px;
    background: #000000;
    color: #ffffff;
}

.skip-link:focus {
    top: 8px;
}

.centrado {
    max-width: 44rem;
    margin: 18px auto;
    padding: 0 20px;
    text-align: center;
}

section {
    margin-bottom: 4rem;
    scroll-margin-top: 1rem;
}

/* ---------- Encabezado ---------- */
#container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 16px;
    margin-top: 5px;
    padding: 1rem;
    border-bottom: 3px solid #e4c00e;
    background-color: #ffffff;
}

.logo {
    width: clamp(170px, 16vw, 230px);
    height: auto;
}

.navbar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
}

.navbar a {
    display: block;
    padding: 15px;
    border-radius: 8px;
    color: #1e1e1e;
    text-align: center;
    text-decoration: none;
}

.navbar a:hover,
.navbar a:focus-visible {
    background-color: #4a304d;
    color: #f6f18a;
}

/* ---------- Introducción ---------- */
#Introduccion {
    margin: 20px;
    padding: 30px;
    border-radius: 8px;
    background-color: lab(72.79% 3.02 -15.1 / 0.398);
    text-align: center;
}

.kattiaux {
    width: clamp(64px, 9vw, 130px);
    height: clamp(64px, 9vw, 130px);
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    vertical-align: middle;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s;
}

.kattiaux:hover {
    transform: scale(1.08);
}

.bienvenidos {
    max-width: 48rem;
    margin: 20px auto 0;
}

/* ---------- Casos de estudio ---------- */
#card_estudio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 11px;
    margin: 20px clamp(16px, 3.5vw, 50px) 0;
    padding-bottom: 40px;
    border-radius: 8px;
    background-color: lab(87.8% 0.85 -5.25 / 0.398);
}

.card {
    margin: 40px clamp(8px, 1.4vw, 20px) 0;
    padding: 8px;
    overflow: hidden;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card img {
    display: block;
    width: 100%;
    height: auto;
}

.card_content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
}

.card_content h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.card_nota {
    margin-bottom: 8px;
    padding: 8px 12px;
    border-left: 4px solid #5b3d8f;
    border-radius: 4px;
    background-color: #f3f0f7;
    color: #2b2b2b;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.card_tipo {
    margin-bottom: 8px;
    color: #525252;
}

.descripcion {
    padding-bottom: 20px;
    color: #3a3a3a;
    font-size: 0.875rem;
    line-height: 1.5;
}

.card .descripcion {
    padding-bottom: 12px;
}

.etiquetas {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    list-style: none;
}

.etiqueta {
    padding: 10px;
    border-radius: 6px;
    background: #e1dee2;
    color: #1e1e1e;
    font-size: 0.75rem;
}

/* ---------- Botones y enlaces ---------- */
.btn {
    align-self: flex-start;
    margin-top: 10px;
    padding: 10px 16px;
    border-radius: 8px;
    background-color: #4a63c4;
    color: #ffffff;
    text-decoration: none;
}

.btn:hover {
    background-color: #d67e5c;
    color: #1e1e1e;
}

.box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 22px;
    margin: 20px;
}

.box-centrada {
    justify-content: center;
}

.button_box {
    padding: 10px 16px;
    border: 2px solid #3a3a3a;
    border-radius: 8px;
    background-color: #ffffff;
    color: #3a3a3a;
    font-size: 1rem;
    text-decoration: none;
}

.button_box:hover {
    border-color: #d67e5c;
    background-color: #d67e5c;
    color: #1e1e1e;
}

.link_interno {
    padding: 10px 16px;
    border: 2px solid #349a1a;
    border-radius: 8px;
    background-color: #349a1a;
    color: #ffffff;
    font-size: 1rem;
    text-decoration: none;
}

.link_interno:hover {
    border-color: #d67e5c;
    background-color: #d67e5c;
}

.connect-email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #333333;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.connect-email:hover {
    color: #111111;
    text-decoration: underline;
}

.email-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ---------- Habilidades ---------- */
#skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 11px;
    margin: 20px clamp(16px, 3.5vw, 50px) 0;
    padding-bottom: 40px;
}

.skillscard {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px clamp(0px, 1vw, 15px);
    padding: 20px;
    border-radius: 8px;
    background-color: lab(87.8% 0.85 -5.25 / 0.398);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.skillscard img {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.skillscard h3 {
    padding: 10px 0;
}

/* ---------- Contacto ---------- */
.contacto {
    padding: 40px 20px;
    background-color: lab(85.31% 0.86 -5.28 / 0.398);
}

.contacto h2 {
    margin-top: 0;
}

/* ---------- Pie de página ---------- */
footer {
    padding: 30px;
    background-color: #0336ff;
    color: #ffffff;
    text-align: center;
}

.footer-nombre {
    color: #ffffff;
    font-weight: 700;
}

.footer {
    padding: 12px;
    color: #e1dee2;
    font-weight: 300;
}

.finalp {
    color: #e1dee2;
    font-size: 0.875rem;
}

.navfooter ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.875rem;
    list-style: none;
}

.navfooter a {
    display: inline-block;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 8px;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
}

.navfooter a:hover {
    background-color: #f6f18a;
    color: #0336ff;
}

hr {
    border: 0;
    border-top: 1px solid #ffffff;
}

#final_footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.socialmedia {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    padding: 12px 0;
}

.socialmedia a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    transition: transform 0.3s;
}

.socialmedia a:hover {
    transform: translateY(-2px);
}

/* ---------- Respetar la preferencia de movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
    }

    .kattiaux:hover,
    .socialmedia a:hover {
        transform: none;
    }
}

/* ---------- Pantallas pequeñas ---------- */
@media (max-width: 480px) {
    #Introduccion {
        margin: 12px;
        padding: 24px 16px;
    }

    .navbar a {
        padding: 12px 10px;
    }

    #container {
        justify-content: center;
    }

    #final_footer {
        justify-content: center;
    }
}
