:root {
  --bg: #ffffff;
  --fg: #111111;
  --fg-muted: #888888;
  --border: #e8e8e8;
  --max-width: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d0d;
    --fg: #f2f2f2;
    --fg-muted: #8a8a8a;
    --border: #262626;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", "Hiragino Sans", "Noto Sans JP", Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

a {
  color: inherit;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.series-view {
  display: none;
}

.series-view.active {
  display: block;
}

/* Reveal on open / scroll into view (rise + fade) */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    will-change: opacity, transform;
  }

  .reveal.in {
    opacity: 1;
    transform: none;
    transition: opacity 1s ease, transform 1s cubic-bezier(0.22, 1, 0.36, 1);
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  font-weight: 500;
  letter-spacing: 0.04em;
  font-size: 18px;
  text-decoration: none;
  color: var(--fg);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 36px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--fg);
}

.nav-links a.active {
  color: var(--fg);
}

/* Works dropdown submenu */
.has-submenu {
  position: relative;
}

.submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 120;
}

.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.submenu a {
  white-space: nowrap;
  /* Solid (not muted) so the items read as crisply over photos as they do
     over the white Works page */
  color: var(--fg);
  /* Halo in the site background colour: invisible over the plain page, but
     keeps the text clearly legible wherever it overlaps a photo behind it */
  text-shadow:
    0 0 2px var(--bg),
    0 0 4px var(--bg),
    0 0 7px var(--bg),
    0 0 11px var(--bg);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 20px;
  height: 1px;
  background: var(--fg);
}

/* Hero */
.hero {
  padding: 160px 0 120px;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 56px);
  margin: 0;
  letter-spacing: -0.01em;
  font-weight: 400;
}

.hero-jp {
  font-size: 0.5em;
  color: var(--fg-muted);
  margin-left: 16px;
  font-weight: 400;
}

.hero-role {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}

.hero .lead-image {
  margin: 48px 0 0;
}

.current-exhibition {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  max-width: 560px;
}

.current-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  margin: 0 0 12px;
}

.current-title {
  font-size: 16px;
  margin: 0 0 6px;
}

.current-title .en {
  display: block;
  font-size: 13px;
  color: var(--fg-muted);
  font-style: italic;
  margin-top: 4px;
}

.current-venue {
  font-size: 13px;
  color: var(--fg-muted);
  margin: 0;
}

/* Hero work-image slideshow */
.hero-slideshow {
  position: relative;
  /* Break out a little wider than the text column for a larger slideshow.
     Centered with margins (not transform) so the reveal fade-in can use transform. */
  --hero-w: min(100vw - 40px, 1320px);
  width: var(--hero-w);
  margin-left: calc((100% - var(--hero-w)) / 2);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  margin-top: 8px;
  background: var(--bg);
}

.hero-slideshow .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slideshow .slide.is-active {
  opacity: 1;
}

.hero-slide-info {
  margin: 16px 0 0;
  line-height: 1.7;
}

.hero-slide-title {
  font-size: 14px;
  color: var(--fg);
}

.hero-slide-title .en {
  color: var(--fg-muted);
  font-style: italic;
  margin-left: 8px;
}

.hero-slide-meta {
  display: block;
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 4px;
}

/* Home random work-image gallery (masonry — natural shapes) */
.home-gallery {
  margin-top: 96px;
  column-count: 2;
  column-gap: 10px;
}

.home-gallery-item {
  display: block;
  margin: 0 0 10px;
  break-inside: avoid;
  overflow: hidden;
  background: var(--border);
}

.home-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.home-gallery-item:hover img {
  transform: scale(1.04);
  opacity: 0.9;
}

/* Sections */
.section {
  padding: 88px 0;
}

.section h2 {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-muted);
  margin: 0 0 48px;
}

.section-body p {
  color: var(--fg);
  max-width: 640px;
  font-size: 16px;
}

.section-body p.en {
  color: var(--fg-muted);
  font-size: 14px;
  margin-top: 20px;
}

/* Exhibition installation slideshow */
.install-slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--border);
  margin: 0;
}

.install-slideshow .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.install-slideshow .slide.is-active {
  opacity: 1;
}

.install-caption {
  font-size: 13px;
  color: var(--fg-muted);
  margin: 16px 0 72px;
  line-height: 1.7;
}

/* Exhibitions pickup grid (representative installation views) */
.pickup-label {
  font-size: 13px;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
  margin: 0 0 24px;
  text-align: center;
}

.pickup-label .en {
  margin-left: 10px;
}

.exhibitions-pickup {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: start;
  /* One column, large — but kept smaller than the slideshow above, centred */
  max-width: 800px;
  margin: 0 auto;
}

.exhibition-card {
  display: block;
  text-decoration: none;
  color: var(--fg);
  cursor: pointer;
}

.exhibition-card-media {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--border);
}

.exhibition-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.exhibition-card:hover .exhibition-card-media img,
.exhibition-card:focus-visible .exhibition-card-media img {
  transform: scale(1.04);
  opacity: 0.9;
}

.exhibition-card-title {
  font-size: 15px;
  margin: 12px 0 0;
  line-height: 1.5;
}

.exhibition-card-title .en {
  color: var(--fg-muted);
  font-size: 13px;
  margin-left: 8px;
}

.exhibition-card-meta {
  font-size: 13px;
  color: var(--fg-muted);
  margin: 4px 0 0;
}

.exhibition-card:hover .exhibition-card-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Clickable exhibition entry (opens installation gallery) */
.year-sublist li.has-gallery {
  cursor: pointer;
}

.year-sublist li.has-gallery > .jp {
  font-weight: 600;
}

.year-sublist li.has-gallery:hover .jp {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gallery-hint {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 8px;
  padding: 3px 10px;
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.03em;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.18));
  border-radius: 999px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.year-sublist li.has-gallery:hover .gallery-hint {
  color: var(--fg);
  border-color: var(--fg);
}

.install-caption .en {
  font-style: italic;
  margin-left: 8px;
}

/* CV subheads (Exhibitions / Information) */
.cv-subhead {
  font-size: 14px;
  font-weight: 500;
  margin: 56px 0 20px;
  letter-spacing: 0.02em;
}

.cv-subhead:first-child {
  margin-top: 0;
}

.cv-subhead .en {
  color: var(--fg-muted);
  font-weight: 400;
  font-size: 12px;
  margin-left: 10px;
}

/* Exhibitions */
.exhibition-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.exhibition-list li {
  display: flex;
  gap: 24px;
  font-size: 15px;
}

.exhibition-year {
  width: 48px;
  flex-shrink: 0;
  color: var(--fg-muted);
}

.exhibition-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exhibition-detail[hidden] {
  display: none;
}

.year-group {
  margin-bottom: 28px;
}

.year-heading {
  font-size: 13px;
  color: var(--fg-muted);
  font-weight: 400;
  margin: 0 0 12px;
}

.year-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.year-sublist li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 15px;
  max-width: 720px;
}

.year-sublist .en,
.exhibition-detail .en {
  color: var(--fg-muted);
  font-size: 13px;
}

/* Work */
.works-section {
  padding-bottom: 40px;
}

.lead-image {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 96px;
}

.works-category {
  font-size: 22px;
  margin: 0 0 32px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.works-category-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 0 0 32px;
  padding: 0;
}

.works-category-nav a {
  text-decoration: none;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--fg-muted);
  transition: color 0.2s ease;
}

.works-category-nav a:hover,
.works-category-nav a.active {
  color: var(--fg);
}

.category-view {
  display: none;
}

.category-view.active {
  display: block;
}

.drawing-placeholder {
  font-size: 15px;
  color: var(--fg-muted);
}

.drawing-placeholder .en {
  font-style: italic;
  margin-left: 8px;
}

.works-subnav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 0 0 96px;
  padding: 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}

.works-subnav a {
  text-decoration: none;
  font-size: 17px;
  color: var(--fg-muted);
  transition: color 0.2s ease;
}

.works-subnav a:hover,
.works-subnav a.active {
  color: var(--fg);
}

.work-series {
  margin-bottom: 0;
}

.sub-series + .sub-series {
  margin-top: 112px;
  padding-top: 112px;
  border-top: 1px solid var(--border);
}

.series-header {
  margin-bottom: 32px;
}

.series-title {
  font-size: 24px;
  margin: 0;
  letter-spacing: -0.01em;
}

.series-title .en {
  color: var(--fg-muted);
  font-weight: 400;
  font-size: 16px;
  margin-left: 12px;
}

.series-years {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--fg-muted);
}

.statement {
  max-width: 640px;
  margin-bottom: 24px;
}

.statement p {
  font-size: 15px;
  margin: 0 0 18px;
}

.statement p:last-child {
  margin-bottom: 0;
}

.statement-en {
  margin-top: 24px;
  margin-bottom: 48px;
}

.statement-en p {
  color: var(--fg-muted);
  font-size: 13px;
}

/* Collapsible statement (Read more) */
.statement-collapse {
  position: relative;
  max-height: 8em;
  overflow: hidden;
  transition: max-height 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.statement-collapse.expanded {
  max-height: 4000px;
}

.statement-collapse:not(.expanded) .statement {
  margin-bottom: 0;
}

.statement-collapse:not(.expanded)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4em;
  background: linear-gradient(rgba(255, 255, 255, 0), var(--bg));
  pointer-events: none;
}

.statement-toggle {
  background: none;
  border: none;
  padding: 0;
  margin: 12px 0 48px;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.statement-toggle:hover {
  color: var(--fg);
}

.process-image {
  width: 100%;
  max-width: 320px;
  height: auto;
  display: block;
  margin-bottom: 8px;
}

.process-caption {
  font-size: 12px;
  color: var(--fg-muted);
  margin: 0 0 48px;
}

.process-caption .en {
  margin-left: 8px;
}

.subgroup-title {
  font-size: 14px;
  color: var(--fg-muted);
  margin: 56px 0 32px;
}

.drawing-year:first-child {
  margin-top: 0;
}

.subgroup-title .en {
  margin-left: 8px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: start;
}

.work-card {
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
}

.work-thumb {
  width: 100%;
  height: auto;
  background: var(--border);
  margin-bottom: 0;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.work-card:hover .work-thumb,
.work-card:focus-visible .work-thumb {
  transform: scale(1.04);
  opacity: 0.9;
}

/* Info overlay — hidden by default, rises on hover */
.work-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 18px 16px;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.work-card:hover .work-overlay,
.work-card:focus-visible .work-overlay {
  opacity: 1;
  transform: none;
}

.work-overlay .work-title {
  font-size: 14px;
  margin: 0 0 4px;
  letter-spacing: 0.01em;
  color: #fff;
}

.work-overlay .work-title .en {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
  margin-top: 3px;
}

.work-overlay .work-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.work-overlay .work-credit {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin: 4px 0 0;
}

/* Touch devices: no hover, keep info visible over the image */
@media (hover: none) {
  .work-overlay {
    opacity: 1;
    transform: none;
  }
}

/* Contact */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-list a {
  text-decoration: none;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-muted);
  transition: color 0.2s ease;
}

.contact-list a:hover {
  color: var(--fg);
}

.contact-list a span {
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}

.contact-list a:hover span {
  border-color: var(--fg);
}

.contact-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 24px;
  z-index: 210;
  background: var(--bg);
  border: none;
  cursor: pointer;
  color: var(--fg-muted);
  font-size: 32px;
  line-height: 1;
  padding: 16px;
  transition: color 0.2s ease;
  font-family: inherit;
}

.lightbox-close:hover {
  color: var(--fg);
}

.lightbox-scroll {
  max-width: 960px;
  margin: 0 auto;
  padding: 96px 32px 120px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.lightbox-info {
  margin-bottom: -16px;
}

.lightbox-info .work-title {
  font-size: 18px;
  margin: 0 0 6px;
}

.lightbox-info .work-title .en {
  display: block;
  font-size: 13px;
  color: var(--fg-muted);
  font-style: italic;
  margin-top: 4px;
}

.lightbox-info .work-meta {
  font-size: 13px;
  color: var(--fg-muted);
  margin: 0;
}

.lightbox-info .work-credit {
  font-size: 12px;
  color: var(--fg-muted);
  margin: 4px 0 0;
}

.lightbox-info .work-meta {
  margin-top: 8px;
}

.lightbox-info .lb-statement {
  font-size: 14px;
  color: var(--fg);
  margin: 24px 0 0;
  max-width: 640px;
  line-height: 1.9;
}

.lightbox-info .lb-artists {
  font-size: 13px;
  color: var(--fg-muted);
  margin: 16px 0 0;
  max-width: 640px;
  line-height: 1.8;
}

.lightbox-info .lb-note {
  font-size: 12px;
  color: var(--fg-muted);
  margin: 24px 0 0;
  max-width: 640px;
  line-height: 1.8;
}

.lightbox-info .lb-artists .en,
.lightbox-info .work-meta .en {
  font-style: italic;
}

.lightbox-scroll img {
  width: 100%;
  height: auto;
  display: block;
}

/* Footer */
.site-footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.site-footer p {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
}

/* Mobile */
@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-links.open {
    max-height: 460px;
  }

  .nav-links li {
    border-top: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 16px 0;
  }

  /* Mobile: submenu shown inline (no hover) */
  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin: 0;
    padding: 0;
    gap: 0;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .submenu li {
    border-top: 1px solid var(--border);
  }

  .submenu a {
    padding: 14px 0 14px 20px;
    font-size: 11px;
  }

  .hero {
    padding: 100px 0 72px;
  }

  .section {
    padding: 56px 0;
  }

  .works-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .home-gallery {
    column-count: 2;
    margin-top: 64px;
  }

  .lead-image {
    margin-bottom: 64px;
  }

  .work-series {
    margin-bottom: 72px;
  }

  .sub-series + .sub-series {
    margin-top: 72px;
    padding-top: 72px;
  }

  .lightbox-scroll {
    padding: 80px 16px 96px;
    gap: 40px;
  }
}
