@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400&family=Inter:ital,wght@0,300;0,400;1,300;1,400&display=swap");

/* Roy Taro — official archive
   Quiet, editorial, work first. Light normal-width sans-serif typography. */

:root {
  --bg: #FFFFFF;
  --bg-alt: #F2F2EE;
  --text: #20211F;
  --muted: #61645F;      /* adjusted from #686B66 for >= 5.5:1 on --bg */
  --rule: #DADCD6;
  --jade: #1F6455;       /* adjusted from #236B50 toward the teal-greens sampled from Jade Sun / Cosmo Egg */
  --w-bg: #141B29;
  --sans: "Inter", "Noto Sans JP", "Helvetica Neue", "Hiragino Sans", "Yu Gothic", Arial, sans-serif;
  --serif: var(--sans);
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --col-gap: clamp(1rem, 2.4vw, 2.25rem);
  --max: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-weight: 300; font-size: 16px; line-height: 1.6;
  font-feature-settings: "palt" 0;
}
html[lang="ja"] body { line-height: 1.9; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--jade); }
:focus-visible { outline: 2px solid var(--jade); outline-offset: 3px; }
h1, h2, h3 { font-weight: 300; margin: 0; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--text); color: var(--bg); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- header / footer ---------- */
.site-header {
  max-width: var(--max); margin: 0 auto; padding: 1.75rem var(--gutter) 0;
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 1rem 2rem;
}
.site-name { font-size: 1rem; letter-spacing: 0.08em; text-decoration: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1.4rem; justify-content: flex-end; }
.site-nav a, .lang-switch a { text-decoration: none; font-size: 0.9375rem; padding: 0.35rem 0; display: inline-block; }
.site-nav a[aria-current="page"] { text-decoration: underline; }
.lang-switch { margin: 0; font-size: 0.875rem; color: var(--muted); }
.lang-switch a { color: var(--text); }

main { display: block; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
main:focus { outline: none; }

.site-footer {
  max-width: var(--max); margin: 8rem auto 0; padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  font-size: 0.875rem; color: var(--muted);
}
.site-footer p { margin: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer a { color: var(--text); text-decoration: none; }

/* ---------- common ---------- */
.page-head { padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.page-head h1 { font-size: clamp(1.375rem, 2.4vw, 1.75rem); line-height: 1.35; max-width: 34em; }
.section-label { font-size: 0.8125rem; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 1.25rem; text-transform: none; }
section { margin-bottom: clamp(3rem, 7vw, 5.5rem); }
.prose { max-width: 38em; }
html[lang="ja"] .prose { max-width: 36em; }
.prewrap { white-space: pre-line; }
.source { font-size: 0.875rem; color: var(--muted); }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { margin: 0 0 0.6rem; }
.ext a, .more a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.label { font-size: 0.8125rem; letter-spacing: 0.06em; color: var(--jade); margin: 0 0 0.75rem; }
.meta { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1.5rem; margin: 1.25rem 0 1.75rem; font-size: 0.9375rem; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.filters[hidden] { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-top: 1.75rem; }
.filters button {
  font: inherit; font-size: 0.875rem; background: none; border: 0; padding: 0.4rem 0; color: var(--muted); cursor: pointer;
  border-bottom: 1px solid transparent; min-height: 44px;
}
.filters button[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--text); }

/* ---------- home ---------- */
.home-hero {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--col-gap);
  padding-top: clamp(2.5rem, 7vw, 5.5rem); margin-bottom: clamp(5rem, 12vw, 9rem); align-items: end;
}
.hero-image { grid-column: 1 / span 7; margin: 0; }
.hero-image img { width: 100%; max-height: 84vh; object-fit: contain; object-position: left bottom; }
.hero-image figcaption, .fig figcaption { font-size: 0.8125rem; color: var(--muted); margin-top: 0.75rem; }
.hero-image .sep { color: var(--rule); }
.hero-poem { grid-column: 9 / span 4; padding-bottom: 12vh; }
.poem { font-family: var(--serif); font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.9; white-space: pre-wrap; margin: 0; }
.poem-second { margin-top: 2.25rem; color: var(--muted); font-size: 1rem; }
.home-now { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--col-gap); }
.home-now .section-label { grid-column: 1 / span 3; }
.now-item { grid-column: 4 / span 6; }
.now-item h2 { font-size: clamp(1.25rem, 2.2vw, 1.625rem); margin-bottom: 0.75rem; }
.now-item h2 a { text-decoration: none; }
.more { margin-top: 2rem; }

/* worlding entrance: a threshold, not a banner */
.worlding-door a {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--col-gap); align-items: end;
  background: var(--w-bg); color: #E2E6ED; text-decoration: none;
  min-height: clamp(18rem, 44vw, 30rem); padding: clamp(1.5rem, 4vw, 3rem);
  position: relative; overflow: hidden;
}
.worlding-door a::before { /* light source, faint and off-centre */
  content: ""; position: absolute; width: 46vmin; height: 46vmin; right: 12%; top: -12vmin; border-radius: 50%;
  background: radial-gradient(circle, rgba(63,174,134,.28) 0%, rgba(63,174,134,0) 68%); pointer-events: none;
}
.wd-title { grid-column: 1 / span 4; font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.25rem); }
.wd-text { grid-column: 6 / span 5; font-size: 0.9375rem; color: #B9C3D2; }
.wd-enter { grid-column: 12 / span 1; justify-self: end; font-size: 0.875rem; white-space: nowrap; }
.worlding-door a:hover .wd-enter, .worlding-door a:focus-visible .wd-enter { color: #fff; text-decoration: underline; }
.small-door a { min-height: 14rem; }

/* ---------- works grid (aspect ratios preserved, no cropping) ---------- */
.work-grid { list-style: none; margin: 0; padding: 0; columns: 3; column-gap: var(--col-gap); }
.work-card { break-inside: avoid; margin: 0 0 clamp(2rem, 4vw, 3.25rem); }
.work-card a { text-decoration: none; display: block; }
.work-card img { width: 100%; background: var(--bg-alt); }
.card-caption { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.875rem; margin-top: 0.7rem; }
.card-caption .y { color: var(--muted); }
.work-card a:hover .t { text-decoration: underline; }
.work-card[hidden] { display: none; }

/* ---------- single work ---------- */
.work { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--col-gap); padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.work-main { grid-column: 1 / span 8; }
.work-portrait .work-main { grid-column: 1 / span 7; }
.work-main img { max-height: 86vh; width: auto; max-width: 100%; }
.work-caption { grid-column: 9 / span 4; align-self: start; position: sticky; top: 2rem; }
.work-portrait .work-caption { grid-column: 9 / span 4; }
.work-caption h1 { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.35; }
.work-caption .context { font-size: 0.9375rem; color: var(--muted); }
.work-caption .prose { font-size: 0.9375rem; }
.work-images { margin-top: clamp(4rem, 9vw, 7rem); }
.fig { margin: 0; }
.fig a { display: block; cursor: zoom-in; }
.fig-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem) var(--col-gap); align-items: start; }
.fig-grid .fig:nth-child(3n+1):last-child { grid-column: 1 / -1; }
.pager { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--rule); padding-top: 1.5rem; font-size: 0.875rem; }
.pager a { text-decoration: none; }
.pager a[rel="next"] { margin-left: auto; text-align: right; }

/* ---------- exhibitions ---------- */
.ex-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ex-row { display: grid; grid-template-columns: 9rem minmax(0, 2.2fr) minmax(0, 1.6fr) minmax(0, 1fr); gap: 0.25rem var(--col-gap); padding: 0.9rem 0; border-bottom: 1px solid var(--rule); font-size: 0.9375rem; }
.ex-row[hidden] { display: none; }
.ex-year, .ex-type { color: var(--muted); }
.ex-type { font-size: 0.875rem; }
.ex-title a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.ex-head .meta { max-width: 44rem; }
.ex-body { margin-top: clamp(2.5rem, 6vw, 4rem); }
.text-block { margin-top: 2.5rem; }
.back { font-size: 0.875rem; }
.back a { text-decoration: none; }

/* ---------- poetry ---------- */
.poetry-intro .sub { font-family: var(--serif); font-size: 1.375rem; margin-bottom: 1.5rem; }
.poems { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--col-gap); row-gap: clamp(3.5rem, 8vw, 6rem); margin: 2.5rem 0 3rem; }
.poem-entry { grid-column: 1 / span 6; }
.poem-entry.align-right { grid-column: 7 / span 6; }
.poem-entry.align-center { grid-column: 4 / span 6; }
.poem-date { font-size: 0.8125rem; color: var(--muted); letter-spacing: 0.04em; margin-bottom: 1rem; }

/* ---------- about / contact ---------- */
.about { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--col-gap); }
.about > section { grid-column: 1 / span 8; }
.about-name { font-size: 1.25rem; margin-bottom: 0.25rem; }
.statement { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.85; max-width: 36em; }
html[lang="ja"] .statement { line-height: 2.05; }
.statement .sign { margin-top: 1.5rem; font-family: var(--sans); font-size: 0.9375rem; }
.cv-sec { margin-bottom: 2.5rem; }
.cv-sec h3 { font-size: 0.9375rem; margin-bottom: 0.75rem; }
.cv-list { list-style: none; margin: 0; padding: 0; font-size: 0.9375rem; }
.cv-list .ex-title { overflow-wrap: anywhere; min-width: 0; }
.cv-list li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; padding: 0.3rem 0; }
.cv-list .ex-title a { border-bottom: 1px solid var(--rule); text-decoration: none; }
.contact .email { font-size: clamp(1.125rem, 2vw, 1.375rem); }

/* ---------- lightbox ---------- */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: rgba(255,255,255,.98); }
.lightbox::backdrop { background: rgba(255,255,255,.98); }
.lb-inner { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 4.5rem 4.5rem 5rem; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 10rem); width: auto; height: auto; object-fit: contain; }
.lightbox figcaption { font-size: 0.8125rem; color: var(--muted); margin-top: 0.9rem; text-align: center; }
.lightbox button { position: absolute; background: none; border: 0; font: inherit; font-size: 1.5rem; color: var(--text); width: 48px; height: 48px; cursor: pointer; }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.75rem; top: 50%; transform: translateY(-50%); }
.lightbox button[hidden] { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .work-grid { columns: 2; }
  .ex-row { grid-template-columns: 7rem 1fr; }
  .ex-place, .ex-type { grid-column: 2; }
}
@media (max-width: 900px) {
  .work, .home-hero, .about, .home-now { display: block; }
  .work-caption { position: static; margin-top: 2rem; }
  .work-main img { max-height: none; width: 100%; }
  .hero-poem { padding: 2.5rem 0 0 18%; }
  .hero-image img { max-height: none; }
  .home-now .section-label { margin-bottom: 1rem; }
  .poems { display: block; }
  .poem-entry { margin-bottom: 3.5rem; }
  .poem-entry.align-right { padding-left: 22%; }
  .poem-entry.align-center { padding-left: 11%; }
  .worlding-door a { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 1rem; }
}
@media (max-width: 680px) {
  .site-header { grid-template-columns: 1fr auto; padding-top: 1.25rem; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; }
  .site-nav ul { justify-content: flex-start; gap: 0 1.1rem; }
  .site-nav a { padding: 0.55rem 0; }
}
@media (max-width: 560px) {
  .work-grid { columns: 1; }
  .fig-grid { grid-template-columns: 1fr; }
  .ex-row { grid-template-columns: 1fr; }
  .ex-place, .ex-type { grid-column: 1; }
  .cv-list li { grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.75rem; }
  .meta { grid-template-columns: 1fr; gap: 0; }
  .meta dd { margin-bottom: 0.6rem; }
  .lb-inner { padding: 3.75rem 0.5rem 4.5rem; }
  .lb-prev, .lb-next { top: auto; bottom: 0.75rem; transform: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print { .site-nav, .lang-switch, .worlding-door, .filters, .pager { display: none; } }

/* CV portrait — preserve the original landscape composition */
.cv-portrait { grid-column: 1 / span 8; margin: 0 0 clamp(2rem, 5vw, 3.5rem); }
.cv-portrait[hidden] { display: none; }
.cv-portrait img { display: block; width: 100%; height: auto; }

/* Hirono AIR archive */
.hirono-archive { max-width: 76rem; }
.hirono-archive > section { margin-bottom: clamp(3.5rem, 8vw, 7rem); }
.hirono-work { border-top: 1px solid var(--rule); padding-top: 2rem; }
.hirono-work h2 { font-size: clamp(1.2rem, 2vw, 1.6rem); margin-bottom: 1.5rem; }
.hirono-media { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--col-gap); align-items: start; margin-bottom: 1.5rem; }
.hirono-media figure { margin: 0; }
.hirono-media img { width: 100%; height: auto; }
.hirono-media figcaption { color: var(--muted); font-size: .85rem; margin-top: .5rem; }
.hirono-video { aspect-ratio: 16/9; max-width: 52rem; }
.hirono-video iframe { border: 0; width: 100%; height: 100%; }
@media(max-width:760px) { .hirono-media { grid-template-columns: 1fr; gap: 1.5rem; } }

/* Bilingual typography */
.about-name .name-reading { font-size: 0.5em; font-weight: 300; margin-left: .35em; }
strong, b { font-weight: 400; }
