/* Tsuyoshi Watanabe portfolio styles */
@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Mrs+Saint+Delafield&family=Zen+Old+Mincho:wght@400;500&display=swap');
:root {
  --ink: #000;
  --soft: #ededed;
  --muted: #7f7f7f;
  --serif: 'Amiri',serif;
  --script: 'Mrs Saint Delafield',cursive;
  --jp: 'Zen Old Mincho',serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: var(--serif);
}

body.is-locked {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}

img {
  display: block;
  max-width: 100%;
}

button {
  color: inherit;
  font: inherit;
  touch-action: manipulation;
}

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: transparent;
  transition: background-color .25s ease;
}

.header.is-scrolled,
.header.is-menu-open {
  background: #fff;
}

.header__main {
  min-height: 62px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 22px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 40px;
  font-size: 14px;
  letter-spacing: .12em;
}

.nav a {
  position: relative;
}

.nav>a:not(.instagram):after {
  content: '';
  position: absolute;
  left: -8px;
  right: -8px;
  top: 50%;
  height: 1px;
  background: #000;
  transform: scaleX(0);
  transition: transform .28s ease;
}

.nav>a:hover:after, .nav>a.active:after {
  transform: scaleX(1);
}

.instagram {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.instagram svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.instagram .dot {
  fill: currentColor;
  stroke: none;
}

.breadcrumb {
  padding: 10px 20px 20px;
  display: flex;
  gap: 10px;
  font-size: 12px;
  letter-spacing: .12em;
}

.breadcrumb a:first-child {
  color: var(--muted);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #fff;
  pointer-events: none;
  animation: intro-away .7s cubic-bezier(.65,0,.35,1) 2.35s forwards;
}

.intro[hidden] {
  display: none;
}

.intro__name {
  font-family: var(--script);
  font-size: clamp(38px,3.5vw,50px);
  letter-spacing: .27em;
  white-space: nowrap;
  opacity: 0;
  animation: intro-name 2.1s ease forwards;
}

body.intro-seen .intro {
  display: none;
}

@keyframes intro-name {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }

  28%,67% {
    opacity: 1;
    transform: none;
  }

  100% {
    opacity: 0;
    transform: translateY(-5px);
  }

}

@keyframes intro-away {
  to {
    opacity: 0;
    visibility: hidden;
  }

}

.hero {
  min-height: calc(100svh - 62px);
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 29px 20px 80px;
  overflow: hidden;
}

.hero__portrait {
  height: min(66.3svh,546px);
  width: auto;
  max-width: 50vw;
  object-fit: contain;
}

.hero__name {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 48px;
  margin: 0;
  font-family: var(--script);
  font-size: clamp(78px,11.1vw,160px);
  font-weight: 400;
  letter-spacing: .27em;
  line-height: .75;
  white-space: nowrap;
  text-align: center;
}

.hero__role {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 15px;
  letter-spacing: .12em;
}

.categories {
  padding: 80px 0;
  background: var(--soft);
}

h2 {
  margin: 0;
  padding: 0 20px;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: .12em;
}

.category-grid {
  margin-top: 50px;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  align-items: start;
  gap: clamp(30px,6vw,95px);
}

.category-card {
  text-align: center;
}

.category-card__image {
  height: 270px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.category-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .25s ease,transform .5s cubic-bezier(.2,.65,.3,1);
}

.category-card:hover img {
  opacity: .72;
  transform: scale(1.018);
}

.category-card>span:last-child {
  display: block;
  margin-top: 20px;
  font-size: 14px;
  letter-spacing: .12em;
  white-space: nowrap;
}

.profile-section {
  padding: 85px 0 120px;
}

.profile {
  width: min(840px,calc(100% - 40px));
  margin: 50px auto 0;
  font-family: var(--jp);
}

.profile__heading {
  font-size: 18px;
  line-height: 2;
  letter-spacing: .04em;
}

.profile__heading small {
  display: block;
  font-size: 12px;
}

.profile__body {
  border-top: 1px solid;
  margin-top: 60px;
  padding-top: 60px;
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: .03em;
  white-space: pre-line;
}

.contact-grid {
  margin-top: 60px;
  padding: 40px 0;
  border-top: 1px solid;
  border-bottom: 1px solid;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  font-size: 14px;
  line-height: 1.7;
}

.profile__contact-intro {
  margin: 60px 0 0;
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: .03em;
}

.contact-grid a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

footer {
  padding: 20px 10px;
  text-align: center;
  font-size: 12px;
  letter-spacing: .12em;
}

.archive-hero {
  min-height: calc(100svh - 102px);
  display: flex;
  flex-direction: column;
}

.mosaic {
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
}

.mosaic__item {
  height: 140px;
  flex: 1 0 105px;
  overflow: hidden;
}

.mosaic__item:nth-child(5n+1), .mosaic__item:nth-child(7n+3) {
  flex-basis: 190px;
}

.mosaic__item img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: filter .25s ease,opacity .25s ease,transform .5s ease;
}

.mosaic__item:hover img {
  filter: grayscale(1);
  opacity: .76;
  transform: scale(1.02);
}

.archive-meta {
  margin-top: auto;
  padding: 16px 40px 30px;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  letter-spacing: .12em;
}

.detail {
  min-height: calc(100svh - 102px);
  position: relative;
  display: flex;
  flex-direction: column;
}

.viewer {
  flex: 1;
  min-height: 620px;
  position: relative;
}

.slide {
  position: absolute;
  inset: 20px 20px 50px;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .45s ease;
}

.slide.active {
  opacity: 1;
}

.slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.viewer-hit {
  position: absolute;
  top: 0;
  bottom: 50px;
  width: 50%;
  z-index: 4;
  border: 0;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.viewer-hit--prev {
  left: 0;
}

.viewer-hit--next {
  right: 0;
}

.viewer-meta {
  padding: 12px 40px 28px;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  letter-spacing: .12em;
}

.cursor {
  position: fixed;
  z-index: 200;
  width: 58px;
  height: 58px;
  border: 1px solid #000;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  letter-spacing: .12em;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%,-50%) scale(.7);
  transition: opacity .2s,transform .2s,background-color .2s,color .2s;
  mix-blend-mode: difference;
  color: #fff;
  border-color: #fff;
}

.cursor.visible {
  opacity: 1;
  transform: translate(-50%,-50%) scale(1);
}

.cursor.emphasis {
  background: #fff;
  color: #000;
}

.cursor-prev, .cursor-next, .cursor-view, .mosaic__item {
  cursor: none;
}

@media(max-width:700px) {
  .header__main {
    min-height: 36px;
    padding: 13px 10px;
  }

  .brand {
    font-size: 15px;
  }

  .nav {
    position: fixed;
    inset: 36px 0 0;
    z-index: 40;
    flex-direction: column;
    justify-content: center;
    gap: 82px;
    background: #fff;
    font-size: 15px;
    transform: translateY(-110%);
    transition: transform .55s cubic-bezier(.76,0,.24,1);
  }

  .nav.open {
    transform: none;
  }

  .menu-toggle {
    display: block;
    width: 21px;
    height: 15px;
    position: relative;
  }

  .menu-toggle:before, .menu-toggle:after {
    content: '';
    position: absolute;
    left: 0;
    width: 21px;
    height: 1px;
    background: #000;
    transition: .3s;
  }

  .menu-toggle:before {
    top: 3px;
  }

  .menu-toggle:after {
    top: 11px;
  }

  .menu-toggle[aria-expanded=true]:before {
    top: 7px;
    transform: rotate(45deg);
  }

  .menu-toggle[aria-expanded=true]:after {
    top: 7px;
    transform: rotate(-45deg);
  }

  .breadcrumb {
    display: none;
  }

  .intro__name {
    font-size: 24px;
    max-width: 94vw;
  }

  .hero {
    min-height: calc(100svh - 36px);
    padding: 30px 10px 72px;
    align-items: center;
  }

  .hero__portrait {
    width: min(74vw,290px);
    height: auto;
    max-height: 64svh;
    max-width: none;
  }

  .hero__name {
    bottom: 44px;
    font: 400 17px var(--serif);
    letter-spacing: .12em;
    text-transform: uppercase;
  }

  .hero__role {
    bottom: 24px;
    font-size: 9px;
  }

  .categories {
    padding: 40px 0;
  }

  h2 {
    padding: 0 10px;
    font-size: 14px;
  }

  .category-grid {
    margin-top: 30px;
    padding: 0 20px;
    grid-template-columns: 1fr 1fr;
    gap: 22px 21px;
  }

  .category-card__image {
    height: auto;
    aspect-ratio: 160/210;
  }

  .category-card>span:last-child {
    margin-top: 10px;
    font-size: 10px;
  }

  .profile-section {
    padding: 50px 0 60px;
  }

  .profile {
    width: calc(100% - 20px);
    margin-top: 30px;
  }

  .profile__heading {
    font-size: 14px;
  }

  .profile__body {
    margin-top: 40px;
    padding-top: 40px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    font-size: 12px;
  }

  .profile__contact-intro {
    margin-top: 40px;
  }

  .archive-hero {
    min-height: calc(100svh - 36px);
  }

  .mosaic {
    padding: 10px;
    gap: 8px;
  }

  .mosaic__item {
    height: 110px;
    flex-basis: 75px;
  }

  .mosaic__item:nth-child(5n+1), .mosaic__item:nth-child(7n+3) {
    flex-basis: 145px;
  }

  .archive-meta, .viewer-meta {
    padding: 14px 10px 24px;
    font-size: 10px;
  }

  .detail {
    min-height: calc(100svh - 36px);
  }

  .viewer {
    min-height: calc(100svh - 110px);
  }

  .slide {
    inset: 20px 10px 45px;
  }

  .cursor {
    display: none;
  }

  .cursor-prev, .cursor-next, .cursor-view, .mosaic__item {
    cursor: pointer;
  }

}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }

  *,*:before,*:after {
    animation-duration: .01ms!important;
    animation-delay: 0ms!important;
    transition-duration: .01ms!important;
  }

}

.mosaic__item {
  display: block;
}

@media (min-width:701px) and (max-width:1300px) {
  .brand {
    font-size: 18px;
  }

  .nav {
    gap: 28px;
    font-size: 12px;
  }

}

.viewer-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.viewer-actions a {
  position: relative;
}

.viewer-actions a:after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: #000;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s ease;
}

.viewer-actions a:hover:after {
  transform: scaleX(1);
  transform-origin: left;
}

.detail-page {
  padding-top: 102px;
  overflow-x: hidden;
}

.detail-page .header {
  position: fixed;
  inset: 0 0 auto;
  height: 102px;
}

.detail-page .header__main {
  height: 62px;
  min-height: 62px;
}

.detail-page .brand, .detail-page .nav {
  line-height: 1;
}

.detail-page .breadcrumb {
  height: 40px;
  padding: 10px 20px;
  align-items: center;
}

.detail-page .detail {
  height: calc(100svh - 102px);
  min-height: 0;
}

.detail-page .viewer {
  min-height: 0;
}

.detail-page .slide {
  inset: 0 20px 24px;
  margin: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.detail-page .slide img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: calc(100vw - 150px);
  max-height: 100%;
  object-fit: contain;
}

.detail-page .viewer-hit {
  top: 0;
  bottom: 0;
}

.detail-page .viewer-meta {
  flex: 0 0 auto;
  min-height: 44px;
  padding-top: 8px;
  padding-bottom: 18px;
}

@media(max-width:700px) {
  .detail-page {
    padding-top: 66px;
  }

  .detail-page .header {
    height: 66px;
  }

  .detail-page .header__main {
    height: 36px;
    min-height: 36px;
    padding: 0 10px;
  }

  .detail-page .breadcrumb {
    display: flex;
    height: 30px;
    padding: 6px 10px;
    align-items: center;
    overflow: hidden;
    font-size: 8px;
    white-space: nowrap;
  }

  .detail-page .detail {
    height: calc(100svh - 66px);
    min-height: 0;
  }

  .detail-page .viewer {
    min-height: 0;
  }

  .detail-page .slide {
    inset: 0 10px 18px;
  }

  .detail-page .slide img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  .detail-page .viewer-meta {
    min-height: 38px;
    padding: 6px 10px 14px;
  }

}

@media(max-height:520px) {
  .detail-page .detail {
    min-height: 300px;
  }

  .detail-page .viewer-meta {
    padding-bottom: 8px;
  }

  .detail-page .slide {
    inset: 0 16px 8px;
  }

}

.spread {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px,3vw,40px);
  min-width: 0;
  min-height: 0;
}

.detail-page .spread img {
  width: auto;
  height: auto;
  max-width: calc(50% - 20px);
  max-height: 100%;
  object-fit: contain;
}

.mosaic__item--pair {
  display: flex;
  align-items: stretch;
  gap: 3px;
  background: #fff;
}

.mosaic__item--pair img {
  width: auto;
  height: 100%;
  min-width: 0;
  object-fit: cover;
}

.detail-page .detail {
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
}

.detail-page .slide {
  will-change: transform;
}

.detail-page .slide.is-dragging, .detail-page .viewer.is-swipe-transition .slide {
  transition: none!important;
}

.detail-page .viewer.is-swipe-transition .slide.active {
  opacity: 1;
}

.detail-page .viewer-hit--prev {
  cursor: w-resize;
}

.detail-page .viewer-hit--next {
  cursor: e-resize;
}

.detail-page .cursor {
  display: none;
}

.detail-page .viewer-hit {
  bottom: 51px;
}

@media(min-width:701px) {
  .mosaic__item {
    flex: 0 0 auto;
    width: auto;
  }

  .mosaic__item img {
    width: auto;
    height: 100%;
  }

  .mosaic__item--pair {
    flex-basis: auto;
  }

}

@media(max-width:700px) {
  .spread {
    gap: 8px;
  }

  .detail-page .spread img {
    max-width: calc(50% - 4px);
  }

  .mosaic__item--pair {
    flex-basis: auto;
    gap: 2px;
  }

  .mosaic__item--pair img {
    width: auto;
  }

  .detail-page .viewer-hit {
    bottom: 38px;
  }

}

.mosaic .mosaic__item {
  flex: 0 0 auto;
  width: auto;
}

.mosaic .mosaic__item img {
  width: auto;
  height: 100%;
}

.mosaic .mosaic__item--pair {
  flex-basis: auto;
}

/* Figma TOP / OP — 1440 x 823 reference frame */ .home-page .header {
  height: 102px;
}

.home-page .header__main {
  height: 62px;
  min-height: 62px;
  padding: 0 20px;
}

.home-page .hero {
  height: calc(100svh - 102px);
  min-height: 0;
  padding: clamp(18px,2.01vw,29px) 20px 76px;
  position: relative;
}

.home-page .hero__portrait {
  height: min(37.9167vw,calc(100svh - 277px));
  width: auto;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

.home-page .hero__name {
  bottom: 51px;
  font-size: min(11.1111vw,calc((100svh - 92px)/4.55));
  line-height: .71;
  letter-spacing: 3vw;
}

.home-page .hero__role {
  bottom: 18px;
  font-size: 15px;
  line-height: 1;
  letter-spacing: .12em;
}

.home-page .intro {
  animation: intro-away .9s cubic-bezier(.76,0,.24,1) 3.1s forwards;
}

.home-page .intro__name {
  font-size: clamp(17px,3.4722vw,50px);
  line-height: 1;
  letter-spacing: clamp(4.59px,.9375vw,13.5px);
  opacity: 0;
  filter: blur(24px);
  transform: translateY(8px) scale(.96);
  animation: intro-name-rich 3s cubic-bezier(.22,.61,.36,1) forwards;
  will-change: opacity,filter,transform;
}

@keyframes intro-name-rich {
  0% {
    opacity: 0;
    filter: blur(28px);
    transform: translateY(10px) scale(.95);
  }

  30% {
    opacity: 1;
    filter: blur(2px);
    transform: translateY(0) scale(1);
  }

  45%,68% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    filter: blur(20px);
    transform: translateY(-5px) scale(1.035);
  }

}

@media(max-width:700px) {
  .home-page .header {
    height: 66px;
  }

  .home-page .header__main {
    height: 36px;
    min-height: 36px;
    padding: 0 10px;
  }

  .home-page .hero {
    height: calc(100svh - 66px);
    min-height: 0;
    padding: 30px 10px 68px;
    align-items: center;
  }

  .home-page .hero__portrait {
    width: min(74vw,calc((100svh - 165px)*.7857));
    height: auto;
    max-width: none;
    max-height: calc(100svh - 165px);
  }

  .home-page .hero__name {
    bottom: 43px;
    font-size: 17px;
    line-height: 1;
    letter-spacing: .12em;
  }

  .home-page .hero__role {
    bottom: 23px;
    font-size: 9px;
  }

  .home-page .intro__name {
    width: 100%;
    padding-left: clamp(4.59px,.9375vw,13.5px);
    text-align: center;
  }

}

.cursor {
  width: 36px;
  height: 36px;
  font-size: 0;
  transition: opacity .2s,transform .2s cubic-bezier(.22,.61,.36,1),background-color .2s,color .2s;
}

.cursor span {
  display: none;
}

.cursor.is-clicking {
  transform: translate(-50%,-50%) scale(.62);
  background: rgba(255,255,255,.35);
}

.profile__body {
  display: flex;
  flex-direction: column;
  gap: 40px;
  white-space: normal;
}

.profile__copy-block {
  white-space: pre-line;
}

.profile__credits {
  display: flex;
  flex-direction: column;
  gap: 32px;
  white-space: normal;
}

.profile__credit-block {
  white-space: pre-line;
}

.profile__history {
  white-space: normal;
}

.profile__history-row,
.profile__history-current {
  display: block;
}

.profile__history-row {
  display: grid;
  grid-template-columns: 5.5em minmax(0, 1fr);
  column-gap: .65em;
  align-items: start;
}

.profile__year {
  white-space: nowrap;
}

.profile__year::after {
  content: none;
}

@media(max-width:700px) {
  .profile__copy-block {
    line-height: 1.6;
  }

  .profile__history {
    display: flex;
    flex-direction: column;
    gap: 0;
    white-space: normal;
  }

  .profile__history-row {
    display: grid;
    grid-template-columns: 6em minmax(0, 1fr);
    column-gap: 1em;
    align-items: start;
  }

  .profile__year::after {
    content: none;
  }

}

.home-page .intro {
  animation: intro-away .8s cubic-bezier(.76,0,.24,1) 4.15s forwards;
}

.home-page .intro__name {
  opacity: 1;
  filter: none;
  transform: none;
  animation: intro-word-out .9s cubic-bezier(.65,0,.35,1) 3.35s forwards;
}

.home-page .intro__name>span {
  display: inline-block;
  padding: .35em .12em;
  margin: -.35em -.12em;
  overflow: visible;
  opacity: 0;
  filter: blur(15px);
  transform: translateY(9px) scale(.94);
  animation: intro-letter 1.25s cubic-bezier(.22,.61,.36,1) calc(.22s + var(--letter-index)*.105s) forwards;
  will-change: opacity,filter,transform;
}

.home-page .intro__name {
  width: max-content;
  max-width: none;
  padding: 1em;
  overflow: visible;
  line-height: 1.35;
  box-sizing: content-box;
}

@keyframes intro-letter {
  0% {
    opacity: 0;
    filter: blur(15px);
    transform: translateY(9px) scale(.94);
  }

  55% {
    opacity: .82;
    filter: blur(3px);
  }

  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }

}

@keyframes intro-word-out {
  to {
    opacity: 0;
    filter: blur(18px);
    transform: translateY(-4px) scale(1.025);
  }

}

@media(prefers-reduced-motion:reduce) {
  .home-page .intro__name {
    animation: none!important;
  }

  .home-page .intro__name>span {
    animation: intro-letter .01ms linear forwards!important;
  }

  .home-page .intro {
    animation-delay: .8s!important;
  }

}

/* Anchor the two title lines to the bottom of the first view. The portrait
   alone scales to preserve the Figma overlap without opening the title gap. */ .home-page .hero {
  --hero-name-line: min(7.8889vw,calc((100svh - 92px)/6.4085));
  --hero-photo-h: min(72vw,calc(100% - 15px - var(--hero-name-line)));
  --hero-photo-top: max(0px,calc((100% - 34px - var(--hero-name-line) - var(--hero-photo-h))/2));
  height: calc(100svh - 102px);
  min-height: 0;
  padding: 29px 20px 19px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: visible;
}

body.home-page {
  overflow-x: clip;
}

body.home-page.is-locked {
  overflow: hidden;
}

.home-page .hero__visual {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 0 0 auto;
}

.home-page .hero__portrait-stage {
  position: absolute;
  top: var(--hero-photo-top);
  left: 50%;
  height: var(--hero-photo-h);
  width: min(90vw, 1180px);
  transform: translateX(-50%) translateY(var(--hero-photo-parallax, 0px));
  will-change: transform;
}

.home-page .hero__portrait-set {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.5vw, 24px);
  width: 100%;
  height: 100%;
}

.home-page .hero__portrait {
  position: static;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  transform: none;
}

.home-page .hero__portrait-set .hero__portrait:nth-last-child(n+2),
.home-page .hero__portrait-set .hero__portrait:nth-last-child(n+2) ~ .hero__portrait {
  max-width: calc(50% - 12px);
}

.home-page .hero__name {
  top: auto;
  bottom: 34px;
  transform: translateY(calc(-.14em + var(--hero-name-parallax, 0px)));
  will-change: transform;
}

.home-page .hero__role {
  top: auto;
  bottom: 0;
  margin: 0;
  line-height: 10px;
  transform: translateY(var(--hero-role-parallax, 0px));
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .home-page .hero {
    --hero-photo-parallax: 0px !important;
    --hero-name-parallax: 0px !important;
    --hero-role-parallax: 0px !important;
  }
}

@media(max-width:700px) {
  .home-page .hero {
    --hero-photo-h: min(114.55vw,calc(100svh - 165px));
    height: calc(100svh - 66px);
    padding: 30px 10px 68px;
    align-items: center;
  }

  .home-page .hero__visual {
    height: calc(var(--hero-photo-h) + 34px);
  }

  .home-page .hero__portrait-stage {
    width: calc(100vw - 20px);
    height: var(--hero-photo-h);
  }

  .home-page .hero__portrait {
    width: auto;
    height: 100%;
    max-width: 100%;
  }

  .home-page .hero__name {
    top: var(--hero-photo-h);
  }

  .home-page .hero__role {
    top: calc(var(--hero-photo-h) + 23px);
    line-height: 1;
  }

}

.detail-page .slide>img, .detail-page .spread img {
  max-height: min(63.3333vw,calc(87.915svh - 244.5px));
}

@media(max-width:700px) {
  .detail-page .slide>img, .detail-page .spread img {
    max-height: min(88vw,calc(100svh - 215px));
  }

}

@media(prefers-reduced-motion:reduce) {
  .home-page .intro {
    animation-duration: .01ms!important;
    animation-delay: .8s!important;
  }

  .home-page .intro__name {
    animation-duration: .8s!important;
  }

}

/* White breathing room between each first view and the following grey box. */ .hero+.categories, .archive-hero+.categories, .detail+.categories {
  margin-top: 80px;
}

@media(max-width:700px) {
  .hero+.categories, .archive-hero+.categories, .detail+.categories {
    margin-top: 48px;
  }

}

@media(max-width:700px) {
  .home-page .hero__visual {
    height: calc(var(--hero-photo-h) + 106px);
  }

  .home-page .hero__name {
    top: calc(var(--hero-photo-h) + 43px);
    font-family: var(--script);
    font-size: clamp(48px, 14vw, 62px);
    font-weight: 400;
    line-height: .75;
    letter-spacing: .13em;
    text-transform: none;
  }

  .home-page .hero__role {
    top: calc(var(--hero-photo-h) + 88px);
  }
}

/* Category thumbnails share one portrait frame. Shorter images are shown in
   full and vertically centred instead of being cropped. */
.category-card__image {
  height: auto;
  aspect-ratio: 160/210;
  position: relative;
  display: block;
}

.category-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center;
}

/* Cross-page transition. */ body {
  opacity: 0;
  animation: page-enter .3s ease forwards;
  transition: opacity .3s ease;
}

body.page-leaving {
  opacity: 0;
  animation: none;
  pointer-events: none;
}

@keyframes page-enter {
  to {
    opacity: 1;
  }

}

@media(prefers-reduced-motion:reduce) {
  body {
    animation-duration: .01ms;
    transition-duration: .01ms;
  }

}
