:root {
  --bg: #080808;
  --bg2: #0f0f0f;
  --ink: #ffffff;
  --soft: #dadada;
  --soft2: #8a8a8a;
  --accent: #c8aa82;
  --line: rgba(255,255,255,0.10);
  --line2: rgba(255,255,255,0.06);
  --ease-quiet: cubic-bezier(.22,1,.36,1);
  --ease-precise: cubic-bezier(.4,0,.2,1);
  --ease-emphasis: cubic-bezier(.16,1,.3,1);
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  line-height: 1.75;
  overflow-x: hidden;
  cursor: none;
}

@media (pointer: coarse) {
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none !important; }
}

::selection { background: rgba(200,170,130,0.30); color: #fff; }

/* 3D Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Custom cursor */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 10000;
  mix-blend-mode: difference; opacity: 0;
  transition: opacity .25s ease-out;
  will-change: transform;
}
.cursor-dot { width: 6px; height: 6px; background: #fff; border-radius: 50%; }
.cursor-ring {
  width: 32px; height: 32px; border: 1px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  transition: opacity .25s ease-out, width .3s ease-out, height .3s ease-out, border-color .3s ease-out;
}
.cursor-dot.is-visible, .cursor-ring.is-visible { opacity: 1; }
.cursor-ring.is-hover { width: 56px; height: 56px; border-color: rgba(255,255,255,0.8); }

/* Type system */
.font-serif { font-family: 'EB Garamond', serif; font-weight: 400; letter-spacing: -0.01em; }
.hero-h1 {
  font-family: 'EB Garamond', serif; font-weight: 400;
  font-size: clamp(3rem, 9vw, 8rem);
  line-height: 1.02; letter-spacing: -0.025em;
}
.section-h2 {
  font-family: 'EB Garamond', serif; font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 1.05; letter-spacing: -0.02em;
}
.eyebrow {
  font-family: 'Fira Code', monospace; font-size: 13px;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent);
}
.mono-label {
  font-family: 'Fira Code', monospace; font-size: 13px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--soft2);
}
.mono-small {
  font-family: 'Fira Code', monospace; font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
}

/* Eyebrow rule */
.eyebrow-rule {
  display: inline-block; width: 0; height: 1px;
  margin-left: 0.85rem; vertical-align: middle;
  background: currentColor;
  transition: width 900ms var(--ease-quiet) 400ms;
}
.is-in .eyebrow-rule { width: 2.75rem; }

/* Fade-up */
.fade-up { opacity: 0; transform: translateY(50px);
  transition: opacity 1400ms var(--ease-quiet), transform 1400ms var(--ease-quiet);
  will-change: transform, opacity; }
.fade-up.is-in { opacity: 1; transform: none; }

/* Hero 4-beat */
.hero-beat { opacity: 0; transform: translateY(60px); }

/* Row hover with accent bar */
.row-hover { position: relative; transition: background 600ms var(--ease-quiet); }
.row-hover::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--accent);
  transform: scaleY(0); transform-origin: top;
  transition: transform 600ms var(--ease-quiet);
}
.row-hover:hover::before { transform: scaleY(1); }
/* .row-hover:hover .row-title { color: var(--accent); } */
.row-hover:hover .row-desc { opacity: 1; color: var(--accent);}
.row-title { transition: color 600ms var(--ease-quiet); }
.row-desc { opacity: 0.4; transition: opacity 600ms var(--ease-quiet); }

/* Sticky column */
.sticky-col {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
}

/* Hairlines */
.hairline { border-top: 1px solid var(--line); }
.hairline-b { border-bottom: 1px solid var(--line); }

/* Status dot */
.status-dot {
  width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
  display: inline-block;
  animation: pulse 3s var(--ease-quiet) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Project image */
.project-img {
  filter: grayscale(70%) brightness(0.5) contrast(1.15);
  transition: filter 1.5s var(--ease-quiet), transform 1.5s var(--ease-quiet);
}
.project-img-wrap:hover .project-img {
  filter: grayscale(20%) brightness(0.8) contrast(1.05);
  transform: scale(1.03);
}

/* Italic detail */
.serif-it { font-family: 'EB Garamond', serif; font-style: italic; font-weight: 400; }

/* Underline link */
.u-link { position: relative; }
.u-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 600ms var(--ease-quiet);
}
.u-link:hover::after { transform: scaleX(1); transform-origin: left; }

/* Section number */
.sec-num { font-family: 'Fira Code', monospace; font-size: 13px; letter-spacing: 0.2em; color: var(--accent); }

/* Vertical text */
.vertical-text {
  writing-mode: vertical-rl; transform: rotate(180deg);
  letter-spacing: 0.3em; font-family: 'Fira Code', monospace;
  font-size: 11px; text-transform: uppercase;
}

/* Tech tag chips */
.tech-tag {
  font-family: 'Fira Code', monospace; font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
  background: rgba(200,170,130,0.08);
  border: 1px solid rgba(200,170,130,0.35);
  padding: 0.5rem 0.9rem;
  border-radius: 3px;
  transition: background 400ms var(--ease-quiet), border-color 400ms var(--ease-quiet), transform 400ms var(--ease-quiet);
}
.tech-tag:hover {
  background: rgba(200,170,130,0.16);
  border-color: rgba(200,170,130,0.7);
  transform: translateY(-1px);
}

/* Nav consulting CTA */
.nav-cta {
  background: var(--accent);
  color: #0a0a0a !important;
  font-weight: 500;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  box-shadow: 0 4px 20px -6px rgba(200,170,130,0.6);
  transition: transform 350ms var(--ease-quiet), box-shadow 350ms var(--ease-quiet), background 350ms var(--ease-quiet);
}
.nav-cta:hover {
  background: #ddc39c;
  transform: translateY(-1px);
  box-shadow: 0 8px 26px -6px rgba(200,170,130,0.85);
}
.nav-cta .status-dot { background: #0a0a0a; }

/* Primary CTA button */
.cta-btn {
  position: relative;
  background: var(--accent);
  color: #0a0a0a;
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 0 rgba(200,170,130,0.0), 0 8px 30px -8px rgba(200,170,130,0.55);
  transition: transform 400ms var(--ease-quiet), box-shadow 400ms var(--ease-quiet), background 400ms var(--ease-quiet);
}
.cta-btn:hover {
  background: #ddc39c;
  transform: translateY(-2px);
  box-shadow: 0 0 0 0 rgba(200,170,130,0.0), 0 14px 40px -6px rgba(200,170,130,0.75);
}
.cta-btn:active { transform: translateY(0); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
  .fade-up, .hero-beat { opacity: 1 !important; transform: none !important; }
}