/* ============ Our Team page — roster grid & bio modal ============ */

.team-section {
  --ink-soft: #4b5d68;
  --muted: #7e8d96;
  --line: #e3e8ee;
  --accent: #1ba8c4;
  --accent-soft: #e3f6fa;
  --accent-deep: #157f96;
  --chip: #eff4fb;
  --shadow-md: 0 6px 24px rgba(29,43,51,.08), 0 2px 6px rgba(29,43,51,.05);
}

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

.team-section .card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, border-color .2s;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  width: 100%;
  font: inherit;
}

.team-section .card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cfd8e0;
}

.team-section .card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.team-section .photo {
  position: relative;
  height: 0;
  padding-top: 125%;
  background: var(--chip);
  overflow: hidden;
}

.team-section .photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform .5s ease;
}

.team-section .card:hover .photo img { transform: scale(1.03); }

.team-section .role-tag {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(6px);
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
}

.team-section .body {
  padding: 16px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.team-section .name {
  font-family: 'Roboto Condensed', 'Roboto', sans-serif;
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
  margin: 0 0 4px;
  line-height: 1.2;
}

.team-section .creds {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  margin: 0 0 10px;
}

.team-section .focus {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.55;
}

/* Modal */

.team-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20,30,36,.55);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
  animation: teamFade .2s ease;
}

.team-modal-backdrop.open { display: flex; }

@keyframes teamFade { from { opacity: 0; } to { opacity: 1; } }

.team-modal {
  background: #fff;
  border-radius: 18px;
  max-width: 720px;
  width: 100%;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  animation: teamPop .25s cubic-bezier(.2,.9,.3,1.2);
}

@keyframes teamPop {
  from { transform: scale(.96); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.team-modal .modal-head {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 30px 30px 22px;
  border-bottom: 1px solid #e3e8ee;
  position: relative;
}

.team-modal .modal-photo {
  flex: 0 0 130px;
  width: 130px;
  height: 130px;
  border-radius: 12px;
  overflow: hidden;
  background: #eff4fb;
  position: relative;
}

.team-modal .modal-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }

.team-modal .modal-title h2 {
  font-family: 'Roboto Condensed', 'Roboto', sans-serif;
  font-weight: 600;
  font-size: 28px;
  margin: 6px 0 4px;
  color: var(--ink);
}

.team-modal .modal-title .creds {
  font-size: 14.5px;
  color: #1ba8c4;
  font-weight: 500;
  margin: 0 0 12px;
}

.team-modal .role-pill {
  display: inline-block;
  background: #e3f6fa;
  color: #157f96;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.team-modal .close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e3e8ee;
  background: #fff;
  color: #4b5d68;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
}

.team-modal .close:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.team-modal .modal-body { padding: 24px 30px 30px; }

.team-modal .modal-body h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #7e8d96;
  margin: 0 0 10px;
}

.team-modal .modal-body p {
  color: #4b5d68;
  font-size: 15.5px;
  line-height: 1.65;
  margin: 0 0 18px;
}

.team-modal .tags { display: flex; flex-wrap: wrap; gap: 6px; }

.team-modal .tag {
  background: #eff4fb;
  color: #4b5d68;
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: 999px;
}

@media (max-width: 560px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .team-section .body { padding: 12px 13px 14px; }
  .team-section .name { font-size: 16px; }
  .team-section .creds { font-size: 12px; }
  .team-section .focus { font-size: 12.5px; }
  .team-modal-backdrop { padding: 12px; }
  .team-modal .modal-head { flex-direction: column; padding: 24px 20px 18px; }
  .team-modal .modal-photo { flex: 0 0 auto; width: 110px; height: 110px; }
  .team-modal .modal-body { padding: 20px; }
}
