/* ============================================
   岚 — CG ARTIST Portfolio
   Cinematic Dark Immersive Style
   ============================================ */

/* CSS Variables */
:root {
  --bg-primary: #050505;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #111111;
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --text-muted: #555555;
  --accent: #c9a96e;
  --accent-dim: rgba(201, 169, 110, 0.15);
  --border: rgba(255, 255, 255, 0.06);
  --font-serif: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
  --font-sans: 'Noto Sans SC', 'Inter', -apple-system, sans-serif;
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: auto;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent-dim);
  color: var(--accent);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #444;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(3rem, 8vw, 7rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

p {
  color: var(--text-secondary);
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  max-width: 65ch;
}

.section-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

/* Utilities */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ============================================
   INTRO OVERLAY
   ============================================ */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.intro-text {
  font-family: var(--font-serif);
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  line-height: 1;
  opacity: 0;
}

.intro-line {
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.intro-sub {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding-bottom: 8vh;
}

.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.hero-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    var(--bg-primary) 0%,
    rgba(5, 5, 5, 0.6) 40%,
    rgba(5, 5, 5, 0.2) 70%,
    rgba(5, 5, 5, 0.4) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4vw;
}

.hero-title {
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.hero-title .char {
  display: inline-block;
  will-change: transform, opacity;
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: clamp(0.7rem, 1vw, 0.9rem);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.hero-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 45ch;
  line-height: 1.8;
}

.scroll-indicator {
  position: absolute;
  bottom: 3vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
}

.scroll-indicator span {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.6; }
  50% { transform: scaleY(0.6); opacity: 1; }
}

/* ============================================
   SECTIONS
   ============================================ */
section {
  position: relative;
  width: 100%;
}

.section-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10vh 4vw;
}

/* ============================================
   ABOUT
   ============================================ */
.about-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 6vw;
  align-items: center;
}

.about-text {
  padding-right: 2vw;
}

.about-text h2 {
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-text p {
  margin-bottom: 1.5rem;
  text-align: justify;
}

.about-media {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4/5;
}

.about-media img,
.about-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 8s var(--transition-smooth);
}

.about-media:hover img,
.about-media:hover video {
  transform: scale(1.05);
}

/* ============================================
   GALLERY A — Render Art Series A
   ============================================ */
.gallery-a-section {
  background: var(--bg-primary);
}

.gallery-a-header {
  margin-bottom: 6vh;
}

.gallery-a-header h2 {
  margin-top: 0.5rem;
}

.gallery-a-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(280px, auto);
  gap: 1.25rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  background: var(--bg-tertiary);
  cursor: pointer;
  opacity: 0;
  transform: translateY(80px);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--transition-smooth), filter 0.6s ease;
  will-change: transform;
}

.gallery-item:hover img {
  transform: scale(1.05);
  filter: brightness(0.7);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  transform: translateY(10px);
  transition: transform 0.5s var(--transition-smooth);
}

.gallery-item:hover .gallery-item-title {
  transform: translateY(0);
}

.gallery-item-category {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  transform: translateY(10px);
  transition: transform 0.5s var(--transition-smooth) 0.05s;
}

.gallery-item:hover .gallery-item-category {
  transform: translateY(0);
}

/* Grid spanning */
.gallery-item:nth-child(1) { grid-column: span 7; grid-row: span 2; }
.gallery-item:nth-child(2) { grid-column: span 5; grid-row: span 1; }
.gallery-item:nth-child(3) { grid-column: span 5; grid-row: span 1; }
.gallery-item:nth-child(4) { grid-column: span 4; grid-row: span 2; }
.gallery-item:nth-child(5) { grid-column: span 4; grid-row: span 1; }
.gallery-item:nth-child(6) { grid-column: span 4; grid-row: span 1; }
.gallery-item:nth-child(7) { grid-column: span 6; grid-row: span 1; }
.gallery-item:nth-child(8) { grid-column: span 6; grid-row: span 1; }

/* ============================================
   GALLERY B — Render Art Series B
   ============================================ */
.gallery-b-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.gallery-b-header {
  margin-bottom: 6vh;
}

.gallery-b-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.gallery-b-item {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  background: var(--bg-tertiary);
  aspect-ratio: 16/10;
  cursor: pointer;
  opacity: 0;
  transform: translateY(60px);
}

.gallery-b-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--transition-smooth);
  will-change: transform;
}

.gallery-b-item:hover img {
  transform: scale(1.05);
}

.gallery-b-item-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.gallery-b-item:hover .gallery-b-item-overlay {
  opacity: 1;
}

.gallery-b-item-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-primary);
  text-align: center;
  padding: 0 1rem;
  transform: translateY(15px);
  transition: transform 0.5s var(--transition-smooth);
}

.gallery-b-item:hover .gallery-b-item-title {
  transform: translateY(0);
}

/* ============================================
   VIDEO WORKS
   ============================================ */
.video-section {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
}

.video-header {
  margin-bottom: 6vh;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.video-item {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  background: var(--bg-tertiary);
  aspect-ratio: 16/9;
  cursor: pointer;
  opacity: 0;
  transform: translateY(60px);
}

.video-item video,
.video-item img.poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--transition-smooth);
  will-change: transform;
}

.video-item img.poster {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.video-item video {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.video-item:hover video {
  opacity: 1;
}

.video-item:hover img.poster {
  opacity: 0;
}

.video-item:hover video,
.video-item:hover img.poster {
  transform: scale(1.03);
}

.video-play-btn {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.2);
  transition: background 0.4s ease;
}

.video-item:hover .video-play-btn {
  background: rgba(0,0,0,0.5);
}

.play-icon {
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: transform 0.4s var(--transition-smooth), border-color 0.4s ease;
}

.play-icon svg {
  width: 16px;
  height: 16px;
  fill: var(--text-primary);
  margin-left: 3px;
}

.video-item:hover .play-icon {
  transform: scale(1.1);
  border-color: var(--accent);
}

.video-item-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.5rem 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  z-index: 2;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-primary);
}

/* ============================================
   AWARDS
   ============================================ */
.awards-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.awards-header {
  margin-bottom: 6vh;
}

.awards-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.award-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(40px);
  cursor: default;
  transition: padding-left 0.4s var(--transition-smooth);
}

.award-item:hover {
  padding-left: 1rem;
}

.award-year {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 400;
}

.award-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.award-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.award-tag {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.35rem 0.8rem;
  border-radius: 2px;
  white-space: nowrap;
}

/* ============================================
   FOOTER
   ============================================ */
.footer-section {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 8vh 0;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4vw;
  text-align: center;
}

.footer-name {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(30px);
}

.footer-line {
  width: 60px;
  height: 1px;
  background: var(--accent);
  margin: 0 auto 1.5rem;
  opacity: 0;
}

.footer-copy {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
}

/* ============================================
   FULLSCREEN VIDEO MODAL
   ============================================ */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.video-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.video-modal video {
  width: 90vw;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

.video-modal-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1.5rem;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.video-modal-close:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--accent);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 4vh;
  }
  .about-media {
    aspect-ratio: 16/9;
  }
  .gallery-a-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .gallery-item:nth-child(1) { grid-column: span 6; grid-row: span 2; }
  .gallery-item:nth-child(2) { grid-column: span 3; grid-row: span 1; }
  .gallery-item:nth-child(3) { grid-column: span 3; grid-row: span 1; }
  .gallery-item:nth-child(4) { grid-column: span 3; grid-row: span 2; }
  .gallery-item:nth-child(5) { grid-column: span 3; grid-row: span 1; }
  .gallery-item:nth-child(6) { grid-column: span 6; grid-row: span 1; }
  .gallery-item:nth-child(7) { grid-column: span 3; grid-row: span 1; }
  .gallery-item:nth-child(8) { grid-column: span 3; grid-row: span 1; }
  .gallery-b-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .award-item {
    grid-template-columns: 80px 1fr;
    grid-template-rows: auto auto;
    gap: 0.75rem 1.5rem;
  }
  .award-tag {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .section-inner {
    padding: 8vh 5vw;
  }
  .hero {
    padding-bottom: 6vh;
  }
  .gallery-a-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(220px, auto);
  }
  .gallery-item:nth-child(n) {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
  .gallery-b-grid {
    grid-template-columns: 1fr;
  }
  .video-grid {
    grid-template-columns: 1fr;
  }
  .award-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .award-tag {
    grid-column: 1;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
