/* =========================================================
   Group page
   ========================================================= */

/* Jump links under the hero lede */
.group-jump ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.group-jump a {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 8px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgb(var(--surface-rgb) / .38);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 14px; font-weight: 600; text-decoration: none; color: var(--text);
  transition: border-color .2s ease, background-color .2s ease;
}
.group-jump a:hover { border-color: rgb(var(--cyan-rgb) / .55); background: rgb(var(--cyan-rgb) / .08); }
.gj-num {
  min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: rgb(var(--cyan-rgb) / .1); border: 1px solid rgb(var(--cyan-rgb) / .3);
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

/* ---------- Current members ---------- */
.role-group + .role-group { margin-top: clamp(48px, 6vw, 72px); }
.role-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.role-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.role-title {
  margin: 0;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--cyan);
}
.role-count { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); letter-spacing: .06em; }

.member-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.member-grid > li { display: flex; }
.member {
  flex: 1; display: flex; flex-direction: column;
  padding: 24px 24px 26px; border-radius: 22px;
  scroll-margin-top: calc(var(--header-h) + 24px);
  transition: box-shadow .4s ease;
}
.member-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.member .avatar { width: 88px; height: 88px; margin: 0; }
.member:hover .avatar { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px rgb(var(--cyan-rgb) / .7), 0 0 26px 2px rgb(var(--cyan-rgb) / .35); }
.member .avatar--initials { font-size: 1.45rem; }
.member-id { min-width: 0; flex: 1; }
.member-name { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.22rem; line-height: 1.25; letter-spacing: -.022em; }
.member-role { margin: 6px 0 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); }
.member-anchor {
  align-self: flex-start; flex: none;
  width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 13px; color: var(--text-3); text-decoration: none;
  border: 1px solid transparent;
  opacity: 0; transition: opacity .2s ease, color .2s ease, border-color .2s ease;
}
.member:hover .member-anchor, .member-anchor:focus-visible { opacity: 1; }
.member-anchor:hover { color: var(--cyan); border-color: rgb(var(--cyan-rgb) / .4); }
@media (hover: none) { .member-anchor { opacity: .6; } }
.member-bio { margin: 0; color: var(--text-2); font-size: .97rem; line-height: 1.68; }
.member-bio a, .alum-bio a {
  color: var(--text); text-decoration: underline; text-decoration-color: rgb(var(--cyan-rgb) / .45);
  text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s;
}
.member-bio a:hover, .alum-bio a:hover { color: var(--cyan); text-decoration-color: var(--cyan); }

/* A linked member (group.html#name) gets a soft highlight */
.member:target { box-shadow: var(--card-shadow), 0 0 0 2px rgb(var(--cyan-rgb) / .7), 0 24px 70px -30px rgb(var(--cyan-rgb) / .7); }
.member:target::before { opacity: 1; }

/* ---------- Join note ---------- */
.join {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 40px;
  margin-top: clamp(56px, 7vw, 88px); padding: 28px 32px; border-radius: 22px;
  background:
    radial-gradient(90% 140% at 100% 0%, rgb(var(--violet-rgb) / .14), transparent 60%),
    linear-gradient(160deg, rgb(var(--surface-rgb) / .72), rgb(var(--surface-rgb) / .34));
}
.join-copy { flex: 1 1 420px; max-width: 640px; }
.join .eyebrow { margin-bottom: 10px; }
.join-title { margin: 0 0 8px; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.3rem, 1.1rem + .7vw, 1.6rem); line-height: 1.2; letter-spacing: -.028em; }
.join p:not(.eyebrow) { margin: 0; color: var(--text-2); }
.join .btn { flex: none; }

/* ---------- Alumni ---------- */
.group-alumni { padding-top: clamp(64px, 8vw, 112px); }
.alumni-grid {
  list-style: none; margin: clamp(32px, 4vw, 48px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.alum {
  display: flex; flex-direction: column;
  padding: 20px 20px 18px; border-radius: 18px;
  border: 1px solid var(--line); background: rgb(var(--surface-rgb) / .34);
  scroll-margin-top: calc(var(--header-h) + 24px);
  transition: border-color .3s ease, background-color .3s ease;
}
.alum:hover { border-color: rgb(var(--cyan-rgb) / .3); background: rgb(var(--surface-rgb) / .5); }
.alum:target { border-color: rgb(var(--cyan-rgb) / .7); box-shadow: 0 0 0 1px rgb(var(--cyan-rgb) / .5), 0 20px 50px -30px rgb(var(--cyan-rgb) / .7); }
.alum-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.alum .avatar { width: 52px; height: 52px; margin: 0; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line-2); }
.alum .avatar--initials { font-size: 1rem; }
.alum-name { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; line-height: 1.3; letter-spacing: -.015em; }
.alum-bio { margin: 0; color: var(--text-2); font-size: .92rem; line-height: 1.62; }

/* With JS, long bios are clamped with a "Read more" toggle (full text is always in the HTML). */
.alumni-grid.is-enhanced .alum-bio:not(.is-open) {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden;
}
.alum-more {
  align-self: flex-start; margin: 0; padding: 12px 0 0;
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; cursor: pointer;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .04em; color: var(--cyan);
}
.alum-more::after { content: "↓"; content: "↓" / ""; transition: transform .25s var(--ease); }
.alum-more[aria-expanded="true"]::after { transform: rotate(180deg); }
.alum-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .member-grid, .alumni-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .member-grid, .alumni-grid { grid-template-columns: minmax(0, 1fr); }
  .member { padding: 20px 20px 22px; }
  .member .avatar { width: 76px; height: 76px; }
  .join { padding: 24px 22px; }
  .join .btn { width: 100%; justify-content: center; white-space: normal; }
}
