@font-face {
    font-family: "Unison Pro";
    src: url("unison-pro-bold.woff") format("woff");
    font-weight: bold;
    font-style: normal;
    font-display: block;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    background: #000;
    overflow: hidden;
}

a {
    color: #f5f5f5;
}

.institute-stack {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.institute-line {
    font-family: "Unison Pro", sans-serif;
    font-weight: bold;
    color: #fff;
    line-height: 1;
    white-space: nowrap;
    /* Tune this single value so the word fits the width with a little padding. */
    font-size: 8vw;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 2vh 6vw 0;
    /* Single backdrop for both the about view and the bio view. */
    background: rgba(0, 0, 0, 0.85);
}

.modal-overlay:target {
    display: flex;
}

.modal {
    position: relative;
    flex: 0 0 auto;
    max-width: 900px;
    width: 100%;
    padding: 24px 32px;
    background: #000;
    color: #fff;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 1.125rem;
    line-height: 1.6;
}

.modal p {
    margin-bottom: 1em;
}

.modal p:last-child {
    margin-bottom: 0;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    text-decoration: none;
}

.people-field {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    overflow: hidden;
}

.dance-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    padding: 8px 16px;
    border: 1px solid #fff;
    background: #111;
    color: #fff;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
    font-style: italic;
    cursor: pointer;
    white-space: nowrap;
}

.dance-btn.hidden {
    display: none;
}

.person {
    position: absolute;
    top: 0;
    left: 0;
    width: 90px;
    cursor: pointer;
    will-change: transform;
    transition: transform 6s ease-in-out;
}

.person img {
    display: block;
    width: 100%;
    height: 115px;
    object-fit: cover;
    pointer-events: none;
    background: #111;
}

.person .person-role {
    display: block;
    margin-bottom: 6px;
    text-align: center;
    color: #fff;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
    font-style: italic;
    pointer-events: none;
}

.person .person-name {
    display: block;
    margin-top: 6px;
    text-align: center;
    color: #fff;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.9rem;
    pointer-events: none;
}

.bio-panel {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 6vw 6vw;
    overflow-y: auto;
}

.bio-panel[hidden] {
    display: none;
}

/* While a bio is open, hide the about card and photos so only the single
   .modal-overlay backdrop shows behind the bio text. */
.modal-overlay.bio-active .modal,
.modal-overlay.bio-active .people-field {
    visibility: hidden;
}

.bio-close {
    position: absolute;
    bottom: 100%;
    left: 100%;
    margin: 0 0 8px 8px;
    padding: 0;
    border: 0;
    background: none;
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
}

.bio-content {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 32px;
    max-width: 900px;
    width: 100%;
    color: #fff;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 1.125rem;
    line-height: 1.6;
}

.bio-text {
    flex: 1 1 auto;
    padding: 24px;
    background: #000;
}

.bio-text .bio-role {
    font-style: italic;
}

.bio-text p {
    margin-bottom: 1em;
}

.bio-text p:last-child {
    margin-bottom: 0;
}

.bio-content h2 {
    margin-bottom: 0.75em;
    font-size: 1.5rem;
}

.bio-photo {
    flex: 0 0 auto;
}

.bio-photo img {
    display: block;
    width: 240px;
    max-width: 35vw;
    height: 320px;
    max-height: 45vh;
    object-fit: cover;
    object-position: top;
    background: #111;
}

.bio-photo-credit {
    display: block;
    margin-top: 6px;
    color: #999;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.7rem;
}

@media (max-width: 600px) {
    .modal {
        padding: 32px;
        font-size: 0.9rem;
    }

    .bio-content {
        flex-direction: column-reverse;
        gap: 20px;
        font-size: 0.9rem;
    }

    .bio-close {
        position: fixed;
        top: 16px;
        right: 16px;
        left: auto;
        bottom: auto;
        margin: 0;
    }

    .bio-content h2 {
        font-size: 1.2rem;
    }

    .bio-photo img {
        width: 160px;
        max-width: 60vw;
    }

    .person {
        width: 64px;
    }

    .person img {
        height: 82px;
    }

    .person .person-role {
        font-size: 0.6rem;
    }

    .person .person-name {
        font-size: 0.625rem;
    }
}
