/* Reveal each portrait's original colors on interaction. */
.team-card .team-photo img,
.network-profile img {
  filter: grayscale(1);
  transition: filter .65s ease, transform .7s ease;
}
.team-card:hover .team-photo img,
.team-card:focus-visible .team-photo img,
.network-profile:hover img,
.network-profile:focus-visible img,
.network-profile[aria-expanded="true"] img {
  filter: grayscale(0);
}
.ceo-portrait .ceo-photo { filter: none; }
.network-stage { height:630px; }
.network-comment { max-height:calc(100% - 16px); overflow-y:auto; }
@media(max-width:760px) { .network-stage { height:640px; } }
/* Keep headroom instead of enlarging portraits into the circular rim. */
.team-grid .team-card, .team-grid .team-card:last-child { flex-basis:184px; width:184px; }
.team-row { gap:clamp(20px,2.4vw,36px); }
.team-card .team-photo { background: #e4e2df; width:156px; height:156px; }
.team-card h3 { font-size:27px; }
.team-card > p { font-size:12px; max-width:184px; }
.team-card .team-photo img,
.team-card:hover .team-photo img {
  object-position: 50% 50%;
  transform: translateX(var(--portrait-x, 0%)) scale(var(--portrait-scale, 1.01)) rotate(var(--portrait-angle, 0deg));
}
.team-photo img[src*="kainat-gul"] { --portrait-angle: -9deg; --portrait-x:2%; --portrait-scale:1.05; }
.team-photo img[src*="hamza-kiyani"] { --portrait-angle: 9deg; --portrait-x:3%; --portrait-scale:1.07; }
@media(max-width:760px) {
  .team-grid .team-card, .team-grid .team-card:last-child { flex-basis:156px; width:156px; }
  .team-card .team-photo { width:132px; height:132px; }
  .team-card h3 { font-size:24px; }
  .team-card > p { font-size:11px; }
}
/* Float gently without tilting the portraits themselves. */
@keyframes team-orbit-float {
  0%, 100% { transform: translate3d(-2px,2px,0); }
  50% { transform: translate3d(2px,-6px,0); }
}
@media (prefers-reduced-motion: reduce) {
  .team-card .team-photo img, .ceo-portrait .ceo-photo, .network-profile img {
    transition: none;
  }
}
