:root {
  color-scheme: dark;
  --bg: #202421;
  --surface: #292f2a;
  --text: #e9e8df;
  --muted: #a3a79d;
  --accent: #a8b5a0;
  --line: #3b423c;
  --body: "DM Sans", Arial, sans-serif;
  --display: "Playfair Display", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.7 var(--body);
  overflow-x: hidden;
}

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

button, input, select {
  font: inherit;
}

button {
  color: inherit;
}

.site-header {
  min-height: 76px;
  padding: 0 8%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(32 36 33 / 94%);
  backdrop-filter: blur(14px);
}

.wordmark, .footer-mark {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -1.5px;
}

.wordmark span {
  color: var(--accent);
}

.header-note {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .08em;
}

.intro {
  min-height: 390px;
  padding: 82px 12% 76px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .25em;
}

h1 {
  margin: 0;
  font: 500 clamp(48px, 7.5vw, 88px)/1.04 var(--display);
  letter-spacing: -.045em;
}

h1 em {
  color: var(--accent);
  font-weight: 500;
}

.intro-note {
  max-width: 245px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

.gallery-section {
  padding: 64px 8% 100px;
}

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.type-filters, .gallery-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-button {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  transition: .2s ease;
}

.filter-button:hover {
  border-color: var(--accent);
  color: var(--text);
}

.filter-button.active {
  background: var(--accent);
  color: #202421;
  border-color: var(--accent);
}

.search-wrap input, .select-wrap select {
  min-height: 37px;
  max-width: 190px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
}

.search-wrap input {
  width: 155px;
}

.search-wrap input:focus, .select-wrap select:focus {
  border-color: var(--accent);
}

.search-wrap input::placeholder {
  color: var(--muted);
}

.gallery-status {
  min-height: 23px;
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 11px;
}

.art-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 28px 22px;
}

.artwork-card {
  display: block;
  width: 100%;
  margin: 0;
  min-width: 0;
}

.artwork-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
  position: relative;
}

.artwork-button img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .3s ease;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.artwork-button:hover img {
  transform: scale(1.02);
  opacity: .94;
}

.artwork-button:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.artwork-signature {
  position: absolute;
  right: 9px;
  bottom: 7px;
  color: rgb(255 255 255 / 55%);
  font-size: 9px;
  letter-spacing: .08em;
  text-shadow: 0 1px 5px #000;
  pointer-events: none;
}

.artwork-info {
  padding: 9px 2px 0;
}

.artwork-title {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.artwork-details {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.message {
  color: var(--muted);
  font-size: 13px;
  padding: 18px 0;
}

.site-footer {
  padding: 30px 8%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.footer-mark {
  color: var(--text);
  font-size: 18px;
  flex: 0 0 auto;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  text-align: center;
}

.top-link {
  color: var(--accent);
  flex: 0 0 auto;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 58px 76px 48px;
  background: rgb(10 13 11 / 97%);
}

.image-viewer.open {
  display: flex;
}

.viewer-figure {
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.viewer-figure img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 135px);
  width: auto;
  height: auto;
  object-fit: contain;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.viewer-figure figcaption {
  margin-top: 13px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.viewer-close, .viewer-arrow {
  position: absolute;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: color .2s ease;
}

.viewer-close:hover, .viewer-arrow:hover {
  color: var(--accent);
}

.viewer-close {
  top: 17px;
  right: 26px;
  font-size: 36px;
  line-height: 1;
}

.viewer-arrow {
  top: 50%;
  transform: translateY(-50%);
  padding: 12px;
  font-size: 52px;
}

.viewer-previous {
  left: 12px;
}

.viewer-next {
  right: 12px;
}

.viewer-counter {
  position: absolute;
  bottom: 13px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media(max-width: 900px) {
  .site-header { padding: 0 6%; }
  .intro { min-height: 340px; padding: 72px 8%; }
  .gallery-section { padding: 55px 6% 80px; }
.art-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 16px;
}
  .site-footer { padding: 28px 6%; }
}

@media(max-width: 600px) {
  html { scroll-padding-top: 70px; }
  .site-header { min-height: 66px; padding: 0 5%; }
  .wordmark { font-size: 21px; }
  .header-note { font-size: 9px; }
  .intro { min-height: 340px; padding: 66px 7% 55px; display: block; }
  h1 { font-size: clamp(47px, 12vw, 65px); }
  .intro-note { max-width: 270px; margin-top: 24px; font-size: 12px; }
  .gallery-section { padding: 42px 5% 65px; }
  .gallery-toolbar { align-items: stretch; flex-direction: column; gap: 13px; }
  .type-filters { overflow-x: auto; padding: 2px 2px 5px; }
  .filter-button { flex: 0 0 auto; padding: 8px 13px; }
  .gallery-tools { width: 100%; }
  .search-wrap { flex: 1; }
  .search-wrap input { width: 100%; max-width: none; }
  .select-wrap select { max-width: 150px; }
.art-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 10px;
}
  .artwork-info { padding-top: 7px; }
  .artwork-title { font-size: 10px; }
  .artwork-details { font-size: 9px; }
  .image-viewer { padding: 54px 34px 46px; }
  .viewer-previous { left: 0; }
  .viewer-next { right: 0; }
  .site-footer {
    padding: 26px 7%;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .site-footer p { text-align: left; }
}

@media(prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}


/* Respect the hidden attribute on gallery controls. */
.type-filters[hidden] {
  display: none !important;
}
