.twi-in {
  background: var(--in-bg, #F5F7F9);
  padding: 72px 24px;
  color: var(--in-heading, #003658);
}
.twi-in *, .twi-in *::before, .twi-in *::after { box-sizing: border-box; }

.twi-in-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }

.twi-in-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.twi-in-h2 {
  margin: 0;
  font-size: 40px; line-height: 1.1; font-weight: 900; letter-spacing: -.02em;
  color: var(--in-heading, #003658);
  overflow-wrap: normal; word-break: normal; hyphens: none;
}
.twi-in-mono { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.twi-in-ref { font-size: 12px; letter-spacing: .14em; color: var(--in-muted, #667681); }

/* ---------- people ---------- */
.twi-in-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

.twi-in-card {
  background: var(--in-card-bg, #FFFFFF);
  border: 1px solid var(--in-border, #C6CFD6);
  border-radius: 12px;
  padding: 20px;
  display: flex; gap: 16px; align-items: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
.twi-in-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(0,54,88,.12); }

.twi-in-avatar {
  flex-shrink: 0;
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--in-avatar-bg, #DCE5EC);
  /* Double ring from the source: a white gap, then the border colour. */
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--in-border, #C6CFD6);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 22px;
  color: var(--in-blue, #125383);
  overflow: hidden;
}
.twi-in-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.twi-in-person { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.twi-in-name { font-weight: 800; font-size: 18px; color: var(--in-heading, #003658); }
.twi-in-role { font-size: 14px; font-weight: 600; color: var(--in-accent, #D1035A); }

/* ---------- footer note ---------- */
.twi-in-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  font-size: 15px; color: var(--in-body, #3D4F5C);
}
.twi-in-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1.5px solid var(--in-blue, #125383);
  border-radius: 6px;
  font-weight: 800; font-size: 13px;
  color: var(--in-blue, #125383);
}
.twi-in-note-text { flex: 1 1 480px; font-size: 16px; line-height: 1.5; }
.twi-in-note-text p { margin: 0; }
.twi-in-note-text strong { color: var(--in-heading, #003658); }

/* ---------- scroll-driven entrance ----------
   Animates `translate`, not `transform`, so the card hover lift composes
   with it rather than being cancelled. */
@keyframes twiInUp { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }

@supports (animation-timeline: view()) {
  .twi-in-rv {
    animation: twiInUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 45%;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .twi-in { padding: 56px 20px; }
  .twi-in-h2 { font-size: clamp(28px, 5.4vw, 40px); }
  .twi-in-inner { gap: 24px; }
}
@media (max-width: 560px) {
  .twi-in-head { justify-content: flex-start; gap: 6px; }
  .twi-in-card { padding: 16px; gap: 14px; }
  .twi-in-avatar { width: 60px; height: 60px; font-size: 19px; }
  .twi-in-name { font-size: 17px; }
  /* Long roles ("Website Development Lead") wrap awkwardly beside a
     shrunken avatar, so the pill gets its own line above the note. */
  .twi-in-note { gap: 10px; }
  .twi-in-note-text { flex-basis: 100%; font-size: 15.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .twi-in *, .twi-in *::after { animation: none !important; transition: none !important; }
}
