:root {
  color-scheme: light;
  --ink: #191512;
  --muted: #6f625a;
  --paper: #fbfaf6;
  --wash: #ece6da;
  --line: #d8ccbd;
  --accent: #d95439;
  --accent-dark: #a93425;
  --blue: #1f6f8b;
  --green: #657c52;
  --shadow: 0 18px 50px rgba(25, 21, 18, 0.12);
  --header-bg: rgba(251, 250, 246, 0.88);
  --header-line: rgba(216, 204, 189, 0.72);
  --brand-mark-bg: var(--ink);
  --brand-mark-ink: #ffffff;
  --image-bg: #ffffff;
  --hover-shadow: 0 16px 34px rgba(25, 21, 18, 0.14);
  --modal-scrim: rgba(25, 21, 18, 0.42);
  --control-bg: #ffffff;
}

body.theme-deep-sea {
  color-scheme: dark;
  --ink: #f3ede3;
  --muted: #b8aaa0;
  --paper: #101a1f;
  --wash: #17252c;
  --line: #30444c;
  --accent: #e05a3f;
  --accent-dark: #ff9b84;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
  --header-bg: rgba(16, 26, 31, 0.9);
  --header-line: rgba(69, 92, 101, 0.62);
  --brand-mark-bg: #e05a3f;
  --brand-mark-ink: #101a1f;
  --image-bg: #17252c;
  --hover-shadow: 0 20px 42px rgba(0, 0, 0, 0.38);
  --modal-scrim: rgba(0, 0, 0, 0.68);
  --control-bg: #17252c;
}

body.theme-night-museum {
  color-scheme: dark;
  --ink: #f6f0e8;
  --muted: #afa59b;
  --paper: #151515;
  --wash: #22201d;
  --line: #3b3630;
  --accent: #d86b4b;
  --accent-dark: #f29a7e;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  --header-bg: rgba(21, 21, 21, 0.9);
  --header-line: rgba(77, 70, 62, 0.64);
  --brand-mark-bg: #d86b4b;
  --brand-mark-ink: #151515;
  --image-bg: #22201d;
  --hover-shadow: 0 20px 44px rgba(0, 0, 0, 0.42);
  --modal-scrim: rgba(0, 0, 0, 0.7);
  --control-bg: #22201d;
}

body.theme-night-museum-light {
  color-scheme: light;
  --ink: #211d19;
  --muted: #71665d;
  --paper: #f6f0e8;
  --wash: #ece3d8;
  --line: #d5c4b5;
  --accent: #d86b4b;
  --accent-dark: #a7462f;
  --shadow: 0 20px 54px rgba(73, 52, 39, 0.14);
  --header-bg: rgba(246, 240, 232, 0.9);
  --header-line: rgba(213, 196, 181, 0.78);
  --brand-mark-bg: #d86b4b;
  --brand-mark-ink: #fff8ef;
  --image-bg: #fffaf3;
  --hover-shadow: 0 18px 40px rgba(73, 52, 39, 0.16);
  --modal-scrim: rgba(33, 29, 25, 0.42);
  --control-bg: #fffaf3;
}

body.theme-graphite-sketchbook {
  color-scheme: dark;
  --ink: #f1e7d7;
  --muted: #b7aa98;
  --paper: #1c1b19;
  --wash: #2a2824;
  --line: #474137;
  --accent: #d5a64a;
  --accent-dark: #efca7b;
  --shadow: 0 24px 62px rgba(0, 0, 0, 0.38);
  --header-bg: rgba(28, 27, 25, 0.9);
  --header-line: rgba(77, 70, 59, 0.68);
  --brand-mark-bg: #d5a64a;
  --brand-mark-ink: #1c1b19;
  --image-bg: #2a2824;
  --hover-shadow: 0 20px 42px rgba(0, 0, 0, 0.4);
  --modal-scrim: rgba(0, 0, 0, 0.68);
  --control-bg: #2a2824;
}

body.theme-midnight-photo {
  color-scheme: dark;
  --ink: #f4f6f8;
  --muted: #9da7b3;
  --paper: #0e1116;
  --wash: #181d25;
  --line: #2f3947;
  --accent: #6ab7d6;
  --accent-dark: #9fd4ea;
  --shadow: 0 24px 68px rgba(0, 0, 0, 0.44);
  --header-bg: rgba(14, 17, 22, 0.9);
  --header-line: rgba(61, 74, 91, 0.68);
  --brand-mark-bg: #6ab7d6;
  --brand-mark-ink: #0e1116;
  --image-bg: #181d25;
  --hover-shadow: 0 20px 46px rgba(0, 0, 0, 0.44);
  --modal-scrim: rgba(0, 0, 0, 0.72);
  --control-bg: #181d25;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 56px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
  font-size: 1rem;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--brand-mark-ink);
  background: var(--brand-mark-bg);
  border-radius: 50%;
  font-size: 0.92rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 3vw, 32px);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--accent-dark);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.78fr);
  gap: clamp(28px, 6vw, 84px);
  align-items: center;
  min-height: calc(100svh - 72px);
  padding: clamp(54px, 8vw, 104px) clamp(20px, 5vw, 72px) 70px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 720px;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.4rem, 13vw, 11rem);
  font-weight: 500;
  line-height: 0.82;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 610px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.48rem);
  line-height: 1.48;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  font-size: 0.94rem;
  font-weight: 750;
}

.button.primary {
  color: #fff;
  background: var(--ink);
}

.button.secondary {
  color: var(--ink);
  background: transparent;
}

.featured-work {
  justify-self: end;
  width: min(100%, 440px);
}

.featured-image {
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.featured-caption {
  display: grid;
  gap: 4px;
  margin-top: 18px;
}

.featured-caption h2,
.featured-caption p {
  margin: 0;
}

.caption-label {
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.featured-caption h2 {
  font-size: 1.5rem;
}

.featured-caption p:not(.caption-label) {
  color: var(--muted);
}

.gallery-title {
  margin: 0 0 clamp(24px, 4vw, 44px);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.4rem, 13vw, 11rem);
  font-weight: 500;
  line-height: 0.82;
  letter-spacing: 0;
}

.gallery-section {
  padding: 72px clamp(20px, 5vw, 72px);
}

.gallery-section.gallery-home {
  padding-top: clamp(46px, 8vw, 104px);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.filter-chip {
  min-height: 38px;
  padding: 0 16px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 750;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.art-grid {
  column-count: 3;
  column-gap: clamp(16px, 2.2vw, 28px);
}

.art-grid-error {
  column-span: all;
  margin: 0;
  padding: 24px 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
}

.art-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 clamp(24px, 3vw, 42px);
  padding: 0;
  text-align: left;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}

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

.art-card img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: var(--image-bg);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.art-card:hover img,
.art-card:focus-visible img {
  transform: scale(1.03);
  box-shadow: var(--hover-shadow);
}

.art-card-copy {
  display: grid;
  gap: 4px;
  padding-top: 14px;
}

.art-card-copy strong {
  font-size: 1.04rem;
}

.art-card-copy span {
  color: var(--muted);
  font-size: 0.92rem;
}

.art-card-date {
  font-size: 0.78rem;
  opacity: 0.6;
}

.art-card-detail {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-top: 2px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--modal-scrim);
  animation: modal-in 220ms ease forwards;
}

.modal[hidden] {
  display: none;
}

.modal-panel {
  position: relative;
  max-width: min(100%, 720px);
  animation: panel-in 260ms ease forwards;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  min-height: 34px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--control-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 750;
}

#modal-img {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
}

@keyframes modal-in {
  from { opacity: 0; }
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
}

.not-found-copy {
  max-width: 42rem;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.5;
}

.not-found-link {
  color: var(--accent-dark);
  font-weight: 800;
}

@media (max-width: 880px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .featured-work {
    justify-self: start;
    width: min(100%, 520px);
  }

  .art-grid {
    column-count: 2;
  }
}

@media (max-width: 560px) {
  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    min-height: auto;
  }

  .hero h1 {
    font-size: clamp(4rem, 23vw, 6.5rem);
  }

  .art-grid {
    column-count: 1;
  }

}
