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

:root {
  --bg: #f5f0e8;
  --bg-dark: #111110;
  --text: #1a1a18;
  --text-muted: #6b6960;
  --text-light: #a09e96;
  --accent: #c8a96e;
  --accent-dark: #9a7d4a;
  --border: rgba(26, 26, 24, 0.1);
  --border-light: rgba(26, 26, 24, 0.06);

  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;

  --nav-h: 72px;
  --container: 1140px;
  --pad: clamp(24px, 5vw, 80px);
}

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

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

body.no-scroll {
  overflow: hidden;
}

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

/* =============================================
   PRELOADER
   ============================================= */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-inner {
  display: flex;
  gap: 2px;
}

.preloader-inner span {
  font-family: var(--font-serif);
  font-size: clamp(40px, 8vw, 80px);
  color: var(--bg);
  opacity: 0;
  transform: translateY(20px);
  animation: preload-char 0.5s ease forwards;
}

.preloader-inner span:nth-child(1) { animation-delay: 0.1s; }
.preloader-inner span:nth-child(2) { animation-delay: 0.2s; }
.preloader-inner span:nth-child(3) { animation-delay: 0.3s; }
.preloader-inner span:nth-child(4) { animation-delay: 0.4s; }

@keyframes preload-char {
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   NAVIGATION
   ============================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  background: transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

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

.nav-logo {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}

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

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-links .nav-cta {
  opacity: 1;
  background: var(--text);
  color: var(--bg);
  padding: 9px 20px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links .nav-cta:hover {
  background: var(--accent);
  color: var(--bg-dark);
}

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

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

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu ul {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.mobile-menu a {
  font-family: var(--font-serif);
  font-size: clamp(32px, 7vw, 56px);
  color: var(--bg);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.mobile-menu a:hover {
  opacity: 1;
}

/* =============================================
   LAYOUT UTILITIES
   ============================================= */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.section-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 80px;
  align-items: start;
}

.section-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.section-label span:first-child {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.section-label span:last-child {
  font-size: 13px;
  color: var(--text-light);
  letter-spacing: 0.04em;
}

/* =============================================
   SCROLL REVEAL
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* =============================================
   HERO
   ============================================= */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 60px) var(--pad) 100px;
  position: relative;
}

.hero-inner {
  max-width: 860px;
}

.hero-label {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 32px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hero-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.hero-heading {
  font-family: var(--font-serif);
  font-size: clamp(40px, 5.5vw, 76px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 28px;
}

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

.hero-heading em {
  font-style: italic;
  color: var(--text-muted);
}

.hero-heading .em-day {
  color: #c4a05e;
}

.hero-heading .em-night {
  color: #7a9aaa;
}

.hero-detail {
  font-size: clamp(15px, 1.4vw, 17px);
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 48px;
  padding-left: 14px;
  border-left: 2px solid var(--accent);
  min-height: 1.8em;
}

.cursor {
  display: inline-block;
  color: var(--accent);
  font-weight: 300;
  animation: blink 1s step-end infinite;
  margin-left: 1px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  padding: 14px 32px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 14px 32px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.03em;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-ghost:hover {
  border-color: var(--text);
  background: rgba(26, 26, 24, 0.04);
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: var(--pad);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-light);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: var(--text-light);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* =============================================
   ABOUT
   ============================================= */
.about {
  padding: 140px 0;
}

.about h2 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
}

.italic {
  font-style: italic;
}

.about-text p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 24px;
}

.about-stats {
  display: flex;
  gap: 48px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 32px;
  color: var(--text);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 0.04em;
}

/* =============================================
   WORK
   ============================================= */
.work {
  padding: 0 0 140px;
}

.work h2 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4vw, 56px);
  letter-spacing: -0.02em;
  margin-bottom: 64px;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.pillar {
  background: rgba(26, 26, 24, 0.03);
  padding: 40px 32px;
  border: 1px solid var(--border);
  transition: background 0.3s ease, transform 0.3s ease;
}

.pillar:hover {
  background: rgba(26, 26, 24, 0.06);
  transform: translateY(-3px);
}

.pillar-icon {
  font-size: 22px;
  color: var(--accent);
  margin-bottom: 24px;
}

.pillar h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.pillar p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* =============================================
   PROCESS
   ============================================= */
.process {
  background: var(--bg-dark);
  padding: 100px 0;
}

.process-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.process-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 140px;
}

.step-num {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
}

.step-content h4 {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--bg);
  margin-bottom: 6px;
}

.step-content p {
  font-size: 13px;
  color: rgba(245, 240, 232, 0.45);
  line-height: 1.6;
}

.process-divider {
  color: rgba(245, 240, 232, 0.15);
  font-size: 24px;
  font-weight: 300;
  align-self: center;
  flex-shrink: 0;
}

/* =============================================
   INTERESTS
   ============================================= */
.interests {
  padding: 140px 0;
}

.interests h2 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4vw, 56px);
  letter-spacing: -0.02em;
  margin-bottom: 56px;
}

.interest-cards {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.interest-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  border: 1px solid var(--border);
  transition: background 0.3s ease;
  overflow: hidden;
}

.interest-card:hover {
  background: rgba(26, 26, 24, 0.03);
}

/* AI Visual */
.interest-visual {
  position: relative;
  overflow: hidden;
  min-height: 220px;
}

.ai-visual {
  background: var(--bg-dark);
}

.ai-nodes {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--accent);
}

.node {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: node-pulse 3s ease-in-out infinite;
}

.n1 { top: 25%; left: 25%; animation-delay: 0s; }
.n2 { top: 30%; left: 75%; animation-delay: 0.6s; }
.n3 { top: 70%; left: 20%; animation-delay: 1.2s; }
.n4 { top: 70%; left: 80%; animation-delay: 1.8s; }
.n5 { top: 50%; left: 50%; width: 14px; height: 14px; animation-delay: 0.3s; }

@keyframes node-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* Film Visual */
.film-visual {
  background: #1a1208;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hasselblad-svg {
  width: 160px;
  height: auto;
  opacity: 0.9;
}

.film-frame {
  display: flex;
  align-items: stretch;
  height: 140px;
  width: 200px;
  border: 1px solid rgba(200, 169, 110, 0.3);
}

.film-sprocket {
  width: 18px;
  background: #0d0c09;
  border-color: rgba(200, 169, 110, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  padding: 8px 0;
}

.film-sprocket.left { border-right: 1px solid rgba(200, 169, 110, 0.2); }
.film-sprocket.right { border-left: 1px solid rgba(200, 169, 110, 0.2); }

.hole {
  width: 8px;
  height: 10px;
  border-radius: 2px;
  background: var(--bg-dark);
  border: 1px solid rgba(200, 169, 110, 0.3);
}

.film-image {
  flex: 1;
  background: linear-gradient(135deg, #2d2416 0%, #1a1208 40%, #3a2e1c 100%);
  position: relative;
  overflow: hidden;
}

.grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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.15'/%3E%3C/svg%3E");
  opacity: 0.4;
}

.light-leak {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(200, 169, 110, 0.4) 0%, transparent 70%);
  animation: leak-pulse 4s ease-in-out infinite;
}

@keyframes leak-pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

/* Piano Visual */
.piano-visual {
  background: #1a1a18;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 40px;
}

.piano-keys {
  display: flex;
  gap: 2px;
  position: relative;
  align-items: flex-start;
}

.key {
  border-radius: 0 0 4px 4px;
  flex-shrink: 0;
}

.key.white {
  width: 28px;
  height: 120px;
  background: linear-gradient(180deg, #f0ede4 0%, #ffffff 100%);
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), inset 0 -2px 4px rgba(0,0,0,0.1);
  transition: background 0.1s ease;
  cursor: default;
}

.key.white:hover {
  background: linear-gradient(180deg, #e8e4d8 0%, #f5f2ea 100%);
}

/*
  7 white keys × 28px + 6 gaps × 2px = 208px total
  White key start positions: C=0 D=30 E=60 F=90 G=120 A=150 B=180
  Black key (18px) centered on the gap between adjacent white keys:
    C# boundary 28–30 → left = 20px
    D# boundary 58–60 → left = 50px
    F# boundary 118–120 → left = 110px
    G# boundary 148–150 → left = 140px
    A# boundary 178–180 → left = 170px
*/
.key.black {
  width: 18px;
  height: 74px;
  background: linear-gradient(180deg, #1a1a18 0%, #2d2d2b 100%);
  position: absolute;
  top: 0;
  z-index: 2;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.6), inset 0 -2px 3px rgba(255,255,255,0.05);
  border-radius: 0 0 3px 3px;
}

.b1 { left: 20px; }
.b2 { left: 50px; }
.b3 { left: 110px; }
.b4 { left: 140px; }
.b5 { left: 170px; }

.interest-body {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.interest-body h3 {
  font-family: var(--font-serif);
  font-size: 26px;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.interest-body p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 440px;
}

/* =============================================
   QUOTE
   ============================================= */
.quote-section {
  padding: 120px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.quote-section blockquote {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 820px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.quote-section blockquote em {
  color: var(--text-muted);
  font-style: italic;
}

/* =============================================
   CONTACT
   ============================================= */
.contact {
  padding: 140px 0;
  background: var(--bg-dark);
}

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

.contact-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

.contact h2 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--bg);
  margin-bottom: 56px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 400;
  color: var(--bg);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 240, 232, 0.2);
  padding-bottom: 8px;
  transition: border-color 0.2s ease, gap 0.2s ease;
}

.contact-link:hover {
  border-color: var(--accent);
  gap: 20px;
}

.contact-link .arrow {
  color: var(--accent);
  transition: transform 0.2s ease;
}

.contact-link:hover .arrow {
  transform: translateX(4px);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--bg-dark);
  border-top: 1px solid rgba(245, 240, 232, 0.06);
  padding: 32px 0;
}

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

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: rgba(245, 240, 232, 0.35);
}

.footer-sep {
  opacity: 0.4;
}

.footer-right a {
  font-size: 13px;
  color: rgba(245, 240, 232, 0.5);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .section-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .section-label {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    position: static;
    padding-top: 0;
  }

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

  .interest-card {
    grid-template-columns: 1fr;
  }

  .interest-visual {
    min-height: 200px;
  }

  .process-steps {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }

  .process-divider {
    display: none;
  }
}

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

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding-top: calc(var(--nav-h) + 40px);
  }
}

@media (max-width: 560px) {
  .about-stats {
    gap: 32px;
  }

  .interest-body {
    padding: 32px 24px;
  }

  .quote-section blockquote {
    font-size: 26px;
  }
}
