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

:root {
  --bg: #0c0c0c;
  --bg-alt: #111111;
  --bg-card: #161616;
  --fg: #f0ede8;
  --fg-muted: #888880;
  --accent: #c9a96e;
  --accent-dim: rgba(201, 169, 110, 0.15);
  --border: rgba(240, 237, 232, 0.08);
  --border-accent: rgba(201, 169, 110, 0.3);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow: 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* =========================================
   NAVIGATION
   ========================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 48px;
  transition: background var(--transition), padding var(--transition);
}

.nav.scrolled {
  background: rgba(12, 12, 12, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 18px 48px;
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.25em;
  color: var(--fg);
  transition: color var(--transition);
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 40px;
}

.nav-link {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--fg-muted);
  transition: color var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-link:hover {
  color: var(--fg);
}

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

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--fg);
  transition: all var(--transition);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background: var(--bg);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: right var(--transition-slow);
}

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

.mobile-menu ul {
  list-style: none;
  text-align: center;
}

.mobile-link {
  display: block;
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  padding: 16px 0;
  transition: color var(--transition);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(201, 169, 110, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 30%, rgba(201, 169, 110, 0.04) 0%, transparent 60%);
}

.hero-grain {
  position: absolute;
  inset: 0;
  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)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  opacity: 0.5;
}

.hero-content {
  position: relative;
  text-align: center;
  z-index: 1;
  padding: 0 20px;
}

.hero-sub {
  font-size: 12px;
  letter-spacing: 0.35em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(52px, 8vw, 110px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
}

.hero-title .line {
  display: block;
}

.hero-title .italic {
  font-style: italic;
  color: var(--accent);
}

.hero-divider {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  margin: 0 auto 28px;
}

.hero-desc {
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--fg-muted);
  font-size: 10px;
  letter-spacing: 0.2em;
}

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

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

/* Fade up animation */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.9s var(--transition) forwards;
}

.fade-up:nth-child(1) { animation-delay: 0.2s; }
.fade-up:nth-child(2) { animation-delay: 0.45s; }
.fade-up:nth-child(3) { animation-delay: 0.65s; }
.fade-up:nth-child(4) { animation-delay: 0.8s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   SECTION COMMON
   ========================================= */
.section-header {
  margin-bottom: 64px;
}

.section-header.centered {
  text-align: center;
}

.section-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* =========================================
   WORKS INTRO
   ========================================= */
.works-intro {
  padding: 140px 0;
}

.works-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.works-card {
  display: block;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.works-card-img {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-card);
}

.video-thumb {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.illust-thumb {
  background: linear-gradient(135deg, #1a0a2e 0%, #2e1a3e 50%, #3e0a2e 100%);
}

.works-card-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
  z-index: 1;
}

.works-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0;
  transition: opacity var(--transition);
}

.works-card:hover .works-card-overlay {
  opacity: 1;
}

.works-card-icon {
  font-size: 36px;
  color: var(--accent);
  opacity: 0.9;
}

.works-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(201, 169, 110, 0.05);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 1;
}

.works-card:hover .works-card-img::after {
  opacity: 1;
}

.works-card-img {
  transition: transform var(--transition-slow);
}

.works-card:hover .works-card-img {
  transform: scale(1.03);
}

.works-card-info {
  padding: 24px 0 8px;
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.works-card-num {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 400;
}

.works-card-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.works-card-desc {
  margin-left: auto;
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
}

/* =========================================
   GALLERY SECTION
   ========================================= */
.gallery-section {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

.gallery-section.alt-bg {
  background: var(--bg-alt);
}

/* Video grid: mosaic layout */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 240px;
  gap: 12px;
}

.video-grid .gallery-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

/* Illustration grid */
.illust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
  gap: 12px;
}

.illust-grid .gallery-item.large {
  grid-column: span 1;
  grid-row: span 2;
}

.gallery-item {
  overflow: hidden;
  position: relative;
}

.gallery-thumb {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  cursor: pointer;
}

/* Video thumbnails — subtle blue/teal palette */
.video-grid .gallery-thumb:nth-child(1),
.video-grid .gallery-item:nth-child(1) .gallery-thumb {
  background: linear-gradient(145deg, #0d1b2a 0%, #1b2a3b 40%, #243447 100%);
}

.video-grid .gallery-item:nth-child(2) .gallery-thumb {
  background: linear-gradient(145deg, #111827 0%, #1e2f41 100%);
}

.video-grid .gallery-item:nth-child(3) .gallery-thumb {
  background: linear-gradient(145deg, #0a1628 0%, #162232 100%);
}

.video-grid .gallery-item:nth-child(4) .gallery-thumb {
  background: linear-gradient(145deg, #131f2e 0%, #1c2e42 100%);
}

.video-grid .gallery-item:nth-child(5) .gallery-thumb {
  background: linear-gradient(145deg, #0e1a28 0%, #1a2c3e 100%);
}

/* Illustration thumbnails — warm purple/rose palette */
.illust-item {
  background: linear-gradient(145deg, #1a0f1e 0%, #2a1530 100%);
}

.illust-grid .gallery-item:nth-child(1) .gallery-thumb {
  background: linear-gradient(145deg, #1c0d22 0%, #2d1a38 100%);
}

.illust-grid .gallery-item:nth-child(2) .gallery-thumb {
  background: linear-gradient(145deg, #1a1028 0%, #291830 100%);
}

.illust-grid .gallery-item:nth-child(3) .gallery-thumb {
  background: linear-gradient(145deg, #200d20 0%, #35183a 100%);
}

.illust-grid .gallery-item:nth-child(4) .gallery-thumb {
  background: linear-gradient(145deg, #1a0e1c 0%, #2d1832 100%);
}

.illust-grid .gallery-item:nth-child(5) .gallery-thumb {
  background: linear-gradient(145deg, #190c24 0%, #28183a 100%);
}

/* Shimmer overlay */
.gallery-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(201, 169, 110, 0.04) 50%,
    transparent 100%
  );
  z-index: 1;
}

/* Hover overlay */
.gallery-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(201, 169, 110, 0.06);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 2;
}

.gallery-thumb:hover::after {
  opacity: 1;
}

.gallery-thumb {
  transition: transform var(--transition-slow);
}

.gallery-thumb:hover {
  transform: scale(1.04);
}

/* Play button */
.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border: 1px solid rgba(201, 169, 110, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition), border-color var(--transition);
}

.play-btn span {
  color: var(--accent);
  font-size: 16px;
  padding-left: 4px;
}

.gallery-thumb:hover .play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
  border-color: var(--accent);
}

/* Gallery info */
.gallery-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 20px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
  z-index: 4;
  transform: translateY(4px);
  opacity: 0;
  transition: all var(--transition);
}

.gallery-thumb:hover .gallery-info {
  opacity: 1;
  transform: translateY(0);
}

.gallery-info h4 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.gallery-info p {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.15em;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--transition), transform 0.8s var(--transition);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   ABOUT
   ========================================= */
.about-section {
  padding: 140px 0;
  border-top: 1px solid var(--border);
}

.about-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 80px;
  align-items: start;
}

.about-body {
  font-size: 16px;
  line-height: 1.9;
  color: rgba(240, 237, 232, 0.75);
  margin-bottom: 24px;
  max-width: 560px;
}

.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
}

.skill-tag {
  padding: 8px 18px;
  border: 1px solid var(--border-accent);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent);
  transition: all var(--transition);
}

.skill-tag:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.about-portrait {
  display: flex;
  justify-content: center;
}

.portrait-frame {
  width: 300px;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--border);
  position: relative;
}

.portrait-frame::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px solid var(--border-accent);
  pointer-events: none;
}

.portrait-placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-muted);
  font-size: 13px;
  letter-spacing: 0.15em;
}

/* =========================================
   CONTACT
   ========================================= */
.contact-section {
  padding: 140px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.contact-container {
  text-align: center;
}

.contact-sub {
  font-size: 15px;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  margin-bottom: 48px;
  line-height: 1.8;
}

.contact-email {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--fg);
  border-bottom: 1px solid var(--border-accent);
  padding-bottom: 8px;
  transition: color var(--transition), border-color var(--transition);
  margin-bottom: 56px;
}

.contact-email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.social-link {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
  transition: color var(--transition);
}

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

.social-sep {
  color: var(--border);
  font-size: 12px;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

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

.footer-logo {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--fg-muted);
}

.footer-copy {
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
}

/* =========================================
   LIGHTBOX
   ========================================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

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

.lightbox-close {
  position: absolute;
  top: 28px;
  right: 36px;
  background: none;
  border: none;
  color: var(--fg-muted);
  font-size: 32px;
  cursor: pointer;
  transition: color var(--transition);
  line-height: 1;
}

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

.lightbox-content {
  max-width: 80vw;
  max-height: 70vh;
}

.lightbox-caption {
  margin-top: 20px;
  font-size: 13px;
  color: var(--fg-muted);
  letter-spacing: 0.1em;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .about-container {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .about-portrait {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }

  .nav {
    padding: 22px 24px;
  }

  .nav.scrolled {
    padding: 16px 24px;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

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

  .works-card-desc {
    display: none;
  }

  .video-grid,
  .illust-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 180px;
  }

  .gallery-item.large {
    grid-column: span 2;
  }

  .about-section,
  .works-intro,
  .gallery-section,
  .contact-section {
    padding: 80px 0;
  }

  .portrait-frame {
    width: 240px;
  }

  .social-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .video-grid,
  .illust-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }

  .gallery-item.large {
    grid-column: span 1;
    grid-row: span 1;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* =========================================
   CURSOR CUSTOM (desktop only)
   ========================================= */
@media (pointer: fine) {
  body {
    cursor: none;
  }

  .cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s, width 0.3s, height 0.3s, background 0.3s;
    mix-blend-mode: difference;
  }

  .cursor-ring {
    position: fixed;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(201, 169, 110, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out, width 0.3s, height 0.3s, border-color 0.3s;
  }

  .cursor.hover {
    width: 12px;
    height: 12px;
  }

  .cursor-ring.hover {
    width: 56px;
    height: 56px;
    border-color: var(--accent);
  }
}
