/*<--------------------------------------------------->
<!--  HabilidadesEsperadas (section component)       -->
<!----------------------------------------------------->
* Description:
    Two-area skills section for expected technical and
    transversal abilities, with an interactive detail card.
* Parameters:
    - None
* Dependencies:
    - style.css custom properties
    - main.js skills card interaction
* Returns/results:
    Styles the #habilidades section layout, chips, detail card,
    and closing banner.
<!--------------------------------------------------->*/

@keyframes habilidadesPanelUpdate {
    from {
        opacity: 0.42;
        transform: translateY(0.6rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*###################################################*/
/*...................................................*/
/* habilidades intro                                 */
/*...................................................*/
/*###################################################*/

.habilidadesIntro {
    max-width: 42rem;
    margin: 1.25rem 0 0;
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1vw, 1.08rem);
    line-height: 1.7;
    color: hsla(0, 30%, 96%, 0.62);
}

/*###################################################*/
/*...................................................*/
/* end habilidades intro                             */
/*...................................................*/
/*###################################################*/

/*###################################################*/
/*...................................................*/
/* habilidades layout                                */
/*...................................................*/
/*###################################################*/

.habilidadesLayout {
    --habilidadesLeftColumn: 1.618fr;
    --habilidadesRightColumn: 1fr;

    display: grid;
    grid-template-areas:
        "skills"
        "detail"
        "actions";
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0.5rem;
    margin-top: 2.75rem;

    @media (min-width: 991px) {
        grid-template-areas:
            "skills detail"
            "actions detail";
        grid-template-columns: minmax(0, var(--habilidadesLeftColumn)) minmax(19rem, var(--habilidadesRightColumn));
        grid-template-rows: auto 1fr;
        align-items: stretch;
        gap: 2.5rem;
        padding: 0 2rem;
    }
}

.habilidadesSidebar {
    display: grid;
    grid-area: skills;
    gap: 1.5rem;
}

.habilidadesChipsPanel {
    display: flex;
    flex-direction: column;
    gap: 2.75rem;
}

/*###################################################*/
/*...................................................*/
/* end habilidades layout                            */
/*...................................................*/
/*###################################################*/

/*###################################################*/
/*...................................................*/
/* habilidades groups                                */
/*...................................................*/
/*###################################################*/

.habilidadesGroup {
    display: grid;
    gap: 1.15rem;
}

.habilidadesGroupHeader {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.habilidadesGroupTitle {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    color: hsla(0, 0%, 100%, 1);
}

.habilidadesGroupCount {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1;
    color: hsla(0, 30%, 96%, 0.28);
}

.habilidadesChipList {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

/*###################################################*/
/*...................................................*/
/* end habilidades groups                            */
/*...................................................*/
/*###################################################*/

/*###################################################*/
/*...................................................*/
/* habilidades chips                                 */
/*...................................................*/
/*###################################################*/

.habilidadesChip {
    min-height: 2.55rem;
    padding: 0.7rem 1rem;
    font-family: var(--font-body);
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.2;
    color: hsla(0, 30%, 96%, 0.72);
    background: transparent;
    border: 1px solid hsla(0, 0%, 100%, 0.1);
    border-radius: 8px;
    cursor: pointer;
    touch-action: manipulation;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;

    @media (hover: hover) {
        &:hover {
            color: hsla(0, 0%, 100%, 1);
            border-color: hsla(25, 94%, 67%, 0.45);
            background: hsla(25, 96%, 50%, 0.08);
        }
    }

    &:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 3px;
    }

    &.active {
        color: hsla(0, 0%, 100%, 1);
        border-color: hsla(25, 94%, 67%, 0.5);
        background: hsla(25, 96%, 50%, 0.12);
    }

    &:disabled {
        color: hsla(0, 30%, 96%, 0.38);
        border-style: dashed;
        border-color: hsla(0, 0%, 100%, 0.12);
        background: transparent;
        cursor: not-allowed;
    }
}

/*###################################################*/
/*...................................................*/
/* end habilidades chips                             */
/*...................................................*/
/*###################################################*/

/*###################################################*/
/*...................................................*/
/* habilidades detail card                           */
/*...................................................*/
/*###################################################*/

.habilidadesDetailCard {
    display: grid;
    grid-area: detail;
    align-content: start;
    min-height: 18rem;
    padding: 1.4rem;
    background: hsla(0, 0%, 7%, 1);
    border: 1px solid hsla(0, 0%, 100%, 0.1);
    border-radius: 12px;

    @media (min-width: 768px) {
        padding: 1.75rem;
    }

    @media (min-width: 991px) {
        position: sticky;
        top: calc(var(--nav-height) + 1.5rem);
        height: 100%;
    }
}

.habilidadesDetailContent {
    display: grid;
    gap: 1rem;
}

.habilidadesDetailEyebrow {
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.habilidadesDetailTitle {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 1.5vw, 1.6rem);
    font-weight: 700;
    line-height: 1.15;
    color: hsla(0, 0%, 100%, 1);
}

.habilidadesDefinitionList {
    display: grid;
}

.habilidadesDefinitionList p {
    margin: 0;
    padding: 1rem 0;
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.7;
    color: hsla(0, 30%, 96%, 0.62);

    &:first-child {
        padding-top: 0;
    }

    & + p {
        border-top: 1px solid hsla(0, 0%, 100%, 0.08);
    }
}

/*###################################################*/
/*...................................................*/
/* end habilidades detail card                       */
/*...................................................*/
/*###################################################*/

/*###################################################*/
/*...................................................*/
/* habilidades banner                                */
/*...................................................*/
/*###################################################*/

.habilidadesBanner {
    grid-area: actions;
    margin: 0;
    padding: 1rem 1.1rem;
    border: 1px solid hsla(0, 0%, 100%, 0.1);
    border-radius: 12px;
    background: hsla(0, 0%, 7%, 1);

    @media (min-width: 991px) {
        padding: 1.15rem 1.35rem;
    }
}

.habilidadesBannerEyebrow {
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.habilidadesActionList {
    display: grid;
    gap: 0.85rem;
    margin: 0.9rem 0 0;
    padding: 0;
    list-style: none;
}

.habilidadesActionList li {
    position: relative;
    margin: 0;
    padding-left: 1rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.6;
    color: hsla(0, 30%, 96%, 0.72);

    &::before {
        position: absolute;
        top: 0.72em;
        left: 0;
        width: 0.36rem;
        height: 0.36rem;
        content: "";
        background: var(--contrast);
        border-radius: 50%;
        box-shadow: 0 0 0 0.18rem hsla(217, 81%, 31%, 0.18);
    }
}

.habilidadesActionLabel {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: 0.18rem;
    font-weight: 700;
    color: hsla(0, 0%, 100%, 0.9);
    vertical-align: -0.16rem;
}

.habilidadesActionLogo {
    display: block;
    width: clamp(2.6rem, 8vw, 3.4rem);
    height: auto;
}

.habilidadesDetailContent.isChanging,
.habilidadesActionList.isChanging {
    animation: habilidadesPanelUpdate 170ms ease-out both;
    will-change: opacity, transform;

    @media (prefers-reduced-motion: reduce) {
        animation: none;
        will-change: auto;
    }
}

/*###################################################*/
/*...................................................*/
/* end habilidades banner                            */
/*...................................................*/
/*###################################################*/

/*<!--------------------------------------------------->
<!--  end HabilidadesEsperadas                       -->
<!--------------------------------------------------->*/
