@font-face {
  font-family: "Cormorant Garamond";
  src: url("cormorant-garamond.woff2") format("woff2");
  font-weight: 300 500;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans JP";
  src: url("noto-sans-jp.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #eee9df;
  --ink: #1f1c15;
  --muted: #554e3e;
  --ivory: #f9f4ea;
  --accent: #b8392d;
  --link-ink: #8b3025;
  --rule: #61554040;
  --ink-feather: #61554024;
  --detail-paper: #f7f1e6;
  --scenery-paper: #d6cbbb;
  --caption-paper: #f9f4eae8;
  --bird-ink: #1f1c15b8;
  --mist-low: #dad9d0a6;
  --mist-high: #e0ded6;
  --mist-center: #f8f4eb;
  --panel-shade: linear-gradient(180deg, transparent 25%, #211d1640 45%, #211d16d9 77%, #211d16ed);
  --ink-landscape: url("ink-landscape.webp");
  --ink-blend: multiply;
  --serif: "Cormorant Garamond", Georgia, serif;
  color: var(--ink);
  background: var(--paper);
  font: 1rem/1.65 "Noto Sans JP", system-ui, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #131820;
  --ink: #f0ebe2;
  --muted: #b9bdc4;
  --accent: #ec9a86;
  --link-ink: #f3aa99;
  --rule: #b5c4d242;
  --ink-feather: #b5c4d228;
  --detail-paper: #1c232d;
  --scenery-paper: #273140;
  --caption-paper: #151d26eb;
  --bird-ink: #d8e4eec7;
  --mist-low: #35414caa;
  --mist-high: #283440;
  --mist-center: #232d38;
  --ink-landscape: url("ink-landscape-night.webp");
  --ink-blend: normal;
  --panel-shade: linear-gradient(180deg, transparent 25%, #0e141e35 45%, #10141bca 77%, #10141be8);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

.page-shell { padding: 32px 40px; }
.site-header, .panel-stage, .site-colophon, .profile {
  width: min(1440px, 100%);
  margin-inline: auto;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding-bottom: clamp(16px, 2.5vw, 40px);
  border-bottom: 1px solid var(--rule);
}

.brand {
  justify-self: start;
  color: var(--ink);
  font: 500 clamp(2.25rem, 3.2vw, 3.25rem)/.9 var(--serif);
  letter-spacing: -.045em;
  text-decoration: none;
}

.brand span, .site-context span { color: var(--accent); }

.site-context {
  margin: 0;
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.site-context span { margin-inline: .55em; }

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: clamp(7px, 1.4vw, 18px);
}

.header-contact {
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 20px);
  padding-block: 5px;
  border-bottom: 1px solid var(--rule);
  font-size: .875rem;
  text-decoration: none;
  white-space: nowrap;
}

.header-contact:hover { border-color: var(--accent); }

.header-contact svg {
  width: 15px;
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
}

.theme-toggle:not([hidden]) {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg {
  width: 17px;
  grid-area: 1 / 1;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle[aria-pressed="false"] .theme-sun,
.theme-toggle[aria-pressed="true"] .theme-moon { display: none; }

.site-title {
  margin: 0;
  font: 500 clamp(1.5rem, 2.7vw, 2.75rem)/1.08 var(--serif);
  letter-spacing: -.035em;
  text-align: center;
  text-wrap: balance;
}

.splash:not([hidden]) {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 22% 75%, var(--mist-low), transparent 65%),
    radial-gradient(ellipse at 82% 20%, var(--mist-high), transparent 68%),
    radial-gradient(ellipse at center, var(--mist-center), var(--paper));
  text-align: center;
  pointer-events: none;
  animation: mist-dissolve 3s ease-in-out both;
}

.splash-title {
  margin: 0;
  font: 500 clamp(3rem, 7vw, 6.5rem)/.95 var(--serif);
  letter-spacing: -.045em;
  text-wrap: balance;
}

.splash-subtitle {
  margin: clamp(12px, 2vw, 22px) 0 0;
  color: var(--muted);
  font: italic 400 clamp(1.25rem, 2.3vw, 2rem)/1.25 var(--serif);
  text-wrap: balance;
}

@keyframes mist-dissolve {
  0%, 18% { opacity: 1; }
  to { opacity: 0; }
}

.panel-arrow {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
}

.triptych {
  --panel-gap: 20px;
  position: relative;
}

.panel-stage {
  scroll-margin-top: 24px;
  margin-top: clamp(20px, 3vw, 36px);
  margin-bottom: clamp(38px, 6vw, 88px);
}

.panel-stage [hidden] { display: none; }

.panel-stage.is-interactive .profile {
  max-width: none;
  margin-top: 0;
  padding: clamp(20px, 5vw, 72px);
  border: 1px solid var(--rule);
  background: var(--detail-paper);
  box-shadow: 0 8px 24px #2922181c;
}

.panel-return {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--link-ink);
  font-size: .875rem;
  text-underline-offset: .24em;
}

.panel-stage.is-interactive .profile-section {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-bottom: 0;
}

.panel-scenery {
  --panel-span: calc((100% - 2 * var(--panel-gap)) / 3);
  --mask-fill: linear-gradient(#000 0 0);
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--ink-landscape) center / cover no-repeat var(--scenery-paper);
  pointer-events: none;
  /* Crop one landscape to the three columns so it stays aligned across the gutters. */
  mask: var(--mask-fill) left / var(--panel-span) 100% no-repeat,
        var(--mask-fill) center / var(--panel-span) 100% no-repeat,
        var(--mask-fill) right / var(--panel-span) 100% no-repeat;
}

.panel-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--panel-gap);
}

.panel {
  display: flex;
  min-height: clamp(490px, calc(100svh - 150px), 790px);
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(24px, 3.45vw, 40px);
  color: var(--ivory);
  background: var(--panel-shade);
  box-shadow: 0 8px 24px #2922181c, inset 0 0 0 1px #50433424;
  text-decoration: none;
  transition: box-shadow .45s ease;
}

.panel:hover, .panel:focus-visible {
  box-shadow: 0 14px 28px #12100940, inset 0 0 0 1px #f9f4ea62;
}

.panel:focus-visible { outline: 2px solid var(--accent); }
.panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-topline, .explore {
  font-size: .6875rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.panel-topline > span:first-child {
  padding: 4px 8px;
  color: var(--ink);
  background: var(--caption-paper);
}

.panel-arrow {
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--ink);
  background: var(--caption-paper);
  transition: transform .45s ease, background-color .45s ease, color .45s ease;
}

.panel-arrow svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.panel:hover .panel-arrow, .panel:focus-visible .panel-arrow {
  transform: rotate(45deg);
  border-color: var(--accent);
  color: var(--accent);
}

.panel-copy { max-width: 18rem; text-shadow: 0 1px 8px #1f1c15a6; }
.panel-copy h2 {
  margin: 0;
  font: 400 clamp(2rem, 3.3vw, 3rem)/1.04 var(--serif);
  letter-spacing: -.015em;
}

.panel-copy p {
  max-width: 24ch;
  margin: 12px 0 0;
  font-size: .875rem;
  line-height: 1.55;
}

.explore { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.explore::before { content: ""; width: 22px; height: 1px; background: #d36052; }

.bird-flight {
  position: absolute;
  z-index: 1;
  top: 18%;
  left: 20%;
  width: 72px;
  fill: none;
  stroke: var(--bird-ink);
  stroke-linecap: round;
  stroke-width: 2;
  animation: bird-flight 18s linear -4s infinite;
}

.bird-flight path {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: wing-flutter 1.3s ease-in-out infinite;
}

.bird-flight path + path { animation-delay: -.3s; }

@keyframes bird-flight {
  from { left: 0; transform: translateX(-100%); }
  50% { transform: translateY(-16px); }
  to { left: 100%; transform: translateY(6px); }
}

@keyframes wing-flutter {
  50% { transform: scaleY(.47); }
}

.site-colophon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .8125rem;
}

.indonesia-flag {
  width: 18px;
  aspect-ratio: 3 / 2;
  background: linear-gradient(#ce1126 50%, #fff 50%);
  border: 1px solid var(--rule);
}

.profile {
  max-width: 1120px;
  margin-top: clamp(60px, 10vw, 148px);
}

.profile-section { scroll-margin-top: 24px; }

.profile-spread {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 3dvh, 32px) clamp(28px, 7vw, 105px);
}

.profile-section :is(h2, p) { margin: 0; }

.profile-kicker {
  grid-column: 1 / -1;
  padding-bottom: 10px;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, var(--rule), var(--ink-feather) 80%, transparent) 1;
}

.profile-section h2 {
  font: 500 clamp(2.5rem, 4.4vw, 3.5rem)/1.02 var(--serif);
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

.profile-intro h2 {
  margin-top: 14px;
  font-size: clamp(2.5rem, 5.4vw, 4.5rem);
  line-height: 1;
}

.profile-summary h2 { font-size: clamp(2.25rem, 4.2vw, 3.5rem); }

.profile-section .profile-lede {
  margin-top: 10px;
  color: var(--accent);
  font: 500 clamp(1.35rem, 2.5vw, 1.7rem)/1.15 var(--serif);
}

.profile-label {
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.profile-copy { max-width: 52ch; margin-top: 20px; }
.profile-copy p + p { margin-top: .85em; }
.work-highlights { margin: 0 0 .85em; padding: 0; list-style: none; }
.work-highlights li + li { margin-top: .55em; }
.summary-link { color: var(--link-ink); text-underline-offset: .2em; }

.profile-ink {
  min-height: 220px;
  align-self: stretch;
  background: var(--ink-landscape) var(--ink-position, left 56%) / auto 125% no-repeat;
  mask: radial-gradient(ellipse at 42% 50%, #000 33%, transparent 73%);
  mix-blend-mode: var(--ink-blend);
  opacity: .72;
}

.ink-work { --ink-position: center 56%; }
.ink-contact { --ink-position: right 70%; }

.profile-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 30px;
  margin-top: 16px;
  font-style: normal;
}

.profile-contact a {
  color: var(--link-ink);
  text-underline-offset: .2em;
  overflow-wrap: anywhere;
}

@media screen and (min-width: 801px) and (orientation: landscape) {
  html.panel-home { overflow: hidden; }

  .panel-home .page-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: clamp(8px, 1.7dvh, 22px);
    height: 100dvh;
    overflow: clip;
    padding-block: clamp(12px, 2.6dvh, 32px);
  }

  .panel-home main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    padding-block: clamp(14px, 4.2dvh, 62px);
  }

  .panel-home .site-header { padding-bottom: clamp(10px, 2dvh, 28px); }
  .panel-home .site-colophon { padding-top: clamp(5px, 1dvh, 14px); }
  .panel-home .panel-stage {
    width: min(100%, 940px);
    height: 100%;
    max-height: min(68dvh, 650px);
    min-height: 0;
    margin-block: 0;
  }

  .panel-home .panel-stage > :not([hidden]) { height: 100%; overflow: auto; }
  .panel-home .triptych { --panel-gap: clamp(16px, 2.4vw, 24px); }
  .panel-home .panel-grid { min-height: 100%; }

  .panel-home .panel {
    min-height: 0;
    gap: clamp(10px, 2dvh, 30px);
    padding: clamp(12px, min(2.7vw, 3.8dvh), 28px);
  }

  .panel-home .panel-copy h2 { font-size: clamp(1.75rem, min(3.3vw, 4.9dvh), 2.625rem); }
  .panel-home .panel-copy p { margin-top: clamp(6px, 1.3dvh, 12px); }
  .panel-home .explore { margin-top: clamp(7px, 1.8dvh, 18px); }

  .panel-home .panel-stage.is-interactive .profile {
    padding: clamp(14px, 3.4dvh, 34px) clamp(24px, 4vw, 52px);
  }

  .panel-home .panel-stage.is-interactive .profile:not([hidden]) {
    display: flex;
    flex-direction: column;
  }

  .panel-home .panel-return { align-self: flex-start; }

  .panel-home .profile-spread {
    flex: 1 0 auto;
    grid-template-rows: auto minmax(min-content, 1fr);
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    column-gap: clamp(24px, 5vw, 56px);
  }
  .panel-home .profile-intro h2 { font-size: clamp(2.5rem, min(5.4vw, 6.3dvh), 3.75rem); }
  .panel-home .profile-summary h2 { font-size: clamp(2.25rem, min(4.2vw, 5.4dvh), 3.5rem); }
  .panel-home .profile-copy { margin-top: clamp(10px, 2.2dvh, 20px); }
  .panel-home .profile-ink {
    align-self: center;
    height: clamp(150px, 36dvh, 330px);
    min-height: 0;
  }
}

@media screen and (min-width: 801px) and (orientation: landscape) and (max-height: 620px) {
  .panel-home main { padding-block: clamp(10px, 3dvh, 24px); }
  .panel-home .panel-copy p { line-height: 1.45; }
  .panel-home .profile-copy { font-size: .9375rem; line-height: 1.5; }
}

@media (max-width: 800px) {
  .page-shell { padding: 20px 16px; }
  .triptych { --panel-gap: 12px; }
  .panel-scenery {
    /* Recompose the same left, center, and right scenery for stacked cards. */
    background: var(--ink-landscape) left top / auto var(--panel-span) no-repeat,
                var(--ink-landscape) center / auto var(--panel-span) no-repeat,
                var(--ink-landscape) right bottom / auto var(--panel-span) no-repeat var(--scenery-paper);
    mask: var(--mask-fill) top / 100% var(--panel-span) no-repeat,
          var(--mask-fill) center / 100% var(--panel-span) no-repeat,
          var(--mask-fill) bottom / 100% var(--panel-span) no-repeat;
  }
  .panel-grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; }
  .bird-flight { top: 10%; }
  .panel {
    /* Reserve a visible edge of the next card below the first one. */
    min-height: max(17rem, min(90svh, calc(100svh - var(--mobile-panel-offset, 5.25rem) - var(--panel-gap) - 1rem)));
    padding: 28px;
  }
  .panel-copy h2 { font-size: clamp(2rem, 5.75vw, 2.75rem); }
  .site-colophon { padding-top: 16px; }
  .profile-spread { grid-template-columns: minmax(0, 1fr); row-gap: 22px; }
  .profile-ink {
    min-height: 165px;
    width: min(100%, 420px);
    justify-self: center;
    background-size: auto 150%;
  }
}

@media (max-width: 600px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-context { display: none; }
  .home-header { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; }
  .home-header .brand { font-size: 1.875rem; }
  .home-header .header-contact { font-size: .75rem; }
  .home-header .header-contact svg { display: none; }
  .site-title { font-size: clamp(1rem, 4vw, 1.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .splash:not([hidden]) { display: none; }
  .bird-flight, .bird-flight path { animation: none; }
  .panel, .panel-arrow { transition: none; }
  .panel:hover, .panel:focus-visible, .panel:hover .panel-arrow, .panel:focus-visible .panel-arrow { transform: none; }
}

@media print {
  :root, :root[data-theme] {
    color-scheme: light;
    --accent: #b8392d;
    --link-ink: #8b3025;
    --muted: #554e3e;
    color: #000;
    background: #fff;
  }
  .site-header, .splash:not([hidden]), .triptych, .site-colophon, .panel-return { display: none; }
  .page-shell { padding: 0; }
  .profile { margin: 0; }
  .panel-stage.is-interactive .profile { display: block; padding: 0; box-shadow: none; border: 0; background: none; }
  .panel-stage .profile-section[hidden] { display: block; }
  .profile-section { display: block; padding-block: 14px; }
  .profile-ink { display: none; }
  .profile-section h2 { margin-bottom: 8px; font-size: 24pt; }
}
