.portfolio-home {
  --ink: #171717;
  --paper: #f8f8f7;
  --line: #dededb;
  background: var(--paper);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.cover {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  background: #f7f7f7;
}
.cover > img {
  display: block;
  width: 100%;
  height: auto;
}

.exhibit {
  width: min(1500px, 94%);
  margin: auto;
  display: grid;
  grid-template-columns: minmax(158px, 17%) minmax(0, 1fr);
  gap: clamp(12px, 4vw, 60px);
  align-items: center;
  padding: 42px 0;
  min-height: 95svh;
}
.exhibit-index h2 { margin: 0 0 24px; font-size: clamp(20px, 2vw, 30px); }
.exhibit-index nav { display: grid; gap: 0; }
.exhibit-index nav a {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  white-space: nowrap;
  transition: color .18s, padding .18s;
}
.exhibit-index nav a:last-child { border-bottom: 1px solid var(--line); }
.exhibit-index nav a span { font: 12px/1 Consolas, monospace; color: #626262; }
.exhibit-index nav a[aria-current] { padding-left: 7px; color: #8d3f22; font-weight: 700; }
.back-cover { display: inline-block; margin-top: 24px; color: #525252; font-size: 13px; }

.exhibit-stage { position: relative; min-width: 0; aspect-ratio: 1.57; }
.exhibit-panel { position: absolute; inset: 0; isolation: isolate; }
.exhibit-panel:not([hidden]) { animation: reveal-project .24s ease-out both; }
@keyframes reveal-project { from { opacity: .35; transform: translateY(6px); } }
.exhibit-product {
  position: absolute;
  inset: 19% 25% 16%;
  z-index: 1;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.exhibit-product img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  filter: drop-shadow(0 18px 13px #25252538);
  transition: transform .24s, filter .24s;
  pointer-events: auto;
}
.exhibit-product:hover img, .exhibit-product:focus-visible img {
  transform: translateY(-6px);
  filter: drop-shadow(0 23px 17px #2525252a);
}
.exhibit-detail {
  position: absolute;
  right: 2%;
  bottom: 3%;
  z-index: 2;
  font-size: 14px;
  color: #6e351f;
  border-bottom: 1px solid currentColor;
}
.home-about {
  width: min(1500px, 94%);
  margin: auto;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
}
.home-about h2, .home-about p { margin: 0; font-size: 14px; }
@media (max-width: 760px) {

  .exhibit { grid-template-columns: 1fr; align-content: center; min-height: auto; padding: 42px 0 30px; gap: 24px; }
  .exhibit-index h2 { margin-bottom: 10px; }
  .exhibit-index nav { grid-template-columns: repeat(2, 1fr); gap: 0 12px; font-size: clamp(12px, 3vw, 15px); }
  .exhibit-index nav a:last-child { border-bottom: 0; }
  .back-cover { display: none; }
  .exhibit-stage { aspect-ratio: 1.08; }
  .exhibit-product { inset: 17% 21% 20%; }
}
@media (prefers-reduced-motion: reduce) {
  .exhibit-panel { animation: none !important; }
}

[data-theme="respiration"] { --gallery-color: #cee7e4; --gallery-light: #f0eee1; --gallery-accent: #643e23; }
[data-theme="rescue"] { --gallery-color: #cecece; --gallery-light: #e2e2e2; --gallery-accent: #862e23; }
[data-theme="inspection"] { --gallery-color: #b9b5b4; --gallery-light: #e6e5e3; --gallery-accent: #403635; }
[data-theme="disinfect"] { --gallery-color: #d3d3d3; --gallery-light: #c5e4e9; --gallery-accent: #23535b; }
.exhibit, .project-page {
  background-color: var(--gallery-color);
  background-image: radial-gradient(ellipse at 68% 44%, var(--gallery-light), transparent 66%);
}
.exhibit {
  width: 100%;
  padding-inline: max(5vw, calc((100% - 1500px) / 2));
  column-gap: clamp(22px, 6vw, 100px);
  transition: background-color .32s ease;
}
.exhibit-index h2 { font-size: 15px; letter-spacing: .12em; }
.exhibit-index nav a { border-color: #17171730; }
.exhibit-index nav a[aria-current] { color: var(--gallery-accent); }
.exhibit-index nav a span { color: #414141; }
.exhibit-stage { aspect-ratio: auto; height: clamp(420px, 66svh, 730px); }
.exhibit-product { inset: 3% 7% 11%; }
.exhibit-product img {
  filter: drop-shadow(0 24px 18px #17171724);
}
#respiration .exhibit-product { inset-inline: 18%; }
#rescue .exhibit-product { inset: 10% 16% 16%; }
#inspection .exhibit-product { inset-inline: 4%; }
#disinfect .exhibit-product { inset: 7% 17% 14%; }
.exhibit-detail { right: 5%; bottom: 0; color: var(--gallery-accent); }
@media (max-width: 760px) {
  .exhibit { padding-inline: 5vw; }
  .exhibit-stage { height: clamp(265px, 90vw, 465px); }
  .exhibit-detail { right: 0; }
}



.cover > img {
  height: min(71svh, 56.25vw);
  object-fit: cover;
  object-position: left bottom;
}
.exhibit {
  position: relative;
  align-items: start;
  min-height: 0;
  padding-block: 0 clamp(30px, 6vw, 90px);
  background-image:
    linear-gradient(to bottom, #f7f7f7, transparent clamp(125px, 22vh, 210px)),
    radial-gradient(ellipse at 68% 44%, var(--gallery-light), transparent 66%);
}
.exhibit-index {
  position: relative;
  padding: 36px 0 0 clamp(18px, 2vw, 32px);
  margin-left: 2.4vw;
}
.exhibit-index::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: clamp(3px, 0.45vw, 8px);
  background: linear-gradient(#151515 65%, transparent);
}
.exhibit-stage { margin-top: clamp(15px, 4vw, 60px); }
#works { scroll-margin-top: 16px; }
@media (max-width: 760px) {
  .cover > img { height: auto; }
  .exhibit-index { padding-top: 18px; margin-left: 2.4vw; }
  .exhibit-stage { margin-top: 0; }
  .exhibit { gap: 8px; }
}


/* The original cover is bottom-aligned, so both masks track its artwork. */
.cover {
  --date-width: 12vw;
  --date-height: 2.5vw;
  --date-right: 5vw;
  --date-bottom: 3.75vw;
}
.cover::before,
.cover::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.cover::before {
  right: var(--date-right);
  bottom: var(--date-bottom);
  width: var(--date-width);
  height: var(--date-height);
  background: #f7f7f7;
}
.cover::after {
  left: 7.2%;
  bottom: 0;
  width: 2.3%;
  height: min(19vw, 39%);
  background: linear-gradient(transparent, #f7f7f7 96%);
}
.exhibit-index::before { background: linear-gradient(transparent, #15151540 40%, transparent); }

.portfolio-home { background: #f5f3ed; }
.front-cover, .front-about {
  width: min(1500px, 90%);
  margin-inline: auto;
  color: #172b43;
}
.front-cover {
  min-height: min(650px, 82svh);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-block: 24px 32px;
}
.front-bar, .front-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-block-start: 1px solid #172b4350;
  padding-top: 14px;
  font-size: 14px;
  font-weight: 600;
}
.front-title { padding: clamp(55px, 8vw, 110px) 0; }
.front-title p { margin: 0 0 12px .5%; font-size: clamp(15px, 2vw, 24px); }
.front-title h1 {
  margin: 0;
  font-size: clamp(54px, 17vw, 245px);
  line-height: .87;
  letter-spacing: -.08em;
  font-weight: 800;
}
.front-bottom { justify-content: flex-end; }
.front-about {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 8vw, 120px);
  border-top: 1px solid #172b4350;
  padding: clamp(32px, 7vw, 92px) 0;
}
.front-about img { display: block; width: 100%; height: auto; max-width: 440px; }
.front-about h2 { font-size: clamp(32px, 5vw, 76px); line-height: 1.02; margin: 0; letter-spacing: -.045em; }
.front-about p { max-width: 30em; margin-block: 22px 26px; }
.front-about a { padding-bottom: 4px; border-bottom: 1px solid; }
.portfolio-home .exhibit-index::before { content: none; }
.portfolio-home .exhibit { background-image: linear-gradient(to bottom, #f5f3ed, transparent 180px), radial-gradient(ellipse at 68% 44%, var(--gallery-light), transparent 66%); }
@media (max-width: 600px) {
  .front-cover { min-height: min(490px, 65svh); }
  .front-bar nav { gap: 14px; }
  .front-about { grid-template-columns: 1fr; }
  .front-about img { max-width: 320px; }
}

.portfolio-home {
  background: repeating-linear-gradient(45deg, transparent 0 42px, #1818180b 42px 43px), #e4e4e2;
  color: #111;
  --industrial-red: #c31113;
}
.front-cover, .front-about { color: #111; }
.front-cover { min-height: 0; }
.front-title h1, .industrial-project h2, .industrial-number {
  font-family: "Arial Black", "Inter", Arial, sans-serif;
  font-weight: 900;
}
.front-title h1 { color: var(--industrial-red); font-size: clamp(54px, 15.5vw, 210px); }
.front-title p { font: 700 clamp(28px, 6.2vw, 84px)/.95 "Arial Black", Arial, sans-serif; letter-spacing: -.06em; }
.front-about { grid-template-columns: minmax(110px, 220px) minmax(0, 1fr); }
.industrial-works { width: min(1500px, 90%); margin: 0 auto; padding-bottom: 32px; }
.industrial-project {
  display: grid;
  grid-template-columns: minmax(36px, 7%) minmax(0, 1fr) minmax(0, 1.55fr);
  gap: clamp(12px, 2.5vw, 40px);
  align-items: start;
  padding-block: clamp(26px, 5vw, 72px);
  border-top: 1px solid #1116;
}
.industrial-number { color: var(--industrial-red); font-size: clamp(26px, 5vw, 65px); line-height: .95; }
.industrial-project h2 { margin: 0 0 14px; font-size: clamp(22px, 4.5vw, 62px); line-height: .95; letter-spacing: -.055em; }
.industrial-copy p { margin: 0 0 10px; max-width: 26ch; }
.industrial-name { font-weight: 700; }
.industrial-link { display: inline-block; border-bottom: 1px solid; margin-top: 12px; font-size: 14px; }
.industrial-link:hover, .industrial-project h2 a:hover { color: var(--industrial-red); }
.industrial-image {
  display: grid;
  place-items: center;
  aspect-ratio: 1.58;
  background: transparent;
}
.industrial-image img { display: block; width: 78%; height: auto; max-height: 82%; object-fit: contain; }
[data-item="respiration"] .industrial-image img { width: 45%; }
[data-item="rescue"] .industrial-image img { width: 48%; }
[data-item="inspection"] .industrial-image img { width: 85%; }
[data-item="disinfect"] .industrial-image img { width: 44%; }
@media (max-width: 630px) {
  .industrial-project { grid-template-columns: 45px minmax(0, 1fr); }
  .industrial-image { grid-column: 2; }
  .front-about { grid-template-columns: 1fr; }
  .front-about img { max-width: 225px; }
}

/* On touchscreens, keep the original colors visible without a hover gesture. */
.industrial-image img {
  transition: filter .45s ease, transform .45s ease;
}
@media (hover: hover) and (pointer: fine) {
  .industrial-image img { filter: grayscale(1); }
  .industrial-image:hover img, .industrial-image:focus-visible img {
    filter: grayscale(0);
    transform: scale(1.055);
  }
}
@media (prefers-reduced-motion: reduce) {
  .industrial-image img { transition: none; }
  .industrial-image:hover img, .industrial-image:focus-visible img { transform: none; }
}

