/* People page (/people/). Loads after style.css and pages.css. */

.people-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Each role sits directly above the person who covers it */
.role {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 3px solid var(--primary-text-color);
}

.role-code {
  font-family: "DM Mono", monospace;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: #1a7385;
}

.role-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-text-color);
}

.role-text {
  font-size: 16px;
  line-height: 1.5;
  color: #4a4f57;
}

/* People cards */
.people-section {
  padding-bottom: 90px;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 48px;
  margin-top: 10px;
}

/* Role and card share row tracks across columns so every card starts at the same height */
.pairing {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@supports (grid-template-rows: subgrid) {
  .pairing {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
    row-gap: 16px;
  }
}

.person {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e3e6eb;
  border-radius: 16px;
  overflow: hidden;
}

.person-portrait {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.person-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 22px 26px;
}

.person-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.person-name {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--primary-text-color);
}

.person-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: #1a7385;
}

.person-role,
.person-label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5b6068;
}

.person-role {
  font-weight: 500;
}

.person-label {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.person-quote {
  font-size: 16px;
  line-height: 1.5;
  color: var(--primary-text-color);
}

.person-detail p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--primary-text-color);
}

.person-detail a,
.person-link {
  color: #1a7385;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.person-detail a:hover,
.person-link:hover {
  color: var(--highlighted-text-color);
}

.person-link {
  margin-top: auto;
  padding: 10px 0 0;
  font-size: 15px;
  font-weight: 700;
}

/* Tablet: two columns */
@media (max-width: 1100px) {
  .people-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phone: one column */
@media (max-width: 600px) {
  .people-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 44px;
  }

  .pairing {
    gap: 14px;
  }

  .role {
    gap: 6px;
    padding-top: 12px;
    border-top-width: 2px;
  }

  .role-code {
    font-size: 14px;
  }

  .role-text {
    font-size: 15px;
  }

  .people-section {
    padding-bottom: 56px;
  }

  .person-body {
    padding: 22px 20px 24px;
    gap: 16px;
  }
}

/* Founder row: the first person spans the full width, the rest sit below in a row of four */
.people-grid .pairing-founder {
  grid-column: 1 / -1;
}

.pairing-founder .role-text {
  max-width: 760px;
}

.pairing-founder .person {
  display: grid;
  grid-template-columns: 440px minmax(0, 1fr);
}

/* The portrait fills the full height of the card, so the card's rounded corner cuts it */
.pairing-founder .person-portrait {
  height: 100%;
  aspect-ratio: auto;
}

.pairing-founder .person-body {
  justify-content: center;
  gap: 19px;
  padding: 34px 40px;
}

.pairing-founder .person-body > * {
  max-width: 680px;
}

.pairing-founder .person-name {
  font-size: 29px;
}

.pairing-founder .person-title {
  font-size: 14px;
}

.pairing-founder .person-role,
.pairing-founder .person-label {
  font-size: 11px;
}

.pairing-founder .person-quote {
  font-size: 19px;
  line-height: 1.45;
}

.pairing-founder .person-detail p,
.pairing-founder .person-link {
  font-size: 13px;
}

.pairing-founder .person-link {
  margin-top: 0;
  padding-top: 0;
}

@media (max-width: 1100px) {
  .pairing-founder .person {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .pairing-founder .person-body {
    padding: 28px 32px;
  }

  .pairing-founder .person-quote {
    font-size: 17px;
  }
}

@media (max-width: 760px) {
  .pairing-founder .person {
    display: flex;
    flex-direction: column;
  }

  .pairing-founder .person-portrait {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .pairing-founder .person-body {
    gap: 16px;
    padding: 22px 20px 24px;
  }

  .pairing-founder .person-name {
    font-size: 26px;
  }

  .pairing-founder .person-title {
    font-size: 16px;
  }

  .pairing-founder .person-role,
  .pairing-founder .person-label {
    font-size: 12px;
  }

  .pairing-founder .person-quote {
    font-size: 16px;
  }

  .pairing-founder .person-detail p,
  .pairing-founder .person-link {
    font-size: 15px;
  }
}