:root {
  --bg: #fff;
  --ink: #090909;
  --muted: #d4d4d4;
  --line: rgba(17, 17, 17, 0.2);
  --accent: #090909;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, "Helvetica Neue", "PingFang SC", sans-serif;
  font-size: 12px;
  letter-spacing: 0;
}

body.overlay-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cursor {
  position: fixed;
  z-index: 90;
  width: 12px;
  height: 12px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 180ms var(--ease), height 180ms var(--ease), background 180ms var(--ease);
}

.cursor.is-active {
  width: 34px;
  height: 34px;
  border-color: var(--accent);
  background: var(--accent);
  mix-blend-mode: multiply;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  justify-self: start;
}

.nav button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  cursor: pointer;
  text-transform: uppercase;
}

.nav-center {
  margin-right: 0;
}

.nav a,
.nav button {
  border-bottom: 1px solid transparent;
}

.nav a:hover,
.nav button:hover {
  border-color: currentColor;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  grid-template-columns: 30% 40% 30%;
  align-items: stretch;
  padding: 0 12px;
}

.hero-index {
  display: grid;
  min-height: 100svh;
  align-items: center;
  transition: opacity 300ms var(--ease);
}

.project-menu {
  display: grid;
  height: 68vh;
  grid-template-rows: repeat(4, 1fr);
  align-items: center;
}

.project-menu button {
  display: grid;
  grid-template-columns: 32% minmax(0, 1fr);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
  transition: color 220ms var(--ease);
}

.project-menu button span {
  font-size: 11px;
}

.project-menu button:hover,
.project-menu button.active {
  color: var(--accent);
}

.hero-index-left .project-menu {
  padding-left: 8vw;
}

.hero-index-right .project-menu {
  padding-right: 7vw;
}

.hero-index-right .project-menu button {
  grid-template-columns: 30% minmax(0, 1fr);
}

.hero-media {
  position: relative;
  z-index: 2;
  height: 100svh;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
}

.hero-image-track {
  position: absolute;
  inset: 0;
  transition: transform 620ms cubic-bezier(0.45, 0, 0.2, 1);
  will-change: transform;
}

.hero-slide {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
}

.hero-slide.is-square {
  width: min(58%, 340px);
  aspect-ratio: 1;
}

.hero-slide.is-wide {
  width: min(84%, 500px);
  aspect-ratio: 16 / 9;
}

.hero-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide.has-cover::before,
.hero-slide.has-cover::after {
  display: none;
}

.hero-slide::before,
.hero-slide::after,
.detail-image::before,
.detail-image::after,
.thumb::before,
.thumb::after {
  position: absolute;
  content: "";
}

.hero-slide::before,
.detail-image::before,
.thumb::before {
  inset: 13%;
  border: 1px solid currentColor;
  transform: rotate(var(--r, 12deg));
}

.hero-slide::after,
.detail-image::after,
.thumb::after {
  width: 23%;
  aspect-ratio: 1;
  top: var(--top, 55%);
  left: var(--left, 56%);
  background: var(--shape, var(--accent));
  transform: translate(-50%, -50%) rotate(var(--r2, 0deg));
}

.hero-slide figcaption,
.detail-image figcaption {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  color: currentColor;
  font-size: 9px;
  text-transform: uppercase;
}

.media-counter {
  display: none;
}

.visual-01 { background: #d8d8d8; color: #111; --shape: #171717; --r: 14deg; --top: 58%; --left: 59%; }
.visual-02 { background: #2e2e2e; color: #ededed; --shape: #bebebe; --r: 48deg; --r2: 30deg; --top: 43%; --left: 43%; }
.visual-03 { background: #b8b8b8; color: #292929; --shape: #474747; --r: -18deg; --top: 62%; --left: 67%; }
.visual-04 { background: #202020; color: #e4e4e4; --shape: #ababab; --r: 72deg; --r2: 45deg; --top: 38%; --left: 61%; }
.visual-05 { background: #9a9a9a; color: #171717; --shape: #dedede; --r: -42deg; --top: 61%; --left: 38%; }
.visual-06 { background: #d1d1d1; color: #303030; --shape: #f7f7f7; --r: 6deg; --top: 47%; --left: 68%; }
.visual-07 { background: #a9a9a9; color: #242424; --shape: #e2e2e2; --r: 32deg; --r2: 20deg; --top: 65%; --left: 47%; }
.visual-08 { background: #d4d4d4; color: #333; --shape: #707070; --r: -58deg; --top: 42%; --left: 63%; }

.section-index {
  margin: 0;
  color: #777;
  font-size: 9px;
  text-transform: uppercase;
}

.project-detail {
  position: fixed;
  inset: 0;
  z-index: 160;
  overflow-y: auto;
  padding: 116px 0 140px;
  background: var(--bg);
  pointer-events: none;
  transform: translateY(105%);
  visibility: hidden;
}

.project-detail.is-open {
  pointer-events: auto;
  visibility: visible;
  animation: detail-enter 760ms var(--ease) forwards;
}

.project-detail.is-closing {
  pointer-events: none;
  visibility: visible;
  animation: detail-exit 420ms var(--ease) forwards;
}

.detail-close {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 2;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  text-transform: uppercase;
}

.detail-heading {
  display: grid;
  width: 66%;
  grid-template-columns: minmax(180px, 0.75fr) minmax(0, 1.25fr);
  gap: 9vw;
  margin: 0 0 96px 17%;
}

h2 {
  margin: 28px 0 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
}

.detail-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.55fr);
  gap: 6vw;
}

.detail-description {
  margin: 0;
  color: #717171;
  font-size: 11px;
  line-height: 1.42;
}

.detail-description span,
.about-copy p span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

dl {
  margin: 0;
}

dl > div {
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

dl > div:last-child {
  border-bottom: 1px solid var(--line);
}

dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

dd {
  margin: 0;
  font-size: 10px;
  line-height: 1.5;
}

.detail-body {
  display: grid;
  width: 74%;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 9vw;
  align-items: start;
  margin-left: 17%;
}

.detail-gallery {
  display: grid;
  gap: 120px;
}

.detail-image {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
}

.detail-video,
.detail-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-video {
  z-index: 1;
  display: none;
  background: #000;
  object-fit: contain;
}

.detail-image.has-video .detail-video {
  display: block;
}

.detail-image.has-video::before,
.detail-image.has-video::after {
  display: none;
}

.detail-fallback {
  display: block;
}

.detail-image.has-video .detail-fallback {
  display: none;
}

.detail-image-main figcaption {
  z-index: 3;
  padding: 3px 5px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
}

.detail-image-main {
  min-height: 0;
  aspect-ratio: 16 / 9;
}

.detail-image-secondary {
  width: 72%;
  min-height: 0;
  aspect-ratio: 4 / 3;
}

.detail-image-secondary:nth-child(odd) {
  margin-left: auto;
}

.detail-project-image {
  display: none;
  aspect-ratio: auto;
}

.detail-project-image::before,
.detail-project-image::after {
  display: none;
}

.detail-project-image img {
  display: block;
  width: 100%;
  height: auto;
}

.project-detail.has-gallery .detail-default-media,
.project-detail.has-gallery .default-thumb {
  display: none;
}

.project-detail.has-gallery .detail-project-image {
  display: block;
}

.gallery-thumb {
  display: none !important;
}

.project-detail.has-gallery .gallery-thumb {
  display: grid !important;
}

.thumbnail-nav {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 10px;
}

.thumbnail-nav > p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.thumbnail-nav a {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid transparent;
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb .thumb::before,
.gallery-thumb .thumb::after {
  display: none;
}

.thumbnail-nav a.active .thumb,
.thumbnail-nav a:hover .thumb {
  border-color: var(--accent);
}

.thumbnail-nav em {
  font-size: 8px;
  font-style: normal;
}

.about-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  backdrop-filter: blur(18px) saturate(0.72);
  -webkit-backdrop-filter: blur(18px) saturate(0.72);
  opacity: 0;
}

.about-overlay.is-open {
  display: grid;
  animation: fade-in 420ms var(--ease) forwards;
}

.about-overlay.is-closing {
  display: grid;
  animation: fade-out 320ms var(--ease) forwards;
}

.about-top {
  position: absolute;
  inset: 16px 18px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  text-transform: uppercase;
}

.about-top button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-transform: uppercase;
}

.about-grid {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(54vw, 780px);
  margin: auto;
  gap: 48px;
  align-content: center;
}

.about-grid .section-index,
.about-grid dt,
.about-copy p span {
  color: #7f7f7f;
}

.about-grid h2 {
  margin-top: 24px;
  font-size: 14px;
  font-weight: 500;
}

.about-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: min(29vw, 420px);
  height: auto;
  opacity: 0.1;
  pointer-events: none;
  transform: translate(-50%, -54%);
  mix-blend-mode: multiply;
}

.about-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.7fr);
  gap: 64px;
}

.about-copy p {
  margin: 0;
  color: #717171;
  font-size: 12px;
  line-height: 1.42;
}

.about-copy dl > div {
  border-color: rgba(17, 17, 17, 0.16);
}

.about-links {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: #717171;
  font-size: 11px;
  text-transform: uppercase;
}

.about-links a:hover {
  color: var(--ink);
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes detail-enter {
  0% { transform: translateY(105%); }
  72% { transform: translateY(-1.2%); }
  88% { transform: translateY(0.45%); }
  100% { transform: translateY(0); }
}

@keyframes detail-exit {
  from { transform: translateY(0); }
  to { transform: translateY(105%); }
}

@media (max-width: 850px) {
  .cursor {
    display: none;
  }

  .site-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
  }

  .nav-center {
    margin-right: 0;
  }

  .hero {
    grid-template-columns: 27% 46% 27%;
  }

  .hero-index-left .project-menu,
  .hero-index-right .project-menu {
    padding: 0 12px;
  }

  .project-menu button {
    grid-template-columns: 28px 1fr;
    font-size: 10px;
  }

  .hero-index-right .project-menu button {
    grid-template-columns: 28px 1fr;
  }

  .detail-heading,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .detail-heading {
    width: 72%;
    margin-left: 14%;
  }

  .detail-body {
    width: 80%;
    margin-left: 10%;
  }

  .about-grid {
    align-content: center;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 14px 12px;
    font-size: 10px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 0 12px 54px;
  }

  .hero-media {
    height: 68svh;
    min-height: 480px;
    grid-row: 1;
  }

  .hero-slide {
    height: auto;
  }

  .hero-slide.is-square {
    width: 62%;
  }

  .hero-slide.is-wide {
    width: 88%;
  }

  .hero-index {
    min-height: auto;
    opacity: 1;
  }

  .project-menu {
    height: auto;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(2, 52px);
    gap: 0 18px;
  }

  .hero-index-left .project-menu,
  .hero-index-right .project-menu {
    padding: 0;
  }

  .project-detail {
    padding: 84px 16px 64px;
  }

  .detail-heading {
    width: 100%;
    gap: 52px;
    margin-left: 0;
    margin-bottom: 64px;
  }

  .detail-summary,
  .about-copy {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .detail-body {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 54px;
    gap: 10px;
    margin-left: 0;
  }

  .detail-image-main,
  .detail-image-secondary {
    min-height: 0;
  }

  .about-overlay {
    padding: 14px 16px 18px;
  }

  .about-grid {
    width: 100%;
    gap: 34px;
  }

  .about-logo {
    width: min(68vw, 320px);
    opacity: 0.08;
  }

  .about-grid h2 {
    font-size: 13px;
  }

  .about-links {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
