/* ── Meet the Team ─────────────────────────────────────────────────────────── */

.team-section { padding: 3rem 1.5rem 4rem; }
.team-section + .team-section { padding-top: 0; }

.team-section__header {
  max-width: 1120px;
  margin: 0 auto 2rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 2px solid var(--ugle-blue);
  padding-bottom: 0.6rem;
}
.team-section__title {
  font-family: 'Barlow', sans-serif;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: var(--ugle-blue);
}
.team-section__hint {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ── Quick nav ────────────────────────────────────────────────────────────── */
.team-quicknav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  padding: 1.5rem;
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
}
.team-quicknav a {
  padding: 0.4rem 1.1rem;
  border: 1.5px solid var(--ugle-blue);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ugle-blue);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.team-quicknav a:hover { background: var(--ugle-blue); color: #fff; }

/* ── Card grid ────────────────────────────────────────────────────────────── */
.team-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.75rem;
}
.team-grid--exec {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

/* ── Member card ──────────────────────────────────────────────────────────── */
.team-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s, border-color 0.18s;
}
.team-card:hover { box-shadow: 0 4px 20px rgba(19,50,94,0.10); border-color: var(--accent); }

.team-card__photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  display: block;
  background: var(--off-white);
}
.team-card__photo--placeholder {
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, var(--ugle-blue) 0%, var(--ugle-blue-mid) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.35);
  font-size: 3rem;
}

.team-card__body {
  padding: 1rem 1.1rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.team-card__name {
  font-family: 'Barlow', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  margin-bottom: 0.25rem;
}
.team-card__role {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
  flex: 1;
}

/* ── Clickable card (has a pen portrait) ──────────────────────────────────── */
.team-card--clickable {
  cursor: pointer;
}
.team-card--clickable:hover {
  box-shadow: 0 6px 24px rgba(19,50,94,0.14);
  border-color: var(--accent);
}
.team-card--clickable:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ── Pen portrait badge (visual affordance, not interactive) ──────────────── */
.team-card__bio-badge {
  margin-top: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border: 1.5px solid var(--ugle-blue);
  border-radius: 6px;
  color: var(--ugle-blue);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: 'Barlow', sans-serif;
  letter-spacing: 0.03em;
  pointer-events: none;
  align-self: flex-start;
  transition: background 0.15s, color 0.15s;
}
.team-card--clickable:hover .team-card__bio-badge {
  background: var(--ugle-blue);
  color: #fff;
}

/* ── Collapsible section wrapper ──────────────────────────────────────────── */
.team-collapsible {
  max-width: 1120px;
  margin: 0 auto;
}
.team-collapsible > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  background: var(--ugle-blue);
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  user-select: none;
  margin-bottom: 1.5rem;
}
.team-collapsible > summary::-webkit-details-marker { display: none; }
.team-collapsible > summary::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.75rem;
  margin-left: auto;
  transition: transform 0.2s;
}
.team-collapsible[open] > summary::after { transform: rotate(180deg); }

/* ── Sub-section tabs (Craft / Chapter) ───────────────────────────────────── */
.team-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.team-tab-btn {
  padding: 0.5rem 1.5rem;
  border: 1.5px solid var(--ugle-blue);
  border-radius: 6px;
  background: #fff;
  color: var(--ugle-blue);
  font-weight: 700;
  font-family: 'Barlow', sans-serif;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.team-tab-btn.is-active, .team-tab-btn:hover { background: var(--ugle-blue); color: #fff; }
.team-tab-panel { display: none; }
.team-tab-panel.is-active { display: block; }

/* ── Bio modal ────────────────────────────────────────────────────────────── */
body.modal-open { overflow: hidden; }

.bio-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.bio-modal.is-open { display: flex; }

.bio-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 25, 50, 0.70);
  backdrop-filter: blur(3px);
}

.bio-modal__box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  animation: modal-in 0.22s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.bio-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  z-index: 2;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  width: 2.2rem;
  height: 2.2rem;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.bio-modal__close:hover { background: #f0f0f0; }

/* Two-column layout: photo | text */
.bio-modal__inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  flex: 1;
  overflow: hidden;
}

.bio-modal__photo-col {
  background: var(--ugle-blue);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.bio-modal__photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  display: block;
}
.bio-modal__id {
  padding: 1rem;
  flex: 1;
}
.bio-modal__name {
  font-family: 'Barlow', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 0.3rem;
}
.bio-modal__role {
  font-size: 0.75rem;
  color: var(--accent-light, #d4af37);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.bio-modal__text-col {
  overflow-y: auto;
  padding: 2rem 1.75rem 2rem;
  -webkit-overflow-scrolling: touch;
}
.bio-modal__portrait {
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text-mid);
}
.bio-modal__portrait p + p {
  margin-top: 0.85rem;
}
.bio-modal__portrait em {
  color: var(--text-dark);
  font-style: italic;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .team-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 1rem; }

  /* Stack photo above text on small screens */
  .bio-modal__inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    overflow-y: auto;
  }
  .bio-modal__photo-col {
    flex-direction: row;
    align-items: center;
  }
  .bio-modal__photo {
    width: 100px;
    aspect-ratio: 3/4;
    flex-shrink: 0;
  }
  .bio-modal__id { padding: 0.75rem 1rem; }
  .bio-modal__text-col {
    overflow-y: visible;
    padding: 1.25rem 1.1rem 1.5rem;
  }
}
