:root {
  --ink: #111;
  --mute: #c8c8c8;
  --hover: #8c8c8c;
  --soft: #f2f2f2;
  --head: 52px;
  --pad-x: max(20px, 13.4vw);
  --col: clamp(260px, 24vw, 460px);
  --fs: clamp(38px, 3.8vw, 68px);
  --ease: cubic-bezier(.22, .7, .18, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
button {
  font: inherit; color: inherit; background: none; border: 0;
  cursor: pointer; text-align: left; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }

/* ---------- Header ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  height: var(--head);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px 0 18px;
  background: #fff;
}
.brand { font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
.nav { display: flex; align-items: center; gap: 18px; font-size: 13px; font-weight: 500; }
.nav-link { color: #a8a8a8; transition: color .25s var(--ease); }
.nav-link:hover, .nav-link.is-active { color: var(--ink); }
.nav-cta {
  background: var(--ink); color: #fff;
  padding: 7px 12px; border-radius: 9px;
  transition: opacity .25s;
}
.nav-cta:hover { opacity: .82; }

/* ---------- Stage ---------- */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--col);
  height: 100vh; height: 100dvh;
  padding-top: var(--head);
}
.left { position: relative; overflow: hidden; }
.view {
  position: absolute; inset: 0;
  padding: calc(33vh - var(--head)) var(--pad-x) 40px;
  overflow-y: auto; scrollbar-width: none;
  opacity: 0; visibility: hidden;
  transition: opacity .45s var(--ease), visibility 0s linear .45s;
}
.view::-webkit-scrollbar { display: none; }
.view.is-active { opacity: 1; visibility: visible; transition: opacity .45s var(--ease); }

/* ---------- Category list ---------- */
.cat { position: relative; }
.cat-btn {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: var(--fs); line-height: 1.16; letter-spacing: -.035em;
  color: var(--mute);
  transition: color .35s var(--ease);
}
.cat-btn:hover { color: var(--hover); }
.cat.is-active .cat-btn { color: var(--ink); }

.tag {
  font-size: 11px; font-weight: 500; letter-spacing: 0; line-height: 1;
  padding: 5px 7px; border-radius: 6px;
  background: var(--soft); color: #9b9b9b;
  opacity: 0; transform: translateY(3px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.cat.is-active .tag { opacity: 1; transform: none; }

.marker {
  position: absolute;
  left: calc(24px - var(--pad-x));
  top: calc(var(--fs) * 1.16 / 2);
  width: 34px; height: 34px; margin-top: -17px;
  border-radius: 10px;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  opacity: 0; transform: scale(.5) rotate(-45deg);
  transition: opacity .35s var(--ease), transform .5s var(--ease);
  pointer-events: none;
}
.cat.is-active .marker { opacity: 1; transform: none; }

/* Sub-collections (UI/UX) */
.subs {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .5s var(--ease);
}
.subs-inner {
  overflow: hidden; min-height: 0;
  opacity: 0; transition: opacity .3s var(--ease);
}
.cat.is-active .subs { grid-template-rows: 1fr; }
.cat.is-active .subs-inner { opacity: 1; transition-delay: .12s; }
.subs ul { display: flex; flex-direction: column; gap: 2px; padding: 8px 0 18px 3px; }
.sub-btn {
  display: flex; align-items: center; gap: 12px;
  font-size: clamp(17px, 1.45vw, 22px); line-height: 1.5; letter-spacing: -.015em;
  color: var(--mute);
  transition: color .3s var(--ease);
}
.sub-btn::before {
  content: ""; width: 12px; height: 1.5px; background: currentColor;
  transition: width .4s var(--ease);
}
.sub-btn:hover { color: var(--hover); }
.sub-btn.is-active { color: var(--ink); }
.sub-btn.is-active::before { width: 26px; }

/* ---------- About ---------- */
.about-lead {
  font-size: clamp(22px, 2.1vw, 34px); line-height: 1.3; letter-spacing: -.025em;
  max-width: 30ch;
}
.about-lead span { color: #a3a3a3; }
.about-links {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  margin-top: 36px; font-size: 14px; font-weight: 500;
}
.about-links a { border-bottom: 1px solid #d6d6d6; padding-bottom: 2px; transition: border-color .25s; }
.about-links a:hover { border-color: var(--ink); }

/* ---------- Work column ---------- */
.shots {
  display: flex; flex-direction: column; gap: 12px;
  padding: 0 12px 12px 0;
  overflow-y: auto; scrollbar-width: none;
  transition: opacity .18s ease;
}
.shots::-webkit-scrollbar { display: none; }
.shots.is-out { opacity: 0; }

.shot {
  position: relative; display: block; flex: none;
  aspect-ratio: 4 / 3; border-radius: 3px; overflow: hidden;
  background: var(--soft);
  animation: rise .7s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}
.shot img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .9s var(--ease);
}
a.shot:hover img { transform: scale(1.035); }
.shot-src {
  position: absolute; left: 10px; bottom: 10px;
  font-size: 11px; font-weight: 500; line-height: 1;
  padding: 6px 8px; border-radius: 6px;
  background: #fff; color: var(--ink);
  opacity: 0; transform: translateY(4px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
a.shot:hover .shot-src, a.shot:focus-visible .shot-src { opacity: 1; transform: none; }
.shot.ph { display: grid; place-items: center; font-size: 12px; color: #adadad; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  :root { --fs: clamp(36px, 10.5vw, 56px); }
  body { overflow: auto; }
  .stage { display: block; height: auto; }
  .left { overflow: visible; }
  .view {
    position: static; display: none;
    padding: 56px 20px 28px; overflow: visible;
    opacity: 1; visibility: visible;
  }
  .view.is-active { display: block; }
  .marker { display: none; }
  .shots {
    flex-direction: row;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; scroll-padding: 20px;
    padding: 0 20px 32px;
  }
  .shot { width: 78vw; scroll-snap-align: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
