/* TIW Leadership */
.tiwl {
  --tiwl-cols: 4;
  --tiwl-cols-t: 3;
  --tiwl-cols-m: 2;
  --tiwl-gap: 20px;
  --tiwl-n: var(--tiwl-cols);
  --tiwl-ink: #0b3a5b;
  --tiwl-link: #2c6aa0;
  --tiwl-text: #4a5d6e;
  --tiwl-ph: #e6f3fa;
  --tiwl-radius: 14px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 0;
  font-family: 'Roboto', sans-serif;
}
.tiwl *,
.tiwl *::before,
.tiwl *::after { box-sizing: border-box; }

/* Heading with accent bar */
.tiwl .tiwl__heading {
  position: relative;
  margin: 0 0 40px;
  padding-bottom: 16px;
  text-align: center;
  color: var(--tiwl-ink);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.2px;
}
.tiwl .tiwl__heading::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 56px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 4px;
  background: linear-gradient(90deg, var(--tiwl-link), #5aa9e0);
}

/* Grid: columns come from --tiwl-n, incomplete last row stays centered */
.tiwl .tiwl__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: left;
  gap: var(--tiwl-gap);
}
.tiwl .tiwl__card {
  flex: 0 0 calc((100% - (var(--tiwl-n) - 1) * var(--tiwl-gap)) / var(--tiwl-n) - 0.5px);
  max-width: calc((100% - (var(--tiwl-n) - 1) * var(--tiwl-gap)) / var(--tiwl-n) - 0.5px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  text-align: center;
  background: #fff;
  border-radius: var(--tiwl-radius);
  box-shadow: 0 2px 6px rgba(11, 58, 91, .06), 0 8px 24px rgba(11, 58, 91, .08);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.tiwl .tiwl__card:hover {
  transform: translateY(-6px);
  box-shadow: 0 4px 10px rgba(11, 58, 91, .08), 0 18px 36px rgba(11, 58, 91, .16);
}

/* Photo */
.tiwl .tiwl__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--tiwl-ph);
}
.tiwl .tiwl__media.has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 58, 91, .5) 0%, rgba(11, 58, 91, 0) 42%);
  pointer-events: none;
}
.tiwl .tiwl__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  margin: 0;
  border-radius: 0;
  transition: transform .6s ease;
}
.tiwl .tiwl__card:hover .tiwl__photo { transform: scale(1.05); }
.tiwl .tiwl__ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #b3d4e8;
  background: linear-gradient(160deg, #eef7fc, var(--tiwl-ph));
}

/* LinkedIn pill */
.tiwl .tiwl__in {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #fff;
  color: #111 !important;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
  transition: transform .2s, box-shadow .2s, background .2s;
}
.tiwl .tiwl__in svg { flex: none; display: block; }
.tiwl .tiwl__in:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .25);
}

/* Text */
.tiwl .tiwl__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 16px 20px;
}
.tiwl .tiwl__name {
  position: relative;
  margin: 0 0 12px;
  padding-bottom: 12px;
  color: var(--tiwl-ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}
.tiwl .tiwl__name::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 28px;
  height: 3px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: var(--tiwl-link);
  opacity: .5;
}
.tiwl .tiwl__role {
  display: block;
  margin: 0;
  padding: 0;
  color: var(--tiwl-link);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.tiwl .tiwl__contact {
  margin-top: auto;
  padding-top: 14px;
}
.tiwl .tiwl__role + .tiwl__contact { margin-top: 14px; border-top: 1px solid #e8eff5; }
.tiwl .tiwl__line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0 0 6px;
  padding: 0;
  color: var(--tiwl-text);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.tiwl .tiwl__line:last-child { margin-bottom: 0; }
.tiwl .tiwl__line svg { flex: none; color: var(--tiwl-link); }
.tiwl .tiwl__line a {
  color: inherit;
  text-decoration: none;
  transition: color .2s;
}
.tiwl .tiwl__line a:hover { color: var(--tiwl-link); text-decoration: underline; }

/* Tablet */
@media (max-width: 1024px) {
  .tiwl { --tiwl-n: var(--tiwl-cols-t); }
}
/* Mobile */
@media (max-width: 640px) {
  .tiwl { --tiwl-n: var(--tiwl-cols-m); }
  .tiwl .tiwl__heading { font-size: 24px; margin-bottom: 28px; }
  .tiwl .tiwl__body { padding: 14px 8px 16px; }
  .tiwl .tiwl__name { font-size: 15px; }
  .tiwl .tiwl__role { font-size: 11.5px; }
  .tiwl .tiwl__line { font-size: 10.5px; gap: 5px; letter-spacing: -.1px; }
  .tiwl .tiwl__line svg { width: 12px; height: 12px; }
  .tiwl .tiwl__in { bottom: 10px; padding: 6px 10px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .tiwl .tiwl__card, .tiwl .tiwl__photo, .tiwl .tiwl__in { transition: none; }
  .tiwl .tiwl__card:hover { transform: none; }
  .tiwl .tiwl__card:hover .tiwl__photo { transform: none; }
}
