main {
    line-height: 1.5em;
}

main ul.flex {
    row-gap: clamp(3rem, 10vw, 10rem);
}

main ul.flex li {
    width: 47%;
    padding: 3rem;
    background-color: #fff;
    box-shadow: none;
    transition: box-shadow .15s ease;
}

figure img {
    margin-bottom: 2rem;
}

.name {
    font-size: clamp(2rem, 2vw, 2.4rem);
}

.name-en {
    margin-bottom: 1rem;
}

.work {
    display: flex;
    gap: .5em;
    margin-bottom: 1rem;
    line-height: 1.5em;
    font-size: 1.4rem;
}

.work p {
    width: fit-content;
    padding-inline: .5em;
    background-color: var(--c-bg);
}

@media screen and (max-width:992px) {
    section ul.flex>li.staff {
        width: 100%;
    }
}

@media (hover: hover) and (pointer: fine) {
    main ul li:hover {
        cursor: pointer;
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
    }
}

.profile {
    display: none;
}

#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    padding-top: clamp(6rem, 8vw, 8rem);
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

#overlay.show {
    display: flex;
    opacity: 1;
}

#popup {
    position: relative;
    max-width: 1200px;
    height: 80vh;
    max-height: fit-content;
    padding: 6rem;
    background: #fff;
    transition: opacity 0.3s ease;
    opacity: 0;
}

#overlay.show #popup {
    opacity: 1;
    transform: translateY(0);
}

#popup .close-btn {
    display: block;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 4rem;
    font-weight: 200;
    cursor: pointer;
    user-select: none;
    color: var(--c-font);
}

#popup-content {
    align-items: flex-start;
    gap: 4rem;
}

#popup-content>div:first-child {
    width: 40%;
}

#popup-content>div:last-child {
    width: 60%;
}

.intro .work {
    margin-bottom: 1.5rem;
}

.intro {
    margin-bottom: 5rem;
}

.intro .name-all {
    margin-bottom: 1rem;
}

.intro .name,
.intro .name-en {
    display: inline;
}

h4 {
    border-bottom: 1px solid var(--c-accent);
    padding-bottom: .5rem;
    margin-bottom: .8rem;
    font-weight: 500;
    color: var(--c-accent);
    letter-spacing: .5em;
}

.skill div:first-child {
    margin-bottom: 3rem;
}

@media screen and (max-width:992px) {
    #popup .close-btn {
        top: 1rem;
        right: 1rem;
    }

    #popup {
        overflow-y: scroll;
        padding: 6rem 2rem 4rem;
        max-width: 600px;
    }

    #popup-content.flex {
        gap: 2rem;
    }

    #popup-content.flex>div {
        width: 100%;
    }

    #popup-content .intro {
        margin-bottom: 2rem;
    }

    #popup-content .work {
        margin-bottom: 1rem;
    }

        #popup-content .name-all {
        margin-bottom: .5rem;
    }

    #popup-content div:has(>img) {
        aspect-ratio: 4/3;
        object-position: center top;
        overflow: hidden;
    }
}