* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: #fff; color: #363636; font: 300 16px/1.6 "Barlow", sans-serif; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: #747474; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid #575757; outline-offset: 5px; }
[hidden] { display: none !important; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 5; padding: 8px 14px; background: white; }
.site-header { padding-top: 50px; line-height: 24px; }
.site-header nav { display: flex; justify-content: center; gap: 18px; }
.site-header a { font: 200 20px/24px "Work Sans", sans-serif; letter-spacing: 4px; text-decoration: none; white-space: nowrap; }
.page { width: min(980px, calc(100% - 40px)); margin-inline: auto; padding-top: var(--page-top, 100px); padding-bottom: 160px; }
h1 { margin: 0; font: 400 20px/1.36 "Open Sans", sans-serif; letter-spacing: 4px; overflow-wrap: anywhere; }
h2 { font-size: 18px; font-weight: 400; }
.copy p { margin: 0; }
.copy p:empty { min-height: 1.6em; }
.credits { font-size: 10px; line-height: 1.6; }
.align-right { text-align: right; }
.align-center { text-align: center; }
.figure { min-width: 0; margin: 0; }
.figure picture, .figure a { display: block; }
.figure img { display: block; width: 100%; height: auto; }
.related { margin-top: 85px; font-size: 16px; line-height: 1.6; }
.related-label { margin-right: 6px; font: 200 16px "Work Sans", sans-serif; text-decoration: none; }
.gallery-layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--aside-width, 200px); column-gap: var(--column-gap, 50px); row-gap: var(--image-gap, 40px); width: var(--spread-width, 940px); max-width: calc(100% - var(--offset, 0px)); margin-left: var(--offset, 0px); }
.gallery-layout .figure { grid-column: 1; }
.gallery-layout .summary, .gallery-layout .side-copy { grid-column: 2; align-self: start; min-width: 0; }
.gallery-layout .summary { grid-row: 1; padding-top: 3px; }
.gallery-layout .summary > * + * { margin-top: 45px; }
.page-home { --page-top: 78px; }
.portfolio-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 38px 21px; width: 926px; max-width: 100%; margin: 0 auto; padding: 0; list-style: none; }
.portfolio-tile { display: block; min-width: 0; text-align: center; text-decoration: none; }
.portfolio-tile img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.portfolio-caption { display: block; max-width: 182px; margin: 12px auto 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 400 13px/16px "Work Sans", sans-serif; color: #666; }
.page-about { --page-top: 143px; }
.about-copy { width: 833px; max-width: calc(100% - 13px); margin-left: 13px; min-height: 461px; }
.about-links { max-width: 664px; margin: 76px 0 0 9px; }
.about-copy a[href^="mailto:"] { text-decoration: none; }
.diagram { position: relative; }
.diagram-viewport { max-width: 100%; }
.diagram.is-expanded .diagram-viewport { position: relative; isolation: isolate; height: min(80dvh, 720px); overflow: auto; overscroll-behavior: contain; touch-action: none; user-select: none; cursor: grab; }
.diagram.is-expanded .diagram-canvas { position: relative; }
.diagram.is-expanded picture { position: absolute; pointer-events: none; }
.diagram.is-expanded img { width: 100%; height: 100%; max-width: none; user-select: none; }
.diagram.is-dragging .diagram-viewport { cursor: grabbing; }
.diagram-toggle { position: absolute; z-index: 2; top: 12px; right: 12px; min-width: 44px; min-height: 44px; padding: 6px 12px; border: 1px solid #888; background: #fff; font-size: 13px; touch-action: manipulation; }
.diagram-hint { position: absolute; z-index: 1; left: 12px; bottom: 12px; max-width: calc(100% - 24px); margin: 0; padding: 6px 10px; background: rgb(255 255 255 / 92%); font-size: 12px; line-height: 1.4; pointer-events: none; }
.diagram-fallback { font-size: 13px; }
.diagram-error { font-size: 14px; }
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 16px; border: 0; background: #fff; color: #363636; }
.lightbox::backdrop { background: #fff; }
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex: 0 0 auto; }
.lightbox button { min-width: 44px; min-height: 44px; border: 0; background: #fff; }
.lightbox-close span { font-size: 26px; margin-left: 8px; }
.lightbox-body { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; flex: 1; min-height: 0; align-items: center; gap: 8px; }
.lightbox-image { display: block; max-width: 100%; max-height: calc(100dvh - 150px); width: auto; height: auto; margin: auto; object-fit: contain; }
.lightbox-prev, .lightbox-next { font-size: 38px; }
#lightbox-caption { flex: 0 0 auto; margin: 10px 0 0; text-align: center; font-size: 14px; }
.modal-open { overflow: hidden; }
.not-found { max-width: 600px; margin: auto; }

@media (min-width: 600px) and (max-width: 979px) {
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 38px 24px; width: 700px; max-width: 100%; }
  .credits { font-size: 12px; }
  main.page .gallery-layout { --offset: 0px; --aside-width: 34%; --column-gap: 28px; width: 100%; }
}
@media (max-width: 599px) {
  body { font-size: clamp(16px, 5vw, 21px); }
  .site-header { padding-top: 25px; }
  .site-header nav { gap: clamp(14px, 5vw, 38px); }
  .site-header a { font-size: clamp(14px, 4.8vw, 20px); letter-spacing: 3px; }
  .page { padding-top: 76px; padding-bottom: 70px; }
  .page-home { padding-top: 64px; }
  .page-about { padding-top: 96px; }
  h1 { font-size: clamp(20px, 6.25vw, 26px); letter-spacing: clamp(4px, 1.25vw, 5.3px); overflow-wrap: anywhere; }
  .credits { font-size: clamp(12px, 3.75vw, 16px); }
  .portfolio-grid { grid-template-columns: minmax(0, 1fr); width: 100%; gap: 36px; }
  .portfolio-caption { max-width: 100%; font-size: 15px; line-height: 1.5; white-space: normal; }
  .gallery-layout { display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 100%; margin-left: 0; }
  .gallery-layout .summary, .gallery-layout .side-copy { width: 100%; padding-top: 0; }
  .gallery-layout .summary > * + * { margin-top: 24px; }
  .align-right { text-align: right; }
  .related { margin-top: 50px; font-size: 16px; }
  .about-copy { width: 100%; max-width: 100%; margin-left: 0; min-height: 0; }
  .about-links { margin: 50px 0 0; }
  .desktop-only { display: none; }
  .lightbox { padding: 10px; }
  .lightbox-body { grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 0; }
  .lightbox-body button { min-width: 34px; }
}
@media (max-height: 450px) {
  .lightbox-image { max-height: calc(100dvh - 110px); }
  #lightbox-caption { font-size: 12px; margin-top: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
