:root {
  color-scheme: light;
  --paper: #fdfdfd;
  --ink: #000;
  --muted: #565656;
  --accent: #c12e1a;
  --highlight-text: #09ff00;
  --page-transition-duration: 1s;
  --page-exit-duration: 220ms;
  --rule: #dedede;
  --home-top: 11.7svh;
  --home-title-size: min(clamp(1.75rem, 3.75vw, 4.5rem), 6.85svh);
  --home-title-leading: 1.2;
  --home-title-lines: 3;
  --home-title-offset: 1px;
  --home-menu-size: min(clamp(2rem, 5vw, 6rem), 8.7svh);
  --home-menu-leading: 1.275;
  /* Arial's alphabetic baseline is about .35em below the line box midpoint. */
  --home-title-baseline: calc(((var(--home-title-lines) - .5) * var(--home-title-leading) + .35) * var(--home-title-size));
  --home-menu-baseline: calc((var(--home-menu-leading) / 2 + .35) * var(--home-menu-size));
  --home-menu-offset: calc(var(--home-title-offset) + var(--home-title-baseline) - var(--home-menu-baseline));
  font-family: Arial, "Hiragino Sans", "Yu Gothic", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

.masthead {
  position: absolute;
  z-index: 3;
  inset: 0 auto auto 0;
  padding: 16px 0 0 clamp(12px, 1.72vw, 30px);
  pointer-events: none;
}

.masthead a { pointer-events: auto; }
.frog-link { display: grid; place-items: center; min-width: 44px; min-height: 44px; }
.frog-link img { width: 42px; height: auto; }
#route { position: relative; z-index: 1; min-height: 100svh; }
#route:focus { outline: none; }

.home {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30vw;
  column-gap: 1rem;
  align-items: start;
  min-block-size: 100svh;
  padding: var(--home-top) 2.1875vw 1rem 1.72vw;
  overflow: clip;
}

.site-backdrop {
  --frog-blur: 84px;
  position: absolute;
  inset: 0;
  overflow: clip;
  height: 100svh;
  pointer-events: none;
}

.home-frog {
  position: absolute;
  inset: -7svh auto auto 50%;
  width: min(75vw, 116svh);
  height: auto;
  max-width: none;
  transform: translateX(-50%);
  filter: blur(0) saturate(1);
}

.home-frog > img { width: 100%; height: auto; }
.frog-motion { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.frog-motion.is-visible { opacity: 1; }

.section-view .site-backdrop { position: fixed; }
.backdrop-blurred .home-frog { filter: blur(var(--frog-blur)) saturate(.9); opacity: .86; }
.route-motion .home-frog {
  transition: filter var(--page-transition-duration) ease, opacity var(--page-transition-duration) ease;
}
.route-motion .section-menu {
  transition: opacity calc(var(--page-transition-duration) - var(--page-exit-duration)) ease;
}
.route-motion :is(#route > .home, .page > :not(.section-title)),
.route-motion.home-transition .page > .section-title {
  transition: opacity var(--page-exit-duration) ease;
}
.route-motion.route-leaving :is(#route > .home, .page > :not(.section-title)),
.route-motion.route-leaving.home-transition .page > .section-title,
.route-motion.route-leaving.home-transition .section-menu {
  opacity: 0;
  transition-duration: var(--page-exit-duration);
}
.route-motion:not(.route-leaving) :is(#route > .home, .page > :not(.section-title)),
.route-motion.home-transition:not(.route-leaving) .page > .section-title {
  animation: page-fade-in calc(var(--page-transition-duration) - var(--page-exit-duration)) ease;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.home-title {
  grid-area: 1 / 2;
  justify-self: end;
  margin: var(--home-title-offset) 0 0;
  font-size: var(--home-title-size);
  font-weight: 700;
  letter-spacing: .012em;
  line-height: var(--home-title-leading);
  text-align: right;
}

.home-title > span { display: block; white-space: nowrap; }
.home-title > span:first-child { margin-inline-end: .2em; letter-spacing: .025em; }
.home-star {
  position: relative;
  top: .085em;
  margin-inline-end: .035em;
  font-size: 1.5em;
  line-height: 0;
}

.home-menu, .section-menu {
  display: grid;
  justify-items: start;
  font-size: var(--home-menu-size);
  font-weight: 700;
  letter-spacing: .01em;
  line-height: var(--home-menu-leading);
}

.home-menu { grid-area: 1 / 1; margin-block-start: var(--home-menu-offset); }
:is(.home-menu, .section-menu) a { text-decoration: none; }
:is(.home-menu, .section-menu) a:first-child { margin-block-end: .77em; }

:is(.home-menu, .section-menu) a { transition: color 180ms ease; }
@media (hover: hover) {
  a[href^="#/"] > * {
    translate: var(--magnet-shift, none);
    transition: translate 220ms cubic-bezier(.2, .72, .3, 1.25), opacity 180ms ease;
  }
  :is(.home-menu, .section-menu, .section-title) a > span { display: inline-block; }
  .frog-link:hover img { opacity: .6; }
  :is(.home-menu, .section-menu) a:hover { color: var(--highlight-text); }
  .work-card:hover .work-title { color: var(--highlight-text); }
}

.section-view {
  --accent: #008400;
  --frog-green: #08df00;
}

.section-menu { display: none; }
.section-menu a[aria-current] { color: var(--highlight-text); }

.page {
  width: min(100%, 48rem);
  margin-inline: auto;
  padding: clamp(5.5rem, 12.45svh, 8rem) max(1rem, 4vw) 4rem;
}

.section-title {
  margin: 0 0 clamp(2.25rem, 5.5svh, 3.25rem);
  color: var(--highlight-text);
  font-size: clamp(2.25rem, 12vw, 3.75rem);
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.section-title a { text-decoration: none; }
.section-title-text { display: none; }
.section-title-link { display: inline-block; }
.list-page > .section-title { margin: 0 0 clamp(1.75rem, 4.7svh, 3rem) .8125rem; }

.profile-page > .section-title { margin-block-end: clamp(2.5rem, 6.5svh, 3.75rem); }
.profile-layout { display: grid; padding-inline: clamp(0rem, 6vw, 1.5rem); color: #333; }
.portrait {
  width: min(100%, 7rem);
  height: auto;
  aspect-ratio: 112 / 137;
  justify-self: center;
  object-fit: cover;
  object-position: 58% center;
}
.profile-heading { margin-block-start: clamp(2.25rem, 5.35svh, 3rem); }
.profile-layout .copy {
  margin-block-start: clamp(1.75rem, 3.7svh, 2rem);
  font-size: clamp(.875rem, 1.25vw, 1rem);
  line-height: 1.4;
}
.profile-records {
  display: grid;
  gap: 1.75rem;
  margin-block-start: 2rem;
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.profile-records h3 { margin: 0 0 .625rem; font-size: 1rem; }
.profile-records ul { display: grid; gap: .375rem; margin: 0; padding-inline-start: 1.2em; }
.profile-records a { text-underline-offset: .18em; }
.profile-record-period { color: var(--muted); }
.bio-name, .english-name {
  margin: 0;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 700;
  line-height: 1.25;
}
.english-name { margin-block-start: .4em; }

.detail-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.copy { font-size: clamp(1rem, 1.45vw, 1.125rem); line-height: 1.65; overflow-wrap: anywhere; }
.copy p { margin: 0; }
.copy p + p { margin-top: 1em; }

.works-grid {
  display: grid;
  gap: clamp(1.5rem, 4svh, 2.25rem);
  padding-inline: .8125rem;
}

.work-card {
  display: grid;
  grid-template-columns: min(27%, 3.5625rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1rem, 7.2vw, 1.8125rem);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.work-card > div { padding-block-start: .25rem; }
.year { color: var(--muted); font-size: .875rem; font-style: italic; }
.work-card .year { font-size: .75rem; }
.work-title { margin: .65rem 0 0; font-size: clamp(.875rem, 1.6vw, 1.25rem); font-weight: 700; line-height: 1.25; }
.card-note { margin: .4rem 0 0; color: var(--muted); font-size: .9375rem; line-height: 1.5; }

.page-progress {
  position: fixed;
  inset: 50% max(.5rem, 4.7vw) auto auto;
  display: grid;
  gap: .5rem;
  width: .3125rem;
  transform: translateY(-50%);
  pointer-events: none;
}
.list-page .page-progress { inset-block-start: 53.2%; }
.page-progress span { height: .375rem; background: #def9dd; }
.page-progress .is-current { background: var(--frog-green); }

.artwork {
  position: relative;
  display: grid;
  container-type: inline-size;
  width: 100%;
  aspect-ratio: 269 / 380;
  overflow: hidden;
  background: var(--art-paper, #d7d7d7);
  color: var(--art-ink, #29352b);
}

.artwork img { width: 100%; height: 100%; object-fit: cover; }
.record-cover { aspect-ratio: 1; }
.project-photo { aspect-ratio: 16 / 9; }
.exhibition-poster { aspect-ratio: 960 / 679; }
.grant-cover { aspect-ratio: 1; border: 1px solid var(--rule); background: #f6f6f6; }
.grant-cover img { object-fit: contain; padding: 12%; }
.event-flyer { background: transparent; }
.event-flyer img { object-fit: contain; object-position: center top; }
.artwork-art img {
  position: absolute;
  inset: 19% 7% 12%;
  width: 86%;
  height: 69%;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: var(--art-filter, contrast(1.25));
}
.artwork-type {
  position: absolute;
  inset: 7% 8% auto;
  font-size: 11cqw;
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.055em;
  max-width: 11ch;
  overflow-wrap: anywhere;
}
.artwork-art small {
  position: absolute;
  right: 8%;
  bottom: 6%;
  font-size: 7cqw;
  font-weight: 700;
}
.artwork-close img { inset: -5% -20%; width: 140%; height: 110%; }
.artwork-night { --art-paper: #d4d9d0; --art-filter: grayscale(1) contrast(1.55); }
.artwork-moss { --art-paper: #dbe2bf; --art-ink: #344323; }
.artwork-fog { --art-paper: #dce1e2; --art-ink: #344c4e; --art-filter: hue-rotate(28deg) contrast(1.15); }
.artwork-soil { --art-paper: #e5d5c7; --art-ink: #57372c; --art-filter: sepia(.9) contrast(1.2); }
.artwork-pollen { --art-paper: #ebe4aa; --art-ink: #534b23; --art-filter: sepia(.35) contrast(1.38); }

.section-return { margin: 0 0 2.5rem .8125rem; }
.detail-layout { display: grid; gap: 1.125rem; padding-inline: .7rem; }
.detail-heading .year { font-size: 1rem; }
.detail-title { margin-block-start: .75rem; }
.gallery { min-width: 0; }
.gallery-main { width: min(100%, 10.5625rem); margin-inline: auto; }
.gallery-main .event-flyer { aspect-ratio: auto; }
.gallery-main .event-flyer img { height: auto; }
.gallery-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: .125rem;
  margin-block-start: 1.625rem;
}
.gallery-thumb {
  flex: 0 0 1.5rem;
  display: block;
  min-width: 0;
  padding: .075rem;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}
.gallery-thumb[aria-pressed="true"], .gallery-thumb:hover { border-color: var(--accent); }
.detail-text { min-width: 0; overflow-wrap: anywhere; }
.detail-text .copy { color: #333; line-height: 1.28; }
.detail-text .copy p + p { margin-top: .55em; }
.detail-text .card-note { font-size: 1rem; }
.detail-text > :first-child { margin-block-start: 0; }
.detail-source { margin: 1.25rem 0 0; }
.track-player { max-width: 30rem; margin-top: 1.25rem; }
.track-player iframe { display: block; width: 100%; height: 166px; margin-bottom: 12px; border: 0; }
.detail-text a { text-underline-offset: .25em; }
.detail-text a:hover { color: var(--highlight-text); }
.work-video { width: 100%; margin: 1.5rem 0 0; }
.work-video video { width: 100%; aspect-ratio: 16 / 9; background: var(--ink); }
.music-video a { display: block; }
.music-video img { width: 100%; height: auto; margin-bottom: 10px; }

.no-script { position: fixed; bottom: 12px; inset-inline: 16px; text-align: center; }

@media (min-width: 901px) and (min-height: 501px), (min-width: 961px) {
  .section-view .masthead { position: fixed; }
  .section-menu { position: fixed; z-index: 2; inset: calc(var(--home-top) + var(--home-menu-offset)) auto auto 1.72vw; display: grid; }
  .section-view .section-menu {
    inset-block-start: 14svh;
    font-size: clamp(1.5rem, 2.5vw, 2.5rem);
    line-height: 1.48;
  }
  .section-view .section-menu a:first-child { margin-block-end: .675em; }
  .section-menu ~ #route .home-menu { visibility: hidden; }
  .page {
    --content-inset: clamp(15.5rem, 23.85vw, 25rem);
    width: auto;
    max-width: 41rem;
    margin-inline: max(var(--content-inset), calc(50% - 20.9375rem)) 5.4vw;
    padding: clamp(6rem, 13.2svh, 8.5rem) 0 4rem;
  }
  .profile-page {
    max-width: 39.5rem;
    margin-inline-start: max(var(--content-inset), calc(50% - 19.75rem));
    padding-block-start: clamp(9rem, 21.3svh, 14rem);
  }
  .detail-page { padding-block-start: clamp(5.5rem, 13.94svh, 9rem); }
  :is(.profile-page, .list-page) > .section-title {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .section-title-text { display: inline; }
  .section-title-link { display: none; }
  .profile-layout { padding-inline: 0; }
  .works-grid { padding-inline: 0; }
  .work-card { grid-template-columns: min(27%, 4.1875rem) minmax(0, 1fr); gap: clamp(1.5rem, 6vw, 4.8rem); }
  .work-card > div { padding-block-start: 1rem; }
  .work-card .year { font-size: 1rem; }
  .page-progress, .list-page .page-progress { inset: 51% 5.85vw auto auto; width: 2rem; }
  .section-return { display: none; }
  .detail-layout { gap: 1.375rem; padding-inline: 0; }
  .gallery-main { width: min(100%, 13.0625rem); }
  :is(.works-detail, .exhibitions-detail) .gallery-main { width: min(100%, 20.875rem); }
  .gallery-picker { margin-block-start: 2rem; gap: .85rem; }
  .gallery-thumb { flex-basis: 2rem; padding: .075rem; }
}

@media (max-width: 700px), (max-width: 900px) and (orientation: portrait), (max-width: 960px) and (max-height: 500px) and (orientation: landscape) {
  :root {
    --highlight-text: var(--ink);
    --phone-gutter: 4vw;
    --phone-top: clamp(2rem, 4.35svh, 3.5rem);
    --phone-heading-size: clamp(1.75rem, min(12vw, 5.75svh), 4rem);
    --phone-heading-leading: 1.29;
    --phone-heading-offset: 1.32;
    --home-top: var(--phone-top);
    --home-title-size: clamp(1.375rem, 8vw, 2.5rem);
    --home-title-offset: calc(var(--home-menu-offset) + var(--home-menu-baseline) - var(--home-title-baseline));
    --home-menu-size: var(--phone-heading-size);
    --home-menu-leading: var(--phone-heading-leading);
    --home-menu-offset: calc(var(--phone-heading-offset) * var(--home-menu-size));
    --home-frog-offset: min(17.9vw, 5.5rem);
    --home-frog-size: min(143vw, 51rem);
    /* Leave room for the eyes and the open mouth as the artwork scales. */
    --home-frog-face-end: calc(var(--home-frog-offset) + .4 * var(--home-frog-size));
  }
  .masthead { padding: 11px 0 0 max(3px, calc(var(--phone-gutter) - 10px)); }
  .frog-link img { width: 25px; }
  .home {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: var(--phone-gutter);
    padding-block-end: 13px;
  }
  .home-frog {
    inset-block-start: calc(var(--home-top) + var(--home-frog-offset));
    width: var(--home-frog-size);
  }
  .site-backdrop { --frog-blur: 48px; }
  .home-title {
    grid-area: 1 / 1;
    margin-inline-end: .25em;
  }
  .home-star { top: 0; font-size: 1.1em; }
  .home-menu a:first-child {
    margin-block-end: max(.65em, calc(var(--home-frog-face-end) - var(--home-menu-offset) - var(--home-menu-leading) * 1em));
  }
  .page {
    width: 100%;
    padding-block-start: calc(var(--home-top) + var(--home-menu-offset));
    padding-inline: var(--phone-gutter);
  }
  .home-menu, .section-title { margin-inline-start: 1px; }
  .section-title {
    font-size: var(--phone-heading-size);
    line-height: var(--phone-heading-leading);
  }
  :is(.list-page, .detail-page) > .section-title { margin-inline-start: 1px; }
}

@media (max-width: 700px) and (max-height: 740px) and (orientation: portrait) {
  :root {
    --phone-heading-size: clamp(1.5rem, min(11.8vw, 5.6svh), 4rem);
    --phone-heading-leading: 1.2;
  }
}

@media (max-width: 700px) and (max-height: 600px) and (orientation: portrait) {
  :root {
    --phone-heading-size: clamp(1.5rem, min(11.8vw, 5svh), 4rem);
    --phone-heading-leading: 1.12;
  }
}

@media (max-width: 960px) and (max-height: 500px) and (orientation: landscape) {
  :root {
    --phone-top: clamp(1.35rem, 5svh, 2rem);
    --phone-heading-size: clamp(1.25rem, min(4vw, 7svh), 1.875rem);
    --phone-heading-leading: 1.2;
    --phone-heading-offset: 2.1;
    --home-title-size: clamp(1rem, 3vw, 1.65rem);
    --home-title-lines: 2;
    --home-frog-offset: calc(-7svh - var(--home-top));
    --home-frog-size: min(95vw, 132svh);
    --home-menu-offset: max(calc(var(--phone-heading-offset) * var(--home-menu-size)), var(--home-frog-face-end));
  }
  .home { grid-template-columns: minmax(0, 1fr) auto; }
  .home-title { grid-area: 1 / 2; }
  .home-title > span:nth-child(-n + 2) { display: inline; }
  .home-menu {
    display: flex;
    flex-wrap: wrap;
    gap: .12em .5em;
  }
  .home-title { margin-block-start: var(--home-menu-offset); }
  .home-menu a:first-child { margin-block-end: 0; }
}

@media (max-width: 650px) {
  .works-grid { gap: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .route-motion #route * { animation: none !important; }
  .frog-motion.is-visible { opacity: 0; }
}
