.team-cards {
  position: relative;
  overflow: hidden;
}

.team-cards__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(160deg, var(--color-surface-inverse) 0%, #0c1a2e 50%, var(--color-surface-inverse) 100%);
}

.team-cards__bg-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.team-cards__bg-glow--1 {
  top: -20%;
  right: -10%;
  width: 50%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255,199,86,0.06) 0%, transparent 70%);
}

.team-cards__bg-glow--2 {
  bottom: -15%;
  left: -5%;
  width: 40%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
}

.team-cards__inner {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - (var(--section-padding-x) * 2)));
  margin: 0 auto;
  padding: var(--section-padding-y) 0;
  color: var(--color-text-inverse);
}

/* ── Header ────────────────────────────────────── */

.team-cards__header {
  text-align: center;
  margin-bottom: 56px;
}

.team-cards__title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  line-height: var(--lh-display);
  text-wrap: balance;
}

.team-cards__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  margin: 16px auto 0;
  background: var(--color-primary);
  border-radius: 2px;
}

.team-cards__intro {
  max-width: 56rem;
  margin: 0 auto;
  opacity: 0.75;
  line-height: var(--lh-body);
}

/* ── Grid ──────────────────────────────────────── */

.team-cards__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ── Card ──────────────────────────────────────── */

.team-cards__card {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 0.4s var(--ease-out), border-color 0.3s ease, box-shadow 0.3s ease;
}

.team-cards__card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 199, 86, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.team-cards__card-media {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

.team-cards__card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.team-cards__card:hover .team-cards__card-image {
  transform: scale(1.06);
}

.team-cards__card-body {
  padding: 20px 24px 24px;
}

.team-cards__card-name {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  line-height: var(--lh-display);
}

.team-cards__card-role {
  margin: 0;
  color: var(--color-primary);
  opacity: 0.9;
  line-height: 1.5;
}

.team-cards__card-bio {
  margin: 12px 0 0;
  opacity: 0.65;
  line-height: var(--lh-body);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.team-cards__card-cta {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-secondary);
  font-size: 12px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  position: relative;
}

.team-cards__card-cta::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-primary);
  transition: width 0.3s var(--ease-out);
}

.team-cards__card:hover .team-cards__card-cta::after {
  width: 100%;
}

/* ── Modal ──────────────────────────────────────── */

.team-cards__modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal, 9999);
  display: none;
  align-items: center;
  justify-content: center;
}

.team-cards__modal[hidden] {
  display: none;
}

.team-cards__modal:not([hidden]) {
  display: flex;
}

.team-cards__modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
}

.team-cards__modal-panel {
  position: relative;
  width: min(720px, calc(100% - 32px));
  max-height: 85vh;
  background: var(--color-surface, #fff);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--color-text-dark);
}

.team-cards__modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(0,0,0,0.5);
  color: var(--color-text-inverse);
  border: none;
  font-size: 24px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.team-cards__modal-close:hover {
  background: rgba(0,0,0,0.8);
}

.team-cards__modal-scroll {
  overflow-y: auto;
  max-height: 85vh;
  -webkit-overflow-scrolling: touch;
}

.team-cards__modal-media {
  width: 100%;
  max-height: 320px;
  overflow: hidden;
}

.team-cards__modal-image {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.team-cards__modal-content {
  padding: 32px;
}

.team-cards__modal-name {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  line-height: var(--lh-display);
}

.team-cards__modal-role {
  margin: 0 0 20px;
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
}

.team-cards__modal-bio {
  color: var(--color-text-secondary);
  line-height: var(--lh-body);
}

.team-cards__modal-bio p {
  margin-bottom: 0.75rem;
}

.team-cards__modal-subtitle {
  margin: 24px 0 8px;
  font-family: var(--font-display);
  color: var(--color-text-dark);
}

/* ── Responsive ────────────────────────────────── */

@media (max-width: 768px) {
  .team-cards__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .team-cards__header {
    margin-bottom: 40px;
  }

  .team-cards__inner {
    padding: calc(var(--section-padding-y) * 0.75) 0;
  }

  .team-cards__modal-content {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .team-cards__grid {
    grid-template-columns: 1fr;
  }
}
