/* ============================================
   Team 3 — 3 per row roster
   ============================================ */
.team3-container{
  --t3-rule: rgba(9,24,31,.10);
  --ease: cubic-bezier(.2,.7,.2,1);

  background: #F5F6F7;
  color: #09181F;
  padding: clamp(80px, 12vw, 160px) 0;
}
.team3-head{
  max-width: 1400px; margin: 0 auto clamp(40px, 5vw, 72px);
}
.team3-head h2{
  font-size: clamp(32px, 4.2vw, 60px);
  line-height: 1.02; letter-spacing: -.028em; font-weight: 600;
  max-width: 22ch;
  margin: 0;
}
.team3-head h2 em{ font-style: normal; color: var(--secondary) }

.team3-grid{
  max-width: 1400px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.team3-card{
  background: #FFFFFF;
  border: 1px solid var(--t3-rule);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .4s;
  cursor: pointer;
}
.team3-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 24px 50px -24px rgba(9,24,31,.25);
  border-color: var(--secondary);
}
.team3-card__photo{
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
  background: #ECEEF0;
}
.team3-card__photo img{
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  display: block;
  transition: transform .6s var(--ease);
}
.team3-card:hover .team3-card__photo img{ transform: scale(1.04) }
.team3-card__initials{
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 96px; font-weight: 600; letter-spacing: -.03em;
  color: rgba(9,24,31,.22);
}
.team3-card__photo::after{
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--secondary);
  transform: scaleX(0); transform-origin: left;
  transition: transform .6s var(--ease);
}
.team3-card:hover .team3-card__photo::after{ transform: scaleX(1) }

.team3-card__badge{
  position: absolute; top: 14px; left: 14px;
  padding: 6px 10px;
  background: rgba(9,24,31,.82);
  color: #FFFFFF;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

/* duotone gradient placeholders used when no photo */
.team3-card__photo--1{ background: linear-gradient(150deg,#8CC5BD,#104A44); }
.team3-card__photo--2{ background: linear-gradient(150deg,#B0D0C4,#2B5E52); }
.team3-card__photo--3{ background: linear-gradient(150deg,#A2CFC8,#0F4C48); }
.team3-card__photo--4{ background: linear-gradient(150deg,#C5D9CF,#3E7466); }
.team3-card__photo--5{ background: linear-gradient(150deg,#9FC8BE,#165E54); }
.team3-card__photo--6{ background: linear-gradient(150deg,#BCD4CA,#2D6A5E); }
.team3-card__photo--7{ background: linear-gradient(150deg,#A8CCC2,#1A5B52); }

.team3-card__meta{ padding: 20px 22px 22px }
.team3-card__name{
  font-size: 22px; font-weight: 600; letter-spacing: -.015em;
  color: #09181F;
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
  margin: 0;
}
.team3-card__arrow{
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--t3-rule);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; color: #5F6B73;
  transition: transform .4s var(--ease), background .3s, color .3s, border-color .3s;
  flex-shrink: 0;
}
.team3-card:hover .team3-card__arrow{
  transform: rotate(-45deg);
  background: var(--secondary); color: #09181F; border-color: var(--secondary);
}
.team3-card__role{
  margin-top: 4px;
  color: var(--secondary);
  font-size: 14px; font-weight: 500;
}
.team3-card__quip{
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--t3-rule);
  font-size: 13.5px; color: #5F6B73;
  font-style: italic; line-height: 1.45;
}

@media (max-width: 991px){
  .team3-grid{ grid-template-columns: repeat(2, 1fr) }
}
@media (max-width: 560px){
  .team3-grid{ grid-template-columns: 1fr }
}

/* Cards without a bio should not hint at click-ability */
.team3-card:not(.has-bio){ cursor: default }
.team3-card:not(.has-bio):hover{ transform: none; box-shadow: none; border-color: var(--t3-rule) }
.team3-card:not(.has-bio):hover .team3-card__photo::after{ transform: scaleX(0) }
.team3-card:not(.has-bio):hover .team3-card__arrow{ transform: none; background: transparent; color: #5F6B73; border-color: var(--t3-rule) }

/* ============================================
   Bio Modal
   ============================================ */
.team3-modal{
  position: fixed; inset: 0;
  z-index: 9999;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.team3-modal.is-open{ display: flex }
.team3-modal__backdrop{
  position: absolute; inset: 0;
  background: rgba(9,24,31,.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: t3FadeIn .3s var(--ease);
}
.team3-modal__panel{
  position: relative;
  z-index: 1;
  width: min(820px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #FFFFFF;
  border-radius: 20px;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.45);
  display: grid;
  grid-template-columns: 300px 1fr;
  animation: t3PanelIn .45s var(--ease);
}
@keyframes t3FadeIn { from{opacity:0} to{opacity:1} }
@keyframes t3PanelIn{
  from{ opacity: 0; transform: translateY(16px) scale(.98) }
  to  { opacity: 1; transform: none }
}

.team3-modal__photo{
  position: relative;
  background: #ECEEF0;
  aspect-ratio: auto;
  min-height: 100%;
  overflow: hidden;
}
.team3-modal__photo img{
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  display: block;
}
.team3-modal__initials{
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 120px; font-weight: 600; letter-spacing: -.03em;
  color: rgba(9,24,31,.22);
}

.team3-modal__body{
  padding: 40px 40px 44px;
  display: flex; flex-direction: column;
  gap: 10px;
}
.team3-modal__name{
  font-size: 34px; font-weight: 600; letter-spacing: -.02em;
  line-height: 1.05;
  color: #09181F;
  margin: 0;
}
.team3-modal__role{
  color: var(--secondary);
  font-size: 14px; font-weight: 500;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .08em; text-transform: uppercase;
}
.team3-modal__bio{
  margin-top: 18px; padding-top: 18px;
  border-top: 1px solid var(--t3-rule);
  font-size: 15.5px; line-height: 1.65;
  color: #2E3A43;
}
.team3-modal__bio p{ margin: 0 0 1em }
.team3-modal__bio p:last-child{ margin-bottom: 0 }
.team3-modal__bio em{ color: var(--secondary); font-style: normal; font-weight: 600 }
.team3-modal__bio strong{ color: #09181F }

.team3-modal__close{
  position: absolute; top: 14px; right: 14px;
  z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(9,24,31,.15);
  background: #FFFFFF;
  color: #09181F;
  font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.team3-modal__close:hover{
  background: var(--secondary); color: #09181F; border-color: var(--secondary);
  transform: rotate(90deg);
}

@media (max-width: 720px){
  .team3-modal__panel{ grid-template-columns: 1fr }
  .team3-modal__photo{ aspect-ratio: 4/3; min-height: 0 }
  .team3-modal__body{ padding: 28px 24px 32px }
  .team3-modal__name{ font-size: 26px }
}
