:root {
  color-scheme: light;
  --paper: #f8f4ec;
  --ink: #171512;
  --muted: #6f6a61;
  --line: #d9d1c3;
  --teal: #0f615c;
  --coral: #b54b3d;
  --ochre: #bb8a28;
  --white: #fffdf8;
  --shadow: 0 18px 45px rgba(32, 27, 20, 0.14);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 54px);
  color: var(--white);
  background: linear-gradient(rgba(23, 21, 18, 0.7), rgba(23, 21, 18, 0));
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  text-decoration: none;
  white-space: nowrap;
}

nav {
  display: flex;
  gap: clamp(14px, 3vw, 34px);
  font-size: 0.92rem;
}

nav a,
footer a {
  text-decoration: none;
}

nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 5px;
}

nav a:hover,
footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero {
  position: relative;
  min-height: 82vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(23, 21, 18, 0.76), rgba(23, 21, 18, 0.24) 58%, rgba(23, 21, 18, 0.12)),
    linear-gradient(0deg, rgba(23, 21, 18, 0.55), rgba(23, 21, 18, 0.02) 48%);
}

.hero img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  width: min(860px, calc(100% - 36px));
  margin: 0 auto;
  padding: 104px 0 46px;
  color: var(--white);
}

.hero-copy .eyebrow,
.hero-copy h1 {
  text-shadow: 0 2px 12px rgba(10, 9, 7, 0.55);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f7c35b;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.03;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.8rem, 7vw, 5rem);
}

h2 {
  font-size: clamp(2.1rem, 5vw, 4rem);
}

h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.button,
.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 28px;
  padding: 0 20px;
  border: 1px solid currentColor;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 800;
}

.button:hover,
.contact-link:hover {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.hero .button:hover {
  background: var(--white);
  color: var(--ink);
  border-color: var(--white);
}

.intro,
.work-section,
.about-section,
.contact-section,
footer {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: clamp(28px, 6vw, 86px);
  padding: clamp(54px, 10vw, 110px) 0;
  border-bottom: 1px solid var(--line);
}

.intro > p,
.about-copy p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.75;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.text-link {
  margin-left: auto;
  color: var(--teal);
  font-weight: 800;
  text-underline-offset: 4px;
  white-space: nowrap;
}

.work-section {
  padding: clamp(54px, 10vw, 96px) 0;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.loading-message {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.art-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.art-card:hover,
.art-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 24px 52px rgba(32, 27, 20, 0.2);
}

.art-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.art-meta {
  min-height: 126px;
  padding: 20px;
}

.art-meta p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.about-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(32px, 7vw, 88px);
  padding: clamp(54px, 10vw, 96px) 0;
  border-top: 1px solid var(--line);
}

.about-copy p {
  margin-top: 24px;
}

.details-list {
  margin: 0;
  border-top: 1px solid var(--line);
}

.details-list div {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 8px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}

.contact-section {
  padding: clamp(54px, 10vw, 96px) 0;
  border-top: 1px solid var(--line);
}

.contact-section h2 {
  max-width: 780px;
}

.contact-link {
  color: var(--teal);
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 36px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

footer p {
  margin: 0;
}

.site-header--solid {
  color: var(--ink);
  background: rgba(248, 244, 236, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.gallery-page {
  padding-top: 68px;
}

.gallery-intro,
.gallery-collections {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.gallery-intro {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.55fr);
  gap: 20px 72px;
  padding: clamp(64px, 10vw, 120px) 0 clamp(42px, 7vw, 76px);
  border-bottom: 1px solid var(--line);
}

.gallery-intro .eyebrow,
.gallery-intro h1 {
  grid-column: 1;
}

.gallery-intro h1 {
  color: var(--ink);
}

.gallery-intro > p:last-child {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.gallery-collections {
  padding: clamp(48px, 8vw, 92px) 0;
}

.collection-section + .collection-section {
  margin-top: clamp(72px, 11vw, 132px);
  padding-top: clamp(48px, 7vw, 80px);
  border-top: 1px solid var(--line);
}

.collection-heading {
  margin-bottom: clamp(28px, 5vw, 48px);
}

.collection-heading h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 5vw, 72px) 22px;
}

.gallery-item {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: opacity 180ms ease;
}

.gallery-item--wide img {
  aspect-ratio: 5 / 4;
}

.gallery-item:hover img {
  opacity: 0.88;
}

.gallery-item:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 6px;
}

.gallery-caption {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--ink);
}

.gallery-caption strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 500;
}

.gallery-caption span {
  color: var(--muted);
}

.art-dialog {
  width: min(1080px, calc(100% - 36px));
  max-height: calc(100vh - 36px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(23, 21, 18, 0.35);
}

.art-dialog::backdrop {
  background: rgba(23, 21, 18, 0.78);
}

.dialog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  min-height: min(680px, calc(100vh - 36px));
}

.dialog-image-wrap {
  display: grid;
  place-items: center;
  padding: clamp(22px, 4vw, 48px);
  background: #e8e4dc;
}

.dialog-image {
  width: 100%;
  max-height: calc(100vh - 132px);
  object-fit: contain;
  box-shadow: var(--shadow);
}

.dialog-copy {
  min-width: 0;
  align-self: center;
  padding: clamp(32px, 5vw, 62px);
}

.dialog-copy h2 {
  max-width: 100%;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  overflow-wrap: anywhere;
  word-break: normal;
}

.dialog-medium {
  margin: 22px 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  line-height: 1.5;
}

.dialog-details,
.dialog-copyright {
  color: var(--muted);
  font-size: 0.88rem;
}

.dialog-description {
  margin: 32px 0;
  color: var(--muted);
  line-height: 1.75;
}

.dialog-copyright {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.dialog-close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    padding-top: 16px;
  }

  nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero {
    min-height: 82vh;
  }

  .hero-copy {
    padding-bottom: 42px;
  }

  .intro,
  .about-section {
    grid-template-columns: 1fr;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .text-link {
    display: inline-block;
    margin: 16px 0 0;
  }

  .gallery-intro,
  .dialog-layout {
    grid-template-columns: 1fr;
  }

  .gallery-intro > p:last-child {
    grid-column: 1;
    grid-row: auto;
    margin-top: 12px;
  }

  .dialog-layout {
    min-height: 0;
  }

  .dialog-image-wrap {
    min-height: 48vh;
  }

  .dialog-image {
    max-height: 44vh;
  }
}

@media (max-width: 520px) {
  .site-header {
    position: absolute;
    display: block;
  }

  .gallery-page .site-header {
    position: fixed;
    display: flex;
  }

  nav {
    justify-content: flex-start;
    margin-top: 12px;
  }

  h1 {
    font-size: 3rem;
  }

  .hero-copy,
  .intro,
  .work-section,
  .about-section,
  .contact-section,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item img,
  .gallery-item--wide img {
    aspect-ratio: 4 / 5;
  }

  .art-dialog {
    width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
  }

  .dialog-copy {
    padding: 28px 22px 34px;
  }

  footer {
    display: block;
  }

  footer a {
    display: inline-block;
    margin-top: 12px;
  }
}
