:root {
  --paper:    #f1ece2;
  --paper-2:  #e9e3d6;
  --paper-3:  #ddd5c2;
  --ink:      #2a2620;
  --ink-2:    #6b655a;
  --ink-3:    #a39b8c;
  --rule:     #cfc8b8;
  --redink:   #f6e1d4;
  --redink-2: #efc8b5;
  --redink-3: rgba(246, 225, 212, 0.88);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Shippori Mincho', 'Noto Serif JP', serif;
  color: var(--ink);
  background: var(--paper);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* page-load fade — transform は使わない（body に transform があると
     position:fixed の子孫がビューポート基準でなくなるため） */
  opacity: 0;
  transition: opacity 1.1s ease;
}
body.is-loaded {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  body { opacity: 1; transition: none; }
}
.mono { font-family: 'JetBrains Mono', monospace; font-weight: 400; }

/* image saturation pass for cohesion */
.desat {
  filter: saturate(0.74) contrast(0.96) brightness(0.98) sepia(0.06);
}
.bw {
  filter: grayscale(1) contrast(0.96) brightness(0.98);
}

/* hide mobile top nav on desktop */
.mobile-nav { display: none; }

/* ===== LEFT (fixed) ===== */
.left {
  position: fixed;
  top: 0; left: 0;
  width: 50%;
  height: 100vh;
  background: #5e1411;
  overflow: hidden;
  z-index: 1;
}
.left-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 22% center;
  display: block;
  filter: saturate(0.72) contrast(0.94) brightness(0.86) sepia(0.06);
}
/* darken to lift text contrast — subtle, not blocky */
.left::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(30,4,4,0.55) 0%,
      rgba(30,4,4,0.18) 22%,
      rgba(30,4,4,0.15) 40%,
      rgba(30,4,4,0.15) 62%,
      rgba(30,4,4,0.28) 86%,
      rgba(30,4,4,0.55) 100%),
    radial-gradient(ellipse at 78% 50%, rgba(30,4,4,0.42), rgba(30,4,4,0) 55%);
  pointer-events: none;
}
.left-content {
  position: absolute; inset: 0;
  color: var(--redink);
  z-index: 2;
  padding: 44px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* TOP: artist identity */
.id-block .mark {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.42em;
  color: var(--redink-3);
  margin-bottom: 14px;
}
.id-block .name {
  font-size: 30px;
  letter-spacing: 0.22em;
  font-weight: 400;
  line-height: 1.4;
  margin: 0 0 6px;
  text-shadow: 0 1px 14px rgba(30,4,4,0.5);
}
.id-block .name-en {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.44em;
  color: var(--redink-2);
  margin-bottom: 18px;
}
.id-block .roles {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--redink);
  line-height: 1.9;
  opacity: 0.95;
}

/* MIDDLE-RIGHT: nav */
.nav {
  position: absolute;
  right: 56px;
  top: 50%;
  transform: translateY(calc(-50% - 100px));
  list-style: none;
  margin: 0; padding: 0;
  text-align: right;
  z-index: 3;
}
.nav li { margin: 6px 0; }
.nav a {
  display: inline-block;
  color: var(--redink);
  text-decoration: none;
  font-family: 'Shippori Mincho', 'Noto Serif JP', serif;
  font-size: 13px;
  letter-spacing: 0.28em;
  line-height: 1.7;
  padding: 4px 0;
  position: relative;
  text-shadow: 0 1px 14px rgba(30,4,4,0.45);
  transition: color 0.4s ease, letter-spacing 0.4s ease;
}
.nav .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--redink-3);
  margin-right: 10px;
  vertical-align: 1px;
}
.nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: var(--redink);
  transition: width 0.6s cubic-bezier(.2,.6,.2,1);
}
.nav a:hover::after { width: 100%; }
.nav a.is-active {
  color: #fff;
}
.nav a.is-active::after { width: 100%; }
.nav a.is-active .num { color: var(--redink-2); }

/* BOTTOM: small print */
.foot-left {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.36em;
  color: var(--redink-3);
  line-height: 2;
  text-shadow: 0 1px 14px rgba(30,4,4,0.45);
}
.foot-left .now {
  color: var(--redink-2);
  font-family: 'Shippori Mincho', 'Noto Serif JP', serif;
  letter-spacing: 0.24em;
  font-size: 11px;
  display: block;
  margin-bottom: 6px;
}

/* ===== RIGHT (scroll) ===== */
.right {
  margin-left: 50%;
  width: 50%;
  background: var(--paper);
  min-height: 100vh;
  color: var(--ink);
}

/* spacers */
.sp-3xl { height: 240px; }
.sp-2xl { height: 180px; }
.sp-xl  { height: 140px; }
.sp-lg  { height: 96px; }
.sp-md  { height: 64px; }

/* section heading */
.sec {
  padding: 0 96px;
}
.sec-head {
  padding: 0 96px;
  margin-bottom: 56px;
}
.sec-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.42em;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.sec-title {
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.24em;
  margin: 0;
  line-height: 1.6;
}
.sec-title-en {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.44em;
  color: var(--ink-3);
  margin-top: 8px;
}

/* body text */
.body p {
  margin: 0;
  font-size: 14px;
  line-height: 2.3;
  letter-spacing: 0.08em;
  max-width: 28em;
  color: var(--ink);
}
.body p + p { margin-top: 22px; }
.body p.lead {
  font-size: 16px;
  line-height: 2.4;
}

/* ===== Reveal on scroll — quiet fade up =====
   Applied to each <figure class="work"> (former parallax target). */
figure.work {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 1.1s cubic-bezier(.2,.6,.2,1),
    transform 1.1s cubic-bezier(.2,.6,.2,1);
  will-change: opacity, transform;
}
figure.work.is-in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  figure.work { opacity: 1; transform: none; transition: none; }
}

/* ===== WORK FIGURE ===== */
figure.work {
  margin: 0;
  padding: 0 64px;
}
figure.work.indent  { padding: 0 120px 0 64px; }
figure.work.indent2 { padding: 0 64px 0 120px; }

/* frame's aspect-ratio matches each work's natural ratio so the
   image is shown fully — we fade the figure in from below on enter. */
.work-frame {
  width: 100%;
  background: var(--paper-2);
  position: relative;
  overflow: hidden;
}
.work-frame.r-43  { aspect-ratio: 4 / 3; }   /* landscape paintings */
.work-frame.r-34  { aspect-ratio: 3 / 4; }   /* portrait paintings */
.work-frame.r-32  { aspect-ratio: 3 / 2; }   /* wide photos */
.work-frame.r-45  { aspect-ratio: 4 / 5; }
.work-frame.r-11  { aspect-ratio: 1 / 1; }

.work-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* studio portrait — keep the right edge (subject is on the right) */
.work-img.anchor-right { object-position: right center; }
.work-img.desat {
  filter: saturate(0.74) contrast(0.96) brightness(0.98) sepia(0.06);
}

figcaption.work-cap {
  margin-top: 22px;
  font-size: 11px;
  letter-spacing: 0.2em;
  line-height: 2;
  color: var(--ink-2);
}
figcaption.work-cap .no {
  font-family: 'JetBrains Mono', monospace;
  margin-right: 12px;
  color: var(--ink-3);
  letter-spacing: 0.24em;
}
figcaption.work-cap .title-jp {
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.16em;
}
figcaption.work-cap .meta {
  color: var(--ink-3);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  margin-left: 10px;
}

/* longer description for a work */
.work-desc {
  margin-top: 28px;
  padding-left: 0;
  max-width: 28em;
  font-size: 13px;
  line-height: 2.2;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.work-desc p { margin: 0; }
.work-desc p + p { margin-top: 16px; }
figure.work.indent  .work-desc { margin-left: 0; }
figure.work.indent2 .work-desc { margin-left: 0; }

/* placeholder */
.ph {
  width: 100%; height: 100%;
  background: var(--paper-2);
  position: absolute; inset: 0;
  display: block; overflow: hidden;
}
.ph svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ph .lbl {
  position: absolute; left: 18px; bottom: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: 0.32em;
  color: var(--ink-2); opacity: 0.7;
}

/* profile imgs */
.profile-row {
  padding: 0 96px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  align-items: start;
}
.profile-row .work-frame { aspect-ratio: 3 / 2; }    /* chorus photo */
.profile-row .work-frame.studio { aspect-ratio: 4 / 3; } /* studio photo */
.pf-cap {
  margin-top: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--ink-3);
}

/* exhibition block */
.exh-card {
  padding: 0 96px;
}
.exh-card .frame {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 36px 0;
}
.exh-card h3 {
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.2em;
  margin: 0 0 26px;
}
.exh-card dl {
  display: grid;
  grid-template-columns: 7em 1fr;
  row-gap: 12px;
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.14em;
  line-height: 1.9;
}
.exh-card dt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--ink-3);
  padding-top: 4px;
}
.exh-card dd { margin: 0; color: var(--ink); }

/* footer */
footer.foot {
  padding: 0 96px 96px;
  margin-top: 160px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.36em;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
}

/* ===== To-Top floating link ===== */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  text-decoration: none;
  color: var(--ink-2);
  background: rgba(241, 236, 226, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--rule);
  padding: 8px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.32em;
  line-height: 1;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease, color 0.3s ease;
}
.to-top.is-visible {
  opacity: 0.85;
  transform: translateY(0);
  pointer-events: auto;
}
.to-top:hover { color: var(--ink); opacity: 1; }
.to-top .arr {
  display: inline-block;
  margin-right: 8px;
  transform: translateY(-1px);
}

/* ===== Mobile ===== */
@media (max-width: 820px) {
  /* nav becomes a top-fixed strip */
  .mobile-nav {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 40;
    background: rgba(241, 236, 226, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--rule);
    padding: 12px 12px;
    gap: 4px;
    justify-content: space-between;
    align-items: center;
  }
  .mobile-nav a {
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: var(--ink-2);
    font-family: 'Shippori Mincho', 'Noto Serif JP', serif;
    font-size: 11px;
    letter-spacing: 0.16em;
    line-height: 1;
    padding: 4px 2px;
    position: relative;
    white-space: nowrap;
  }
  .mobile-nav a::after {
    content: "";
    position: absolute;
    left: 18%; right: 18%; bottom: -4px;
    height: 1px;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s ease;
  }
  .mobile-nav a.is-active { color: var(--ink); }
  .mobile-nav a.is-active::after { transform: scaleX(1); }

  body { padding-top: 44px; } /* room for fixed top nav */

  .left {
    position: relative;
    inset: auto;
    width: 100%;
    height: calc(100vh - 44px);
    min-height: 540px;
  }
  .left-img { object-position: 28% center; }
  .left-content { padding: 28px 24px; }
  .id-block .name { font-size: 22px; }
  /* hide the right-side nav on mobile (handled by top mobile-nav) */
  .nav { display: none; }
  .right {
    margin-left: 0;
    width: 100%;
  }
  .sec, .sec-head, .exh-card, footer.foot { padding-left: 28px; padding-right: 28px; }
  figure.work, figure.work.indent, figure.work.indent2 { padding: 0 24px; }
  .profile-row {
    padding: 0 28px;
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .body p { font-size: 13px; line-height: 2.2; }
  .sp-3xl { height: 140px; }
  .sp-2xl { height: 110px; }
  .sp-xl  { height: 88px; }
  .sp-lg  { height: 64px; }
  footer.foot { flex-direction: column; gap: 10px; padding-bottom: 56px; }
}
