@font-face {
  font-family: Marcellus;
  src: url("fonts/Marcellus-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Light.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans JP";
  src: url("fonts/NotoSansJP.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fefefe;
  --band: #f9f9f9;
  --ink: #202020;
  --muted: #575757;
  --rule: #ccc;
  --gutter: clamp(28px, 8.3333vw, 120px);
  --content: 1200px;
  --band-height: 80px;
  --top-band: calc(var(--band-height) + env(safe-area-inset-top));
  --bottom-band: calc(var(--band-height) + env(safe-area-inset-bottom));
  --serif: Marcellus, Georgia, serif;
  --numerals: "IBM Plex Mono", ui-monospace, monospace;
  --jp: "Noto Sans JP", "Hiragino Sans", sans-serif;
  --tracking: 0.14em;
  --project-heading-space: 36px;
  --detail-copy-size: 0.625rem;
  scroll-padding-block: calc(var(--top-band) + 8px) calc(var(--bottom-band) + 8px);
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: var(--top-band) var(--bottom-band);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-synthesis: none;
}
h1, h2, p, dl, dd, figure { margin: 0; }
h1, h2 { font-weight: 400; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.25em; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.jp { font-family: var(--jp); }
.mono { font-family: var(--numerals); font-weight: 300; font-variant-numeric: tabular-nums; }
.shell { width: min(calc(100% - 2 * var(--gutter)), var(--content)); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 4;
  top: -100px;
  left: 12px;
  padding: 10px 14px;
  background: white;
  color: #202020;
  font-family: var(--jp);
}
.skip-link:focus { top: 12px; }

.site-header, .site-footer {
  position: fixed;
  z-index: 3;
  inset-inline: 0;
  background: var(--band);
  border-color: var(--rule);
  border-style: solid;
}
.site-header { top: 0; padding-top: env(safe-area-inset-top); border-width: 0 0 1px; }
.site-footer { bottom: 0; padding-bottom: env(safe-area-inset-bottom); border-width: 1px 0 0; }
.header-inner, .footer-inner {
  min-height: calc(var(--band-height) - 1px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.header-inner a, .contact { font-size: 1.25rem; letter-spacing: var(--tracking); white-space: nowrap; }
.header-inner nav { display: flex; gap: clamp(14px, 2.6vw, 36px); }
.header-inner a, .contact a, .project-back a { text-decoration: none; }
.header-inner a:hover, .contact a:hover, .header-inner a[aria-current] { opacity: 0.68; }
.footer-inner small { font-size: 0.75rem; letter-spacing: var(--tracking); text-align: right; }

.hero {
  min-height: 386px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  text-align: center;
}
.hero h1 { font-size: 1.75rem; letter-spacing: var(--tracking); }
.hero p { font-size: 1.25rem; letter-spacing: var(--tracking); }
.work-list { list-style: none; padding: 0; margin: 0; }
.work-list li { border-top: 1px solid var(--rule); }
.work-list li:last-child { border-bottom: 1px solid var(--rule); }
.work-link {
  min-height: 79px;
  display: grid;
  grid-template-columns: 18.17% 39.4% minmax(0, 1fr) 8ch;
  padding-inline: max(var(--gutter), calc((100% - var(--content)) / 2));
  align-items: center;
  font-size: 1rem;
  letter-spacing: var(--tracking);
  text-decoration: none;
  transition: background-color 540ms ease;
}
.work-number, .work-title { text-align: left; }
.work-title { overflow-wrap: anywhere; padding-right: 16px; }
.work-role { text-align: right; padding-right: clamp(18px, 3.25vw, 48px); }
.work-role .jp { letter-spacing: 0.04em; }
.work-date { text-align: right; white-space: nowrap; }
.work-link:focus-visible { outline-offset: -4px; }
.work-link:not(.work-link--preview):is(:hover, :focus-visible) { background-color: var(--band); }
.home-preview { display: none; }

.page-home { isolation: isolate; }
.page-home > .home { position: relative; z-index: 1; }
@media (hover: hover) and (pointer: fine) {
  .home-preview {
    position: fixed;
    z-index: 0;
    inset: 0;
    display: block;
    pointer-events: none;
    opacity: 0;
    background: #f3efe9;
    transition: opacity 580ms ease-in-out;
  }
  .home-preview img { width: 100%; height: 100%; object-fit: cover; object-position: center 53%; }
  .home-preview::after { content: ""; position: absolute; inset: 0; background: rgb(253 250 245 / 57%); }
  .page-home :is(.site-header, .site-footer) { transition: background-color 540ms ease; }
  .page-home:has(.work-link--preview:is(:hover, :focus-visible)) {
    --band: rgb(251 249 246 / 42%);
  }
  .page-home:has(.work-link--preview:is(:hover, :focus-visible)) .home-preview {
    opacity: 1;
    transition-delay: 110ms;
  }
  .page-home:has(.work-link--preview:is(:hover, :focus-visible)) :is(.site-header, .site-footer) { transition-delay: 110ms; }
  .work-link--preview { position: relative; }
  .work-link--preview::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgb(255 253 249 / 42%);
    -webkit-backdrop-filter: blur(17px) saturate(87%);
    backdrop-filter: blur(17px) saturate(87%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 540ms ease;
  }
  .work-link--preview:is(:hover, :focus-visible)::before {
    opacity: 1;
    transition-delay: 160ms;
  }
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  column-gap: clamp(36px, 5.5556vw, 80px);
  padding-block: clamp(46px, 5.5556vw, 80px);
}
.project-layout--summary { min-height: min(600px, 72vh); }
.project-copy {
  position: sticky;
  top: calc(var(--top-band) + clamp(18px, 6vh, 80px));
  align-self: start;
  min-width: 0;
}
.project-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) max-content;
  align-items: baseline;
  gap: 32px;
}
.project-heading h1 { font-size: 1rem; line-height: 1.55; letter-spacing: var(--tracking); }
.project-number, .project-date { font-size: 0.75rem; letter-spacing: var(--tracking); }
.project-information { margin: var(--project-heading-space) 0 0 80px; max-width: 372px; }
.project-facts { display: grid; gap: 24px; }
.field-label {
  font: 400 0.75rem/1.45 var(--serif);
  letter-spacing: var(--tracking);
  margin-bottom: 6px;
}
.project-facts dd { font-size: 0.75rem; line-height: 1.7; }
.project-intent, .project-link { margin-top: 24px; }
.project-intent p, figcaption p { font-size: var(--detail-copy-size); line-height: 1.85; }
.project-link a {
  display: inline-flex;
  gap: 0.55em;
  align-items: baseline;
  text-decoration: none;
  font-size: 0.625rem;
  line-height: 1.55;
}
.soft-underline {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.29em;
  transition: text-decoration-color 300ms ease-in-out;
}
a:is(:hover, :focus-visible).soft-underline,
a:is(:hover, :focus-visible) > .soft-underline { text-decoration-color: currentColor; }
.external-icon { flex: none; font: 0.75rem system-ui, sans-serif; }
.project-back { margin-top: var(--project-heading-space); font-size: 0.75rem; letter-spacing: 0.08em; }
.project-back a { color: var(--muted); text-decoration-line: underline; }
.project-back--after-gallery, .project-title-photo { display: none; }
.adjacent-works {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
  border-top: 1px solid var(--rule);
}
.adjacent-works a {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 64px;
  padding-block: 16px;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.adjacent-works a[rel="prev"] { grid-column: 1; grid-row: 1; justify-items: start; }
.adjacent-works a[rel="next"] { grid-column: 2; grid-row: 1; justify-items: end; text-align: right; }
.adjacent-label { font-size: 0.75rem; color: var(--muted); }
.adjacent-works .soft-underline { overflow-wrap: anywhere; }
.project-gallery { display: grid; gap: 40px; }
.project-gallery figure { min-width: 0; }
.figure--portrait { width: min(100%, 390px); }
.figure-image { display: block; }
.figure-image img { width: 100%; height: auto; border: 1px solid #e5e3df; }
figcaption { margin-top: 11px; font-family: var(--jp); }
figcaption h2 { font-size: 0.8125rem; font-weight: 500; margin-bottom: 4px; }
figcaption p { color: var(--muted); }

html:has(.image-viewer[open]) { overflow: hidden; }
.image-viewer {
  max-width: min(1200px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  max-height: calc(100dvh - 24px);
  padding: 8px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
}
.image-viewer::backdrop { background: rgb(28 24 21 / 65%); }
.image-viewer form { display: flex; justify-content: end; padding-bottom: 6px; }
.image-viewer button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--paper);
  color: inherit;
  font: 1.5rem/1 system-ui, sans-serif;
  cursor: pointer;
}
.image-viewer img { max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); object-fit: contain; margin-inline: auto; }

@media (min-width: 761px) {
  .page-home .footer-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }
  .page-home .footer-inner small { text-align: center; }
}
@media (max-width: 960px) and (min-width: 761px) {
  .project-heading { gap: 16px; }
  .project-information { margin-inline-start: 64px; }
}
@media (max-width: 760px) {
  :root { --gutter: 24px; --band-height: 64px; --project-heading-space: 26px; --detail-copy-size: 0.75rem; }
  .header-inner a, .contact { font-size: 1rem; }
  .footer-inner { align-items: baseline; padding-block: 20px; }
  .footer-inner small { font-size: 0.5rem; }
  .home .hero { margin-bottom: 54px; }
  .hero { min-height: 286px; }
  .work-link {
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-rows: auto auto;
    row-gap: 3px;
    min-height: 63px;
    align-content: center;
    padding-block: 8px;
    font-size: 0.75rem;
  }
  .work-number { grid-area: 1 / 1; align-self: start; }
  .work-title { grid-area: 1 / 2; padding-right: 0; }
  .work-role { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 0; }
  .work-date { grid-area: 2 / 2; }
  .project-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; padding-block: 26px 40px; }
  .project-copy { position: static; }
  .adjacent-works { display: none; }
  .project-information { margin-inline-start: 0; max-width: none; }
  .project-heading { grid-template-columns: 24px minmax(0, 1fr) max-content; gap: 10px; }
  .project-heading h1 { font-size: 0.875rem; letter-spacing: 0.08em; }
  .project-link a { font-size: 0.75rem; }
  .project-layout:has(.project-title--preview) { padding-block-start: 0; }
  .project-title--preview {
    position: relative;
    display: grid;
    align-items: end;
    min-height: calc(100vh - var(--top-band) - var(--bottom-band));
    min-height: calc(100svh - var(--top-band) - var(--bottom-band));
    margin-inline: calc(-1 * var(--gutter));
  }
  .project-title-photo {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 62% center;
  }
  .project-title--preview .project-heading {
    position: relative;
    padding: 16px var(--gutter);
    background: rgb(254 252 249 / 76%);
    -webkit-backdrop-filter: blur(17px) saturate(87%);
    backdrop-filter: blur(17px) saturate(87%);
  }
  .project-back--in-copy { display: none; }
  .project-back--after-gallery { display: block; margin-top: 0; }
  .project-gallery { gap: 28px; }
}
@media (max-width: 350px) {
  :root { --gutter: 16px; }
  .header-inner a { font-size: 0.875rem; letter-spacing: 0.08em; }
  .header-inner nav { gap: 10px; }
  .footer-inner small { letter-spacing: 0.09em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; }
  .home-preview, .work-link--preview::before { display: none; }
  .page-home:has(.work-link--preview:is(:hover, :focus-visible)) { --band: #f9f9f9; }
  .work-link--preview:is(:hover, :focus-visible) { background-color: var(--band); }
}
