:root {
  color-scheme: light;
  --bg: #fff;
  --fg: #111;
  --muted: #777;
  --hairline: rgba(17,17,17,.18);
  --page-pad: clamp(18px, 2.2vw, 34px);
  --gallery-gap: clamp(4px, .55vw, 9px);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d0d;
  --fg: #f4f4f2;
  --muted: #999;
  --hairline: rgba(255,255,255,.22);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--fg);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: -.018em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .16s ease, color .16s ease;
}
body.overlay-open { overflow: hidden; }
button, a { font: inherit; color: inherit; }
button { letter-spacing: inherit; }
a { text-decoration: none; }
.site-header {
  height: 72px;
  display: flex;
  align-items: center;
  padding: 0 var(--page-pad);
}
.brand {
  font-size: clamp(15px, 1.25vw, 18px);
  font-weight: 500;
  letter-spacing: -.025em;
}
.intro {
  min-height: clamp(330px, 47svh, 610px);
  display: flex;
  align-items: flex-end;
  padding: 38px var(--page-pad) clamp(58px, 7vw, 108px);
}
.intro h1 {
  margin: 0;
  max-width: 9.2ch;
  font-size: clamp(52px, 8.2vw, 126px);
  line-height: .88;
  font-weight: 400;
  letter-spacing: -.072em;
}
.gallery {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: var(--gallery-gap);
  padding: 0 var(--gallery-gap);
}
.gallery-item {
  display: block;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
  position: relative;
}
.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg);
  transform: scale(1.0001);
  transition: transform .42s cubic-bezier(.22,.61,.36,1), opacity .2s ease;
}
.gallery-item:hover img { transform: scale(1.008); }
.gallery-item:focus-visible { outline: 1px solid var(--fg); outline-offset: 2px; z-index: 2; }
.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 118px;
  padding: 38px var(--page-pad) 28px;
  font-size: 12px;
  letter-spacing: -.01em;
}
.theme-switch { justify-self: start; display: inline-flex; gap: 12px; }
.theme-switch button,
.menu-button,
.menu-close,
.lightbox-close {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}
.theme-switch button { color: var(--muted); position: relative; }
.theme-switch button[aria-pressed="true"] { color: var(--fg); }
.theme-switch button[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: currentColor;
}
.copyright { justify-self: center; white-space: nowrap; }
.menu-button { justify-self: end; }
.theme-switch button:hover, .menu-button:hover, .menu-close:hover, .lightbox-close:hover { opacity: .58; }
.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  color: var(--fg);
  visibility: hidden;
  opacity: 0;
  transition: opacity .16s ease, visibility .16s ease;
}
.menu-panel.is-open { visibility: visible; opacity: 1; }
.menu-panel-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 4px;
  padding: max(30px, env(safe-area-inset-top)) var(--page-pad) max(30px, env(safe-area-inset-bottom));
}
.menu-panel-inner a,
.menu-close {
  font-size: clamp(44px, 8vw, 112px);
  line-height: .96;
  font-weight: 400;
  letter-spacing: -.064em;
}
.menu-close { margin-top: clamp(26px, 5vw, 72px); font-size: 13px; letter-spacing: 0; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  color: var(--fg);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, visibility .16s ease;
}
.lightbox.is-open { visibility: visible; opacity: 1; pointer-events: auto; }
.lightbox-topbar {
  position: absolute;
  z-index: 5;
  top: 0; left: 0; right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-pad);
  font-size: 12px;
}
.lightbox-stage {
  position: absolute;
  inset: 64px clamp(48px, 6vw, 96px) 34px;
  margin: 0;
  display: grid;
  place-items: center;
}
.lightbox-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-hit {
  appearance: none;
  position: absolute;
  top: 64px;
  bottom: 0;
  width: 18vw;
  max-width: 210px;
  z-index: 4;
  border: 0;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.lightbox-hit span {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  font-size: 18px;
  transition: opacity .15s ease;
}
.lightbox-hit:hover span, .lightbox-hit:focus-visible span { opacity: 1; }
.lightbox-prev { left: 0; cursor: w-resize; }
.lightbox-next { right: 0; cursor: e-resize; }
.lightbox-prev span { left: var(--page-pad); }
.lightbox-next span { right: var(--page-pad); }
@media (max-width: 700px) {
  .site-header { height: 60px; }
  .intro {
    min-height: 41svh;
    padding-top: 20px;
    padding-bottom: 50px;
  }
  .intro h1 { font-size: clamp(48px, 17vw, 82px); max-width: 8.5ch; }
  .gallery { gap: 4px; padding: 0; }
  .gallery-item { width: 100% !important; height: auto !important; }
  .gallery-item img { width: 100%; height: auto; object-fit: contain; }
  .site-footer {
    grid-template-columns: 1fr auto;
    grid-template-areas: "theme menu" "copyright copyright";
    row-gap: 28px;
    min-height: 142px;
    padding-top: 34px;
  }
  .theme-switch { grid-area: theme; }
  .menu-button { grid-area: menu; }
  .copyright { grid-area: copyright; justify-self: start; color: var(--muted); }
  .lightbox-topbar { height: 56px; }
  .lightbox-stage { inset: 56px 12px 34px; }
  .lightbox-hit { top: 56px; width: 26vw; }
  .lightbox-hit span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
