.member-page {
  --profile-accent: var(--blood);
  background: #080807;
  color: var(--bone);
}

.member-page .site-header {
  border-bottom: 1px solid transparent;
}

.member-page .site-header.is-scrolled {
  border-bottom-color: var(--line-light);
}

.profile-return {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--bone);
  font-family: var(--font-meta);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.profile-return::before {
  content: "←";
  color: var(--profile-accent);
  font-size: 1rem;
  transition: transform 220ms ease;
}

.profile-return:hover::before,
.profile-return:focus-visible::before {
  transform: translateX(-4px);
}

.member-hero {
  position: relative;
  min-height: max(760px, 100svh);
  display: grid;
  grid-template-columns: minmax(360px, 0.88fr) minmax(500px, 1.12fr);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 23% 45%, rgba(141, 32, 37, 0.15), transparent 30%),
    #070706;
}

.member-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, #070706 5%, rgba(7, 7, 6, 0.96) 34%, rgba(7, 7, 6, 0.38) 62%, rgba(7, 7, 6, 0.12)),
    linear-gradient(180deg, rgba(7, 7, 6, 0.58), transparent 20%, transparent 76%, #070706 100%);
}

.member-hero::after {
  content: "";
  position: absolute;
  inset: var(--header-height) auto 0 48%;
  z-index: 2;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line-light) 20%, var(--line-light) 80%, transparent);
}

.member-hero-visual {
  position: relative;
  grid-column: 2;
  min-width: 0;
  min-height: 0;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

.member-hero-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  filter: saturate(0.65) contrast(1.08) brightness(0.78);
}

.member--professor .member-hero-visual img {
  object-position: center 12%;
}

.member--butcher .member-hero-visual img {
  object-position: center 18%;
  filter: saturate(0.7) contrast(1.06) brightness(0.92);
}

.member--blacksmith .member-hero-visual img {
  object-position: center 14%;
  filter: saturate(0.68) contrast(1.06) brightness(0.86);
}

.member-hero-copy {
  position: absolute;
  top: 50%;
  left: max(48px, calc((100vw - 1440px) / 2));
  z-index: 3;
  width: min(620px, 46vw);
  transform: translateY(-44%);
}

.member-hero-copy h1 {
  margin: 22px 0 28px;
  font-family: var(--font-display);
  font-size: clamp(5rem, 8.2vw, 9.2rem);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.76;
}

.member-hero-copy h1 em {
  color: var(--paper-dark);
  font-weight: 400;
}

.member-role {
  color: var(--profile-accent);
  font-family: var(--font-meta);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.member-lead {
  max-width: 520px;
  margin: 22px 0 34px;
  color: rgba(232, 223, 204, 0.8);
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  line-height: 1.75;
}

.member-serial {
  position: absolute;
  right: 3.5vw;
  bottom: 2vh;
  z-index: 2;
  color: rgba(232, 223, 204, 0.11);
  font-family: var(--font-display);
  font-size: clamp(10rem, 23vw, 26rem);
  line-height: 0.8;
  pointer-events: none;
}

.member-brief {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 0.62fr) minmax(420px, 1.38fr);
  gap: clamp(50px, 8vw, 150px);
  padding: clamp(100px, 11vw, 180px) max(48px, calc((100vw - 1440px) / 2));
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(18, 17, 15, 0.025) 0 1px, transparent 1px 4px),
    var(--paper);
  color: var(--ink-soft);
}

.member-brief::after {
  content: attr(data-number);
  position: absolute;
  top: -0.18em;
  right: 3vw;
  color: rgba(18, 17, 15, 0.06);
  font-family: var(--font-display);
  font-size: clamp(16rem, 32vw, 36rem);
  line-height: 1;
  pointer-events: none;
}

.member-facts {
  position: relative;
  z-index: 1;
  align-self: end;
  border-top: 1px solid var(--line-dark);
}

.member-facts div {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 20px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line-dark);
}

.member-facts dt,
.member-facts dd {
  font-family: var(--font-meta);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.member-facts dt {
  color: var(--blood);
}

.member-brief-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.member-brief-copy h2 {
  margin: 18px 0 42px;
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 7vw, 7.6rem);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.92;
}

.member-brief-copy > p:not(.eyebrow) {
  max-width: 680px;
  font-size: clamp(1.15rem, 1.7vw, 1.55rem);
  line-height: 1.8;
}

.member-brief-copy > p + p {
  margin-top: 24px;
}

.member-gallery {
  padding: clamp(100px, 11vw, 170px) max(48px, calc((100vw - 1440px) / 2));
  background:
    radial-gradient(circle at 85% 10%, rgba(141, 32, 37, 0.12), transparent 24%),
    #0b0a09;
}

.member-gallery-header {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 70px;
  align-items: end;
  margin-bottom: clamp(60px, 8vw, 110px);
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line-light);
}

.member-gallery-header h2 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(3.8rem, 7vw, 7.2rem);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.85;
}

.member-gallery-header > p {
  max-width: 540px;
  justify-self: end;
  color: rgba(232, 223, 204, 0.7);
  font-size: 1.05rem;
}

.portrait-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(18px, 2.2vw, 34px);
  align-items: start;
}

.portrait-card {
  position: relative;
  grid-column: span 6;
  margin: 0;
}

.portrait-card:nth-child(even) {
  margin-top: clamp(50px, 8vw, 120px);
}

.member--butcher .portrait-card:first-child {
  grid-column: span 7;
}

.member--butcher .portrait-card:nth-child(2) {
  grid-column: span 5;
}

.member--butcher .portrait-card:nth-child(3) {
  grid-column: 3 / span 8;
  margin-top: 0;
}

.portrait-button {
  position: relative;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #151412;
  cursor: zoom-in;
}

.portrait-button::after {
  content: "+";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 223, 204, 0.42);
  border-radius: 50%;
  background: rgba(7, 7, 6, 0.62);
  color: var(--bone);
  font-family: var(--font-display);
  font-size: 1.6rem;
  transition: background 220ms ease, transform 220ms ease;
}

.portrait-button:hover::after,
.portrait-button:focus-visible::after {
  background: var(--blood);
  transform: rotate(90deg);
}

.portrait-button img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.72) contrast(1.06);
  transition: filter 350ms ease, transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.portrait-card:nth-child(even) .portrait-button img {
  aspect-ratio: 4 / 5;
}

.portrait-button:hover img {
  filter: saturate(0.92) contrast(1.08);
  transform: scale(1.018);
}

.portrait-card figcaption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 13px;
  color: rgba(232, 223, 204, 0.58);
  font-family: var(--font-meta);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portrait-card figcaption span:first-child {
  color: var(--profile-accent);
}

.dossier-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line-light);
  background: #070706;
}

.dossier-navigation a {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 54px max(48px, calc((100vw - 1440px) / 2));
  transition: background 250ms ease, color 250ms ease;
}

.dossier-navigation a + a {
  align-items: flex-end;
  border-left: 1px solid var(--line-light);
  text-align: right;
}

.dossier-navigation a:hover,
.dossier-navigation a:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

.dossier-navigation span {
  color: var(--blood);
  font-family: var(--font-meta);
  font-size: 0.64rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.dossier-navigation strong {
  margin-top: 13px;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.4vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.045em;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 80px;
  align-items: center;
  padding: 74px 28px 28px;
  background: rgba(5, 5, 4, 0.96);
}

.lightbox[hidden] {
  display: none;
}

.lightbox figure {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  margin: 0;
}

.lightbox figure img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.lightbox figcaption {
  color: rgba(232, 223, 204, 0.62);
  font-family: var(--font-meta);
  font-size: 0.65rem;
  letter-spacing: 0.11em;
  text-align: center;
  text-transform: uppercase;
}

.lightbox-close,
.lightbox-control {
  border: 1px solid var(--line-light);
  background: transparent;
  color: var(--bone);
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 28px;
  padding: 8px 12px;
  font-family: var(--font-meta);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lightbox-control {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  font-size: 1.3rem;
}

.lightbox-close:hover,
.lightbox-control:hover {
  background: var(--blood);
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 1080px) {
  .member-hero {
    grid-template-columns: minmax(320px, 0.78fr) minmax(420px, 1.22fr);
  }

  .member-hero-copy {
    left: 40px;
    width: min(570px, 54vw);
  }

  .member-hero-copy h1 {
    font-size: clamp(4.8rem, 10vw, 7.4rem);
  }

  .member-brief,
  .member-gallery {
    padding-right: 40px;
    padding-left: 40px;
  }

  .member-brief {
    gap: 60px;
  }

  .dossier-navigation a {
    padding-right: 40px;
    padding-left: 40px;
  }
}

@media (max-width: 760px) {
  .member-page .site-header {
    padding-right: 20px;
    padding-left: 20px;
  }

  .member-page .wordmark span {
    display: none;
  }

  .profile-return {
    font-size: 0.6rem;
  }

  .member-hero {
    min-height: auto;
    display: block;
    padding-top: var(--header-height);
    background: #070706;
  }

  .member-hero::before {
    display: none;
  }

  .member-hero::after {
    display: none;
  }

  .member-hero-visual {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    background: #070706;
  }

  .member-hero-visual img,
  .member--professor .member-hero-visual img,
  .member--butcher .member-hero-visual img,
  .member--blacksmith .member-hero-visual img {
    object-fit: contain;
    object-position: center;
    filter: saturate(0.58) contrast(1.06) brightness(0.7);
  }

  .member--butcher .member-hero-visual img {
    filter: saturate(0.68) contrast(1.05) brightness(0.94);
  }

  .member--blacksmith .member-hero-visual img {
    filter: saturate(0.64) contrast(1.05) brightness(0.86);
  }

  .member-hero-copy {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    padding: 42px 20px max(78px, calc(58px + env(safe-area-inset-bottom)));
    transform: none;
  }

  .member-hero-copy h1 {
    margin: 14px 0 18px;
    font-size: clamp(4.2rem, 20vw, 6.5rem);
    line-height: 0.8;
  }

  .member--blacksmith .member-hero-copy h1 {
    font-size: clamp(3.25rem, 16.5vw, 5rem);
  }

  .member-lead {
    margin: 16px 0 23px;
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .member-serial {
    right: -0.05em;
    bottom: 0;
    font-size: 45vw;
  }

  .member-brief {
    grid-template-columns: 1fr;
    gap: 55px;
    padding: 90px 20px;
  }

  .member-brief-copy {
    grid-row: 1;
  }

  .member-brief-copy h2 {
    margin-bottom: 30px;
    font-size: clamp(3.7rem, 17vw, 5.4rem);
  }

  .member-brief-copy > p:not(.eyebrow) {
    font-size: 1.05rem;
  }

  .member-facts {
    grid-row: 2;
  }

  .member-gallery {
    padding: 90px 20px;
  }

  .member-gallery-header {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 55px;
  }

  .member-gallery-header h2 {
    font-size: clamp(3.7rem, 17vw, 5.4rem);
  }

  .member-gallery-header > p {
    justify-self: start;
    font-size: 0.92rem;
  }

  .portrait-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .portrait-card,
  .portrait-card:nth-child(even),
  .member--butcher .portrait-card:first-child,
  .member--butcher .portrait-card:nth-child(2),
  .member--butcher .portrait-card:nth-child(3) {
    grid-column: 1;
    width: min(78vw, 320px);
    justify-self: center;
    margin-top: 0;
  }

  .portrait-button img,
  .portrait-card:nth-child(even) .portrait-button img {
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
  }

  .dossier-navigation {
    grid-template-columns: 1fr;
  }

  .dossier-navigation a {
    min-height: 190px;
    padding: 42px 20px;
  }

  .dossier-navigation a + a {
    align-items: flex-start;
    border-top: 1px solid var(--line-light);
    border-left: 0;
    text-align: left;
  }

  .lightbox {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    padding: 70px 8px max(20px, env(safe-area-inset-bottom));
  }

  .lightbox-close {
    right: 14px;
  }

  .lightbox-control {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portrait-button img,
  .portrait-button::after,
  .profile-return::before {
    transition: none;
  }
}
