/* ===========================================
   NAVBAR
   =========================================== */
.nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 40px);
  max-width: 1320px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 12px 20px;
  background: rgba(18, 12, 9, 0.7);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: box-shadow 300ms, background 300ms, border-color 300ms;
}
.nav.scrolled {
  background: rgba(18, 12, 9, 0.92);
  border-color: var(--line-hi);
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.nav-logo svg { width: 32px; height: 32px; }
.nav-logo .coffee-part { color: var(--amber); }
.nav-logo .projects-part { color: var(--ink-0); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-1);
  border-radius: 8px;
  transition: background 200ms, color 200ms;
}
.nav-links a:hover {
  background: var(--bg-3);
  color: var(--amber);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--amber);
  color: var(--bg-0);
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  transition: transform 200ms var(--ease-out), background 200ms;
}
.nav-cta:hover {
  background: var(--amber-hi);
  transform: translate(-1px, -1px);
}

.mobile-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--bg-3);
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(18, 12, 9, 0.97);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid var(--line-hi);
    border-radius: 12px;
    padding: 12px;
    gap: 4px;
    z-index: 99;
  }
  .nav-links.open a {
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 8px;
  }
  .nav-cta span { display: none; }
  .mobile-toggle { display: flex; }
  .mobile-toggle.open { background: var(--amber-deep); }
}

/* ===========================================
   HERO
   =========================================== */
.hero {
  min-height: 100vh;
  padding-top: 160px;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 40%, transparent 80%);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(245,167,66,0.25) 0%, transparent 60%);
  pointer-events: none;
  animation: heroGlow 8s ease-in-out infinite;
}
@keyframes heroGlow {
  0%, 100% { opacity: 0.8; transform: translateX(-50%) scale(1); }
  50%      { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
  width: 100%;
}

.hero-left .eyebrow { margin-bottom: 28px; }

.hero-title {
  font-size: clamp(52px, 7vw, 104px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-wrap: balance;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line-inner { display: inline-block; }
.hero-title .amber { color: var(--amber); position: relative; }
.hero-title .amber::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 8px;
  background:
    linear-gradient(90deg,
      var(--amber) 0 8px, transparent 8px 16px,
      var(--amber) 16px 24px, transparent 24px 32px,
      var(--amber) 32px 40px, transparent 40px 48px,
      var(--amber) 48px 56px, transparent 56px 64px,
      var(--amber) 64px 72px);
  background-size: 72px 8px;
}

.hero-sub {
  margin-top: 32px;
  font-size: 19px;
  color: var(--ink-1);
  max-width: 520px;
  line-height: 1.6;
  text-wrap: pretty;
}

.hero-ctas {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  margin-top: 60px;
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.hero-stat-num {
  font-family: var(--f-display);
  font-size: 40px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.hero-stat-label {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* ===== Hero visual — pixel cup scene ===== */
.hero-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 540px;
  margin-left: auto;
}

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

.cup-scene svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,0.5));
}

.steam-code {
  position: absolute;
  top: 4%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--crema);
  opacity: 0.85;
  pointer-events: none;
  text-align: center;
  line-height: 1.6;
  white-space: pre;
}
.steam-code .k { color: var(--toast); }
.steam-code .s { color: var(--mint); }
.steam-code .n { color: var(--amber); }
.steam-code .c { color: var(--ink-3); font-style: italic; }

/* Floating pixel particles */
.pixel-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--amber);
  pointer-events: none;
  image-rendering: pixelated;
}
.pixel-particle.small { width: 4px; height: 4px; background: var(--toast); }
.pixel-particle.tiny { width: 3px; height: 3px; background: var(--crema); }

/* Terminal badge */
.hero-terminal {
  position: absolute;
  bottom: -20px;
  right: -30px;
  background: var(--bg-0);
  border: 1px solid var(--line-hi);
  border-radius: 10px;
  padding: 14px 18px;
  font-family: var(--f-mono);
  font-size: 13px;
  box-shadow: var(--shadow-soft);
  min-width: 240px;
}
.hero-terminal-head {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.hero-terminal-head span {
  width: 10px; height: 10px; border-radius: 50%;
}
.hero-terminal-head span:nth-child(1) { background: var(--berry); }
.hero-terminal-head span:nth-child(2) { background: var(--amber); }
.hero-terminal-head span:nth-child(3) { background: var(--mint); }
.hero-terminal-body .prompt { color: var(--mint); }
.hero-terminal-body .path { color: var(--sky); }
.hero-terminal-body .cmd { color: var(--ink-0); }
.hero-terminal-body .caret {
  display: inline-block;
  width: 8px; height: 14px;
  background: var(--amber);
  vertical-align: middle;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 360px; margin: 0 auto; }
  .hero-terminal { right: 0; }
}
