:root {
  --sidebar-w: 400px;
  --content-w: 1300px;
  --bar-h: 56px;
  --ink-black: #0a0a0a;
  --gold: #d4af37;
  --gold-soft: #c9a86a;
  --text-main: rgba(255, 255, 255, 0.88);
  --text-dim: rgba(255, 255, 255, 0.58);
  --text-faint: rgba(255, 255, 255, 0.38);
  --sans: "Switzer", -apple-system, "system-ui", "Helvetica Neue", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.18); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }

body {
  margin: 0;
  background: var(--ink-black);
  color: var(--text-main);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 0, 0, 0.4);
}

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

/* ---------- 背景画布 ---------- */

.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  background: #1a1612;
}

.bg-scrim {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.68) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.42) 45%, rgba(0, 0, 0, 0.42) 100%);
}

.bg-grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image:
    repeating-linear-gradient(0deg, #fff 0px, transparent 1px, transparent 2px),
    repeating-linear-gradient(90deg, #fff 0px, transparent 1px, transparent 2px);
  background-size: 3px 3px;
}

/* ---------- 顶部条 ---------- */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--bar-h);
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 24px;
  font-size: 13px;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  background: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(6px);
}

.menu-toggle {
  background: none;
  border: none;
  color: #fff;
  font: inherit;
  text-transform: lowercase;
  cursor: pointer;
  padding: 4px;
}

/* ---------- 菜单浮层 ---------- */

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 5, 5, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.menu-overlay ul {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

.menu-overlay li { margin: 14px 0; }

.menu-overlay a {
  font-style: italic;
  font-weight: 600;
  font-size: 28px;
  color: var(--text-main);
  transition: color 0.2s ease;
}

.menu-overlay a:hover { color: var(--gold); }

/* ---------- 左侧信息栏 ---------- */

.sidebar {
  position: fixed;
  top: var(--bar-h);
  left: 0;
  bottom: var(--bar-h);
  width: var(--sidebar-w);
  z-index: 20;
  padding: 28px 30px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.name {
  margin: 0 0 14px;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: #fff;
}

.tagline {
  margin: 0 0 20px;
  font-style: italic;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.45;
  color: var(--text-dim);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 24px;
  font-size: 15px;
  font-weight: 500;
}

.sidebar-nav a {
  color: var(--text-main);
  transition: color 0.2s ease;
}

.sidebar-nav a:hover { color: var(--gold); }

.worklist-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.worklist ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.worklist li { margin-bottom: 9px; }

.worklist a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  color: var(--text-main);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.worklist a::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-soft);
  flex-shrink: 0;
}

.worklist a:hover {
  color: var(--gold);
  padding-left: 4px;
}

.bio {
  font-style: italic;
  font-weight: 300;
  font-size: 11.5px;
  letter-spacing: 0.01em;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.42);
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.bio p { margin: 0 0 12px; }
.bio p:last-child { margin-bottom: 0; }

/* ---------- 右侧主舞台 ---------- */

.stage {
  position: relative;
  z-index: 10;
  margin-left: var(--sidebar-w);
  padding: calc(var(--bar-h) + 40px) 48px calc(var(--bar-h) + 60px);
}

.stage-section {
  min-height: calc(100vh - var(--bar-h) * 2);
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.stage-section.in-view {
  opacity: 1;
  transform: translateY(0);
}

.showreel-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 64px;
  margin-top: 48px;
  width: 100%;
  max-width: var(--content-w);
}

.showreel-meta.no-video { margin-top: 0; }

.showreel-info { max-width: 520px; }

.section-kicker {
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 24px;
  margin: 0 0 12px;
  color: #fff;
}

.contact-line {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--text-dim);
}

.contact-line a:hover { color: var(--gold); }

.individual-work .worklist-label {
  display: inline-block;
  margin-bottom: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 22px;
  color: var(--text-main);
}

.stage-section.dark { position: relative; padding: 110px 0; }

.stage-section.dark + .stage-section.dark { border-top: 1px solid rgba(255, 255, 255, 0.08); }

.project-block { max-width: 680px; }

.project-video {
  width: 100%;
  max-width: 1080px;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #000;
  overflow: hidden;
}

.project-video video {
  display: block;
  width: 100%;
  max-height: 72vh;
}

.project-video iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 72vh;
  border: 0;
}

.project-title {
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: 32px;
  margin: 0 0 14px;
  color: #fff;
}

.project-role {
  font-size: 13px;
  color: var(--gold-soft);
  margin: 0 0 16px;
  line-height: 1.6;
}

.project-role .zh { color: var(--text-dim); }

.project-note {
  margin: 0 0 16px;
  font-size: 11px;
  font-style: italic;
  color: var(--text-faint);
}

.project-desc {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-dim);
  max-width: 600px;
}

.project-desc .zh { color: var(--text-faint); }

.section-sub {
  font-size: 13px;
  color: var(--text-faint);
  margin: 0 0 24px;
}

.frame-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
  max-width: var(--content-w);
}

.frame-tile {
  aspect-ratio: 4 / 3;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  overflow: hidden;
  background: #111;
  transition: transform 0.3s ease;
}

.frame-grid + .frame-grid { margin-top: 32px; }

.poster-grid { grid-template-columns: repeat(5, 1fr); }

.frame-tile.poster { aspect-ratio: 2 / 3; }

.poster-item {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.poster-item figcaption {
  margin-top: 8px;
  font-size: 11px;
  font-style: normal;
  line-height: 1.4;
  color: var(--text-dim);
}

@media (max-width: 860px) {
  .poster-grid { grid-template-columns: repeat(3, 1fr); }
}

.frame-tile:hover { transform: scale(1.03); }

.frame-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.frame-tile span {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

/* ---------- 底部条 ---------- */

.bottombar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bar-h);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 13px;
  color: var(--text-faint);
  background: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(6px);
}

.index-link {
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.index-link:hover { color: var(--gold); }

/* ---------- 响应式 ---------- */

@media (max-width: 1100px) {
  :root { --sidebar-w: 340px; }
}

@media (max-width: 860px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    position: relative;
    top: 0; bottom: auto;
    width: 100%;
    height: auto;
    padding: calc(var(--bar-h) + 24px) 20px 32px;
  }

  .stage {
    margin-left: 0;
    padding: 24px 20px calc(var(--bar-h) + 40px);
  }

  .stage-section { min-height: auto; }

  .name { font-size: 28px; }
  .tagline { font-size: 14px; }
  .sidebar-nav { font-size: 14px; }
  .worklist a { font-size: 15px; }
  .bio { font-size: 13px; }

  .showreel-meta { gap: 28px; }

  .section-kicker { font-size: 21px; }
  .contact-line { font-size: 13px; }

  .frame-grid { grid-template-columns: repeat(2, 1fr); }

  .project-title { font-size: 26px; }
  .project-desc { font-size: 13px; }
}
