* {
  box-sizing: border-box;
}

html {
  background: #242426;
}

body {
  margin: 0;
}

.brochure {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 32rem);
  margin-inline: auto;
}

.brochure img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 64rem) {
  .brochure {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(100%, 94rem);
  }
}

body {
  color: #f7f2e7;
  font-family: "Inter", system-ui, sans-serif;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 2rem;
  max-width: 94rem;
  margin-inline: auto;
  padding: .8rem clamp(1rem, 4vw, 3rem);
}

.site-header a {
  color: inherit;
  text-decoration: none;
}

.site-name {
  display: inline-block;
  font-weight: 700;
  letter-spacing: -.025em;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
}

.site-header nav a {
  padding-block: .55rem;
  border-bottom: 2px solid transparent;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  border-bottom-color: #fa7754;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #fa7754;
  outline-offset: 4px;
}

.gallery,
.exhibition-video {
  width: min(100%, 76rem);
  margin-inline: auto;
  padding: clamp(2rem, 7vw, 5rem) clamp(1rem, 4vw, 3rem);
}

.gallery h1,
.exhibition-video h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -.045em;
}

.exhibition-video iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #1b1b1c;
}

.exhibition-video .short-video {
  width: min(100%, 34rem);
  margin: 2rem auto 0;
  aspect-ratio: 9 / 16;
}

.gallery-sections {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 2rem;
}

.gallery-sections a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .6rem 1rem;
  border: 1px solid #927c73;
  border-radius: .65rem;
  color: inherit;
  text-decoration: none;
}

.gallery-sections a:hover {
  background: #47352a;
}

.gallery-sections a[aria-current="page"] {
  background: #fa7754;
  border-color: #fa7754;
  color: #242426;
  font-weight: 700;
}

.gallery h2 {
  margin: 0 0 .85rem;
  font-size: 1.3rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: clamp(.5rem, 1.5vw, 1rem);
  padding: 0;
  margin: 0;
  list-style: none;
}

.photo-grid a {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: #1b1b1c;
}

.photo-grid img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.artist-photos .photo-grid {
  align-items: start;
}

.artist-photos .photo-grid a {
  display: block;
  aspect-ratio: auto;
}

.artist-photos .photo-grid img {
  height: auto;
}

.photo-viewer {
  width: fit-content;
  max-width: calc(100% - 2rem);
  max-height: calc(100% - 2rem);
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  overflow: visible;
}

.photo-viewer::backdrop {
  background: rgb(0 0 0 / 78%);
}

.viewer-stage {
  position: relative;
  width: fit-content;
  background: #1b1b1c;
  overflow: hidden;
}

.photo-viewer button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(0 0 0 / 48%);
  color: #fff;
  font: 400 2rem/1 system-ui, sans-serif;
  cursor: pointer;
}

.photo-viewer button:hover:not(:disabled) {
  background: rgb(0 0 0 / 75%);
}

.photo-viewer button svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.photo-viewer button:disabled {
  opacity: .35;
  cursor: default;
}

.photo-viewer img {
  display: block;
  max-width: min(90vw, 1100px);
  max-height: 88dvh;
  object-fit: contain;
  touch-action: pan-y pinch-zoom;
}

.viewer-caption {
  position: absolute;
  inset: auto 0 0;
  margin: 0;
  padding: 3.5rem 1.25rem 1.25rem;
  background: linear-gradient(transparent, rgb(0 0 0 / 88%));
  color: #fff;
  white-space: pre-line;
  line-height: 1.45;
  overflow-wrap: anywhere;
  max-height: 55%;
  overflow-y: auto;
  text-shadow: 0 1px 3px #000;
}

.viewer-navigation {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.viewer-navigation button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: auto;
}

.viewer-navigation button:first-child {
  left: .75rem;
}

.viewer-navigation button:last-child {
  right: .75rem;
}

.viewer-navigation span {
  position: absolute;
  top: .75rem;
  left: .75rem;
  padding: .4rem .7rem;
  border-radius: 2rem;
  background: rgb(0 0 0 / 55%);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px #000;
}

.photo-viewer form {
  position: absolute;
  top: .75rem;
  right: .75rem;
}

.brochure-spreads {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-block: 1rem clamp(2.5rem, 6vw, 4.5rem);
}

.brochure-spreads .brochure {
  width: min(100%, 32rem);
}

.gallery h3 {
  margin: 0 0 .85rem;
  font-size: 1.15rem;
}

@media (min-width: 64rem) {
  .brochure-spreads .brochure {
    width: 100%;
  }
}

.portrait-works {
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.home {
  background: #30251f;
}

.home .site-header {
  max-width: 84rem;
  justify-content: flex-end;
  border-bottom: 1px solid #ffffff24;
}

.home-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  width: min(100%, 75rem);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem);
}

.home-intro {
  position: relative;
  z-index: 2;
}

.home-sketch {
  position: absolute;
  z-index: -1;
  right: 30%;
  bottom: 8%;
  width: min(60%, 28rem);
  height: auto;
  opacity: .25;
  filter: grayscale(1) invert(1) contrast(1.6);
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse 75% 85% at 50% 58%, #000 42%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 85% at 50% 58%, #000 42%, transparent 100%);
  pointer-events: none;
}

.home-intro h1 {
  margin: 0;
  font-family: "Baskervville", "Baskerville", Georgia, serif;
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 400;
  line-height: .92;
  letter-spacing: -.055em;
}

.home-lifespan {
  margin: 1.35rem 0 0;
  color: #e5bb94;
  font-variant-numeric: oldstyle-nums;
  letter-spacing: .12em;
}

.home-description {
  max-width: 27ch;
  margin: 1.6rem 0 1.9rem;
  color: #e9dacf;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.home-gallery-link {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: .7rem 1rem;
  border: 1px solid #cba98d;
  color: inherit;
  text-decoration: none;
}

.home-gallery-link:hover {
  background: #47352a;
}

.home-portrait {
  display: block;
  width: 100%;
  height: auto;
  max-width: 28rem;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 24%, #000 87%, transparent),
    linear-gradient(to bottom, transparent, #000 10%, #000 88%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 24%, #000 87%, transparent),
    linear-gradient(to bottom, transparent, #000 10%, #000 88%, transparent);
  mask-composite: intersect;
}

@media (min-width: 44rem) {
  .home-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }

  .home-sketch {
    right: 35%;
    bottom: auto;
    top: 50%;
    width: min(42%, 28rem);
    transform: translateY(-50%);
  }

  .home-portrait {
    justify-self: end;
  }
}

.photo-caption {
  margin: .55rem 0 .8rem;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.caption-editor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.caption-editor form {
  min-width: 0;
}

.caption-editor img {
  display: block;
  width: 100%;
  height: 12rem;
  object-fit: contain;
  background: #1b1b1c;
  margin-bottom: .75rem;
}

.caption-editor textarea {
  display: block;
  width: 100%;
  margin-block: .4rem .65rem;
  padding: .5rem;
  resize: vertical;
}

.caption-editor textarea,
.caption-editor button {
  color: inherit;
  background: #302923;
  border: 1px solid #927c73;
  border-radius: .25rem;
  font: inherit;
}

.caption-editor button {
  padding: .5rem .75rem;
}

.caption-editor button:disabled {
  opacity: .55;
}

.caption-editor form p {
  min-height: 1.5em;
  margin: .5rem 0 0;
}

.language-switch {
  min-width: 44px;
  min-height: 44px;
  padding: .4rem .65rem;
  border: 1px solid #927c73;
  border-radius: .5rem;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.language-switch:hover {
  background: #47352a;
}
