.residentsPage {
  height: auto;
  min-height: 100%;
  background-color: #f8f8f8;
  overflow-x: hidden;
  overflow-anchor: none;
}

.residentsPage.residentModalOpen {
  overflow: hidden;
}

.residentsMain {
  width: 100%;
  height: 100vh;
  padding: 104px 5.2vw 44px;
}

.residentsExperience {
  display: grid;
  grid-template-columns: minmax(280px, 31vw) minmax(360px, 32vw);
  grid-template-rows: auto auto auto;
  column-gap: 16vw;
  row-gap: 28px;
  align-items: center;
  height: 100%;
  min-height: 0;
}

.residentsIntro {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  text-align: left;
  transform: translateY(42px);
}

.residentsIntro h1 {
  max-width: 260px;
  padding: 0;
  margin: 0;
  color: #5c5c5c;
  font-family: 'ABC MonumentGrotesk Regular', sans-serif;
  font-size: 1.1vw;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: left;
}

.residentsListWrap {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: start;
  min-width: 0;
  margin-top: 42px;
}

.residentsCatalog {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.residentEntry {
  position: relative;
}

.residentOption {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: #a0a0a0;
  cursor: pointer;
  font-family: 'ABC MonumentGrotesk Regular', sans-serif;
  font-size: clamp(32px, 2.35vw, 50px);
  line-height: 1;
  letter-spacing: 0;
  text-align: left;
  transition:
    color ease 0.25s,
    transform ease 0.25s;
}

.residentOption:hover,
.residentOption:focus-visible {
  color: #5f5f5f;
}

.residentOption:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 7px;
}

.residentEntry.active .residentOption {
  color: #111111;
  transform: translateX(0);
}

.residentDescription {
  max-width: 430px;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  color: #5f5f5f;
  font-family: 'ABC MonumentGrotesk Regular', sans-serif;
  font-size: 1.1vw;
  line-height: 1.28;
  letter-spacing: 0;
  text-align: left;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    max-height ease 0.35s,
    margin-top ease 0.35s,
    opacity ease 0.25s,
    transform ease 0.35s;
}

.residentEntry.active .residentDescription {
  max-height: 64px;
  margin-top: 9px;
  opacity: 1;
  transform: translateY(0);
}

.residentPhotoFrame {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  align-self: start;
  min-width: 0;
  width: min(29vw, 560px);
  margin: 0;
  transform: translateY(20px);
}

.residentPhotoFrame img {
  display: block;
  width: 100%;
  height: min(35vh, 280px);
  object-fit: cover;
}

.residentMoreButton {
  grid-column: 1;
  grid-row: 3;
  align-self: start;
  justify-self: start;
  width: min(29vw, 560px);
  min-height: 60px;
  font-size: 0.95vw;
  opacity: 1;
  transform: translateY(-47px);
}

.residentModal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 34px;
}

.residentModal[hidden] {
  display: none;
}

.residentModalBackdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background-color: rgba(22, 22, 22, 0.52);
  cursor: pointer;
}

.residentModalPanel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(300px, 1fr);
  width: min(920px, 92vw);
  max-height: min(720px, 88vh);
  overflow: hidden;
  background-color: #f8f8f8;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  animation: resident-modal-in 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.residentModalClose {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(32, 32, 32, 0.18);
  border-radius: 0;
  background-color: rgba(248, 248, 248, 0.88);
  color: #171717;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.residentModalClose:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 4px;
}

.residentModalImage {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

.residentModalContent {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 58px 56px 52px;
  text-align: left;
}

.residentModalContent h2 {
  padding: 0;
  margin: 0;
  color: #171717;
  font-family: 'ABC MonumentGrotesk Medium', sans-serif;
  font-size: 54px;
  line-height: 0.95;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}

.residentModalContent p {
  max-width: 520px;
  margin: 0;
  color: #565656;
  font-family: 'ABC MonumentGrotesk Regular', sans-serif;
  font-size: 19px;
  line-height: 1.34;
  letter-spacing: 0;
  text-align: left;
}

.residentModalDetail {
  padding-top: 0;
}

@keyframes resident-modal-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media screen and (max-width: 1000px) {
  .residentsMain {
    height: auto;
    min-height: 100vh;
    padding: 110px 5vw 70px;
  }

  .residentsExperience {
    grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1fr);
    grid-template-rows: auto auto auto;
    gap: 34px;
    height: auto;
    min-height: auto;
  }

  .residentsIntro {
    grid-column: 1;
    grid-row: 1;
    transform: none;
  }

  .residentsIntro h1 {
    max-width: 360px;
    font-size: 15px;
  }

  .residentOption {
    font-size: 40px;
  }

  .residentDescription {
    max-width: 430px;
    font-size: 15px;
  }

  .residentPhotoFrame img {
    height: 300px;
  }

  .residentPhotoFrame {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    transform: none;
  }

  .residentsListWrap {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-top: 0;
  }

  .residentMoreButton {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
    width: 100%;
    font-size: 13px;
    transform: none;
  }

  .residentModalPanel {
    grid-template-columns: 0.9fr 1fr;
  }

  .residentModalContent {
    padding: 50px 40px 44px;
  }

  .residentModalContent h2 {
    font-size: 44px;
  }
}

@media screen and (min-width: 1001px) and (max-width: 1500px) and (min-height: 960px) and (max-height: 1100px) {
  .residentsMain {
    height: auto;
    min-height: 0;
    padding-top: 132px;
    padding-bottom: 70px;
  }

  .residentsPage .mainMenuLink {
    font-size: 15px;
  }

  .residentsPage .logo {
    width: 24px;
    height: 24px;
    margin-top: 0;
  }

  .residentsExperience {
    grid-template-columns: minmax(360px, 31vw) minmax(430px, 34vw);
    column-gap: 12vw;
    height: auto;
  }

  .residentsIntro h1 {
    max-width: 320px;
    font-size: 18px;
  }

  .residentsListWrap {
    margin-top: 40px;
  }

  .residentsCatalog {
    gap: 24px;
  }

  .residentOption {
    font-size: 42px;
  }

  .residentDescription {
    max-width: 470px;
    font-size: 17px;
    line-height: 1.3;
  }

  .residentEntry.active .residentDescription {
    max-height: 72px;
    margin-top: 10px;
  }

  .residentPhotoFrame,
  .residentMoreButton {
    width: 420px;
  }

  .residentMoreButton {
    min-height: 62px;
    font-size: 15px;
    transform: translateY(-134px);
  }
}

@media screen and (max-width: 600px) {
  .residentsMain {
    padding: 88px 18px 56px;
  }

  .residentsExperience {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    justify-items: start;
    gap: 28px;
  }

  .residentsIntro,
  .residentPhotoFrame,
  .residentMoreButton {
    justify-self: start;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .residentsIntro h1 {
    max-width: 280px;
    font-size: 14px;
  }

  .residentPhotoFrame {
    grid-row: 2;
    grid-column: 1;
    transform: none;
  }

  .residentPhotoFrame img {
    margin-left: 0;
    margin-right: 0;
    height: 50vw;
    min-height: 230px;
    object-position: left center;
  }

  .residentPhoto[src$='silkworm.png'] {
    object-position: 35% center;
  }

  .residentsListWrap {
    grid-row: 4;
    grid-column: 1;
  }

  .residentsCatalog {
    gap: 10px;
  }

  .residentEntry {
    padding-left: 0;
  }

  .residentOption {
    font-size: 34px;
  }

  .residentDescription {
    max-width: 100%;
    font-size: 13px;
  }

  .residentEntry.active .residentDescription {
    max-height: 190px;
  }

  .residentMoreButton {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    min-height: 54px;
    font-size: 14px;
  }

  .residentModal {
    padding: 18px;
  }

  .residentModalPanel {
    grid-template-columns: 1fr;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
  }

  .residentModalImage {
    height: 260px;
    min-height: 0;
  }

  .residentModalContent {
    gap: 14px;
    padding: 28px 22px 30px;
  }

  .residentModalContent h2 {
    font-size: 36px;
  }

  .residentModalContent p {
    font-size: 16px;
  }

  .residentsPage .siteFooter {
    flex-direction: column;
    gap: 34px;
    padding: 42px 18px;
  }

  .residentsPage .footerColumn,
  .residentsPage .footerSubscribe {
    width: 100%;
    gap: 12px;
  }

  .residentsPage .footerColumn h2,
  .residentsPage .footerColumn a {
    font-size: 13px;
  }

  .residentsPage .footerColumn p {
    font-size: 12px;
  }

  .residentsPage .footerSubscribe form {
    gap: 10px;
    margin-top: 6px;
  }

  .residentsPage .footerSubscribe input {
    width: 100%;
    padding: 14px;
    font-size: 13px;
  }

  .residentsPage .footerSubscribe button {
    padding: 13px 18px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .residentOption,
  .residentDescription,
  .residentMoreButton,
  .residentModalPanel {
    transition: none;
    animation: none;
  }
}
