/* =========================================================
   WRATH64 STUDIOS
   STAFF SECTION
   ========================================================= */


/* =========================================================
   STAFF MEMBER
   ========================================================= */

.staff-member {

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    width: fit-content;

    margin-top: 34px;

    margin-left: 8px;

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

}


/* =========================================================
   STAFF VISIBLE
   ========================================================= */

.staff-member.is-visible {

    opacity: 1;

    visibility: visible;

    pointer-events: auto;

}



/* =========================================================
   BOTON DEL RETRATO
   ========================================================= */

.staff-portrait-button {

    display: block;

    margin: 0;

    padding: 4px;

    appearance: none;

    background: #000;

    border: 1px solid #bdbdbd;

    outline: none;

    cursor: pointer;

}



/* =========================================================
   MARCO DOBLE
   ========================================================= */

.staff-portrait-frame {

    position: relative;

    width: 170px;
    height: 210px;

    overflow: hidden;

    background: #000;

    border: 1px solid #bdbdbd;

}


/* =========================================================
   IMAGEN
   ========================================================= */

.staff-portrait-frame img {

    position: relative;

    z-index: 1;

    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    filter:
        grayscale(1)
        contrast(1.15);

    user-select: none;

    -webkit-user-drag: none;

}



/* =========================================================
   SCANLINES CRT
   ========================================================= */

.staff-portrait-frame::after {

    content: "";

    position: absolute;

    z-index: 5;

    inset: 0;

    pointer-events: none;

    background:

        repeating-linear-gradient(

            to bottom,

            rgba(255, 255, 255, 0.025) 0px,

            rgba(255, 255, 255, 0.025) 1px,

            rgba(0, 0, 0, 0.10) 2px,

            rgba(0, 0, 0, 0.10) 4px

        );

}



/* =========================================================
   COPIA GLITCH
   ========================================================= */

.staff-portrait-frame::before {

    content: "";

    position: absolute;

    z-index: 3;

    inset: 0;

    pointer-events: none;

    opacity: 0;

    background-image:
        var(--staff-image);

    background-size: cover;

    background-position: center;

    filter:
        grayscale(1)
        contrast(1.4);

}



/* =========================================================
   REVELADO TIPO TV
   ========================================================= */

.staff-member.is-revealing {

    visibility: visible;

    animation:
        staff-container-reveal
        720ms
        steps(1, end)
        forwards;

}


.staff-member.is-revealing
.staff-portrait-frame {

    animation:
        staff-frame-glitch
        720ms
        steps(1, end)
        forwards;

}


.staff-member.is-revealing
.staff-portrait-frame img {

    animation:
        staff-image-glitch
        720ms
        steps(1, end)
        forwards;

}


.staff-member.is-revealing
.staff-portrait-frame::before {

    animation:
        staff-ghost-glitch
        720ms
        steps(1, end)
        forwards;

}



/* =========================================================
   ANIMACION GENERAL
   ========================================================= */

@keyframes staff-container-reveal {

    0% {

        opacity: 0;

    }

    10% {

        opacity: 1;

    }

    14% {

        opacity: 0.15;

    }

    18% {

        opacity: 1;

    }

    26% {

        opacity: 0.45;

    }

    31% {

        opacity: 1;

    }

    100% {

        opacity: 1;

    }

}



/* =========================================================
   DISTORSION DEL MARCO
   ========================================================= */

@keyframes staff-frame-glitch {

    0% {

        transform:
            scaleY(0.02);

    }

    10% {

        transform:
            scaleY(0.02)
            translateX(-8px);

    }

    18% {

        transform:
            scaleY(0.4)
            translateX(5px);

    }

    26% {

        transform:
            scaleY(0.75)
            skewX(2deg);

    }

    32% {

        transform:
            scaleY(1)
            translateX(-3px);

    }

    38% {

        transform:
            translateX(3px);

    }

    47% {

        transform:
            translateX(-2px);

    }

    58% {

        transform:
            none;

    }

    100% {

        transform:
            none;

    }

}



/* =========================================================
   DISTORSION DE LA IMAGEN
   ========================================================= */

@keyframes staff-image-glitch {

    0% {

        opacity: 0;

        filter:
            grayscale(1)
            brightness(2)
            contrast(2);

    }

    12% {

        opacity: 1;

        transform:
            translateX(-8px);

    }

    17% {

        transform:
            translateX(7px);

        filter:
            grayscale(1)
            brightness(1.8)
            contrast(2.4);

    }

    25% {

        transform:
            translateX(-4px)
            skewX(-2deg);

    }

    34% {

        transform:
            translateX(3px);

    }

    44% {

        transform:
            translateX(-2px);

    }

    58% {

        transform:
            none;

        filter:
            grayscale(1)
            contrast(1.15);

    }

    100% {

        opacity: 1;

        transform:
            none;

        filter:
            grayscale(1)
            contrast(1.15);

    }

}



/* =========================================================
   FANTASMA DE VIDEO
   ========================================================= */

@keyframes staff-ghost-glitch {

    0% {

        opacity: 0;

    }

    15% {

        opacity: 0.65;

        transform:
            translateX(10px);

        clip-path:
            inset(
                15% 0
                62% 0
            );

    }

    24% {

        opacity: 0.45;

        transform:
            translateX(-8px);

        clip-path:
            inset(
                52% 0
                16% 0
            );

    }

    35% {

        opacity: 0.55;

        transform:
            translateX(5px);

        clip-path:
            inset(
                34% 0
                42% 0
            );

    }

    48% {

        opacity: 0.25;

        transform:
            translateX(-3px);

    }

    60% {

        opacity: 0;

    }

    100% {

        opacity: 0;

    }

}



/* =========================================================
   INFORMACION BAJO LA FOTO
   ========================================================= */

.staff-member-meta {

    width: 180px;

    margin-top: 12px;

    font-family:
        "Courier New",
        Courier,
        monospace;

    color: #00ff66;

}


.staff-member-name {

    font-size: 14px;

    font-weight: bold;

    text-shadow:
        0 0 4px
        rgba(0, 255, 102, 0.55);

}


.staff-member-role {

    margin-top: 3px;

    font-size: 11px;

    opacity: 0.78;

}


.staff-member-access {

    margin-top: 8px;

    font-size: 11px;

    color: #e9fff0;

    text-shadow:
        0 0 2px #fff,
        0 0 5px #00ff66;

}



/* =========================================================
   HOVER DEL RETRATO
   ========================================================= */

.staff-portrait-button:hover {

    border-color: #ecfff2;

}


.staff-portrait-button:hover
.staff-portrait-frame {

    border-color: #ecfff2;

}


.staff-portrait-button:hover img {

    filter:
        grayscale(1)
        contrast(1.3)
        brightness(1.1);

}



/* =========================================================
   PERFIL
   ========================================================= */

.staff-profile {

    display: none;

    width: min(
        100%,
        540px
    );

    margin-top: 26px;

    padding: 16px;

    border:
        1px solid #00ff66;

    color: #00ff66;

    background: #000;

    font-family:
        "Courier New",
        Courier,
        monospace;

    font-size: 12px;

    line-height: 1.6;

}


.staff-profile.is-open {

    display: block;

    animation:
        staff-profile-open
        220ms
        steps(2, end);

}


@keyframes staff-profile-open {

    0% {

        opacity: 0;

        transform:
            translateX(-5px);

    }

    45% {

        opacity: 1;

        transform:
            translateX(3px);

    }

    100% {

        opacity: 1;

        transform:
            none;

    }

}



.staff-profile-header {

    margin-bottom: 13px;

    color: #ecfff2;

    text-shadow:
        0 0 5px #00ff66;

}


.staff-profile-line {

    opacity: 0.80;

}


.staff-profile-line span {

    color: #ecfff2;

}


.staff-profile-description {

    opacity: 0.76;

}



/* =========================================================
   CLOSE FILE
   ========================================================= */

.staff-profile-close {

    appearance: none;

    padding: 0;

    border: none;

    background: transparent;

    color: #ecfff2;

    font-family: inherit;

    font-size: inherit;

    cursor: pointer;

    text-shadow:
        0 0 4px #00ff66;

}


.staff-profile-close:hover {

    color: #fff;

    text-shadow:
        0 0 3px #fff,
        0 0 8px #00ff66;

}



/* =========================================================
   PARTE FINAL DE TERMINAL
   ========================================================= */

.staff-bottom-terminal {

    opacity: 0;

    visibility: hidden;

}


.staff-bottom-terminal.is-visible {

    opacity: 1;

    visibility: visible;

}



/* =========================================================
   MOVIL
   ========================================================= */

@media (max-width: 767px) {

    .staff-member {

        margin-top: 26px;

    }


    .staff-portrait-frame {

        width: 145px;
        height: 180px;

    }


    .staff-member-meta {

        width: 155px;

    }


    .staff-profile {

        width: 100%;

        box-sizing:
            border-box;

    }

}