/* Team page — dark banner, four grouped sections, contact block.
   Mirrors issgjs/src/app/team/page.tsx and person-profile-card.tsx. */

/* --- Banner ------------------------------------------------------------- */

.team-banner {
  background: var(--issg-dark);
  padding-block: 4rem;
}
@media (min-width: 48em) {
  .team-banner {
    padding-block: 6rem;
  }
}

.team-banner__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 48em) {
  .team-banner__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

.team-banner h1 {
  color: #fff;
  margin-bottom: 1rem;
  font-size: 2.25rem;
  line-height: 1.2;
}
@media (min-width: 48em) {
  .team-banner h1 {
    font-size: 3rem;
    line-height: 1;
  }
}

.team-banner__lead {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.125rem;
  line-height: 1.625;
}

/* --- Roster ------------------------------------------------------------- */

.team-roster {
  padding-block: 3rem;
}
@media (min-width: 48em) {
  .team-roster {
    padding-block: 5rem;
  }
}

.team-roster__actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 3rem;
}

/* --- Tabs --------------------------------------------------------------- */

.team-roster__tabs {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.team-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--gray-200);
  /* On a phone four labels will not fit. Scrolling sideways keeps every group
     reachable without stacking them, which is the thing this replaced. */
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 1px;
}
.team-tabs::-webkit-scrollbar {
  display: none;
}

.team-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.75rem 1.25rem;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  color: var(--gray-600);
  font-size: 0.9375rem;
  font-weight: 600;
  background: var(--gray-50);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.team-tab:hover {
  background: var(--gray-100);
  color: var(--issg-dark);
}
.team-tab.is-active {
  background: #fff;
  color: var(--issg-dark);
  border-color: var(--gray-200);
  /* Sits over the container's own border so the active tab reads as joined to
     the panel below it, the way a folder tab does. */
  margin-bottom: -1px;
  padding-bottom: calc(0.75rem + 1px);
}

/* A group nobody is in yet. Still clickable — hiding it would hide the fact
   that the category exists and needs filling. */
.team-tab.is-empty {
  color: var(--gray-400);
}

.team-tab__count {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.0625rem 0.4375rem;
  border-radius: var(--radius-full);
  background: var(--gray-200);
  color: var(--gray-600);
}
.team-tab.is-active .team-tab__count {
  background: var(--issg-sage);
  color: var(--issg-dark);
}

.team-panel:focus {
  outline: none;
}

.team-panel__empty {
  text-align: center;
  padding-block: 4rem;
  color: var(--gray-500);
}

@media (max-width: 30em) {
  .team-tabs {
    justify-content: flex-start;
  }
  .team-tab {
    padding-inline: 0.875rem;
    font-size: 0.875rem;
  }
}

.team-section {
  margin-bottom: 4rem;
}

.team-section__head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}
.team-section__head h2 {
  color: var(--issg-dark);
}

.team-section__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 48em) {
  .team-section__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Person card -------------------------------------------------------- */

.person-card {
  display: flex;
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  min-height: 100px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.person-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}
@media (min-width: 48em) {
  .person-card {
    min-height: 130px;
  }
}

.person-card__admin {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 1;
}

.person-card__body {
  flex: 1;
  padding: 1rem 0.5rem 1rem 1rem;
  min-width: 0;
}

.person-card__name {
  font-size: 0.875rem;
  /* The original set lineHeight="tight", which is not a Chakra lineHeights
     token. Chakra passed the raw string through, the browser dropped the
     declaration at parse, and the Heading size style's 1.2 applied instead. */
  line-height: 1.2;
  color: var(--issg-dark);
  margin-bottom: 0.25rem;
  padding-right: 2rem;
}

.person-card__role {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.person-card__blurb {
  font-size: 0.75rem;
  color: var(--gray-600);
  line-height: 1.625;
}

.person-card__socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.person-card__social {
  color: var(--gray-400);
  transition: color 0.2s;
}
.person-card__social--in:hover     { color: var(--blue-500); }
.person-card__social--mail:hover   { color: var(--red-500); }
.person-card__social--scholar:hover{ color: #38a169; }

.person-card__photo {
  width: 75px;
  flex-shrink: 0;
  background: var(--gray-100);
  overflow: hidden;
}
@media (min-width: 48em) {
  .person-card__photo {
    width: 100px;
  }
}
.person-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Checkerboard stand-in for a missing photograph. */
.person-card__placeholder {
  width: 100%;
  height: 100%;
  background-image: repeating-conic-gradient(#d1d5db 0% 25%, #f3f4f6 0% 50%);
  background-size: 20px 20px;
}

/* --- Contact ------------------------------------------------------------ */

.team-contact {
  padding-block: 5rem;
  background: var(--issg-background-gray);
}
@media (min-width: 48em) {
  .team-contact {
    padding-block: 8rem;
  }
}

.team-contact__head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 4rem;
}
.team-contact__head h2 {
  color: var(--issg-dark);
}

.team-contact__details {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
/* The shared .contact-item sets a bottom margin for the home page's layout;
   here the column gap does that job instead. */
.team-contact__details .contact-item {
  margin-bottom: 0;
}

/* 2026 portrait roster — inspired by the supplied team reference. */
.team-banner {
  padding-block: clamp(4rem, 8vw, 7rem);
  text-align: center;
  background:
    radial-gradient(circle at 50% 20%, rgba(3, 228, 251, 0.13), transparent 35%),
    #f4f7f9;
}

.team-banner h1 {
  margin: 0;
  color: var(--issg-ink);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  line-height: 0.98;
}

.team-roster {
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
  background: #f4f7f9;
}

.team-roster__tabs {
  gap: clamp(2rem, 5vw, 3.5rem);
}

.team-tabs {
  justify-content: flex-start;
  gap: 0.6rem;
  padding: 0.25rem 0 0.75rem;
  border: 0;
}

.team-tab,
.team-tab.is-active {
  margin: 0;
  padding: 0.7rem 1rem;
  border: 1px solid var(--issg-line);
  border-radius: 999px;
  background: #fff;
  color: var(--issg-muted);
}

.team-tab:hover {
  border-color: rgba(4, 83, 155, 0.35);
  background: #fff;
}

.team-tab.is-active {
  border-color: var(--issg-blue);
  background: var(--issg-blue);
  color: #fff;
}

.team-tab.is-active .team-tab__count {
  color: var(--issg-blue);
  background: #fff;
}

.team-section__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.25rem) clamp(1rem, 2vw, 1.5rem);
}

@media (min-width: 64em) {
  .team-section__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.person-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.person-card:hover {
  border-color: transparent;
  box-shadow: none;
}

.person-card__photo {
  width: 100%;
  aspect-ratio: 0.92;
  border-radius: 1.1rem;
  background: #e8eef0;
  box-shadow: 0 12px 34px rgba(14, 23, 36, 0.08);
}

.person-card__photo img {
  transition: transform 0.45s ease;
}

.person-card:hover .person-card__photo img {
  transform: scale(1.025);
}

.person-card__body {
  padding: 1rem 0 0;
}

.person-card__name {
  margin-bottom: 0.2rem;
  padding: 0;
  color: var(--issg-ink);
  font-size: 1.05rem;
}

.person-card__role {
  margin-bottom: 0.55rem;
  color: var(--issg-blue);
  font-size: 0.82rem;
  font-weight: 700;
}

.person-card__blurb {
  color: var(--issg-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.person-card__socials {
  margin-top: 0.8rem;
}

.team-panel__empty {
  min-height: 16rem;
  display: grid;
  place-items: center;
  border: 1px dashed var(--issg-line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.55);
}

@media (max-width: 35.99em) {
  .team-section__grid {
    grid-template-columns: 1fr;
  }

  .person-card__photo {
    aspect-ratio: 1 / 1.04;
  }
}
