/* Base y variables */
:root {
    --bg-1: linear-gradient(135deg, #844394 0%, #5b2a6a 100%);
    --accent: #ffec60;
    /* amarillo */
    --accent-600: #f0ed43;
    --card: #0f1724;
    /* oscuro para tarjetas */
    --muted: #e5e7eb;
    --glass: rgba(255, 255, 255, 0.04);
    --shadow: 0 12px 30px rgba(2, 6, 23, 0.6);
    --radius: 14px;
    --max-width: 1100px;
}

* {
    font-family: 'Segoe UI', sans-serif;
    margin: 0px;
    padding: 0px;

}

body {
    background: #844394;
    color: #e5e7eb;
}

h2 {
    text-align: center;
    margin-bottom: 4px;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgb(255, 236, 96);
    padding: 0.8rem 1rem;
    z-index: 1000;
}

nav ul {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
    flex-wrap: wrap;
}


nav a {
    color: rgb(0, 0, 0);
    font-weight: bold;
    text-decoration: none;
    font-family: 'Segoe UI', sans-serif;
    transition: all 0.2s ease;
}

nav a:hover {
    color: rgb(153, 48, 214);
}


header {
    min-height: 90vh;
    padding-top: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}


.foto-perfil {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.highlight {
    color: #f0ed43;
}

section {
    padding: 5rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

#sobre-mi h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

#sobre-mi p {
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgb(255, 236, 96);
    color: black;
    border-radius: 10px;
    padding: 15px;
    text-align: center;

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}


/*==Proyectos Grid==*/
.grid-proyectos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}


.proyecto {
    background: #1e293b;
    padding: 1.5rem;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.proyecto:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.45);
}

.proyecto-titulo {
    font-size: 1.4rem;
    color: #ffec60;
}

.proyecto-stack {
    font-size: 0.9rem;
    color: #cbd5f5;
    font-weight: 600;
}

.proyecto-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #e5e7eb;
}

.proyecto-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.proyecto-btn {
    padding: 0.5rem 1rem;
    background: #ffec60;
    color: #1f2937;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
}

.proyecto-btn.secondary {
    background: transparent;
    border: 2px solid #ffec60;
    color: #ffec60;
}


/*===Section h2===*/

section h2 {
    font-size: clamp(1.6rem, 5vw, 2.5rem);
}


.filtros {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    padding: 0.6rem 1rem;
    border-radius: 9px;
    background: rgb(255, 236, 96);
    color: white;
    gap: 1rem;
    margin-bottom: 2rem;
}


.filtros button {
    align-items: center;
    justify-content: space-around;
    padding: 0.6rem 1rem;
    background-color: rgb(255, 236, 96);
    border: none;
    border-radius: 8px;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filtros button:hover {
    background-color: rgba(255, 208, 0, 0.818);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.filtros button:active {
    transform: translateY(0);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

#contacto{
    display: flex;
    flex-direction: column;
    align-items: center;
}
#contacto h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

#contacto .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;

    width: min(300px, 100%);
    padding: 1rem 1.5rem;
    margin: 0.8rem 0;

    background: #f0ed43;
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;

    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#contacto .btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

#contacto .btn img {
    width: 30px;
    height: 30px;
}

/*===Curriculum====*/

/* Seccion CV */
section {
    padding: clamp(3rem, 6vw, 5rem) 1.25rem;
    max-width: 1000px;
    margin: 0 auto;
}


/*  título y acciones */


.cv-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--muted);
    text-align: center;
    letter-spacing: -0.6px;
}

.cv-subtitle {
    color: #f3e98a;
    font-weight: 600;
    text-align: center;
    opacity: 0.95;
}

/* Botones (ver / descargar) */
.cv-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    border: 2px solid transparent;
    user-select: none;
}

.btn:focus {
    outline: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
    transform: translateY(-3px);
}

/* Primary: ver */
.btn-primary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Secondary: descargar (accent) */
.btn-secondary {
    background: var(--accent-600);
    color: #1f2937;
    border-color: rgba(0, 0, 0, 0.06);
}

/* Hover states */
.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.btn-secondary:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

/* Contenedor del CV */
.cv-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

/* Tarjeta del iframe */
.cv-card {
    width: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

/* iframe responsivo y accesible */
.cv-iframe {
    width: 100%;
    height: 80vh;
    border: none;
    display: block;
    background: #fff;
}

/* Nota/ayuda */
.cv-note {
    color: rgba(229, 231, 235, 0.9);
    font-size: 0.95rem;
    text-align: center;
    margin-top: 0.5rem;
    opacity: 0.95;
}

/* Ajustes para secciones y tarjetas previas del CSS original (compatibilidad) */

.show {
    opacity: 1;
    transform: translateY(0);
}

/*======Skills========*/
.skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
    gap: 1.5rem;
    justify-items: center;
}

.icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.icon:hover {
    transform: scale(1.15) rotate(6deg);
}

/* Botón hamburguesa */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #000;
}

/* Responsividad */
@media (max-width: 900px) {
    .cv-iframe {
        height: 70vh;
    }

    .cv-title {
        font-size: 1.6rem;
    }

    nav ul {
        gap: 1.25rem;
    }
}

/*Tablet*/
@media (max-width: 768px) {

    header {
        padding-top: 90px;
    }

    .grid-proyectos {
        grid-template-columns: 1fr;
    }

    .proyecto {
        padding: 1.2rem;
    }

    .skills {
        grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
        gap: 1rem;
    }

    .icon {
        width: 48px;
        height: 48px;
    }
}


/*Móvil*/
@media (max-width: 520px) {

    .menu-toggle {
        display: block;
    }

    nav {
        padding: 0.5rem 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 236, 96, 0.777);
        display: none;             
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 1rem 0;
        margin: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    nav a {
        font-size: 1rem;
        padding: 0.5rem 0;
        display: block;
        width: 100%;
    }

    #sobre-mi p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .cv-iframe {
        height: 55vh;
    }

    .cv-actions {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
        justify-content: flex-start;
    }

    .cv-actions .btn {
        display: flex;       
        justify-content: center;
    }

    .cv-card {
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 0.95rem;
    }

    #header {
        min-height: auto;
        padding-top: 100px;
        text-align: center;
    }

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

    nav {
        padding: 0.5rem;
    }

    nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 0.5rem;
    }

    nav a {
        font-size: 0.85rem;
    }

    .filtros {
        flex-direction: column;
    }

    .filtros button {
        width: 100%;
    }
}

/* Accesibilidad para enlaces */
a {
    -webkit-tap-highlight-color: transparent;
}