.team-page {
  background: var(--paper);
}

.team-main {
  overflow: clip;
}

.team-kicker,
.team-section-label {
  margin: 0 0 16px;
  color: var(--coral-deep);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.team-hero {
  position: relative;
  min-height: 92svh;
  overflow: hidden;
  background: var(--paper-bright);
  isolation: isolate;
}

.team-hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: -1;
  width: 28%;
  height: 100%;
  background: var(--paper-warm);
  content: "";
}

.pcms-stage {
  position: absolute;
  top: 12%;
  left: 50%;
  width: min(calc(100% - 48px), 1280px);
  height: 58%;
  transform: translateX(-50%);
  will-change: transform;
}

.pcms-piece {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  background-color: #050505;
  background-position: center;
  background-size: cover;
  box-shadow: 0 5px 14px rgba(38, 25, 31, 0.13);
  will-change: transform, opacity;
}

.team-hero__copy {
  position: absolute;
  bottom: 54px;
  left: max(28px, calc((100vw - 1280px) / 2));
  z-index: 3;
  max-width: 820px;
}

.team-hero__copy h1 {
  margin: 0;
  font-size: 88px;
  font-weight: 880;
  line-height: 0.94;
}

.team-hero__copy h1 span {
  color: var(--coral-deep);
}

.team-hero__copy > p:last-child {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: 19px;
}

.team-hero__index {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2));
  bottom: 54px;
  z-index: 3;
  display: grid;
  justify-items: end;
  line-height: 1;
}

.team-hero__index span {
  font-size: 19px;
  font-weight: 900;
}

.team-hero__index i {
  margin-top: 6px;
  color: var(--coral-deep);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.team-intro {
  padding: 150px max(28px, calc((100vw - 1180px) / 2));
  background: var(--ink);
  color: #fff;
}

.team-intro .team-section-label {
  color: var(--yellow);
}

.team-intro h2,
.team-directory__header h2,
.team-closing h2 {
  max-width: 980px;
  margin: 0;
  font-size: 68px;
  font-weight: 850;
  line-height: 0.99;
}

.team-intro > p:last-child {
  max-width: 810px;
  margin: 30px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 20px;
}

.team-directory {
  padding: 130px max(28px, calc((100vw - 1280px) / 2));
  background: var(--paper-bright);
}

.team-directory__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
}

.team-directory__header h2 {
  font-size: 60px;
}

.team-filters {
  display: inline-grid;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  grid-template-columns: repeat(4, auto);
}

.team-filters button {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.team-filters button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}

.team-directory__layout {
  display: grid;
  margin-top: 62px;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 54px;
}

.member-grid {
  display: grid;
  min-width: 0;
  gap: 76px;
}

.member-tier {
  --tier-accent: var(--coral-deep);
  position: relative;
  min-width: 0;
}

.member-tier[hidden] {
  display: none;
}

.member-tier[data-tier="secondary"] {
  --tier-accent: #9b7110;
}

.member-tier[data-tier="instructors"] {
  --tier-accent: var(--ink);
}

.member-tier__header {
  display: flex;
  margin-bottom: 22px;
  padding-bottom: 14px;
  align-items: end;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}

.member-tier__header p {
  margin: 0;
  color: var(--coral-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.member-tier__header h3 {
  margin: 0;
  font-size: 25px;
  font-weight: 850;
  line-height: 1;
  text-align: right;
}

.member-tier[data-group="instructors"] .member-tier__header {
  display: block;
  width: 100%;
  margin: 0 auto 26px;
  padding: 0 18px 18px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.member-tier[data-group="instructors"] .member-tier__header h3 {
  font-size: 28px;
  text-align: center;
}

.member-tier[data-tier="primary"] .member-tier__header {
  max-width: 500px;
  border-bottom: 2px solid rgba(184, 137, 18, 0.45);
}

.member-tier[data-tier="primary"] .member-tier__header h3 {
  color: #a9780f;
  font-size: 34px;
  text-shadow: 0 4px 18px rgba(184, 137, 18, 0.2);
}

.member-tier[data-tier="primary"] .member-tier__header h3::after {
  display: block;
  width: 62px;
  height: 3px;
  margin: 13px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #8d6410, var(--yellow), #8d6410);
  box-shadow: 0 4px 14px rgba(184, 137, 18, 0.28);
  content: "";
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .member-tier[data-tier="primary"] .member-tier__header h3 {
    background: linear-gradient(92deg, #8d6410 0%, #d7a928 35%, #f3c74f 50%, #b07e10 76%, #8d6410 100%);
    background-clip: text;
    color: transparent;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.member-tier[data-tier="secondary"] .member-tier__header {
  max-width: 720px;
}

.member-tier[data-tier="primary"]::after,
.member-tier[data-tier="secondary"]::after {
  position: absolute;
  bottom: -76px;
  left: 50%;
  width: 2px;
  height: 76px;
  background: linear-gradient(var(--tier-accent), rgba(38, 25, 31, 0.24));
  content: "";
  transform: translateX(-50%);
}

.member-tier__grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 22px;
}

.member-tier__grid > .member-card {
  grid-column: span 2;
}

.member-tier[data-tier="primary"] .member-card:first-child {
  width: min(100%, 360px);
  grid-column: 2 / span 4;
  justify-self: center;
}

.member-tier[data-tier="secondary"] .member-card:first-child {
  grid-column: 2 / span 2;
}

.member-tier[data-tier="secondary"] .member-card:last-child {
  grid-column: 4 / span 2;
}

.member-tier[data-tier="advisors"] .member-card:first-child {
  grid-column: 2 / span 2;
}

.member-grid[data-active-group="all"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.member-grid[data-active-group="all"] .member-tier,
.member-grid[data-active-group="all"] .member-tier__grid {
  display: contents;
}

.member-grid[data-active-group="all"] .member-tier__header,
.member-grid[data-active-group="all"] .member-tier::after {
  display: none;
}

.member-grid[data-active-group="all"] .member-tier .member-card {
  width: auto;
  border: 1px solid var(--line);
  box-shadow: none;
  grid-column: auto;
  justify-self: stretch;
}

.member-grid[data-active-group="all"] .member-card__photo {
  aspect-ratio: 1;
}

.member-grid[data-active-group="all"] .member-card[data-role-code] .member-card__photo::before {
  display: none;
}

.member-grid[data-active-group="all"] .member-card__meta {
  min-height: 68px;
  padding: 11px 12px 13px;
}

.member-grid[data-active-group="all"] .member-card__meta strong {
  font-size: 14px;
  line-height: 1.25;
}

.member-grid[data-active-group="all"] .member-tier .member-card__meta span {
  color: var(--ink-soft);
  font-weight: 400;
  text-transform: none;
}

.member-card {
  display: grid;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-bright);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.member-tier[data-group="instructors"] .member-card {
  border-top: 4px solid var(--tier-accent);
}

.member-tier[data-tier="primary"] .member-card {
  border-right-color: rgba(217, 47, 78, 0.38);
  border-bottom-color: rgba(217, 47, 78, 0.38);
  border-left-color: rgba(217, 47, 78, 0.38);
  box-shadow: 0 22px 50px rgba(143, 32, 56, 0.13);
}

.member-card[hidden] {
  display: none;
}

.member-card:hover,
.member-card[aria-pressed="true"] {
  border-color: rgba(217, 47, 78, 0.48);
  box-shadow: 0 18px 38px rgba(76, 29, 41, 0.11);
  transform: translateY(-4px);
}

.member-card__photo {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #050505 center / cover no-repeat;
}

.member-card__photo img,
.member-focus__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-card__photo::after {
  position: absolute;
  inset: auto 0 0;
  height: 5px;
  background: var(--coral);
  content: "";
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms ease;
}

.member-card[data-role-code] .member-card__photo::before {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  min-width: 42px;
  padding: 7px 9px 6px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 4px;
  background: var(--tier-accent);
  box-shadow: 0 6px 18px rgba(38, 25, 31, 0.18);
  color: #fff;
  content: attr(data-role-code);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.member-tier[data-tier="secondary"] .member-card[data-role-code] .member-card__photo::before {
  border-color: rgba(38, 25, 31, 0.16);
  background: var(--yellow);
  color: var(--ink);
}

.member-card:hover .member-card__photo::after,
.member-card[aria-pressed="true"] .member-card__photo::after {
  transform: scaleX(1);
}

.member-card__meta {
  display: grid;
  gap: 2px;
  padding: 15px 16px 17px;
}

.member-card__meta strong {
  overflow-wrap: anywhere;
  font-size: 16px;
}

.member-card__meta span {
  color: var(--ink-soft);
  font-size: 12px;
}

.member-tier[data-group="instructors"] .member-card__meta span {
  color: var(--tier-accent);
  font-weight: 800;
  text-transform: uppercase;
}

.member-focus {
  position: sticky;
  top: 108px;
  min-width: 0;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.member-focus__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  background: #050505;
  object-fit: cover;
}

.member-focus__index {
  margin: 18px 0 0;
  color: var(--coral-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
}

.member-focus h3 {
  margin: 10px 0 0;
  font-size: 34px;
  font-weight: 850;
  line-height: 1.05;
}

.member-focus__role {
  margin: 8px 0 0;
  color: var(--teal);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.member-focus__bio {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.member-sheet {
  inset: auto 0 0;
  width: 100%;
  max-width: none;
  max-height: min(88svh, 720px);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px 8px 0 0;
  background: var(--paper-bright);
  color: var(--ink);
  box-shadow: 0 -20px 60px rgba(38, 25, 31, 0.22);
}

.member-sheet::backdrop {
  background: rgba(38, 25, 31, 0.48);
  backdrop-filter: blur(4px);
}

.member-sheet[open] {
  animation: member-sheet-in 220ms ease both;
}

@keyframes member-sheet-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.member-sheet__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  display: grid;
  width: 40px;
  height: 40px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(38, 25, 31, 0.7);
  color: #fff;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
  place-items: center;
}

.member-sheet__photo {
  display: block;
  width: 100%;
  height: min(42svh, 360px);
  background: #050505;
  object-fit: cover;
}

.member-sheet__content {
  padding: 24px 22px 30px;
}

.member-sheet__content h3 {
  margin: 10px 0 0;
  font-size: 34px;
  line-height: 1.05;
}

.member-sheet__content .member-focus__bio {
  margin-bottom: 0;
}

@media (min-width: 900px) {
  .member-sheet {
    display: none;
  }
}

.team-closing {
  position: relative;
  display: grid;
  min-height: 72svh;
  align-items: center;
  overflow: hidden;
  padding: 90px max(28px, calc((100vw - 1180px) / 2)) 0;
  background: #214a47;
  color: #fff;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
}

.team-closing .team-section-label {
  color: var(--yellow);
}

.team-closing h2 {
  max-width: 760px;
}

.team-closing a {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  padding: 0 18px;
  border: 1px solid #fff;
  border-radius: 5px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease;
}

.team-closing a:hover {
  background: #fff;
  color: var(--ink);
}

.team-closing img {
  align-self: end;
  width: min(100%, 520px);
  max-height: 650px;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 30px 28px rgba(0, 0, 0, 0.18));
}

@media (max-width: 1040px) {
  .team-hero__copy h1 {
    font-size: 72px;
  }

  .member-tier__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .member-grid[data-active-group="all"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .member-tier[data-tier="primary"] .member-card:first-child {
    width: min(100%, 320px);
    grid-column: 1 / -1;
  }

  .member-tier[data-tier="secondary"] .member-card:first-child {
    grid-column: 1 / span 2;
  }

  .member-tier[data-tier="secondary"] .member-card:last-child {
    grid-column: 3 / span 2;
  }

  .member-tier[data-tier="advisors"] .member-card:first-child {
    grid-column: 1 / span 2;
  }

  .member-tier[data-tier="instructors"] .member-card:nth-child(3) {
    grid-column: 2 / span 2;
  }
}

@media (max-width: 899px) {
  .team-hero {
    min-height: 92svh;
  }

  .pcms-stage {
    top: 15%;
    width: calc(100% - 24px);
    height: 48%;
  }

  .team-hero__copy {
    right: 24px;
    bottom: 48px;
    left: 24px;
  }

  .team-hero__copy h1 {
    font-size: 62px;
  }

  .team-hero__index {
    display: none;
  }

  .team-intro,
  .team-directory {
    padding: 105px 24px;
  }

  .team-intro h2,
  .team-directory__header h2,
  .team-closing h2 {
    font-size: 52px;
  }

  .team-directory__header {
    align-items: stretch;
    flex-direction: column;
  }

  .team-filters {
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
  }

  .team-filters button {
    padding: 0 7px;
  }

  .team-directory__layout {
    grid-template-columns: 1fr;
  }

  .member-focus {
    position: relative;
    top: auto;
    display: grid;
    padding: 26px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
    grid-template-columns: 180px 1fr;
    gap: 0 24px;
  }

  .member-focus__photo {
    grid-row: 1 / span 5;
  }

  .member-focus__index {
    margin-top: 0;
  }

  .team-closing {
    min-height: auto;
    padding: 90px 24px 0;
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .team-closing img {
    width: min(100%, 440px);
    justify-self: center;
  }
}

@media (max-width: 620px) {
  .team-hero::after {
    width: 38%;
  }

  .pcms-stage {
    top: 17%;
    height: 43%;
  }

  .team-hero__copy {
    right: 18px;
    bottom: 36px;
    left: 18px;
  }

  .team-hero__copy h1 {
    font-size: 48px;
  }

  .team-hero__copy > p:last-child {
    font-size: 16px;
  }

  .team-intro,
  .team-directory {
    padding: 85px 18px;
  }

  .team-intro h2,
  .team-directory__header h2,
  .team-closing h2 {
    font-size: 40px;
  }

  .team-intro > p:last-child {
    font-size: 17px;
  }

  .team-filters {
    overflow-x: auto;
    grid-template-columns: repeat(4, minmax(90px, 1fr));
  }

  .team-directory__layout {
    margin-top: 40px;
  }

  .member-grid {
    gap: 62px;
  }

  .member-tier__header {
    margin-bottom: 16px;
    align-items: start;
    flex-direction: column;
    gap: 7px;
  }

  .member-tier__header h3 {
    font-size: 21px;
    text-align: left;
  }

  .member-tier[data-group="instructors"] .member-tier__header {
    display: block;
    padding: 0 12px 16px;
    text-align: center;
  }

  .member-tier[data-group="instructors"] .member-tier__header h3 {
    font-size: 23px;
    text-align: center;
  }

  .member-tier[data-tier="primary"] .member-tier__header h3 {
    font-size: 29px;
  }

  .member-tier__grid {
    gap: 12px;
  }

  .member-tier[data-tier="primary"]::after,
  .member-tier[data-tier="secondary"]::after {
    bottom: -62px;
    height: 62px;
  }

  .member-card[data-role-code] .member-card__photo::before {
    top: 8px;
    left: 8px;
    min-width: 36px;
    padding: 6px 7px 5px;
    font-size: 9px;
  }

  .member-grid[data-active-group="all"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .member-card__meta {
    padding: 12px;
  }

  .member-card__meta strong {
    font-size: 14px;
  }

  .member-focus {
    display: block;
  }

  .member-focus__photo {
    width: min(100%, 290px);
  }

  .member-focus__index {
    margin-top: 18px;
  }

  .team-closing {
    padding-right: 18px;
    padding-left: 18px;
  }
}

@media (max-width: 899px) and (max-height: 600px) and (orientation: landscape) {
  .team-hero::after {
    width: 42%;
  }

  .pcms-stage {
    top: 80px;
    right: 12px;
    left: auto;
    width: 48%;
    height: calc(100% - 96px);
    transform: none;
  }

  .team-hero__copy {
    top: 102px;
    right: auto;
    bottom: auto;
    left: 18px;
    width: 45%;
  }

  .team-kicker {
    margin-bottom: 10px;
    font-size: 11px;
  }

  .team-hero__copy h1 {
    font-size: 44px;
  }

  .team-hero__copy > p:last-child {
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.4;
  }
}
