:root {
  color-scheme: light;
  --paper: #f6f3eb;
  --ink: #20251e;
  --muted: #555d50;
  --line: #cbcfc1;
  --accent: #355537;
  --serif: "Instrument Serif", "Songti SC", "Noto Serif CJK SC", "Noto Serif SC", Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 "Inter", system-ui, "PingFang SC", sans-serif; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid #628f5f; outline-offset: 4px; }
h1, h2, h3, h4, p, figure { margin: 0; }
.masthead, main, .footer { width: min(1360px, calc(100% - 10vw)); margin-inline: auto; }
.masthead { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.brand { font-size: 17px; font-weight: 750; }
.brand span { margin-inline-start: 10px; font-size: 10px; letter-spacing: .14em; color: var(--muted); }
nav { display: flex; gap: clamp(14px, 3vw, 42px); }
nav span { margin-inline-start: 4px; font-size: 12px; color: var(--muted); }
nav a:hover, .footer a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }
.hero { display: grid; grid-template-columns: .75fr 1.25fr; align-items: center; gap: 4vw; padding: clamp(30px, 6vw, 88px) 0; }
.label { font-size: 11px; font-weight: 650; letter-spacing: .16em; color: var(--accent); }
h1 { margin-block: 22px 28px; font: 500 clamp(40px, 6vw, 92px)/1.13 var(--serif); letter-spacing: -.045em; }
.hero-actions { display: flex; align-items: center; gap: clamp(12px, 2.1vw, 28px); flex-wrap: wrap; font-weight: 600; font-size: 13px; }
.hero-actions a { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.hero-actions .primary { padding: 9px 16px; background: var(--accent); color: white; }
.hero-actions a:hover { text-decoration: underline; text-underline-offset: 4px; }
.cover { aspect-ratio: 1.31; background: #d7ddce; }
.cover img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 65% center; }
section { scroll-margin-top: 18px; }
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 20px; padding: 23px 0; border-top: 1px solid var(--ink); }
.section-heading h2 { font: 500 clamp(29px, 4.2vw, 52px)/1.2 var(--serif); }
.section-heading h2 span { margin-left: 8px; font: 400 .57em var(--serif); color: var(--muted); }
.section-heading p { font-size: 12px; color: var(--muted); }
.year-group { display: grid; grid-template-columns: minmax(115px, 1fr) minmax(0, 6fr); gap: 16px 26px; border-top: 1px solid var(--line); padding: 20px 0 25px; }
.year-group h4 { font: 500 clamp(25px, 3.4vw, 46px)/1.05 var(--serif); font-variant-numeric: lining-nums; }
.year-group:last-child h3 { font-size: clamp(17px, 1.8vw, 25px); }
.year-group h4 span { display: block; margin-top: 6px; font: 400 11px/1.4 system-ui, sans-serif; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(8px, 1.2vw, 18px); }
.gallery a { display: block; aspect-ratio: 4/3; overflow: hidden; background: #e0e3d8; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.gallery a:hover img { transform: scale(1.035); }
#film { display: grid; grid-template-columns: 1fr 2.25fr; gap: 24px; align-items: center; margin: 32px 0; padding: clamp(20px, 4vw, 52px); background: #252d25; color: var(--paper); }
.film-copy .label { color: #bdd1b4; }
.film-copy h2 { margin: 13px 0; font: 500 clamp(24px, 3.3vw, 48px)/1.2 var(--serif); }
.runtime { color: #d4ded0; font-size: 13px; }
video { width: 100%; display: block; aspect-ratio: 16/9; background: #151a15; }
.footer { display: flex; justify-content: end; padding: 18px 0 34px; border-top: 1px solid var(--line); font-size: 13px; }
dialog { width: min(1050px,94vw); max-height: 94dvh; margin: auto; background: #242b23; color: var(--paper); border: 1px solid #596554; padding: 12px; }
dialog::backdrop { background: #11170fee; }
dialog figure { display: grid; place-items: center; height: min(74dvh,690px); }
dialog img { max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; }
.viewer-bar button { background: transparent; border: 1px solid #596554; color: inherit; min-width: 44px; min-height: 40px; font: inherit; font-size: 22px; cursor: pointer; }
@media (max-width: 760px) {
  .hero, #film { grid-template-columns: 1fr; }
  .hero { gap: 24px; }
  h1 { margin-block: 12px 18px; }
  .cover { aspect-ratio: 1.56; }
  .year-group { grid-template-columns: 1fr; gap: 12px; }
  .gallery { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 430px) { .masthead { min-height: 60px; } nav span { display: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .gallery img { transition: none; } }

.photo-category + .photo-category { margin-top: 24px; }
.photo-category h3 { margin: 0 0 14px; font: 500 clamp(23px, 3.2vw, 36px)/1.2 var(--serif); }
.photo-nav { gap: 14px; font-size: 13px; color: var(--accent); flex-wrap: wrap; }

.about {
  display: flex;
  align-items: center;
  min-height: clamp(350px, 43vw, 550px);
  margin-block: clamp(20px, 4vw, 56px);
  padding: clamp(24px, 6vw, 88px);
  border: 1px solid var(--line);
  background-color: #e9ebdf;
  background-image:
    linear-gradient(90deg, rgb(246 243 235 / .98) 4%, rgb(246 243 235 / .94) 35%, rgb(246 243 235 / .48) 100%),
    url("media/photo-17.webp");
  background-size: cover;
  background-position: center, 65% 47%;
}
.about h1 { margin-block: 12px 16px; }
.about-intro { max-width: 37ch; margin-bottom: 22px; font-size: clamp(16px, 2vw, 20px); }
@media (max-width: 540px) {
  .about {
    background-image:
      linear-gradient(90deg, rgb(246 243 235 / .97), rgb(246 243 235 / .80)),
      url("media/photo-17.webp");
    background-position: center, 68% center;
  }
  .masthead nav { gap: 10px; font-size: 13px; }
}

/* Align prints within each row while retaining their original proportions. */
#photos .section-heading { margin-bottom: 6px; }
.photo-category {
  padding: clamp(18px, 3vw, 36px);
  background: #eeeee5;
  border: 1px solid var(--line);
}
.photo-category h3 { margin-bottom: clamp(18px, 3vw, 32px); }
.year-group { grid-template-columns: minmax(76px, 1fr) minmax(0, 9fr); padding-block: 18px 28px; }
.year-group:last-child { padding-bottom: 0; }
.year-group h4, .year-group:last-child h4 {
  font: 600 13px/1.5 "Inter", system-ui, sans-serif;
  color: var(--muted);
  letter-spacing: .04em;
}
.gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(12px, 2vw, 24px); }
.photo-row { display: flex; gap: clamp(8px, 1.8vw, 22px); align-items: flex-start; }
.photo-row-1 { width: min(100%, 660px); }
.photo-row-2 { width: min(100%, 900px); }
.gallery .print {
  flex: var(--ratio) 1 0%;
  min-width: 0;
  aspect-ratio: auto;
  padding: clamp(3px, .65vw, 8px);
  background: #fcfaf4;
  border: 1px solid #d8dbcc;
  box-shadow: 0 3px 7px rgb(32 37 30 / .07);
}
.gallery .print img { height: auto; }
.gallery .print:hover { border-color: var(--accent); }
.gallery .print:hover img { transform: none; }
@media (max-width: 640px) {
  .year-group { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .photo-row { flex-wrap: wrap; }
  .gallery .print { flex: 1 1 calc(45% - 8px); align-self: flex-start; }
  .photo-row-3 .print:last-child { flex-grow: 0; }
  .photo-row-1 .print { flex-basis: 100%; }
}
.print-01 { --ratio: 1.33333; }
.print-02 { --ratio: 1.49901; }
.print-03 { --ratio: 1.33333; }
.print-04 { --ratio: 0.75000; }
.print-05 { --ratio: 1.77570; }
.print-06 { --ratio: 1.77570; }
.print-07 { --ratio: 0.56184; }
.print-08 { --ratio: 1.77570; }
.print-09 { --ratio: 0.75000; }
.print-10 { --ratio: 1.33333; }
.print-11 { --ratio: 0.75000; }
.print-12 { --ratio: 0.56316; }
.print-13 { --ratio: 0.56184; }
.print-14 { --ratio: 0.56184; }
.print-15 { --ratio: 2.22222; }
.print-16 { --ratio: 0.56184; }
.print-17 { --ratio: 1.33333; }
.print-18 { --ratio: 1.77156; }

@media (prefers-reduced-motion: no-preference) {
  .about-copy { animation: enter-frame .65s cubic-bezier(.22, 1, .36, 1) both; }
  .has-arrived {
    animation: enter-frame .62s cubic-bezier(.22, 1, .36, 1) both;
  }
  dialog[open] {
    animation: viewer-enter .24s cubic-bezier(.22, 1, .36, 1) both;
  }
  .gallery .print {
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
  }
  .hero-actions a, .viewer-bar button {
    transition: background-color .18s ease, color .18s ease;
  }
  @media (hover: hover) and (pointer: fine) {
    .gallery .print:hover {
      transform: translateY(-4px);
      box-shadow: 0 10px 22px rgb(32 37 30 / .13);
    }
  }
}

.gallery .print:focus-visible { border-color: var(--accent); }
.hero-actions .primary:hover, .hero-actions .primary:focus-visible { background-color: #28462a; }
.viewer-bar button:hover, .viewer-bar button:focus-visible { background-color: #3c493a; }
body:has(dialog[open]) { overflow: hidden; }

@keyframes enter-frame {
  from { opacity: .25; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes viewer-enter {
  from { opacity: 0; transform: translateY(6px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
