@font-face {
  font-family: "Didact Gothic";
  src: url("/assets/fonts/DidactGothic-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #3e3e3e;
  --muted: #656565;
  --line: #dfdfdf;
  --accent: #9e4236;
  background: var(--paper);
  color: var(--ink);
  font: 100%/1.5 "Didact Gothic", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body, figure, h1, h2, p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .24em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.shell { width: min(100% - 4rem, 72rem); margin-inline: auto; }
.skip { position: absolute; inset: .5rem auto auto .5rem; z-index: 2; transform: translateY(-150%); background: var(--paper); padding: .5rem 1rem; }
.skip:focus { transform: translateY(0); }

.site-header, .site-footer { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.site-header { min-height: 7rem; }
.brand { display: inline-flex; line-height: 1; text-decoration: none; }
.site-footer .brand { font-size: 1.2rem; }
.site-header nav, .footer-links { display: flex; flex-wrap: wrap; gap: clamp(.85rem, 3vw, 2rem); }
.site-header nav a, .footer-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.site-header nav a:hover, .category-nav a:hover { color: inherit; }
.work-menu { position: relative; }
.work-submenu {
  position: absolute;
  z-index: 2;
  inset: 100% auto auto -.75rem;
  min-width: 11rem;
  padding-block: .5rem;
  background: #f2f2f2;
  box-shadow: 0 .6rem 1.25rem rgb(0 0 0 / 10%);
}
.site-header .work-submenu a { display: flex; padding-inline: 1.25rem; }
.site-header .work-submenu a:hover { background: #e8e8e8; }
.footer-links a:hover { text-decoration: underline; }
.site-footer { border-top: 1px solid var(--line); padding-block: 1.7rem 2.3rem; }
.site-footer p { margin-top: .35rem; color: var(--muted); font-size: .95rem; }

.portfolio-heading {
  padding-top: .65rem;
  color: var(--ink);
  font: 400 36px/1 "Didact Gothic", Arial, sans-serif;
  text-align: center;
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  gap: 0 clamp(.2rem, 1.1vw, .8rem);
  margin: 1.25rem auto 1.25rem;
  border-bottom: 1px solid var(--line);
}
.category-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: -1px;
  padding-inline: clamp(.45rem, 1.9vw, 1.25rem);
  border-bottom: 2px solid transparent;
  text-decoration: none;
}
.category-nav a[aria-current="page"] {
  border-bottom-color: #000;
  color: #000;
  font-weight: 700;
}
#work { scroll-margin-top: 1.25rem; }

.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; padding-bottom: clamp(3rem, 7vw, 6rem); }
.photo-grid > :is(figure, .collection) {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  padding: clamp(.85rem, 2vw, 1.35rem) clamp(1rem, 3.2vw, 2.5rem);
  border: 1px solid #ededed;
  border-radius: .65rem;
  background: var(--paper);
  box-shadow: 0 1px 6px rgb(0 0 0 / 5%);
}
.photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.photo-grid figcaption, .collection-title { display: block; margin-top: .75rem; color: var(--muted); font-size: 1rem; text-align: center; }
.photo-grid figcaption a { text-decoration: none; }
.photo-grid figcaption a:hover { text-decoration: underline; }
.collection { text-decoration: none; }
.collection-title, .gallery-heading h2 {
  color: var(--ink);
  font: 400 17px/1.3 Arial, Helvetica, sans-serif;
}
.collection:hover .collection-title { color: var(--accent); }
.photo-tile { display: block; min-height: 0; }
.photo-link { display: block; height: 100%; cursor: zoom-in; }

.gallery-heading { padding-block: .15rem 1.65rem; }
.eyebrow { display: inline-block; color: var(--muted); font-size: .9rem; }
h1 { font-weight: 400; font-size: clamp(2.25rem, 5vw, 4.5rem); line-height: 1.05; text-wrap: balance; }
.gallery-heading h2 { margin-block: .55rem .8rem; }
.inner-heading h1 { margin-block: .55rem .8rem; }
.lede { max-width: 32rem; color: var(--muted); font-size: clamp(1.07rem, 1.6vw, 1.24rem); }
.button { display: inline-flex; align-items: center; min-height: 44px; margin-top: 1.45rem; padding: .55rem 1rem; border: 1px solid var(--ink); text-decoration: none; }
.button:hover { border-color: var(--accent); }
.about { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(1.8rem, 6vw, 5rem); padding-block: clamp(2.5rem, 5vw, 5rem); }
.contact { min-height: 45vh; padding-block: clamp(2.5rem, 5vw, 5rem); }

.viewer { width: min(72rem, 100% - 1.5rem); max-height: 96dvh; padding: .8rem; border: 1px solid #5c5850; background: #202020; color: white; }
.viewer::backdrop { background: rgb(14 14 14 / .86); }
.viewer-controls { display: flex; justify-content: center; gap: .6rem; margin-bottom: .65rem; }
.viewer button { min-height: 44px; padding: .4rem .8rem; border: 1px solid #a4a4a4; background: transparent; color: white; cursor: pointer; font: inherit; }
.viewer button:hover, .viewer button:focus-visible { background: white; color: #202020; }
.viewer img { width: auto; max-height: 77dvh; object-fit: contain; margin-inline: auto; }
.viewer figcaption { margin-top: .4rem; color: #f0f0f0; text-align: center; }

@media (max-width: 580px) {
  .shell { width: calc(100% - 2.25rem); }
  .site-header { min-height: 0; padding-top: 1.25rem; flex-direction: column; align-items: flex-start; gap: .5rem; }
  .site-footer { flex-wrap: wrap; gap: .35rem 1rem; }
  .photo-grid, .about { grid-template-columns: 1fr; }
  .category-nav { margin-block: .75rem 1.25rem; }
}
