/* Section Titles */
.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}

/* Section Alternating Background */
.section-alt {
  background: var(--color-bg-alt);
}


.pi-card {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 51, 102, 0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  position: relative;
}

.pi-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.pi-image {
  flex-shrink: 0;
  width: 220px;
  height: 220px;
  border-radius: 12px;
  overflow: hidden;
}

.pi-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pi-info {
  flex: 1;
}

.pi-info h3 {
  font-size: 1.6rem;
  font-weight: 700;
  padding-bottom: 0px;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.pi-designation {
  font-size: 1rem;
  font-weight: 500;
  padding-bottom: 0px;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.pi-bio {
  font-size: var(--font-size-body);
  line-height: 1.75;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
}

.pi-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}


.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.2rem;
}

.team-member-card {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  background: #fff;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 51, 102, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: auto;
  box-sizing: border-box;
  overflow: hidden;
  width: 100%;
  cursor: pointer;
  position: relative;
}

.team-member-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.join-team-card {
  align-items: center;
  background: #f2f2f2;
}

.join-team-emoji {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.join-team-info h4 {
  white-space: normal;
}

.join-team-link {
  margin-top: 0.25rem;
  color: #0d95c8;
  font-weight: 500;
  text-decoration: none;
}

.join-team-link:hover {
  text-decoration: underline;
}

.team-member-img {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  border-radius: 12px;
  overflow: hidden;
}

.team-member-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.team-member-card:hover .team-member-img img {
  filter: grayscale(0%);
}

.pi-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) !important;
  transition: filter 0.3s ease;
}

.pi-card:hover .pi-image img {
  filter: grayscale(0%) !important;
}

.team-member-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  overflow: hidden;
}

.team-member-info h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.2rem;
  min-height: 1.2em;
  padding-bottom: 3px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-member-role {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: 0.2rem;
  min-height: 1.2em;
  padding-bottom: 3px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-member-duration {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-bottom: 0.2rem;
  padding-bottom: 3px;
  min-height: 1.1em;
  line-height: 1.1;
}

.team-member-edu {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-bottom: 0rem;
  padding-bottom: 3px;

  min-height: 2em;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.team-member-info .team-social-link {
  margin-top: auto;
}

/* Social Links Container */
.team-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.5rem;
  max-width: 100%;
  overflow: hidden;
}

/* Social Link Button */
.team-social-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--color-bg-alt);
  color: var(--color-primary);
  font-weight: 500;
  font-size: 0.72rem;
  text-decoration: none;
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.team-social-link:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.team-social-link-sm {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--color-bg-alt);
  color: var(--color-primary);
  font-weight: 500;
  font-size: 0.7rem;
  text-decoration: none;
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

.team-social-link-sm:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}


.alumni-category-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  padding-left: 0;
}

.alumni-category-title:first-of-type {
  margin-top: 0;
}

.alumni-table-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
  margin-bottom: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.alumni-table-wrapper::-webkit-scrollbar {
  height: 10px;
}

.alumni-table-wrapper::-webkit-scrollbar-track {
  background: #e9edf3;
  border-radius: 999px;
}

.alumni-table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(0, 51, 102, 0.55);
  border-radius: 999px;
  border: 1px solid #d6deea;
}

.alumni-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 51, 102, 0.75);
}

.alumni-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  font-size: var(--font-size-body-compact);
  table-layout: fixed;
}

/* Column widths: Name, Years, Position flexible, Links narrow at far right */
.alumni-table th:first-child,
.alumni-table td:first-child {
  width: 20%;
  min-width: 140px;
}

.alumni-table th:nth-child(2),
.alumni-table td:nth-child(2) {
  width: 190px;
  min-width: 180px;
  text-align: center;
  white-space: nowrap;
  padding-right: 1rem;
}

.alumni-table th:nth-child(3),
.alumni-table td:nth-child(3) {
  width: auto;
  white-space: normal;
  padding-left: 5rem;
  padding-right: 1rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.alumni-table th:last-child,
.alumni-table td:last-child {
  width: 80px;
  min-width: 80px;
  text-align: center;
  padding-right: 1rem;
}

.alumni-table thead {
  background: var(--color-primary);
  color: #fff;
}

.alumni-table thead th {
  padding: 0.9rem 1.2rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff !important;
}

/* Table link icon */
.table-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: color 0.3s ease;
  padding: 4px;
}

.table-link-icon:hover {
  color: var(--color-accent);
}

.alumni-table tbody tr {
  border-bottom: 1px solid rgba(0, 51, 102, 0.06);
  transition: background 0.2s ease;
}

.alumni-table tbody tr:last-child {
  border-bottom: none;
}

.alumni-table tbody tr:hover {
  background: var(--color-bg-alt);
}

.alumni-table tbody td {
  padding: 0.8rem 1.2rem;
  color: var(--color-text);
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.alumni-table tbody td:first-child {
  font-weight: 500;
  color: var(--color-primary);
}

/* Remove extra bottom space on last section before footer */
.section:last-of-type {
  padding-bottom: var(--spacing-xl);
}


@media (max-width: 992px) {
  .pi-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
  }

  .pi-image {
    width: 180px;
    height: 180px;
  }

  .pi-links {
    justify-content: center;
  }

  .team-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .team-hero {
    height: 35vh;
    min-height: 280px;
  }

  .pi-image {
    width: 140px;
    height: 140px;
  }

  .pi-info h3 {
    font-size: 1.3rem;
  }

  .pi-bio {
    font-size: var(--font-size-body-compact);
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-member-card {
    padding: 1.2rem;
  }

  .join-team-emoji {
    width: 76px;
    height: 76px;
    font-size: 2.3rem;
  }

  .alumni-table-wrapper {
    overflow-x: scroll;
  }

  .alumni-table {
    font-size: 0.82rem;
    min-width: 760px;
    table-layout: auto;
  }

  .alumni-table thead th,
  .alumni-table tbody td {
    padding: 0.58rem 0.72rem;
    line-height: 1.35;
  }

  .alumni-table th:first-child,
  .alumni-table td:first-child,
  .alumni-table th:nth-child(2),
  .alumni-table td:nth-child(2),
  .alumni-table th:nth-child(3),
  .alumni-table td:nth-child(3),
  .alumni-table th:last-child,
  .alumni-table td:last-child {
    width: auto;
    min-width: 0;
    padding-left: 0.72rem;
    padding-right: 0.72rem;
  }

  .alumni-table th:nth-child(2),
  .alumni-table td:nth-child(2) {
    min-width: 130px;
    white-space: nowrap;
    text-align: center;
  }

  .alumni-table th:nth-child(3),
  .alumni-table td:nth-child(3) {
    min-width: 300px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .alumni-table th:last-child,
  .alumni-table td:last-child {
    min-width: 76px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .team-member-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: auto;
  }

  .team-member-info h4,
  .team-member-role,
  .team-member-edu {
    white-space: normal;
  }

  .team-member-img {
    width: 80px;
    height: 80px;
  }

  .alumni-table-wrapper {
    margin-bottom: 1.2rem;
  }

  .alumni-table {
    min-width: 700px;
    font-size: 0.78rem;
  }
}
