/* ============================================
   DMOON PRODUCTION — Design System
   "Cinematic Midnight — tungsten amber on
    deep charcoal, grain-dusted atmosphere"
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=Noto+Sans+KR:wght@300;400&family=Outfit:wght@300;400;500&family=Space+Mono:wght@400&display=swap');

/* --- CSS Variables --- */
:root {
  --bg-primary: #0D0D0F;
  --bg-surface: #1A1A1E;
  --bg-elevated: #242428;
  --accent: #E8E4DF;
  --accent-amber: #C4956A;
  --text-primary: #F5F2EE;
  --text-secondary: #8A8580;
  --text-muted: rgba(245, 242, 238, 0.35);
  --border: rgba(255, 255, 255, 0.06);
  --glass: rgba(255, 255, 255, 0.03);
  --grain-opacity: 0.035;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui: 'Outfit', sans-serif;
  --font-kr: 'Noto Sans KR', sans-serif;
  --font-mono: 'Space Mono', monospace;

  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 200ms ease-out;
  --transition-smooth: 400ms var(--ease-smooth);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-ui);
  font-weight: 300;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Grain Overlay --- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: var(--grain-opacity);
  pointer-events: none;
  z-index: 9999;
  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;
}

/* --- Gradient Mesh Background --- */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse at 10% 10%, rgba(13, 15, 30, 0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 90% 90%, rgba(196, 149, 106, 0.08) 0%, transparent 60%);
}

/* --- Korean Text Rules --- */
[lang="ko"], .kr-text {
  font-family: var(--font-kr);
  word-break: keep-all;
}

.kr-serif {
  font-family: var(--font-kr);
  letter-spacing: -0.03em;
  word-break: keep-all;
}

/* --- Bilingual Visibility --- */
/* Hide KR-only duplicate elements when in English mode */
html[lang="en"] .cat-tile-name-kr,
html[lang="en"] .subtitle-kr,
html[lang="en"] .about-bio-kr,
html[lang="en"] .about-title-kr,
html[lang="en"] .skill-group-title-kr,
html[lang="en"] .contact-heading-kr,
html[lang="en"] [data-i18n="contact_subline_kr"],
html[lang="en"] [data-i18n="cta_heading_kr"],
html[lang="en"] .philosophy-ko,
html[lang="en"] [data-i18n="categories_subtitle"],
html[lang="en"] .page-subtitle,
html[lang="en"] [data-i18n="about_quote"],
html[lang="en"] [data-i18n="skills_subtitle"] {
  display: none;
}

/* In Korean mode, hide the EN bio paragraphs (KR bio replaces them) */
html[lang="ko"] .about-bio:not(.about-bio-kr) {
  display: none;
}

/* Show KR bio in Korean mode */
html[lang="ko"] .about-bio-kr {
  display: block;
}

/* --- Links --- */
a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 80px);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 24px 0;
  transition: background var(--transition-fast), padding var(--transition-fast);
}

.nav.scrolled {
  background: rgba(13, 13, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.nav-logo-img {
  height: 36px;
  width: auto;
  mix-blend-mode: screen;
  transition: opacity var(--transition-fast);
}

.nav-logo-img:hover {
  opacity: 0.8;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  cursor: pointer;
}

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

.nav-links a.active {
  color: var(--accent);
}

.lang-toggle {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  cursor: pointer;
  border: 1px solid var(--border);
  padding: 6px 12px;
  background: transparent;
  transition: all var(--transition-fast);
  letter-spacing: 0.05em;
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1002;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text-primary);
  transition: all 300ms var(--ease-smooth);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-primary);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;
  transition: right 500ms var(--ease-smooth);
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 300;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.mobile-menu a:hover {
  color: var(--accent);
}

.mobile-menu-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.mobile-menu-close:hover {
  color: var(--text-primary);
}

.mobile-menu-close svg {
  width: 28px;
  height: 28px;
}

.mobile-menu .lang-toggle {
  margin-top: 24px;
  font-size: 0.85rem;
  padding: 10px 20px;
}

/* ============================================
   CREDENTIALS STRIP
   ============================================ */

.credentials {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
}

.credentials-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.cred-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cred-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.cred-desc {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 767px) {
  .credentials-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 24px;
}

.hero-line1 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.8rem, 5vw, 4rem);
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 8px;
}

.hero-line2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 7vw, 5.5rem);
  color: var(--accent);
  line-height: 1.1;
}

.hero-line1-kr,
.hero-line2-kr {
  display: none;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

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

.scroll-indicator .label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.7); }
    50% { opacity: 1; transform: scaleY(1); }
  }
}

/* Hero Background Video */
.hero-video-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.hero-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  animation: heroFloat 20s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes heroFloat {
    0% { transform: scale(1) translateY(0); }
    100% { transform: scale(1.08) translateY(-2%); }
  }
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.8s ease;
}

.hero-video.loaded {
  opacity: 0.55;
}

/* When video loads, fade out the still image */
.hero-video.loaded ~ .hero-bg-img,
.hero-video-wrap:has(.hero-video.loaded) .hero-bg-img {
  opacity: 0;
  transition: opacity 1.2s ease;
}

/* Cinematic gradient overlay — crushes edges, lifts center for text readability */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at center, transparent 0%, rgba(13,13,15,0.35) 65%, rgba(13,13,15,0.9) 100%),
    linear-gradient(180deg, rgba(13,13,15,0.25) 0%, transparent 28%, transparent 62%, rgba(13,13,15,0.96) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Film grain — GPU-rendered SVG turbulence, no PNG download */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence baseFrequency='0.92' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.55 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
  animation: grainShift 0.8s steps(6) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hero::after { animation: none; }
}

@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-4%, 3%); }
  40%  { transform: translate(3%, -5%); }
  60%  { transform: translate(-5%, 2%); }
  80%  { transform: translate(4%, 4%); }
  100% { transform: translate(0, 0); }
}

/* Subtle warm amber light-leak on the left edge — picks up the D.Moon accent */
.hero-video-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: radial-gradient(ellipse at 10% 50%, rgba(196,149,106,0.12) 0%, transparent 60%);
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* ============================================
   VIDEO LIGHTBOX
   ============================================ */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  width: 90%;
  max-width: 1100px;
  aspect-ratio: 16 / 9;
  z-index: 2;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  transform: scale(0.95);
  transition: transform 400ms var(--ease-smooth);
}

.lightbox.open .lightbox-content {
  transform: scale(1);
}

.lightbox-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  padding: 8px 0;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.lightbox-close:hover {
  color: var(--text-primary);
}

.lightbox-close svg {
  width: 16px;
  height: 16px;
}

/* Placeholder state for video slots */
.lightbox-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
}

.lightbox-placeholder svg {
  width: 48px;
  height: 48px;
  color: var(--accent);
  opacity: 0.5;
}

.lightbox-placeholder span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* Play button overlay on tiles */
.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  z-index: 3;
  width: 64px;
  height: 64px;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 400ms var(--ease-smooth);
  pointer-events: none;
}

.cat-tile:hover .play-overlay,
.masonry-item:hover .play-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

/* Featured reel button on about page */
/* Reel button — cinematic text-only with play icon */
.reel-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  margin-top: 32px;
  position: relative;
  padding-bottom: 10px;
}

.reel-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-amber), transparent);
  transition: width 600ms var(--ease-smooth);
}

.reel-btn:hover::after {
  width: 100%;
}

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

.reel-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  transition: transform 300ms var(--ease-smooth);
}

.reel-btn:hover svg {
  transform: scale(1.15);
}

/* ============================================
   SECTION COMMONS
   ============================================ */

section {
  position: relative;
}

.section-pad {
  padding: clamp(80px, 12vh, 160px) 0;
}

/* ============================================
   CATEGORIES GRID (Homepage)
   ============================================ */

.categories {
  background: var(--bg-primary);
}

.categories-header {
  margin-bottom: clamp(40px, 6vw, 64px);
}

.categories-header h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: var(--text-primary);
}

.categories-header .subtitle {
  font-family: var(--font-kr);
  font-weight: 300;
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  gap: 16px;
}

.cat-tile {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-surface);
  border: 1px solid var(--border);
}

.cat-tile::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--accent-amber);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 400ms var(--ease-smooth);
  z-index: 3;
}

.cat-tile:hover::before {
  transform: scaleY(1);
}

.cat-tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-smooth);
}

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

/* Placeholder gradient for tiles without images */
.cat-tile-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
}

.cat-tile-number {
  position: absolute;
  top: 16px;
  left: 16px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  z-index: 2;
}

.cat-tile-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 24px;
  z-index: 2;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
}

.cat-tile-name {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  transition: transform var(--transition-fast);
}

.cat-tile:hover .cat-tile-name {
  transform: translateY(-4px);
}

.cat-tile-name-kr {
  font-family: var(--font-kr);
  font-weight: 300;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Grid layout: asymmetric — 8 tiles, Concert/Live gets hero treatment */
.cat-tile:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; min-height: 500px; }
.cat-tile:nth-child(2) { grid-column: 3 / 4; min-height: 240px; }
.cat-tile:nth-child(3) { grid-column: 3 / 4; min-height: 240px; }
.cat-tile:nth-child(4) { grid-column: 1 / 2; min-height: 260px; }
.cat-tile:nth-child(5) { grid-column: 2 / 4; min-height: 260px; }
.cat-tile:nth-child(6) { grid-column: 1 / 2; min-height: 260px; }
.cat-tile:nth-child(7) { grid-column: 2 / 3; min-height: 260px; }
.cat-tile:nth-child(8) { grid-column: 3 / 4; min-height: 260px; }

/* ============================================
   PHILOSOPHY SECTION
   ============================================ */

.philosophy {
  background: var(--bg-surface);
  text-align: center;
  position: relative;
}

.philosophy-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  padding-left: 40px;
}

.philosophy-bar {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 60px;
  background: var(--accent-amber);
}

.philosophy-ko {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.5rem, 4vw, 3rem);
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 16px;
}

.philosophy-en {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* ============================================
   CONTACT TEASER
   ============================================ */

.contact-teaser {
  text-align: center;
  background: var(--bg-primary);
}

.contact-teaser h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.5rem, 4vw, 3rem);
  color: var(--text-primary);
  margin-bottom: 8px;
}

.contact-teaser .subtitle-kr {
  font-family: var(--font-kr);
  font-weight: 300;
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* Cinematic CTA — text + arrow, no box */
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  cursor: pointer;
  position: relative;
  padding-bottom: 12px;
}

.cta-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-amber), transparent);
  transition: width 600ms var(--ease-smooth);
}

.cta-link:hover::after {
  width: 100%;
}

.cta-link .cta-text {
  transition: color var(--transition-fast);
}

.cta-link:hover .cta-text {
  color: var(--text-primary);
}

.cta-arrow {
  width: 20px;
  height: 20px;
  transition: transform 400ms var(--ease-smooth);
}

.cta-link:hover .cta-arrow {
  transform: translateX(6px);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  background: var(--bg-primary);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-logo-img {
  height: 40px;
  width: auto;
  mix-blend-mode: screen;
  margin-bottom: 16px;
}

.footer-nap {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nap li,
.footer-nap a {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

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

.footer-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.footer-social a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

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

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom .credit {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.footer-bottom .credit a {
  color: var(--accent-amber);
  transition: color var(--transition-fast);
}

.footer-bottom .credit a:hover {
  color: var(--accent);
}

/* ============================================
   WORK PAGE — Portfolio Grid
   ============================================ */

.page-header {
  padding-top: 140px;
  padding-bottom: 40px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--text-primary);
}

.page-header .page-subtitle {
  font-family: var(--font-kr);
  font-weight: 300;
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  background: none;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
}

.filter-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 1px;
  background: var(--accent-amber);
  transition: transform var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--accent);
}

.filter-btn.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* Masonry Grid */
.masonry-grid {
  columns: 3;
  column-gap: 16px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-surface);
  border: 1px solid var(--border);
}

.masonry-item-img {
  width: 100%;
  display: block;
  transition: transform 600ms var(--ease-smooth);
}

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

.masonry-item-placeholder {
  width: 100%;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
}

.masonry-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 32px 20px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
  transform: translateY(100%);
  transition: transform 400ms var(--ease-smooth);
}

.masonry-item:hover .masonry-overlay {
  transform: translateY(0);
}

.masonry-overlay .project-title {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.masonry-overlay .project-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  position: absolute;
  top: 12px;
  right: 12px;
}

/* ============================================
   ABOUT PAGE
   ============================================ */

.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.about-portrait {
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  aspect-ratio: 3 / 4;
}

.about-portrait-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
}

.about-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.about-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: var(--text-primary);
  margin-bottom: 8px;
}

.about-title-kr {
  font-family: var(--font-kr);
  font-weight: 300;
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.about-bio {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.about-bio-kr {
  font-family: var(--font-kr);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--text-muted);
  word-break: keep-all;
  margin-bottom: 40px;
}

.about-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.about-stat {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  position: relative;
  padding-left: 16px;
}

.about-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 1px;
  background: var(--accent-amber);
}

/* Philosophy Quote Block */
.about-philosophy {
  margin-top: clamp(80px, 10vh, 120px);
  padding: clamp(40px, 6vw, 80px);
  background: var(--bg-surface);
  border-left: 2px solid var(--accent-amber);
  position: relative;
}

.about-philosophy blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.3rem, 3vw, 2.2rem);
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.about-philosophy .quote-en {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 1rem;
  color: var(--text-secondary);
}

/* ============================================
   CONTACT PAGE
   ============================================ */

.contact-section {
  padding-top: 140px;
}

.contact-heading {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--text-primary);
  margin-bottom: 8px;
}

.contact-heading-kr {
  font-family: var(--font-kr);
  font-weight: 300;
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 64px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 600px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 20px;
}

.contact-method-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  font-size: 1.2rem;
}

.contact-method-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.contact-method a {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 1.1rem;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
}

.contact-method a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-amber);
  transition: width 400ms var(--ease-smooth);
}

.contact-method a:hover::after {
  width: 100%;
}

.contact-hours {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.contact-hours-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.contact-hours-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.contact-map {
  margin-top: 80px;
  width: 100%;
  height: 400px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-map-placeholder {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

/* ============================================
   SKILLS SECTION (About page)
   ============================================ */

.skills {
  background: var(--bg-primary);
}

.skills-header {
  margin-bottom: clamp(40px, 6vw, 56px);
}

.skills-header h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-primary);
}

.skills-header .subtitle {
  font-family: var(--font-kr);
  font-weight: 300;
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(32px, 4vw, 56px);
}

.skill-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.skill-group-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.skill-group-title-kr {
  font-family: var(--font-kr);
  font-weight: 300;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-list li {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.skill-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 1px;
  background: var(--accent-amber);
}

@media (max-width: 767px) {
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 600ms var(--ease-smooth), transform 600ms var(--ease-smooth);
}

.reveal.hidden {
  opacity: 0;
  transform: translateY(20px);
}

/* Staggered load animation */
@media (prefers-reduced-motion: no-preference) {
  .stagger-1 { transition-delay: 0.3s; }
  .stagger-2 { transition-delay: 0.7s; }
  .stagger-3 { transition-delay: 1.1s; }
  .stagger-4 { transition-delay: 1.5s; }
}

/* ============================================
   CINEMATIC ANIMATIONS
   ============================================ */

/* Hero text — cinematic entrance with expanding letter-spacing */
@media (prefers-reduced-motion: no-preference) {
  .hero-line1 {
    animation: textReveal 1.2s var(--ease-smooth) 0.3s both;
  }

  .hero-line2 {
    animation: textReveal 1.2s var(--ease-smooth) 0.8s both;
  }

  @keyframes textReveal {
    0% {
      opacity: 0;
      letter-spacing: 0.15em;
      filter: blur(4px);
    }
    100% {
      opacity: 1;
      letter-spacing: normal;
      filter: blur(0);
    }
  }

  /* Credentials — stagger in from below */
  .cred-item {
    animation: credSlide 0.6s var(--ease-smooth) both;
  }
  .cred-item:nth-child(1) { animation-delay: 0s; }
  .cred-item:nth-child(2) { animation-delay: 0.1s; }
  .cred-item:nth-child(3) { animation-delay: 0.2s; }
  .cred-item:nth-child(4) { animation-delay: 0.3s; }

  @keyframes credSlide {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
  }

  /* Category tiles — subtle scale entrance */
  .cat-tile {
    animation: tileReveal 0.8s var(--ease-smooth) both;
  }
  .cat-tile:nth-child(1) { animation-delay: 0.1s; }
  .cat-tile:nth-child(2) { animation-delay: 0.15s; }
  .cat-tile:nth-child(3) { animation-delay: 0.2s; }
  .cat-tile:nth-child(4) { animation-delay: 0.25s; }
  .cat-tile:nth-child(5) { animation-delay: 0.3s; }
  .cat-tile:nth-child(6) { animation-delay: 0.35s; }
  .cat-tile:nth-child(7) { animation-delay: 0.4s; }
  .cat-tile:nth-child(8) { animation-delay: 0.45s; }

  @keyframes tileReveal {
    0% { opacity: 0; transform: scale(0.96); }
    100% { opacity: 1; transform: scale(1); }
  }

  /* Ambient glow pulse on hero */
  .hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 40%;
    background: radial-gradient(ellipse, rgba(196, 149, 106, 0.06) 0%, transparent 70%);
    animation: glowPulse 6s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
  }

  @keyframes glowPulse {
    0% { opacity: 0.3; transform: translateX(-50%) scale(1); }
    100% { opacity: 0.7; transform: translateX(-50%) scale(1.2); }
  }
}

/* Film frame lines on category tile hover */
.cat-tile::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-amber), transparent);
  opacity: 0;
  transition: opacity 400ms var(--ease-smooth);
  z-index: 3;
}

.cat-tile:hover::after {
  opacity: 1;
}

/* ============================================
   MOBILE STICKY BAR
   ============================================ */

.mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 998;
  background: rgba(13, 13, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
}

.mobile-bar-inner {
  display: flex;
  gap: 12px;
}

.mobile-bar a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
}

.mobile-bar a:first-child::after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  height: 50%;
  width: 1px;
  background: var(--border);
}

.mobile-bar a:hover {
  color: var(--accent);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cat-tile:nth-child(1) { grid-column: 1 / 3; grid-row: auto; min-height: 350px; }
  .cat-tile:nth-child(n+2) { grid-column: auto; grid-row: auto; min-height: 260px; }
  .cat-tile:nth-child(5) { grid-column: auto; }

  .masonry-grid {
    columns: 2;
  }

  .about-split {
    grid-template-columns: 1fr;
  }

  .about-portrait {
    max-width: 500px;
  }
}

@media (max-width: 767px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .cat-grid {
    grid-template-columns: 1fr;
  }

  .cat-tile,
  .cat-tile:nth-child(n) {
    grid-column: auto !important;
    grid-row: auto !important;
    min-height: 240px !important;
  }

  .masonry-grid {
    columns: 1;
  }

  .philosophy-inner {
    padding-left: 24px;
  }

  .about-stats {
    flex-direction: column;
    gap: 16px;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-right {
    text-align: left;
    align-items: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
  }

  .mobile-bar {
    display: block;
  }

  /* Extra bottom padding for mobile bar */
  .footer {
    padding-bottom: 80px;
  }

  .contact-method {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 374px) {
  .hero-line1 {
    font-size: 1.5rem;
  }
  .hero-line2 {
    font-size: 1.8rem;
  }
}
