/**********************************************/
/*            VARIABLES GLOBALES              */
/**********************************************/
:root {
    --color-primary: #066997;
    --color-primary-hover: #319bff;
    --color-bg-footer: #171717;
    --color-text-footer: #fff;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

html {
    background: url(fondo.png) no-repeat center center fixed;
    background-size: cover;
    font-family: var(--font-family);
}

body {
    background: transparent;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/**********************************************/
/*                  HEADER                    */
/**********************************************/
.header {
    font-size: clamp(24px, 3vw, 30px);
    text-align: center;
    color: #040c3a;
    padding: 1rem;
}

/**********************************************/
/*                 PORTADA PAGE               */
/**********************************************/
.portada .quick-access {
    text-align: center;
    padding: 2rem 0;
}

.portada .quick-access h2 {
    margin-bottom: 1.5rem;
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: center;
    padding: 0 1rem 1rem 1rem;
}

.button_index {
    position: relative;
    display: inline-block;
    margin: 0.5% auto;
    padding: 1em 1em;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    letter-spacing: 5px;
    text-transform: uppercase;
    cursor: pointer;
    color: var(--color-primary);
    font-size: 15px;
    text-align: center;
    text-decoration: none;
    outline: 2px solid var(--color-primary);
    overflow: hidden;
    transition: color 0.4s, transform 0.4s, outline 0.4s, box-shadow 0.4s;
}
.button_index::before {
    content: "";
    position: absolute;
    left: -50px;
    top: 0;
    width: 0;
    height: 100%;
    background-color: #5badfa;
    transform: skewX(45deg);
    z-index: -1;
    transition: width 600ms;
}
.button_index:hover {
    color: #fff;
    transform: scale(1.1);
    outline: 2px solid var(--color-primary-hover);
    box-shadow: 4px 5px 17px -4px var(--color-primary);
}
.button_index:hover::before {
    width: 250%;
}
.button_index:focus-visible {
    outline: 2px solid var(--color-primary-hover);
    outline-offset: 4px;
}

.portada main section {
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
    color: #040c3a;
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.6;
    text-align: justify;
    hyphens: auto;
}
.portada main section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}
.portada main section p {
    margin-bottom: 1rem;
}

/**********************************************/
/*                SOBRE MÍ PAGE               */
/**********************************************/
.sobre-mi-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
}
.card-presentacion,
.card-habilidades {
    background-color: #ffffffcc;
    max-width: 700px;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    backdrop-filter: blur(5px);
    color: #040c3a;
    font-size: 18px;
    text-align: justify;
}
.card-presentacion h2,
.card-habilidades h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 24px;
    color: var(--color-primary);
}
.card-presentacion p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.foto-perfil {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.foto-perfil img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-perfil {
    width: 190px;
    height: 254px;
    background: #3405a3;
    border-radius: 15px;
    box-shadow: 1px 5px 60px 0 #100a886b;
}
.card-perfil .card-border-top {
    width: 60%;
    height: 3%;
    background: #6b64f3;
    margin: auto;
    border-radius: 0 0 15px 15px;
}
.card-perfil span {
    font-weight: 600;
    color: #fff;
    text-align: center;
    display: block;
    padding-top: 10px;
    font-size: 16px;
}
.card-perfil .job {
    font-weight: 400;
    color: #fff;
    display: block;
    text-align: center;
    padding-top: 3px;
    font-size: 12px;
}
.card-perfil .img {
    width: 70px;
    height: 80px;
    background: #6b64f3;
    border-radius: 15px;
    margin: auto;
    margin-top: 25px;
}

/* Botón azul */
.button-blue {
    position: relative;
    display: block;
    padding: 14px 25px;
    margin: 20px auto;
    border: none;
    border-radius: 8px;
    background: #6b64f3;
    color: #fff;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.4s, transform 0.4s, outline 0.4s, box-shadow 0.4s;
    overflow: hidden;
}
.button-blue::before {
    content: "";
    position: absolute;
    left: -50px;
    top: 0;
    width: 0;
    height: 100%;
    background-color: #d0ebff;
    transform: skewX(45deg);
    z-index: -1;
    transition: width 600ms;
}
.button-blue:hover {
    color: #003049;
    transform: scale(1.05);
    outline: 2px solid var(--color-primary-hover);
    box-shadow: 4px 5px 17px -4px var(--color-primary);
}
.button-blue:hover::before {
    width: 250%;
}
.button-blue:focus-visible {
    outline: 2px solid var(--color-primary-hover);
    outline-offset: 4px;
}

/* Habilidades */
.card-habilidades {
    background-color: #ffffffcc;
    max-width: 700px;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    color: #040c3a;
    text-align: center;
    margin: 0 auto;
}
.card-habilidades h2 {
    margin-bottom: 1.5rem;
    font-size: 24px;
    color: var(--color-primary);
}
.iconos-habilidades {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
}
.habilidad-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
}
.icono-habilidad {
    width: 70px;
    height: 70px;
    padding: 15px;
    border-radius: 20px;
    background-color: rgba(255,255,255,0.3);
    transition: all 0.3s;
    margin-bottom: 8px;
}
.nombre-tecnologia {
    font-size: 14px;
    font-weight: 500;
    color: #040c3a;
    text-align: center;
    margin-top: 5px;
}

.icono-habilidad:hover {
    transform: translateY(-5px);
    background-color: rgba(255,255,255,0.5);
}

/* Colores de iconos */
.icono-habilidad[title="Python"],
.icono-habilidad[data-tecnologia="Python"] {
    fill: #3776AB;
}
.icono-habilidad[title="WordPress"],
.icono-habilidad[data-tecnologia="WordPress"] {
    fill: #21759B;
}
.icono-habilidad[title="Ubuntu"],
.icono-habilidad[data-tecnologia="ubuntu"] {
    fill: #E95420;
}
.icono-habilidad[title="HTML5"],
.icono-habilidad[data-tecnologia="HTML"] {
    fill: #E34F26;
}
.icono-habilidad[title="CSS3"],
.icono-habilidad[data-tecnologia="CSS"] {
    fill: #1572B6;
}
.icono-habilidad[title="Oracle"],
.icono-habilidad[data-tecnologia="Oracle"] {
    fill: #F80000;
}
.icono-habilidad[title="MongoDB"],
.icono-habilidad[data-tecnologia="MongoDB"] {
    fill: #47A248;
}
.icono-habilidad[title="Java"],
.icono-habilidad[data-tecnologia="Java"] {
    fill: #007396;
}

/**********************************************/
/*              CONTACTO PAGE                 */
/**********************************************/
.copy-button {
    text-align: center;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background-color: #a5d8ff;
    border-radius: 8px;
    cursor: text;
    font-weight: 600;
    user-select: all;
    width: auto;
}
.copy-button:focus-within {
    outline: 2px solid #74c0fc;
}
.copy-icon {
    width: 20px;
    height: 20px;
    fill: #003049;
    pointer-events: none;
}
.copy-input {
    text-align: center;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #003049;
    width: 100%;
    max-width: 205%;
    min-width: 100px;
    cursor: text;
    user-select: all;
    outline: none;
    font-weight: 600;
    box-sizing: border-box;
}

/**********************************************/
/*            PROYECTOS PAGE                  */
/**********************************************/
body.proyectos main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    padding: 2rem 1rem;
}
.card {
    width: 100%;
    max-width: 720px;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(4px);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    color: #040c3a;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.card h2 {
    font-size: clamp(22px,4vw,28px);
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 0.5rem;
}
.card p {
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}
.button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

/* Botón GitHub */
.Btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    margin-top: 10px;
    background: #24292e;
    color: #fff;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    overflow: hidden;
    transition: background 0.3s, transform 0.3s;
}
.Btn:hover {
    background: #8bbdf7;
    transform: translateY(-2px);
}
.Btn .svgContainer {
    display: flex;
    align-items: center;
    justify-content: center;
}
.Btn svg {
    width: 1.4em;
    height: 1.4em;
}
.Btn .BG {
    position: absolute;
    inset: 0;
    background: #8bbdf7;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}
.Btn:hover .BG {
    opacity: 1;
}

/**********************************************/
/*                FOOTER                      */
/**********************************************/
footer {
    text-align: center;
    padding: 16px;
    background-color: var(--color-bg-footer);
    color: var(--color-text-footer);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    font-size: clamp(16px,2vw,22px);
    margin-top: auto;
    transition: background-color 0.3s;
}
footer p {
    margin: 8px 0;
    font-weight: bold;
}
footer a {
    color: var(--color-text-footer);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s;
    cursor: pointer;
}
footer a:hover,
footer a:focus {
    color: var(--color-primary);
    text-decoration: underline;
}

/**********************************************/
/*           RESPONSIVE DESIGN                */
/**********************************************/
@media (max-width: 1200px) {
    .portada main section { max-width: 90%; }
    .card-presentacion, .card-habilidades { max-width: 85%; }
}
@media (max-width: 1024px) {
    .portada main section,
    .card-presentacion,
    .card-habilidades {
        font-size: 17px;
        line-height: 1.5;
    }
    .button-container {
        gap: 0.8rem;
        padding: 0 0.8rem 0.8rem;
    }
    .card {
        padding: 1.8rem 1.2rem;
    }
}
@media (max-width: 768px) {
    .card-presentacion,
    .card-habilidades {
        padding: 1.5rem;
        font-size: 16px;
        max-width: 90%;
    }
    .iconos-habilidades { gap: 20px; }
    .habilidad-item { width: 80px; }
    .icono-habilidad { width: 60px; height: 60px; }
    .card-perfil { width: 160px; height: 220px; }
    .card-perfil .img { width: 60px; height: 70px; }
}
@media (max-width: 700px) {
    .header { font-size: clamp(20px,4vw,24px); }
    .button-container {
        flex-direction: column;
        align-items: center;
        gap: 0.7rem;
        padding-bottom: 1rem;
    }
    .button_index {
        width: 90%;
        max-width: 300px;
        margin: 0 auto;
        padding: 1em 3em;
        letter-spacing: 3px;
        font-size: 14px;
    }
    .card {
        padding: 1.5rem 1rem;
        max-width: 95%;
    }
    .copy-button {
        width: 90%;
        max-width: none;
        padding: 10px;
    }
    .copy-input {
        max-width: 110%;
        font-size: 13px;
    }
}
@media (max-width: 600px) {
    .portada .header {
        font-size: 22px;
        padding: 0.8rem 0;
    }
    .portada main section { font-size: 15px; }
    .sobre-mi-container {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }
    .iconos-habilidades { gap: 15px; }
    .habilidad-item { width: 70px; }
    .icono-habilidad { width: 50px; height: 50px; padding: 10px; }
    .nombre-tecnologia { font-size: 12px; }
    .card,
    .card-presentacion,
    .card-habilidades {
        background: #ffffffdd;
        backdrop-filter: none;
    }
}
@media (max-width: 480px) {
    .portada .header {
        font-size: 20px;
        padding: 0.5rem 0;
    }
    .portada main section { font-size: 14px; }
    .button_index {
        padding: 0.8em 2em;
        font-size: 13px;
        letter-spacing: 2px;
    }
    .card-perfil { width: 140px; height: 200px; }
    .card-perfil span { font-size: 14px; }
    .card-perfil .job { font-size: 10px; }
    .card-perfil .img { width: 50px; height: 60px; margin-top: 20px; }
    footer {
        padding: 12px;
        font-size: 14px;
    }
}
@media (max-width: 360px) {
    .button_index {
        width: 95%;
        padding: 0.7em 1em;
        font-size: 12px;
    }
    .iconos-habilidades { gap: 10px; }
    .habilidad-item { width: 60px; }
    .icono-habilidad { width: 40px; height: 40px; }
    .nombre-tecnologia { font-size: 11px; }
    footer { font-size: 13px; }
}
