/* ============================================================
   Staff archive + single (loaded only on those pages)
   ============================================================ */

/* ── Group heading ── */
.staff-group { container-type: inline-size; }
.staff-group-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-green);
}
.staff-group-title::after { content: ''; flex: 1; height: 1px; background: #DCD8D0; }
.staff-group-title.screen-reader-text::after { content: none; }

/* ── Grid: one column; two when the group has room; a lone last card spans both ── */
.staff-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }

@container (min-width: 860px) {
  .staff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-grid > .staff-wrap:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ── Card ── */
.staff-wrap { container-type: inline-size; }

/* Base layout (card 500–800px wide): photo floats left, info beside it,
   then expertise (centred, full width), then the bio */
.staff { display: flow-root; height: 100%; padding: 24px 28px 26px; }

.staff-photo {
  float: left;
  width: 150px;
  height: 190px;
  margin: 0 28px 14px 0;
  overflow: hidden;
  border-radius: 10px;
  background: #E8EDE6;
}
.staff-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }

.staff-top { display: contents; }               /* info and expertise act as direct children of the card */
.staff-info { display: flow-root; margin-bottom: 20px; }   /* sits beside the float, doesn't wrap under it */

.staff-type {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-accent-dark);
}
.staff-name {
  margin-top: 5px;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  color: var(--c-text);
}
.staff-name a { color: inherit; text-decoration: none; }
.staff-name a:hover { color: var(--c-accent-dark); }
.staff-dates { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 14px; color: #7A5A48; }
.staff-dates::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--c-accent); }
.staff-dates.is-active::before { background: var(--c-green); }

.staff-label { margin-bottom: 9px; font-weight: 700; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-text-3); }

.staff-edu { margin-top: 18px; }
.staff-edu-list { list-style: none; font-size: 14px; line-height: 1.4; color: var(--c-text-3); }
.staff-edu-list li + li { margin-top: 9px; }
.staff-edu-list strong { display: block; font-size: 14.5px; color: var(--c-text); }

.staff-exp {
  clear: both;
  margin-bottom: 20px;
  padding: 18px 0;
  border-block: 1px solid #EEEEEE;
  text-align: center;
}
.staff-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; }
.staff-chips li {
  padding: 4px 11px;
  background: #EEF5EA;
  border: 1px solid #D6E6CF;
  border-radius: 99px;
  font-size: 13.5px;
  color: var(--c-green);
}

.staff-bio { font-size: 15px; line-height: 1.65; color: var(--c-text-2); }
.staff-bio > * + * { margin-top: 12px; }
.staff-bio a { color: var(--c-green); text-decoration: underline; text-underline-offset: 2px; }
.staff-bio ul, .staff-bio ol { padding-left: 1.3em; }
.staff-bio ul { list-style: disc; }
.staff-bio ol { list-style: decimal; }

/* No bio: no trailing spacing or lines */
.staff-top:last-child .staff-info { margin-bottom: 0; }
.staff-top:last-child .staff-exp { margin-bottom: 0; border-bottom: 0; }

/* Wide card (800px+): info | expertise side by side, bio below */
@container (min-width: 800px) {
  .staff-photo { width: 200px; height: 250px; margin-right: 30px; }

  .staff-top {
    display: grid;
    grid-template-columns: fit-content(min(380px, 58%)) minmax(0, 1fr);
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #EEEEEE;
  }
  .staff-info { margin-bottom: 0; }
  .staff-exp {
    clear: none;
    margin: 0 0 0 26px;
    padding: 0 0 0 26px;
    border: 0;
    border-left: 1px solid #EEEEEE;
    text-align: left;
  }
  .staff-chips { justify-content: flex-start; }

  .staff-top:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
}

/* Narrower card (two per row): smaller photo, tighter padding, photo stays beside the text */
@container (max-width: 520px) {
  .staff { padding: 20px; }
  .staff-photo { width: 130px; height: 165px; margin-right: 20px; }
  .staff-name { font-size: 22px; }
}

/* Phone-width card: photo on top */
@container (max-width: 380px) {
  .staff-photo { float: none; width: 100%; height: 240px; margin: 0 0 16px; }
}