/*
 * Academy faculty member (single of the CPT "faculty-member")
 * Same grid as the rest of the site: 5 columns inside the container, 16px gap, c = (100% - 64px) / 5.
 */

.fm-head { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.fm-title { margin: 0; font-size: clamp(56px, 6.111vw, 88px); }
.fm-title--xl { font-size: clamp(72px, 7.222vw, 104px); }
.fm-img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ── Profile ────────────────────────────────────────────────────────────── */
.fm-profile { padding: 80px 0 300px; }
.fm-profile__grid {
    display:               grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap:            16px;
    align-items:           start;
}

.fm-aside { grid-column: 1; display: flex; flex-direction: column; gap: 24px; }
.fm-aside__figure { height: 271px; margin: 0; overflow: hidden; background: rgba(14, 14, 16, .04); }
.fm-facts { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.fm-facts > div { display: flex; flex-direction: column; gap: 4px; }
.fm-facts dt,
.fm-facts dd { margin: 0; }
.fm-facts dd { font-size: var(--fs-lead); font-weight: var(--fw-semibold); line-height: var(--line-height); letter-spacing: -0.02em; }
.fm-links { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; font-weight: var(--fw-regular); }
.fm-links a { color: inherit; text-decoration: underline; text-underline-position: from-font; }
.fm-links a:hover { opacity: .6; }

.fm-main { grid-column: 3 / 6; display: flex; flex-direction: column; gap: 104px; min-width: 0; }
.fm-block { display: flex; flex-direction: column; gap: 32px; }
.fm-bio { display: flex; flex-direction: column; gap: 16px; }
.fm-bio > * { margin: 0; }

.fm-expertise { display: flex; flex-direction: column; gap: 24px; margin: 0; padding: 0; list-style: none; }
.fm-expertise li { display: flex; flex-direction: column; gap: 8px; }
.fm-expertise__title {
    display:        flex;
    gap:            8px;
    align-items:    center;
    margin:         0;
    font-size:      var(--fs-body);
    font-weight:    var(--fw-medium);
    line-height:    var(--line-height);
    letter-spacing: var(--ls-base);
}
.fm-expertise__title::before { content: ''; flex: 0 0 6px; width: 6px; height: 6px; background: currentColor; }
.fm-expertise p { margin: 0; padding-left: 14px; }

/* ── Related programmes (slider that bleeds off to the right) ───────────── */
.fm-related {
    --pad:  48px;
    --lead: max(var(--pad), calc((100vw - var(--container-width)) / 2 + var(--pad)));
    --col:  calc((min(100vw, var(--container-width)) - 2 * var(--pad) - 64px) / 5);
    padding: 0 0 300px;
}
.fm-related__top {
    display:               grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap:            16px;
    align-items:           end;
    min-height:            186px;
}
.fm-related__top .fm-head { grid-column: 1 / 5; align-self: start; }
.fm-related__side { grid-column: 5; display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.fm-related__nav { display: flex; justify-content: flex-end; gap: 8px; }
.fm-related__arrow { display: flex; padding: 0; color: var(--color-text); background: none; border: 0; cursor: pointer; }
.fm-related__arrow--prev { transform: rotate(180deg); }
.fm-related__arrow:hover { opacity: .6; }

.fm-related__viewport {
    overflow-x:          auto;
    scroll-snap-type:    x mandatory;
    scroll-padding-left: var(--lead);
    scrollbar-width:     none;
    padding-left:        var(--lead);
    margin-top:          48px;
}
.fm-related__viewport::-webkit-scrollbar { display: none; }
.fm-related__viewport:focus-visible { outline: 1px solid var(--color-faint); outline-offset: 4px; }
.fm-related__track { display: flex; gap: 16px; width: max-content; margin: 0; padding: 0 var(--lead) 0 0; list-style: none; }

.fm-card {
    display:           flex;
    flex:              0 0 calc(var(--col) * 2 + 16px);
    flex-direction:    column;
    gap:               16px;
    height:            420px;
    scroll-snap-align: start;
}
.fm-card__num { margin: 0; font-family: var(--font-mono); text-align: right; color: var(--color-muted); }
.fm-card__figure { flex: 1; min-height: 0; margin: 0; overflow: hidden; }
.fm-card__info { display: flex; flex-direction: column; gap: 8px; width: var(--col); }
.fm-card__info p { margin: 0; }
.fm-card__name { margin: 0; font-size: var(--fs-lead); font-weight: var(--fw-medium); line-height: var(--line-height); letter-spacing: var(--ls-tight); }
.fm-card__info .link-arrow { margin-top: 8px; }

/* ── Tablet / mobile ────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
    .fm-title,
    .fm-title--xl { font-size: 48px; }
    .fm-title--xl { font-size: 64px; }

    .fm-profile { padding: 40px 0 104px; }
    .fm-profile__grid { display: flex; flex-direction: column; align-items: stretch; gap: 48px; }
    .fm-aside__figure { height: 361px; }
    .fm-main { gap: 64px; }
    .fm-block { gap: 24px; }

    .fm-related { --pad: 32px; padding-bottom: 104px; }
    .fm-related__top { display: flex; flex-direction: column; align-items: stretch; gap: 24px; min-height: 0; }
    .fm-related__side { flex-direction: column; align-items: stretch; gap: 24px; }
    .fm-related__viewport { margin-top: 24px; }
    .fm-card { flex-basis: 340px; }
}

@media (max-width: 767px) {
    .fm-related { --pad: 24px; }
}
