:root {
  --bg: #000000;
  --text: #f2f2f0;
  --muted: #7a7a7e;
  --line: rgba(255, 255, 255, 0.10);
  --accent: #2563eb;

  --fs-display: clamp(28px, 4.4vw, 60px);
  --fs-body: 14px;
  --fs-meta: 12px;

  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.5;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body.lock {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

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

button {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.accent {
  color: var(--accent);
}

/* Header: Quiet, Weightless */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: 56px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0) 100%);
}

.brand {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand span {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 400;
  font-size: var(--fs-meta);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: var(--fs-meta);
  color: var(--muted);
}

.nav a:hover,
.nav button:hover {
  color: var(--text);
}

/* Full-Bleed Cinema Hero */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.56);
  animation: slowDrift 22s ease-out infinite alternate;
  transition: opacity 0.8s ease;
}

@keyframes slowDrift {
  from { transform: scale(1); }
  to { transform: scale(1.045); }
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.86) 100%);
}

.hero-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-title {
  margin: 0;
  font-size: var(--fs-display);
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.05;
  animation: riseIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-foot {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-meta);
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Works: Generous 2-Column Editorial Gallery */
.works {
  padding: 48px 32px 96px;
  scroll-margin-top: 56px;
}

.cat-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 20px 0 16px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.cat-bar::-webkit-scrollbar {
  display: none;
}

.cat-btn {
  white-space: nowrap;
  font-size: var(--fs-meta);
  color: var(--muted);
  padding-bottom: 6px;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.cat-btn:hover {
  color: var(--text);
}

.cat-btn.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 24px;
}

.reel-item {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reel-item.is-in {
  opacity: 1;
  transform: translateY(0);
}

.reel-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0d0d0e;
}

.reel-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.reel-item:hover .reel-frame img {
  transform: scale(1.028);
}

.reel-title {
  font-size: var(--fs-body);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.more-wrap {
  margin-top: 64px;
  text-align: center;
}

.plain-btn {
  font-size: var(--fs-meta);
  color: var(--muted);
  transition: color 0.16s ease;
}

.plain-btn:hover,
.plain-btn.is-active {
  color: var(--text);
}

/* Studio Monograph Plates (P003–P013) */
.studio {
  padding: 64px 32px 96px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 56px;
}

.plates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.plate-item {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0d0d0e;
}

.plate-item.is-wide {
  grid-column: 1 / -1;
}

.plate-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.plate-item:hover img {
  transform: scale(1.018);
}

/* Minimal Footer */
.footer {
  padding: 72px 32px 32px;
  border-top: 1px solid var(--line);
}

.footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 56px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-mail {
  font-size: var(--fs-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  transition: color 0.16s ease;
}

.footer-mail:hover {
  color: var(--accent);
}

.footer-sub {
  font-size: var(--fs-meta);
  color: var(--muted);
}

.qr-btn {
  width: 104px;
  height: 104px;
  flex-shrink: 0;
}

.qr-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.footer-copy {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-meta);
  color: var(--muted);
}

/* Pure Black Viewing Room */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #000;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.viewer-top {
  height: 56px;
  flex-shrink: 0;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.viewer-title {
  font-size: var(--fs-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.viewer-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.viewer-stage {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.stage-slide {
  max-width: 1280px;
  width: 100%;
  height: auto;
}

.stage-frames {
  width: 100%;
  max-width: 1280px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

.stage-frames img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #080809;
}

.index-grid {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px 16px;
  align-content: start;
}

.idx-item {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.idx-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0d0d0e;
}

.idx-item span {
  font-size: var(--fs-meta);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 820px) {
  .header,
  .hero-overlay,
  .works,
  .studio,
  .footer,
  .viewer-top,
  .viewer-stage,
  .index-grid {
    padding-left: 16px;
    padding-right: 16px;
  }
  .grid,
  .plates,
  .stage-frames {
    grid-template-columns: 1fr;
  }
  .footer-main {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-img,
  .hero-title,
  .viewer {
    animation: none !important;
  }
  .reel-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
