:root {
  --bg: #0b0b0a;
  --fg: #ecebe7;
  --sub: #8d8c87;
  --line: #262624;
  --pad: clamp(16px, 3.4vw, 48px);
  --hdr: 88px;
  /* typography — option H (chosen 2026-11-18): Rina Yang–style layout, caps only for the name,
     Instrument Sans + Zen Kaku Gothic New. Other options kept in assets/type-*.css.
     Sizes in three steps (Fable review, 11/18): small 12–13 px (labels, nav), body 15–16 px, titles large. */
  --ff-body: "Instrument Sans", "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  --ff-title: var(--ff-body);
  --ff-meta: var(--ff-body);
  --ff-name: var(--ff-body);
  --fw-title: 400; --tt-title: none; --ls-title: 0; --title-scale: .78; --lh-title: 1.25;
  --fw-card: 400;
  --tt-meta: none; --ls-meta: .01em; --fs-meta: 12px;
  --fw-name: 500; --tt-name: uppercase; --ls-name: .14em; --fs-name: 15px;
  --tt-nav: none; --ls-nav: 0; --fs-nav: 13px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--ff-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  word-break: auto-phrase;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
svg { display: block; }

/* shared type roles */
.t-title, .cap .title, .page-title, .item .t, .head h1, .next .t, .bio .who {
  font-family: var(--ff-title); font-weight: var(--fw-title); letter-spacing: var(--ls-title); text-transform: var(--tt-title);
  font-variation-settings: var(--fv-title, normal); line-height: var(--lh-title, 1.12);
}
.t-meta, .cap .count, .cap .meta, .label, .item .m, .head dt, .next .k, .facts dt, footer, .more, .viewer .vx, .viewer .vc, .bio .roles, .cform label, .cform .send {
  font-family: var(--ff-meta); font-size: var(--fs-meta); letter-spacing: var(--ls-meta); text-transform: var(--tt-meta);
  font-variant-numeric: tabular-nums;
}
/* the " x " between names in a title, lifted from the baseline to the middle of the capitals
   (Instrument Sans: capitals .72 em, x-height .51 em) */
.x { position: relative; top: -.1em; }

/* header: hides while scrolling down, comes back on the way up */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px;
  height: var(--hdr); padding: 0 var(--pad);
  color: #fff; transition: transform .35s var(--ease);
}
.hdr.away { transform: translateY(-100%); }
.hdr::before {
  content: ""; position: absolute; inset: 0 0 -48px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
}
.hdr.solid::before { background: var(--bg); inset: 0; }
.hdr.solid { color: var(--fg); }
.hdr .name { display: flex; align-items: baseline; gap: 12px; font-family: var(--ff-name); font-weight: var(--fw-name); font-size: var(--fs-name); letter-spacing: var(--ls-name); text-transform: var(--tt-name); }
.hdr nav { display: flex; gap: 36px; font-family: var(--ff-meta); font-size: var(--fs-nav); letter-spacing: var(--ls-nav); text-transform: var(--tt-nav); }
.hdr nav a { opacity: .85; transition: opacity .2s; }
.hdr nav a:hover, .hdr nav a[aria-current="page"] { opacity: 1; }
@media (max-width: 520px) { .hdr nav { gap: 26px; } }

/* hero (one work at a time) */
.hero { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: #000; color: #fff; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.slide.on { opacity: 1; }
.slide img, .slide video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 32%; pointer-events: none; z-index: 2;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .5));
}
.cap { position: absolute; left: var(--pad); bottom: clamp(32px, 6vh, 60px); z-index: 5; max-width: 70vw; }
.cap .cline { display: flex; align-items: center; gap: 14px; }
.cap .count { opacity: .8; }
.timer { display: block; width: 48px; height: 1px; background: rgba(255, 255, 255, .25); }
.timer i { display: block; height: 100%; width: 0; background: rgba(255, 255, 255, .9); }
.cap .title { display: block; margin: 14px 0 10px; font-size: clamp(26px, 2.6vw, 38px); letter-spacing: -.01em; line-height: 1.1; }
.cap .meta { display: block; opacity: .72; }
.cap.in .title, .cap.in .meta { animation: capin .7s var(--ease) .2s both; }
@keyframes capin { from { opacity: 0; transform: translateY(6px); } }
.ctrl { position: absolute; right: var(--pad); bottom: clamp(32px, 6vh, 60px); z-index: 5; display: flex; gap: 10px; }
.ctrl button, .viewer .vbtn button { display: grid; place-items: center; padding: 10px 6px; background: none; border: 0; cursor: pointer; opacity: .8; transition: opacity .2s; }
.ctrl button:hover, .viewer .vbtn button:hover { opacity: 1; }
.ctrl svg, .viewer .vbtn svg { width: 24px; height: 12px; }

/* sections */
.sec { padding: clamp(80px, 10vw, 140px) var(--pad) 0; }
.page { padding-top: calc(var(--hdr) + clamp(40px, 6vw, 88px)); }
.label { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 28px; color: var(--sub); }
.page-title { margin: 0 0 clamp(40px, 5vw, 64px); font-size: clamp(26px, 2.6vw, 34px); }

/* work cards */
.item { display: block; }
.item .frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ph, #151514); }
.item .frame img { width: 100%; height: 100%; object-fit: cover; }
.item .info { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-top: 12px; }
.item .t { font-weight: var(--fw-card); font-size: 15px; line-height: 1.35; }
.item .m { flex: none; color: var(--sub); }

/* selected works: photobook rhythm (one wide, two halves) */
.sel { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(56px, 7vw, 104px) clamp(16px, 2vw, 28px); }
.sel .wide { grid-column: 1 / -1; }
.more { display: inline-flex; gap: 14px; align-items: center; margin-top: clamp(64px, 8vw, 112px); font-size: 13px; }
.more::after {
  content: ""; width: 24px; height: 12px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M1 6H23M17 .8L23 6L17 11.2' fill='none' stroke='black' stroke-width='1'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M1 6H23M17 .8L23 6L17 11.2' fill='none' stroke='black' stroke-width='1'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* all works */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 24px; }
@media (hover: hover) {
  .grid3 .item { transition: opacity .3s; }
  .grid3:has(.item:hover) .item:not(:hover) { opacity: .55; }
}
@media (max-width: 1100px) { .grid3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .sel { grid-template-columns: 1fr; }
  .item .info { flex-direction: column; gap: 6px; }
  .grid3 { gap: 28px 12px; }
  .grid3 .item .info { margin-top: 10px; }
  .grid3 .item .t { font-size: 13px; }
}

/* work page */
.film { position: relative; width: 100%; max-width: calc((100svh - var(--hdr)) * 16 / 9); margin: var(--hdr) auto 0; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.film[data-mp4], .film[data-vimeo] { cursor: pointer; }
.film > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.film video, .film iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.film .shade { position: absolute; inset: 0; background: rgba(0, 0, 0, .14); }
.play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 72px; height: 72px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 50%; cursor: pointer;
  background: rgba(0, 0, 0, .08); color: #fff; display: grid; place-items: center;
  transition: background .3s, border-color .3s;
}
.film:hover .play { background: rgba(255, 255, 255, .12); border-color: #fff; }
.play svg { width: 15px; height: 18px; margin-left: 3px; }
@media (max-width: 640px) { .play { width: 56px; height: 56px; } .play svg { width: 12px; height: 14px; margin-left: 2px; } }
/* film player: the site's own controls over the bottom of the picture; they fade out while playing */
.film.on { cursor: default; }
.film.on video { cursor: pointer; }
.film.idle, .film.idle video { cursor: none; }
.film:fullscreen { max-width: none; margin: 0; aspect-ratio: auto; }
.vp {
  position: absolute; inset: auto 0 0 0; z-index: 3; padding: 40px clamp(12px, 1.8vw, 24px) 8px;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .55)); color: #fff; transition: opacity .4s;
}
.film.idle .vp { opacity: 0; }
.vp-seek {
  --th: 1px; --p: 0%; --b: 0%;
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 16px; margin: 0;
  background: transparent; cursor: pointer;
}
.vp-seek:hover, .vp-seek:focus-visible { --th: 3px; }
.vp-seek:focus { outline: none; }
.vp-seek::-webkit-slider-runnable-track {
  height: var(--th); border-radius: 2px; transition: height .2s;
  background: linear-gradient(to right, #fff var(--p), rgba(255, 255, 255, .32) var(--p), rgba(255, 255, 255, .32) var(--b), rgba(255, 255, 255, .16) var(--b));
}
.vp-seek::-webkit-slider-thumb {
  -webkit-appearance: none; width: 9px; height: 9px; margin-top: calc((var(--th) - 9px) / 2);
  border: 0; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .2s;
}
.vp-seek:hover::-webkit-slider-thumb, .vp-seek:focus-visible::-webkit-slider-thumb { opacity: 1; }
.vp-seek::-moz-range-track { height: var(--th); border-radius: 2px; background: rgba(255, 255, 255, .16); }
.vp-seek::-moz-range-progress { height: var(--th); border-radius: 2px; background: #fff; }
.vp-seek::-moz-range-thumb { width: 9px; height: 9px; border: 0; border-radius: 50%; background: #fff; opacity: 0; }
.vp-seek:hover::-moz-range-thumb { opacity: 1; }
.vp-row { display: flex; align-items: center; gap: 2px; margin-top: 2px; }
.vp button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; opacity: .85; transition: opacity .2s; }
.vp button:hover, .vp button:focus-visible { opacity: 1; }
.vp button:first-child { margin-left: -8px; }
.vp button:last-child { margin-right: -8px; }
.vp svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linejoin: round; }
.vp svg .f { fill: currentColor; stroke: none; }
.vp-time { margin-left: 6px; font-size: 12px; letter-spacing: .02em; font-variant-numeric: tabular-nums; opacity: .85; }
.vp-gap { flex: 1; }
@media (prefers-reduced-motion: reduce) { .vp, .vp-seek::-webkit-slider-runnable-track { transition: none; } }

.head { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px 48px; align-items: start; padding: clamp(40px, 5vw, 72px) var(--pad) 0; }
.head h1 { margin: 0; font-size: clamp(32px, 5vw, 72px); letter-spacing: -.015em; line-height: 1.05; }
.head dl { display: grid; grid-template-columns: 64px 1fr; align-items: baseline; gap: 14px 16px; margin: 14px 0 0; font-size: 15px; line-height: 1.6; }
.head dt { color: var(--sub); }
.head dd { margin: 0; }
.head .roles span + span::before { content: " / "; color: var(--sub); }
@media (max-width: 800px) { .head { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .head .roles span { display: block; } .head .roles span + span::before { content: none; } }

/* stills: one size, two per row; with an odd count the first one spans the row */
.stills { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 28px); padding: clamp(80px, 10vw, 140px) var(--pad) 0; }
.stills figure { margin: 0; aspect-ratio: var(--ar, 16 / 9); overflow: hidden; background: var(--ph, #151514); }
.stills img { display: block; width: 100%; height: 100%; object-fit: cover; }
.stills .big { grid-column: 1 / -1; margin-bottom: clamp(16px, 3vw, 48px); }
.stills figure.fit { background: none; }               /* a square or upright frame among wide ones: whole, not cropped */
.stills figure.fit img { object-fit: contain; }
.stills.vertical { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .stills { grid-template-columns: 1fr; } .stills.vertical { grid-template-columns: 1fr 1fr; } }

/* next work */
.next { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; margin: clamp(104px, 12vw, 168px) var(--pad) 0; padding-top: 40px; border-top: 1px solid var(--line); }
.next .k { color: var(--sub); }
.next .t { display: block; margin-top: 12px; font-size: calc(clamp(22px, 2.6vw, 36px) * var(--title-scale)); line-height: 1.15; }
.next img { width: min(360px, 34vw); aspect-ratio: 16 / 9; object-fit: cover; }

/* photo: each picture at its own proportions, in columns */
.pgrid { columns: 3; column-gap: clamp(12px, 1.6vw, 24px); }
@media (max-width: 800px) { .pgrid { columns: 2; } }
.pgrid button { display: block; width: 100%; margin: 0 0 clamp(12px, 1.6vw, 24px); padding: 0; border: 0; background: var(--ph, #151514); cursor: zoom-in; break-inside: avoid; }
.pgrid img { width: 100%; height: auto; }
.viewer { position: fixed; inset: 0; z-index: 60; display: none; background: var(--bg); }
.viewer.on { display: block; }
.viewer img { position: absolute; left: 0; right: 0; top: var(--hdr); bottom: 88px; margin: auto; max-width: calc(100% - 2 * var(--pad)); max-height: calc(100% - var(--hdr) - 88px); object-fit: contain; }
.viewer .vc { position: absolute; left: var(--pad); bottom: 34px; }
.viewer .vbtn { position: absolute; bottom: 24px; right: var(--pad); display: flex; gap: 10px; }
.viewer .vx { position: absolute; top: 18px; right: var(--pad); background: none; border: 0; cursor: pointer; padding: 6px; opacity: .85; }

/* about */
.about2 { display: grid; grid-template-columns: 300px 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; max-width: 1180px; }
.about2 .portrait { margin: 0; }
.about2 .portrait img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.bio .who { margin: 0; font-size: calc(clamp(32px, 4vw, 52px) * var(--title-scale)); line-height: 1.1; }
.bio .roles { margin: 28px 0 40px; text-wrap: balance; }
/* Japanese ragged-right, broken between phrases (justifying split 2025｜年 and 次な｜る, or spaced letters out) */
.bio .ja { max-width: 38em; margin: 0 0 24px; font-size: 15px; line-height: 1.9; text-wrap: pretty; }
.bio .en { max-width: 42em; margin: 0 0 48px; font-size: 14px; line-height: 1.8; color: var(--fg); opacity: .8; }
.facts { display: grid; grid-template-columns: 110px 1fr; gap: 14px 16px; max-width: 42em; margin: 0; padding-top: 28px; border-top: 1px solid var(--line); font-size: 14px; }
.facts dt { padding-top: 2px; color: var(--sub); }
.facts dd { margin: 0; }
.facts a { border-bottom: 1px solid var(--sub); }
@media (max-width: 800px) { .about2 { grid-template-columns: 1fr; } .about2 .portrait { width: 200px; } }

/* footer */
footer { display: flex; justify-content: space-between; gap: 24px; margin-top: clamp(104px, 12vw, 168px); padding: 28px var(--pad) 40px; border-top: 1px solid var(--line); color: var(--sub); font-size: 13px; }
footer nav { display: flex; gap: 24px; }
@media (max-width: 520px) { footer { flex-direction: column-reverse; gap: 16px; } }   /* four links and the © no longer fit on one line */

/* contact form */
.contact { padding-bottom: clamp(104px, 12vw, 168px); }
.cform { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 32px; max-width: 760px; }
.cform .f { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cform .full { grid-column: 1 / -1; }
.cform label { color: var(--sub); }
.cform input, .cform textarea {
  width: 100%; padding: 8px 0 10px; border: 0; border-bottom: 1px solid rgba(236, 235, 231, .24); border-radius: 0;
  background: transparent; color: var(--fg); font-family: var(--ff-body); font-size: 16px; line-height: 1.6; outline: none;
  transition: border-color .2s;
}
.cform input:focus, .cform textarea:focus { border-color: var(--fg); }
.cform input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px var(--bg) inset; -webkit-text-fill-color: var(--fg); }
.cform textarea { min-height: 220px; max-height: 70vh; resize: none; field-sizing: content; }   /* grows with the text where supported */
.cform .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cform .send {
  flex: none; padding: 14px 44px; border: 1px solid rgba(236, 235, 231, .4); background: none; color: var(--fg);
  font-size: 13px; cursor: pointer; transition: background .2s, color .2s, opacity .2s;
}
@media (hover: hover) { .cform .send:hover { background: var(--fg); color: var(--bg); } }   /* no sticky fill after a tap on phones */
.cform .send:disabled { opacity: .4; cursor: default; background: none; color: var(--fg); }
.cform .actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.cform .status { font-size: 15px; line-height: 1.9; }
.cform .status:empty { display: none; }
.cform .status p { margin: 0; }
.cform .status .en { color: var(--sub); font-size: 14px; }
.cform .status.err p:first-child { color: #e6a395; }
.cform.sent .f, .cform.sent .send { display: none; }
@media (max-width: 640px) { .cform { grid-template-columns: 1fr; gap: 32px; } }
/* not found (404) */
.nf { padding-bottom: clamp(104px, 12vw, 168px); }
.nf p { margin: 0; font-size: 15px; line-height: 1.9; }
.nf .en { color: var(--sub); font-size: 14px; }
.nf .more { margin-top: 48px; }   /* close to the two lines above, not the home page's long gap */
/* a short page: keep the footer at the bottom of the screen */
body:has(.contact), body:has(.nf) { display: flex; flex-direction: column; min-height: 100svh; }
body:has(.contact) footer, body:has(.nf) footer { margin-top: auto; }

/* motion: pictures come in softly as they load; pages cross-fade where the browser supports it */
.js .fade { opacity: 0; transition: opacity .8s var(--ease); }
.js .fade.in { opacity: 1; }
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
  .slide, .hdr, .js .fade { transition: none; }
  .cap.in .title, .cap.in .meta { animation: none; }
  @view-transition { navigation: none; }
}
