/*
    ------------------------------------------------
    |                   Bio Grid                   |
    ------------------------------------------------
*/

.bio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(50%, 350px), 1fr));
    justify-content: center;

    margin: 0 auto;

    grid-gap: clamp(4px, 1vw, 32px);
}

/*
    ------------------------------------------------
    |                     Bio                      |
    ------------------------------------------------
*/

.bio {
    display: flex;
    flex-direction: column;

    width: 100%;
    height: 100%;
}

/*
    --------------------------------
    |           Carousel           |
    --------------------------------
*/

.carousel {
    align-items: stretch;
    position: relative;

    width: 100%;
    aspect-ratio: 1 / 1;
}

.carousel ul {
    margin: 0;
    padding: 0;

    list-style: none;
}

/*
    --------------------------------
    |        Scroll Buttons        |
    --------------------------------
*/

.carousel-button {
    z-index: 1;
    border: 0.125rem solid black;
    background-color: white;
    opacity: 1;
    border-radius: 50%;

    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    width: 2.5rem;
    height: 2.5rem;

    display: block;
    align-content: center;

    transition: 150ms ease;
    cursor: pointer;
}

.carousel-button > svg {
    display: block;
    margin: 0;
    padding: 0;

    height: 100%;
    width: 100%;

    fill: black;

    transition: 150ms ease;
}

.carousel-button:hover,
.carousel-button:focus-within {
    background-color: var(--accent-color);

    width: 2.75rem;
    height: 2.75rem;

    outline: none;
}

.next {
    right: 0.375rem;
}

.prev {
    left: 0.375rem;
}

/*
    --------------------------------
    |             Card             |
    --------------------------------
*/

.slide {
    position: absolute;
    inset: 0;

    z-index: -1;
    opacity: 0;

    transition: opacity 150ms ease;
    transition-delay: 150ms;
}

.slide[data-active] {
    opacity: 1;
    z-index: 0;

    transition-delay: 0ms;
}

.slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;

    border-radius: clamp(4px, 1vw, 24px);
    transition: 250ms ease;

    aspect-ratio: 1 / 1;
}

.carousel-fullscreen {
    border: none;
    outline: none;
    background-color: transparent;
    border-radius: clamp(4px, 1vw, 24px);
    cursor: pointer;

    margin: 0.25rem;

    transition: box-shadow 250ms ease;
}

.carousel-fullscreen:hover img,
.carousel-fullscreen:focus-within img {
    filter: brightness(0.5);
}

.carousel-fullscreen:hover,
.carousel-fullscreen:focus-within {
    box-shadow: 0 0 0 0.25rem var(--accent-color);
}

/*
    --------------------------------
    |             Text             |
    --------------------------------
*/

.bio h1,
.bio p {
    margin: 0;
    padding: 0;

    text-align: center;
}
