/* =========================================
PORTAFOLIO
========================================= */

.portfolio {
min-height: 100vh;

padding: 175px 8% 100px;

background:
    radial-gradient(
        circle at 10% 20%,
        rgba(168, 223, 107, 0.10),
        transparent 30%
    ),
    radial-gradient(
        circle at 90% 80%,
        rgba(181, 140, 255, 0.12),
        transparent 30%
    ),
    #f8f5ef;

color: #172b4d;

}

/* =========================================
INTRO
========================================= */

.portfolio-intro {
max-width: 750px;

margin: 0 auto 70px;

text-align: center;

animation: portfolioEntrada 1s ease;

}

.portfolio-intro > span {
display: inline-block;

margin-bottom: 15px;

color: #8c6cff;

font-size: 0.9rem;

font-weight: 800;

letter-spacing: 2px;

}

.portfolio-intro h1 {
margin: 0 0 20px;

font-family: "Geomanist", Arial, sans-serif;

font-size: 3.8rem;

line-height: 1.1;

color: #96de6b;

white-space: nowrap;

}

.portfolio-intro p {
max-width: 600px;

margin: 0 auto;

font-family: "Nunito", sans-serif;

font-size: 1.15rem;

line-height: 1.7;

color: #5c6575;

}

/* =========================================
PROYECTO
========================================= */

.project {
    max-width: 1150px;

    margin: 0 auto 70px;

    padding: 35px;

    background: rgba(255, 255, 255, 0.90);

    border-radius: 35px;

    box-shadow:
        0 20px 50px rgba(23, 43, 77, 0.10);

    display: grid;

    grid-template-columns: 1.2fr 0.8fr;

    gap: 45px;

    position: relative;

    overflow: hidden;
}

/* pequeña decoración */

.project::before {
content: "";

position: absolute;

width: 180px;
height: 180px;

border-radius: 50%;

background: rgba(181, 140, 255, 0.10);

top: -90px;
right: -60px;

}

.project::after {
content: "";

position: absolute;

width: 140px;
height: 140px;

border-radius: 50%;

background: rgba(168, 223, 107, 0.10);

bottom: -70px;
left: -50px;

}

/* =========================================
PREVIEW
========================================= */

.project-preview {
min-height: 420px;

border-radius: 28px;

overflow: hidden;

position: relative;

background: #e9e5dd;

box-shadow:
    0 12px 30px rgba(23, 43, 77, 0.15);

}

.project-preview img {
width: 100%;
height: 100%;
display: block;

object-fit: cover;

transition:
    transform .6s ease,
    filter .6s ease;

}

.project-preview:hover img {
transform: scale(1.05);


filter: brightness(1.03);


}

/* =========================================
INFORMACIÓN DEL PROYECTO
========================================= */

.project-info {

    display: flex;

    flex-direction: column;

    justify-content: center;

    position: relative;

    z-index: 2;

    padding: 15px 10px;

}

/* ETIQUETA */

.project-info small {

    display: inline-flex;

    align-items: center;

    width: fit-content;

    margin-bottom: 18px;

    padding: 8px 16px;

    border-radius: 30px;

    background:
        linear-gradient(
            90deg,
            rgba(168, 223, 107, 0.25),
            rgba(181, 140, 255, 0.20)
        );

    color: #6b5ca5;

    font-size: 0.75rem;

    font-weight: 800;

    letter-spacing: 1.5px;

}


/* TÍTULO */

.project-info h2 {

    margin: 0 0 12px;

    font-family: "Geomanist", Arial, sans-serif;

    font-size: 3.2rem;

    line-height: 1.05;

    color: #172b4d;

}
/* FRASE DESTACADA */

.project-info h3 {

    margin: 0 0 20px;

    max-width: 460px;

    font-family: "Nunito", sans-serif;

    font-size: 1.15rem;

    line-height: 1.5;

    font-weight: 700;

    color: #6f52c8;

}


/* DESCRIPCIÓN */

.project-info p {

    margin: 0 0 25px;

    max-width: 470px;

    font-size: 1rem;

    line-height: 1.7;

    color: #5c6575;

}


/* =========================================
   CARACTERÍSTICAS
========================================= */

.project-features {

    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-bottom: 30px;

}


.project-features span {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    padding: 9px 14px;

    border-radius: 25px;

    background: rgba(255, 255, 255, 0.9);

    border: 1px solid rgba(181, 140, 255, 0.18);

    box-shadow:
        0 5px 15px rgba(23, 43, 77, 0.06);

    color: #53617a;

    font-family: "Nunito", sans-serif;

    font-size: 0.82rem;

    font-weight: 700;

    transition:
        transform .3s ease,
        box-shadow .3s ease;

}


.project-features span:hover {

    transform: translateY(-3px);

    box-shadow:
        0 8px 18px rgba(23, 43, 77, 0.10);

}


/* =========================================
BOTÓN PORTAFOLIO
========================================= */


.project-button {

    align-self: flex-start;

    display: inline-flex;
    align-items: center;

    padding: 14px 25px;

    border: none;
    border-radius: 30px;

    background:
        linear-gradient(
            90deg,
            #a8df6b,
            #b8e77e 45%,
            #b58cff
        );

    color: #172b4d;

    font-family: "Nunito", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;

    text-decoration: none;

    cursor: pointer;

    box-shadow:
        0 8px 20px rgba(55, 70, 90, 0.18);

    transition:
        transform .3s ease,
        background .3s ease,
        box-shadow .3s ease;
}


.project-button:hover {

    transform: translateY(-3px);

    background: #b5e77d;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.25);
}
/* =========================================
DEMOS
========================================= */

/* =========================================
   DEMOS DEL PROYECTO
========================================= */

.project-demos {

    grid-column: 1 / -1;

    padding-top: 20px;

    position: center;

    z-index: 2;

}


/* TÍTULO */

.project-demos > h3 {

    margin: 0 0 5px;

    font-family: "Geomanist", Arial, sans-serif;

    font-size: 1.7rem;

    color: #172b4d;
    text-align: center;

}


/* SUBTÍTULO */

.demos-intro {

    margin: 0 0 25px;

    color: #747b88;

    font-size: 0.95rem;
    text-align: center;
}


/* =========================================
   GRID
========================================= */

.demo-grid {

    display: grid;

    gap: 20px;

    width: 100%;

    margin: 0 auto;

}


/* =========================================
   CANTIDAD DE DEMOS
========================================= */

/* 1 DEMO */

.demo-grid-1 {

    grid-template-columns: 1fr;

}


/* 2 DEMOS */

.demo-grid-2 {

    grid-template-columns: repeat(2, minmax(0, 1fr));

}


/* 3 DEMOS */

.demo-grid-3 {

    grid-template-columns: repeat(3, minmax(0, 1fr));

}


/* =========================================
   TARJETA
========================================= */

.demo {

    position: relative;

    padding: 28px;

    min-height: 210px;

    border-radius: 28px;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #faf8ff
        );

    border: 1px solid rgba(181, 140, 255, 0.15);

    box-shadow:
        0 12px 30px rgba(23, 43, 77, 0.08);

    overflow: hidden;

    transition:
        transform .35s ease,
        box-shadow .35s ease;

}


/* decoración */

.demo::after {

    content: "";

    position: absolute;

    width: 100px;

    height: 100px;

    border-radius: 50%;

    background:
        rgba(181, 140, 255, 0.08);

    right: -35px;

    bottom: -35px;

}



/* =========================================
   NÚMERO
========================================= */

.demo-number {

    position: absolute;

    top: 20px;

    left: 20px;

    width: 42px;

    height: 42px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #a8df6b,
            #b58cff
        );

    color: white;

    font-size: 0.85rem;

    font-weight: 800;

}


/* =========================================
   ICONO
========================================= */

.demo-icon {

    margin-top: 48px;

    margin-bottom: 12px;

    font-size: 2rem;

}


/* =========================================
   TÍTULO
========================================= */

.demo h4 {

    margin: 0 0 8px;

    font-family: "Geomanist", Arial, sans-serif;

    font-size: 1.5rem;

    color: #172b4d;

}


/* =========================================
   TEXTO
========================================= */

.demo p {

    margin: 0;

    color: #747b88;

    font-size: 1.0rem;

    line-height: 1.55;

}


/* =========================================
   ENLACE DECORATIVO
========================================= */

.demo-link {

    display: inline-block;

    margin-top: 18px;

    color: #8c6cff;

    font-size: 0.82rem;

    font-weight: 800;

    transition:
        transform .3s ease;

}


.demo:hover .demo-link {

    transform: translateX(5px);

}
/* =========================================
ANIMACIÓN DE ENTRADA
========================================= */

@keyframes portfolioEntrada {

from {
    opacity: 0;

    transform:
        translateY(25px);
}

to {
    opacity: 1;

    transform:
        translateY(0);
}

}

/* =========================================
TABLET
========================================= */

@media (max-width: 900px) {

.portfolio {
    padding: 130px 5% 80px;
}


.project {
    grid-template-columns: 1fr;
    padding: 18px;
    border-radius: 25px;
    margin-bottom: 40px;
}
}


.project-preview {
    min-height: 350px;
}


.project-info h2 {
    font-size: 2.5rem;
}


.project-demos {
    grid-column: 1 / -1;
    width: 100%;
}


.demo-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 20px;

    max-width: 900px;

    margin: 0 auto;
}

/* =========================================
   COMPONENTES INTERACTIVOS
========================================= */

.demo-interactivo {
    grid-column: 1 / -1;
    width: 100%;
    box-sizing: border-box;

    margin-top: 20px;
    padding: 30px;

    background: #ffffff;
    border-radius: 28px;

    box-shadow:
        0 15px 35px rgba(23, 43, 77, 0.08);
}


.demo-interactivo-cabecera {
    display: flex;
    align-items: flex-start;
    gap: 18px;

    margin-bottom: 25px;
}


.demo-interactivo-cabecera h4 {
    margin: 4px 0 6px;

    font-family: "Geomanist", Arial, sans-serif;
    font-size: 1.4rem;

    color: #172b4d;
}


.demo-interactivo-cabecera p {
    margin: 0;

    color: #747b88;

    font-size: 0.95rem;
    line-height: 1.5;
}


.demo-etiqueta {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1.5px;

    color: #8c6cff;
}


.demo-componente {
    width: 100%;
    box-sizing: border-box;
}

/* =========================================
MÓVIL
========================================= */

@media (max-width: 900px) {

    .portfolio {
        padding: 130px 5% 80px;
    }

    .project {
        grid-template-columns: 1fr;
        padding: 25px;
    }

    .project-preview {
        min-height: 350px;
    }

    .project-info h2 {
        font-size: 2.5rem;
    }

    /* 👇 IMPORTANTE */
    .project-demos {
        grid-column: 1 / -1;
        width: 100%;
    }

    .demo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
        max-width: 900px;
        margin: 0 auto;
    }
}
/* =========================================
   BOTÓN EXPLORAR PROYECTO
========================================= */

.project-info .project-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: fit-content !important;

    padding: 14px 25px !important;

    border-radius: 30px !important;
    border: none !important;

    background: linear-gradient(
        90deg,
        #a8df6b 0%,
        #b8e77e 45%,
        #b58cff 100%
    ) !important;

    color: #172b4d !important;

    font-family: "Nunito", sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;

    text-decoration: none !important;

    box-shadow:
        0 8px 20px rgba(55, 70, 90, 0.18) !important;

    cursor: pointer;

    transition:
        transform .3s ease,
        background .3s ease,
        box-shadow .3s ease;
}


.project-info .project-button:hover {
    transform: translateY(-3px) !important;

    background: #b5e77d !important;

    color: #172b4d !important;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.25) !important;
}
/* AJUSTE GENERAL PARA MÓVILES */
@media (max-width: 768px) {

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

* {
    box-sizing: border-box;
}

.portfolio {
    width: 100%;
    max-width: 100%;
}

}
/* =========================================
   AJUSTES DEL PORTFOLIO EN MÓVIL
========================================= */

@media (max-width: 600px) {

    /* Zona general */
    .portfolio {
        width: 100%;
        box-sizing: border-box;
        padding: 115px 16px 50px;
        overflow-x: clip;
    }

    /* Introducción */
    .portfolio-intro {
        width: 100%;
        max-width: 100%;
        margin: 0 auto 38px;
        padding: 0 5px;
        box-sizing: border-box;
    }

    .portfolio-intro > span {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }

    /* Título: ahora sí puede ocupar varias líneas */
    .portfolio-intro h1 {
        font-size: clamp(2rem, 8vw, 2.7rem);
        line-height: 1.08;
        white-space: normal;
        overflow-wrap: break-word;
        text-align: center;
        margin-bottom: 18px;
    }

    .portfolio-intro p {
        font-size: 1rem;
        line-height: 1.65;
        max-width: 340px;
    }

    /* Tarjetas de los proyectos */
    .project {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        padding: 16px;
        margin: 0 auto 30px;
        border-radius: 25px;
    }

    /* Imagen del proyecto */
    .project-preview {
        width: 100%;
        min-width: 0;
        min-height: 0;
        height: auto;
        aspect-ratio: 4 / 3;
        border-radius: 19px;
    }

    .project-preview img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
    }

    /* Información del proyecto */
    .project-info {
        min-width: 0;
        padding: 4px 3px 10px;
        align-items: flex-start;
    }

    .project-info h2 {
        font-size: 2rem;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    .project-info p {
        font-size: 0.98rem;
        line-height: 1.65;
        margin-bottom: 22px;
    }

    .project-button {
        max-width: 100%;
        box-sizing: border-box;
        font-size: 0.9rem;
        padding: 13px 20px;
    }

    /* Muestras interactivas */
    .project-demos {
        min-width: 0;
        padding-top: 8px;
    }

    .project-demos h3 {
        font-size: 1.3rem;
        line-height: 1.3;
        margin-bottom: 20px;
    }

    .demo-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 15px;
    }

    .demo {
        min-width: 0;
        box-sizing: border-box;
        padding: 22px 18px;
        border-radius: 22px;
    }
}