html { --page-surface: 255 255 255; }
* { box-sizing: border-box; }
body { margin: 0; background: rgb(var(--page-surface)); color: #0c0c0c; font: 1rem/1.5 Arial, Helvetica, sans-serif; }
button { color: inherit; font: inherit; cursor: pointer; }
button:focus-visible, .section-home:focus-visible, .section-back:focus-visible, .contact-link:focus-visible, .about-link:focus-visible { outline: 1px solid currentColor; outline-offset: 6px; }
.composition {
  position: relative;
  isolation: isolate;
  overflow: clip;
  height: 100vh;
  height: 100svh;
}
.artwork {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% center;
  transform: translateX(-5%) scale(1.1);
  transform-origin: 52% 60%;
}
.masthead {
  position: relative;
  z-index: 1;
  width: fit-content;
  padding: 36px 0 0;
  margin-inline-start: clamp(18px, 5vw, 78px);
}
.masthead h1 { margin: 0; }
.masthead h1 svg { display: block; width: clamp(160px, 19vw, 239px); }
.masthead nav { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 12px; }
.masthead nav :is(button, .work-link, .contact-link, .about-link) {
  color: inherit;
  text-decoration: none;
  position: relative;
  border: 0;
  padding: 5px 0;
  background: transparent;
}
.masthead nav svg { display: block; height: clamp(17px, 2.1vw, 23px); }
nav :is(button, .work-link, .contact-link, .about-link)::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  top: 4px;
  left: calc(100% + 6px);
  opacity: 0;
}
nav :is(button, .work-link, .contact-link, .about-link):is(:hover, :focus-visible)::after { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  nav :is(button, .work-link, .contact-link, .about-link):is(:hover, :focus-visible) svg { animation: nudge 300ms ease-out; }
}
@keyframes nudge {
  32% { transform: translate(2px, -2px) rotate(-4deg); }
  66% { transform: translate(1px, 1px) rotate(2deg); }
}
dialog { width: min(30rem, calc(100% - 32px)); max-height: calc(100svh - 32px); border: 1px solid #dedbd6; padding: 20px; background: rgb(var(--page-surface)); color: inherit; }
dialog::backdrop { background: rgb(var(--page-surface) / .85); }
.panel-head { display: flex; gap: 14px; align-items: baseline; justify-content: space-between; }
.panel-head h2 { margin: 0; font-size: 1.35rem; font-weight: 400; }
.panel-head button { background: none; border: 0; font-size: 1.5rem; padding-inline: 8px; }
.original { display: block; max-height: 67svh; max-width: 100%; margin: 12px auto 0; }
@media (max-width: 600px) {
  .artwork { object-position: 72% center; transform: none; }
}
.work-page { max-width: 96rem; margin-inline: auto; padding: clamp(24px, 5vw, 68px); }
.section-header { display: grid; width: fit-content; grid-template-columns: repeat(3, max-content); align-items: center; gap: 5px 12px; margin: 0 0 clamp(20px, 3vw, 42px); }
.section-back { grid-column: 1 / -1; justify-self: start; display: grid; place-items: center start; width: 44px; min-height: 36px; color: inherit; }
@media (prefers-reduced-motion: no-preference) {
  .section-back svg { transition: transform 180ms ease; }
  .section-back:hover svg { transform: translateX(-3px) rotate(-5deg); }
}
.section-home { display: inline-block; color: inherit; }
.section-home svg { display: block; height: clamp(20px, 2.4vw, 26px); width: auto; }
.section-divider { color: #666; font: 300 1.05rem/1 Arial, sans-serif; }
.section-name { display: block; margin: 0; }
.section-name svg { display: block; height: clamp(15px, 1.65vw, 19px); width: auto; }
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 44px);
}
.work-card { min-width: 0; margin: 0; }
.work-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.work-open img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.work-card figcaption { margin-top: 12px; font: 300 1rem/1.45 "Helvetica Neue", "Segoe UI", Arial, sans-serif; }
.work-card figcaption span { display: block; }
.work-card figcaption span:not(.work-title) { color: #555; font-size: .875rem; }
@media (max-width: 540px) {
  .work-grid { grid-template-columns: minmax(0, 1fr); }
}
body:has(.work-viewer[open]) { overflow: hidden; }
.work-viewer {
  width: min(94vw, 90rem);
  max-width: none;
  max-height: none;
  height: 92svh;
  padding: 0;
  border: 0;
  background: transparent;
}
.work-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.work-viewer::backdrop { background: rgb(var(--page-surface) / .64); backdrop-filter: blur(9px); }
.viewer-controls { display: flex; align-items: center; gap: 8px; padding: 6px 0 12px; }
.viewer-controls h2 { flex: 1; margin: 0; font-size: 1rem; font-weight: 400; }
.viewer-controls button { background: rgb(var(--page-surface)); border: 1px solid #bcbcbc; padding: 6px 12px; }
.viewer-stage { display: grid; place-items: center; min-width: 0; overflow: auto; }
.viewer-stage img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.viewer-stage.is-zoomed { display: block; }
.viewer-stage.is-zoomed img { width: max(145%, 70rem); height: auto; }
