/* Portraits sit in front of the card edge while the compact grid stays fixed. */
.family-grid {
  --family-card-height: clamp(295px, calc((100svh - 180px) / 2), 350px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 20px;
  padding-top: 0;
}
.family-card--illustrated {
  --portrait-size: clamp(236px, calc(var(--family-card-height) * .72 + 24px), 276px);
  --portrait-clear-right: .125;
  --portrait-clear-top: .0208;
  --portrait-pop: 9px;
  --portrait-space: -3px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  height: var(--family-card-height);
  min-height: var(--family-card-height);
  padding: 16px 18px;
  overflow: visible;
  isolation: isolate;
  box-shadow: 0 3px 10px rgba(65, 51, 31, .055);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}
.family-card--illustrated[data-family="testing-quality"] {
  --portrait-clear-right: .3143;
  --portrait-clear-top: .0195;
  --portrait-space: 36px;
}
.family-card--illustrated[data-family="infrastructure-security"] {
  --portrait-clear-right: .1562;
  --portrait-clear-top: .0339;
  --portrait-space: -3px;
}
.family-card--illustrated[data-family="data-ai"] {
  --portrait-clear-right: .0807;
  --portrait-space: -4px;
}
.family-card--illustrated[data-family="delivery-service"] {
  --portrait-clear-right: .2036;
  --portrait-clear-top: .0234;
  --portrait-space: 4px;
}
.family-card--illustrated[data-family="product-design-operations"] {
  --portrait-clear-right: .2357;
  --portrait-clear-top: .0182;
  --portrait-space: 4px;
}
.family-portrait {
  position: absolute;
  inset: 0;
  display: block;
  overflow: clip;
  overflow-clip-margin: 12px;
  pointer-events: none;
}
.family-card--illustrated .family-visual {
  position: absolute;
  top: calc(0px - var(--portrait-size) * var(--portrait-clear-top) - var(--portrait-pop));
  right: calc(var(--portrait-space) - var(--portrait-size) * var(--portrait-clear-right));
  display: block;
  width: var(--portrait-size);
  height: var(--portrait-size);
  pointer-events: none;
}
.family-card--illustrated .family-character {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: none;
  pointer-events: auto;
  user-select: none;
}
.family-nickname {
  position: absolute;
  top: 15px;
  left: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}
.family-career-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}
.family-title-row { display: block; }
.family-card--illustrated h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.24;
  letter-spacing: -.04em;
}
.family-card--illustrated .family-examples {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.48;
}
.family-example { display: block; max-width: 100%; }
.family-scene {
  margin-top: 4px;
  padding-top: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.family-card--illustrated:hover:not(:disabled),
.family-card--illustrated:focus-visible {
  transform: translateY(-3px);
  border-color: var(--line-dark);
  box-shadow: 0 9px 21px rgba(65, 51, 31, .11);
}
.family-card--illustrated:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
.career-family-heading { display: flex; align-items: center; gap: 18px; min-width: 0; }
.career-family-avatar { display: block; flex: 0 0 94px; width: 94px; height: 94px; object-fit: contain; }
.career-family-heading .eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 7px; font-size: 13px; letter-spacing: .05em; }
.career-family-heading .eyebrow span { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.career-section-top .career-family-heading h1 { margin-bottom: 7px; font-size: clamp(28px, 2.6vw, 36px); }
@media (max-width: 1099px) {
  .family-grid {
    --family-card-height: 310px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
  }
}
@media (max-width: 699px) {
  .family-grid {
    --family-card-height: 272px;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding-top: 0;
  }
  .family-card--illustrated {
    --portrait-size: 228px;
    --portrait-pop: 7px;
    padding: 14px 18px;
  }
  .family-card--illustrated h2 { font-size: 24px; line-height: 1.25; }
  .family-card--illustrated .family-examples { font-size: 15px; line-height: 1.5; gap: 1px; }
  .family-career-copy { gap: 6px; }
  .family-scene { font-size: 13px; line-height: 1.5; }
  .career-family-heading { gap: 10px; align-items: flex-start; }
  .career-family-avatar { flex-basis: 70px; width: 70px; height: 80px; }
  .career-family-heading .eyebrow { gap: 4px 8px; font-size: 12px; }
  .career-family-heading .eyebrow span { font-size: 11px; }
  .career-section-top .career-family-heading h1 { font-size: 25px; line-height: 1.3; }
}
@media (max-width: 370px) {
  .family-card--illustrated { --portrait-size: 186px; --portrait-pop: 6px; }
  .family-card--illustrated h2 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  .family-card--illustrated { transition: none; }
  .family-card--illustrated:hover:not(:disabled),
  .family-card--illustrated:focus-visible { transform: none; }
}
