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

:root {
  --black: #111110;
  --white: #FAF9F6;
  --beige: #D4C5A9;
  --beige-light: #E8DFD0;
  --brown: #8B7355;
  --brown-line: rgba(139, 115, 85, 0.25);
  --text-primary: #111110;
  --text-secondary: #6B6860;
  --text-muted: #9E9A90;
  --bg: #FAF9F6;
  --font: 'Inter', -apple-system, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 64px;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { background: none; border: none; color: inherit; font: inherit; cursor: pointer; }
em { font-family: var(--serif); font-style: italic; }

::selection { background: var(--beige); color: var(--black); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 28px; }

/* ===== GRID CANVAS ===== */
#grid-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== CURSOR LIGHT ===== */
.cursor-light {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 197, 169, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  will-change: left, top;
}

/* ===== DIVIDER ===== */
.divider {
  height: 1px;
  background: var(--brown-line);
  width: 100%;
}

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h); z-index: 100;
  transition: background 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled {
  background: rgba(250, 249, 246, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--brown-line);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 28px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-weight: 500; font-size: 1.05rem; letter-spacing: -0.01em;
}
.dot { color: var(--brown); }
.nav-links { display: flex; gap: 32px; }
.nav-link {
  font-size: 0.85rem; font-weight: 400; color: var(--text-secondary);
  position: relative; transition: color 0.3s;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 1px; background: var(--brown);
  transition: width 0.3s var(--ease);
}
.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { width: 100%; }

.nav-menu-btn {
  display: none; flex-direction: column; gap: 6px; padding: 8px; z-index: 101;
}
.nav-menu-btn span {
  width: 22px; height: 1.5px; background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
  display: block;
}
.nav-menu-btn.active span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.nav-menu-btn.active span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  background: rgba(250, 249, 246, 0.97);
  backdrop-filter: blur(20px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}
.mobile-menu.active { opacity: 1; visibility: visible; }
.mobile-menu-link {
  font-family: var(--serif); font-size: clamp(2rem, 8vw, 3.5rem);
  color: var(--text-secondary); padding: 8px 0;
  transition: color 0.3s;
}
.mobile-menu-link:hover { color: var(--text-primary); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; padding: 120px 28px 80px;
  max-width: 1100px; margin: 0 auto;
}
.hero-content { position: relative; z-index: 2; }
.hero-tag {
  font-size: 0.8rem; font-weight: 500; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 24px;
}
.hero-title {
  font-family: var(--font); font-weight: 300;
  font-size: clamp(3rem, 9vw, 6.5rem); line-height: 1.08;
  letter-spacing: -0.04em; margin-bottom: 28px;
  color: var(--text-primary);
}
.hero-title em {
  font-family: var(--serif); font-weight: 400;
  color: var(--brown);
}
.hero-sub {
  font-size: 1.05rem; color: var(--text-secondary);
  max-width: 420px; line-height: 1.7; margin-bottom: 48px;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.85rem; font-weight: 500; color: var(--brown);
  border-bottom: 1px solid var(--brown);
  padding-bottom: 4px;
  transition: gap 0.3s var(--ease), color 0.3s;
}
.hero-cta:hover { gap: 14px; color: var(--text-primary); }
.hero-cta .arrow { font-size: 1.1rem; transition: transform 0.3s var(--ease); }
.hero-cta:hover .arrow { transform: translateY(3px); }

.hero-line-decoration {
  position: absolute; right: 10%; top: 50%; transform: translateY(-50%);
  width: 1px; height: 200px; background: var(--brown-line);
}

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

.section-label {
  font-size: 0.8rem; font-weight: 500; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 20px;
}

.project-row {
  display: grid;
  grid-template-columns: 40px 1fr auto auto 30px;
  align-items: center;
  gap: 24px;
  padding: 28px 0;
  transition: background 0.3s;
  position: relative;
}
.project-row::before {
  content: '';
  position: absolute;
  inset: 0 -28px;
  background: transparent;
  border-radius: 8px;
  transition: background 0.35s var(--ease);
  z-index: -1;
}
.project-row:hover::before {
  background: rgba(212, 197, 169, 0.1);
}

.project-index {
  font-size: 0.75rem; font-weight: 500; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.project-info { min-width: 0; }
.project-name {
  font-size: 1.3rem; font-weight: 500; letter-spacing: -0.02em;
  margin-bottom: 2px;
  transition: color 0.3s;
}
.project-row:hover .project-name { color: var(--brown); }
.project-desc {
  font-size: 0.82rem; color: var(--text-muted);
}

.project-tags-wrap { display: flex; gap: 6px; }
.ptag {
  padding: 4px 10px; border-radius: 100px; font-size: 0.7rem;
  font-weight: 500; border: 1px solid var(--brown-line);
  color: var(--text-secondary);
}

.project-icon-wrap {
  width: 44px; height: 44px; border-radius: 10px;
  overflow: hidden; flex-shrink: 0;
  transition: transform 0.35s var(--ease);
}
.project-row:hover .project-icon-wrap { transform: scale(1.08); }
.project-icon { width: 100%; height: 100%; object-fit: cover; }

.project-arrow {
  font-size: 1rem; color: var(--text-muted);
  transition: transform 0.3s var(--ease), color 0.3s;
}
.project-row:hover .project-arrow {
  transform: translateX(4px); color: var(--brown);
}

/* ===== ABOUT ===== */
.about { padding: 100px 0 120px; }
.about-grid {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px;
  align-items: start;
}
.about-text {
  font-size: 1.05rem; color: var(--text-secondary);
  line-height: 1.8; margin-bottom: 20px;
}
.about-text em { color: var(--brown); }

.toolkit { }
.toolkit-label {
  font-size: 0.8rem; font-weight: 500; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 16px;
}
.toolkit-list { display: flex; flex-wrap: wrap; gap: 8px; }
.toolkit-list span {
  padding: 7px 16px; border-radius: 100px; font-size: 0.8rem;
  font-weight: 400; border: 1px solid var(--brown-line);
  color: var(--text-secondary);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.toolkit-list span:hover {
  background: var(--beige); color: var(--text-primary);
  border-color: var(--beige);
}

/* ===== CONTACT ===== */
.contact { padding: 100px 0; }
.contact-inner { padding: 80px 0; text-align: center; }
.contact-title {
  font-weight: 300; font-size: clamp(2rem, 6vw, 4rem);
  letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 48px;
}
.contact-title em { color: var(--brown); }

.contact-links {
  display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
}
.contact-link {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: transform 0.3s var(--ease);
}
.contact-link:hover { transform: translateY(-3px); }
.contact-link-label {
  font-size: 0.72rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-muted);
}
.contact-link-value {
  font-size: 0.95rem; color: var(--text-primary);
  border-bottom: 1px solid var(--brown-line);
  padding-bottom: 2px;
  transition: border-color 0.3s;
}
.contact-link:hover .contact-link-value { border-color: var(--brown); }

/* ===== FOOTER ===== */
.footer { padding: 24px 0; border-top: 1px solid var(--brown-line); }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.78rem; color: var(--text-muted);
}

/* ===== REVEAL ===== */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: flex; }

  .hero { padding: 100px 24px 60px; }
  .hero-line-decoration { display: none; }

  .project-row {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 20px 0;
  }
  .project-index { display: none; }
  .project-tags-wrap { display: none; }
  .project-icon-wrap { width: 38px; height: 38px; border-radius: 8px; }
  .project-desc { display: none; }
  .project-arrow { display: none; }
  .project-info { order: 1; }
  .project-icon-wrap { order: 2; }

  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .work, .about { padding: 80px 0; }
  .contact { padding: 60px 0; }
  .contact-links { gap: 32px; }

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

  .cursor-light { display: none; }
}

@media (max-width: 480px) {
  .hero-title { font-size: clamp(2.2rem, 13vw, 3.5rem); }
  .contact-title { font-size: clamp(1.8rem, 10vw, 2.5rem); }
}
