/* === Reset & Variables === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-elevated: #1a1a1a;
  --accent: #d4d4d4;
  --accent-warm: #c8b8a8;
  --accent-dim: #888888;
  --gradient-main: linear-gradient(135deg, #d4d4d4, #888888);
  --gradient-subtle: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  --text-primary: #f0f0f0;
  --text-secondary: #777777;
  --text-muted: #555555;
  --font-cn: 'Noto Serif SC', 'Songti SC', serif;
  --font-en: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  overflow-x: hidden;
  letter-spacing: 0.01em;
}

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

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

button {
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
}

ul { list-style: none; }

/* === Layout === */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 120px 0;
}

.section-title {
  font-family: var(--font-cn);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 72px;
  color: var(--text-primary);
  letter-spacing: 0.15em;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--accent-dim);
  margin: 20px auto 0;
}

.subsection-title {
  font-size: 1.2rem;
  font-weight: 400;
  font-family: var(--font-cn);
  margin: 56px 0 28px;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
}

/* === Navbar === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: background 0.4s ease, padding 0.4s ease;
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-en);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  font-family: var(--font-body);
  color: var(--text-secondary);
  transition: color 0.4s ease;
  position: relative;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text-primary);
  transition: width 0.4s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
}

/* === Hero === */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../assets/images/hero-bg.png') center/cover no-repeat;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(10, 10, 10, 0.2),
    rgba(10, 10, 10, 0.85)
  );
}

/* Vencent - behind figure, left of center */
.hero-text-back {
  position: absolute;
  z-index: 1;
  left: 15%;
  top: 50%;
  transform: translateY(-65%);
}

.hero-name-en {
  font-family: var(--font-en);
  font-size: 5.5rem;
  font-weight: 900;
  color: rgba(240, 240, 240, 0.85);
  letter-spacing: 0.05em;
  line-height: 1;
  display: block;
}

/* Figure - middle layer */
.hero-figure {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: auto;
  height: 85vh;
  pointer-events: none;
  will-change: transform;
}

.hero-figure img {
  height: 100%;
  width: auto;
  object-fit: contain;
  display: block;
}

/* 马瑞辰 - in front of figure, right of center */
.hero-text-front {
  position: absolute;
  z-index: 3;
  right: 15%;
  top: 50%;
  transform: translateY(-65%);
}

.hero-name-cn {
  font-family: var(--font-cn);
  font-size: 5.5rem;
  font-weight: 900;
  color: rgba(240, 240, 240, 0.95);
  letter-spacing: 0.15em;
  line-height: 1;
  display: block;
}

.hero-bottom {
  position: absolute;
  bottom: 80px;
  left: 0;
  right: 0;
  z-index: 4;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-roles {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  min-height: 1.8em;
}

.cursor {
  animation: blink 1s step-end infinite;
  color: var(--accent-dim);
}

.hero-tags {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.tag {
  padding: 8px 22px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
  font-size: 0.85rem;
  font-family: var(--font-body);
  color: var(--accent);
  background: transparent;
  letter-spacing: 0.05em;
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-secondary);
  animation: bounce 2s infinite;
  z-index: 1;
}

/* === Video Sections === */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.video-card {
  border-radius: 2px;
  overflow: hidden;
  background: var(--bg-card);
  cursor: pointer;
  position: relative;
}

.video-card video {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--bg-secondary);
  pointer-events: none;
}

.video-card .video-play-btn {
  position: absolute;
  inset: 0;
  bottom: auto;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-card:hover .video-play-btn {
  opacity: 1;
}

.video-play-btn svg {
  width: 48px;
  height: 48px;
  fill: #fff;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.video-title {
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Video Lightbox */
.video-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
}

.video-lightbox.active {
  display: flex;
}

.video-lightbox video {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 4px;
}

.video-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.3s;
  z-index: 2001;
}

.video-lightbox-close:hover {
  color: var(--accent-dim);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  background: var(--bg-card);
  transition: transform 0.4s ease;
}

.gallery-item:hover {
  transform: scale(1.03);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.6s ease;
  filter: grayscale(100%);
}

.gallery-item:hover img {
  transform: scale(1.08);
  filter: grayscale(0%);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 85vw;
  max-height: 85vh;
  border-radius: 0;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 2.5rem;
  color: #fff;
  transition: color 0.3s;
}

.lightbox-close:hover {
  color: var(--accent-dim);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: #fff;
  padding: 16px;
  transition: color 0.3s;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--accent-dim);
}

/* === Contact / Links === */
.links-grid {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 28px;
  background: var(--bg-card);
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.4s ease;
  min-width: 110px;
}

.link-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
}

.link-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent-dim);
  transition: all 0.4s ease;
}

.link-card:hover .link-icon {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.link-card span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color 0.3s;
}

.contact-item:hover {
  color: var(--text-primary);
}

/* === Footer === */
.footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 0.85rem;
  position: relative;
}

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dim);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

/* === Film Grain Overlay === */
.film-grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}
