/* ==========================================================================
   Team member portfolio page  —  /team/{slug}
   Built on the theme's "portfolio-2" markup (.works-wrapper-2), flattened to a
   plain 4-per-row flow so no cell is ever left empty.
   ========================================================================== */

/* The big display word. fa.css forces YekanBakh onto every h2 with !important,
   so put the theme's condensed Latin face back for this one heading. */
.page-title-wrapper .page-title {
    font-family: "Thunder", sans-serif !important;
}

/* --- member line under the display title --------------------------------- */

.team-portfolio-meta {
    text-align: center;
    margin-bottom: 60px;
}

.team-portfolio-meta .name {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

.team-portfolio-meta .role {
    font-size: 16px;
    line-height: 1.6;
    color: #999999;
    margin: 4px 0 0;
}

.team-portfolio-meta .caps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.team-portfolio-meta .caps li {
    font-size: 14px;
    line-height: 1;
    padding: 9px 16px;
    border: 1px solid var(--border, rgba(255, 255, 255, .15));
    border-radius: 50px;
    color: #cccccc;
}

.team-portfolio-meta .socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.team-portfolio-meta .socials a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    line-height: 1;
    color: #cccccc;
    border: 1px solid var(--border, rgba(255, 255, 255, .15));
    border-radius: 50%;
    transition: color .3s, background-color .3s, border-color .3s;
}

.team-portfolio-meta .socials a:hover {
    color: var(--black, #111111);
    background-color: var(--primary, #ffffff);
    border-color: var(--primary, #ffffff);
}

@media only screen and (max-width: 767px) {
    .team-portfolio-meta {
        margin-bottom: 40px;
    }

    .team-portfolio-meta .name {
        font-size: 22px;
    }

    .team-portfolio-meta .socials a {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }
}

/* --- the grid ------------------------------------------------------------ */

.works-wrapper-2.works-flow {
    grid-template-columns: repeat(4, 1fr);
    gap: 56px 24px;
}

/* The theme staggers the cards with hard-coded grid-column-start values on
   :nth-child(3/4/6/7/9/12), which punches holes in the layout. Cancel them. */
.works-wrapper-2.works-flow > *:nth-child(n) {
    grid-column-start: auto;
}

@media only screen and (max-width: 1399px) {
    .works-wrapper-2.works-flow {
        gap: 48px 20px;
    }
}

@media only screen and (max-width: 1199px) {
    .works-wrapper-2.works-flow {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media only screen and (max-width: 991px) {
    .works-wrapper-2.works-flow {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 20px;
    }
}

@media (max-width: 575px) {
    .works-wrapper-2.works-flow {
        grid-template-columns: repeat(1, 1fr);
        gap: 32px;
    }
}

/* --- cards --------------------------------------------------------------- */

/* Uploaded artwork comes in every aspect ratio; lock the thumbs to one shape
   so the rows line up. */
.works-wrapper-2.works-flow .work-box .thumb {
    border-radius: 12px;
    aspect-ratio: 4 / 3;
}

.works-wrapper-2.works-flow .work-box .thumb a {
    display: block;
    width: 100%;
    height: 100%;
}

.works-wrapper-2.works-flow .work-box .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.works-wrapper-2.works-flow .work-box:hover .thumb img {
    transform: scale(1.06);
}

.works-wrapper-2.works-flow .work-box .content {
    margin-top: 14px;
}

.works-wrapper-2.works-flow .work-box .title a:hover {
    color: var(--secondary);
}

.works-wrapper-2.works-flow .empty-note {
    grid-column: 1 / -1;
    opacity: .6;
}
