/* team: styles for ext/team.js, the Team page at /about/team. Use the site's --b- tokens only.
   White cards with a fine --rule edge; the photo fills the top, inset 6px with a 14px radius (the card-art pattern of
   the homepage and events cards), 4:5 and kept on faces. Five across on desktop, four on small laptops, three on tablets, two on phones. */

.tm { padding-bottom: clamp(var(--sp-6), 6vw, var(--sp-12)); }

/* ---------------------------------------------------------------- filter chips */
.tm-bar { display: grid; gap: var(--sp-2); padding-top: var(--sp-1); }
.tm-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-1); }
.tm-chip { min-height: 38px; padding: 0 var(--sp-1) 0 var(--sp-2); background: var(--b-surface); box-shadow: inset 0 0 0 1px var(--b-rule); color: var(--b-ink); font-size: 14px; }
.tm-chip small { display: grid; place-items: center; min-width: 24px; height: 22px; padding: 0 var(--sp-1); border-radius: 999px; background: var(--b-paper); font: 500 11.5px/1 var(--font-mono); color: var(--b-ink-2); }
.tm-chip[aria-pressed="true"] { background: var(--b-solid); box-shadow: none; color: var(--b-solid-ink); }
.tm-chip[aria-pressed="true"] small { background: var(--b-surface); color: var(--b-ink); }
@media (hover: hover) { :root .tm-chip[aria-pressed="true"]:is(:hover, :focus-visible) { color: var(--b-accent-ink-light); } }

/* ---------------------------------------------------------------- sections */
.tm-sec { padding-top: var(--sp-section); }
.tm.is-one .tm-sec { padding-top: var(--sp-4); }
.tm-sh { display: flex; flex-direction: column; gap: var(--sp-head-desc); margin-bottom: var(--sp-head); }
.tm-sh h2 { display: flex; align-items: center; gap: var(--sp-1-5); margin: 0; font: 500 var(--h-section)/1.1 var(--font-display); letter-spacing: -0.015em; color: var(--b-ink); }
.tm-n { display: grid; place-items: center; min-width: 34px; height: 30px; padding: 0 var(--sp-1); border-radius: 999px; background: var(--b-tint-100); font: 500 14px/1 var(--font-mono); letter-spacing: 0; color: var(--b-accent-ink-light); }
.tm-sh p { margin: 0; max-width: 46em; font-size: 15.5px; line-height: 1.5; color: var(--b-ink-2); }

/* ---------------------------------------------------------------- person cards */
.tm-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-grid); }
.tm-i { display: flex; min-width: 0; }
.tm-card { position: relative; display: flex; flex-direction: column; width: 100%; border-radius: 20px; background: var(--b-surface); box-shadow: inset 0 0 0 1px var(--b-rule); color: var(--b-ink); text-decoration: none; transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; }
.tm-ph { position: relative; display: block; aspect-ratio: 4 / 5; margin: var(--sp-1) var(--sp-1) 0; border-radius: 14px; overflow: hidden; background: var(--b-tile); }
.tm-ph img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.tm-ph.is-none { display: grid; place-items: center; }
.tm-ini { font: 500 clamp(2.4rem, 4vw, 3.4rem)/1 var(--font-display); letter-spacing: -0.02em; color: var(--b-ink-3); }
.tm-body { display: flex; flex-direction: column; gap: var(--sp-0-5); padding: var(--sp-1-5) var(--sp-2); }
.tm-name { font: 500 1.05rem/1.2 var(--font-display); letter-spacing: -0.01em; text-wrap: balance; }
.tm-role { font-size: 13px; line-height: 1.4; color: var(--b-ink-2); text-wrap: pretty; }
.tm-flag { width: fit-content; margin-top: 2px; padding: var(--sp-0-5) var(--sp-1); border-radius: 999px; background: var(--b-tint-100); font: 600 11px/1 var(--font-text); letter-spacing: .04em; text-transform: uppercase; color: var(--b-accent-ink-light); }
/* The profile link: a small pill that takes the site's gradient sweep when the card is hovered */
.tm-go { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; gap: var(--sp-0-5); width: fit-content; min-height: 28px; margin: auto var(--sp-2) var(--sp-2); padding: 0 var(--sp-1-5) 0 var(--sp-1-5); border-radius: 999px; box-shadow: inset 0 0 0 1px var(--b-rule-2); font: 500 13px/1 var(--font-text); color: var(--b-ink-2);
  transition: color var(--btn-d, .32s) var(--btn-ease, ease), box-shadow var(--btn-d, .32s) var(--btn-ease, ease); }
.tm-go .ico { width: 13px; height: 13px; }
.tm-card .tm-go { align-self: flex-start; }
.tm-go::before { content: ""; position: absolute; z-index: -1; inset: 0 auto 0 0; width: 200%; pointer-events: none; background: var(--btn-g-ink); opacity: 0; transform: translateX(-50%);
  transition: opacity var(--btn-d, .32s) var(--btn-ease, ease), transform .6s var(--btn-ease, ease); }
.tm-card:focus-visible { outline: 2px solid var(--b-accent-ink-light); outline-offset: 3px; }
@media (hover: hover) {
  .tm-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--b-rule-2), 0 14px 30px rgba(var(--b-shadow), .08); }
  .tm-card:hover .tm-ph img { transform: scale(1.045); }
}
.tm-card:is(:hover, :focus-visible) .tm-go { box-shadow: none; color: var(--b-accent-ink); }
.tm-card:is(:hover, :focus-visible) .tm-go::before { opacity: 1; transform: translateX(0); }
.tm-card:active .tm-go::before { opacity: 1; filter: brightness(.88); }

/* ---------------------------------------------------------------- alumni */
.tm-alumni { list-style: none; margin: 0; padding: var(--sp-3) var(--sp-3); columns: 4 13em; column-gap: var(--sp-4); border-radius: 24px; background: var(--b-surface); box-shadow: inset 0 0 0 1px var(--b-rule); }
.tm-alumni li { break-inside: avoid; padding: var(--sp-0-5) 0; }
.tm-alumni li.is-more { display: none; }
.tm-alumni.is-open li.is-more { display: block; }
.tm-alumni a { color: var(--b-ink); font-size: 15px; text-decoration: none; background: linear-gradient(var(--b-accent-ink-light), var(--b-accent-ink-light)) 0 100% / 0 1.5px no-repeat; transition: background-size .3s var(--btn-ease, ease), color .2s; }
.tm-alumni a:is(:hover, :focus-visible) { color: var(--b-accent-ink-light); background-size: 100% 1.5px; }
.tm-more { display: flex; margin: var(--sp-2) auto 0; }

/* ---------------------------------------------------------------- sizes */
@media (max-width: 1200px) { .tm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .tm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .tm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-grid); }
  .tm-chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: calc(var(--sp-2) * -1); padding: 2px var(--sp-2) var(--sp-1); scrollbar-width: none; }
  .tm-chips::-webkit-scrollbar { display: none; }
  .tm-chip { flex: none; }
  .tm-card { border-radius: 20px; }
  .tm-ph { margin: var(--sp-1) var(--sp-1) 0; border-radius: 14px; }
  .tm-body { padding: var(--sp-1-5) var(--sp-1-5) var(--sp-1-5); gap: var(--sp-0-5); }
  .tm-name { font-size: .98rem; }
  .tm-role { font-size: 13px; }
  .tm-go { margin: auto var(--sp-1-5) var(--sp-1-5); min-height: 28px; font-size: 12.5px; }
  .tm-alumni { padding: var(--sp-2) var(--sp-2); columns: 2; column-gap: var(--sp-2); }
  .tm-alumni a { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .tm-card, .tm-ph img, .tm-go, .tm-go::before { transition-duration: .01ms !important; }
  .tm-card:hover { transform: none; }
  .tm-card:hover .tm-ph img { transform: none; }
  .tm-go::before { transform: none !important; }
}

/* Team cards are the site's .nc card (Shajee, 24 Oct): no profile pill; the corner arrow opens on hover, a size smaller */
.tm-card.nc { background: none; box-shadow: none; }
.tm-card.nc::before { --s: calc(48px * var(--nk)); --r: calc(14px * var(--nk)); }
.tm-card .corner { width: 48px; height: 48px; }
.tm-card .corner-btn { width: 36px; height: 36px; }
.tm-card .corner-btn .ico { width: 15px; height: 15px; }
.tm-body { padding: var(--sp-2) calc(var(--sp-2) + 40px) var(--sp-2) var(--sp-2); }  /* same space above the name as below the role */
@media (hover: hover) { .tm-card.nc:hover { box-shadow: none; filter: drop-shadow(0 16px 16px rgba(var(--b-shadow), .1)); } }
