@font-face {
  font-family: Futura PT;
  src: url("assets/futura-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Futura PT;
  src: url("assets/futura-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Proxima Nova;
  src: url("assets/proxima.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #faf9f6;
  --ink: #242421;
  --muted: #5c5a56;
  --rule: #d8d4ca;
  --accent: #373d76;
  --heading: "Futura PT", "Trebuchet MS", sans-serif;
}

body.alphabet-page { background: var(--paper); }
.alphabet-page #canvas { padding-bottom: 0; }
#project, #art-viewer {
  font: 1rem/1.5 "Proxima Nova", system-ui, sans-serif;
  color: var(--ink);
}
#project, #project *, #art-viewer, #art-viewer * { box-sizing: border-box; }
:where(#project) :is(figure, h1, h2, p), #art-viewer p { margin: 0; }
#art-viewer button { font: inherit; color: inherit; cursor: pointer; }
#project a { color: inherit; text-underline-offset: .2em; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.skip { position: absolute; top: .5rem; left: .5rem; transform: translateY(-200%); padding: .65rem; background: white; z-index: 1; }
.skip:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.shell { width: min(90%, 79rem); margin-inline: auto; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(1.5rem, 4.3vw, 4.25rem);
  margin: clamp(2rem, 4vw, 3.5rem) 0 clamp(3.5rem, 7vw, 7rem);
}
#project :is(h1, h2) { font-family: var(--heading); font-weight: 400; color: inherit; text-transform: none; }
#project h1 { font-size: clamp(2.55rem, 5.5vw, 5.2rem); line-height: .92; letter-spacing: -.025em; }
.description { margin-top: 1.45rem; font-size: clamp(1.06rem, 1.5vw, 1.3rem); max-width: 30ch; line-height: 1.46; }
.gallery-link { display: inline-block; margin-top: 1.15rem; }
.gallery-link-below-art { display: none; }
.gallery-link span { display: inline-block; margin-inline-start: .25em; }
.hero-art img { display: block; width: 100%; height: auto; background: #e5d0b1; }
.hero-art figcaption { padding-top: .6rem; color: #72706a; font-size: .85rem; }

.collection { border-top: 1px solid var(--rule); padding-block: 1.4rem 2rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .25rem 1rem; margin-bottom: 1.65rem; }
.section-head h2 { font-size: clamp(2.1rem, 4vw, 3.3rem); line-height: 1; letter-spacing: -.025em; scroll-margin-top: 1.4rem; }
.section-head p { color: var(--muted); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.2rem, 2.5vw, 2rem) clamp(.9rem, 2vw, 1.7rem); }
.art-card { display: block; padding: 0; width: 100%; border: 0; background: transparent; text-align: left; }
.art-card img { display: block; width: 100%; height: auto; aspect-ratio: 3000 / 2179; object-fit: contain; background: #e5d0b1; }
.art-card[href]:hover img { opacity: .9; }

.viewer-controls { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding-top: .8rem; }
dialog button { padding: .45rem .8rem; border: 1px solid var(--rule); background: transparent; }
dialog button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .45; cursor: default; }

dialog { max-width: min(58rem, 96vw); max-height: 96dvh; background: var(--paper); color: var(--ink); border: 0; padding: 1rem; }
dialog::backdrop { background: rgb(27 25 23 / .78); }
dialog img { display: block; max-width: 100%; width: auto; height: auto; max-height: 74dvh; margin-inline: auto; }
.viewer-top { display: flex; justify-content: flex-end; margin-bottom: .45rem; }

@media (max-width: 940px) {
  .hero { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; margin-top: 1.65rem; gap: 1.5rem; }
  .description { margin-top: 1rem; max-width: 35ch; }
  .gallery-link-intro, .section-head p { display: none; }
  .art-card { pointer-events: none; }
  .gallery-link-below-art {
    display: inline-block;
    justify-self: end;
    position: sticky;
    bottom: max(.75rem, env(safe-area-inset-bottom));
    z-index: 1;
    margin-top: 0;
    padding: .45rem .75rem;
    background: var(--paper);
    border: 1px solid var(--rule);
  }
}
@media (max-width: 460px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .viewer-controls { font-size: .9rem; }
  dialog button { padding-inline: .52rem; }
}
