* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Disable selection and drag */
html, body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

:root {
  --bg-dark: #0a0a0a;
  --coffee-gold: #d4a574;
  --coffee-light: #e8c9a8;
  --coffee-dark: #8b6914;
  --amber: #ffb347;
  --cream: #f5f0e6;
  --text-primary: #f0ebe3;
  --text-secondary: #9a9590;
  --accent-glow: rgba(212, 165, 116, 0.4);
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  overflow: hidden;
  min-height: 100vh;
}

#canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  touch-action: none;
  cursor: grab;
}

#canvas:active {
  cursor: grabbing;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
  user-select: none;
}

/* Sections Container - vertical scroll */
.sections-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 400vh; /* 4 sections × 100vh */
  transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

.section {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.section-content {
  text-align: center;
  padding: 2rem;
  max-width: 800px;
}

.section-content .contact {
  pointer-events: auto;
}

/* Section Indicator (vertical dots on right) */
.section-indicator {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
}

.indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(212, 165, 116, 0.2);
  border: 1px solid rgba(212, 165, 116, 0.4);
  transition: all 0.4s ease;
  cursor: pointer;
  pointer-events: auto;
}

.indicator-dot.active {
  background: var(--coffee-gold);
  border-color: var(--amber);
  box-shadow: 0 0 12px var(--coffee-gold);
  transform: scale(1.3);
}

.indicator-dot:hover {
  background: rgba(212, 165, 116, 0.4);
}

/* Section Titles */
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 1.5rem;
  text-shadow: 0 0 20px var(--accent-glow);
}

.section-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* Progressive reveal items - hidden by default */
.reveal-item {
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  filter: blur(8px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-item.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* Reveal animations */
.name-hero.reveal-item.revealed {
  animation: revealHero 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.section-title.reveal-item.revealed {
  animation: revealTitle 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.section-text.reveal-item.revealed {
  animation: revealText 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.highlight.reveal-item.revealed {
  animation: revealCode 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.contact.reveal-item.revealed {
  animation: revealGlow 0.8s ease forwards;
}

@keyframes revealHero {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.7);
    filter: blur(15px);
  }
  60% {
    transform: translateY(-10px) scale(1.05);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes revealTitle {
  0% {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes revealText {
  0% {
    opacity: 0;
    transform: translateX(-20px);
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

@keyframes revealCode {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    filter: blur(8px);
  }
  50% {
    transform: translateY(-5px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes revealSlide {
  0% {
    opacity: 0;
    transform: translateY(25px);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes revealGlow {
  0% {
    opacity: 0;
    transform: translateY(15px) scale(0.95);
    filter: blur(4px);
  }
  70% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  85% {
    box-shadow: 0 0 40px rgba(212, 165, 116, 0.5);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ============================================
   HERO NAME - Big, Bold, Glitchy
   ============================================ */
.name-hero {
  margin-bottom: 2rem;
  line-height: 1.1;
}

.name-hero .greeting {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.name-hero .name-glitch {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 800;
  color: var(--cream);
  position: relative;
  letter-spacing: -0.03em;
  text-shadow: 
    0 0 20px var(--accent-glow),
    0 0 60px rgba(212, 165, 116, 0.4),
    0 0 100px rgba(255, 179, 71, 0.2);
  background: linear-gradient(135deg, var(--cream) 0%, var(--coffee-gold) 50%, var(--amber) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Glitch layers */
.name-hero.revealed .name-glitch::before,
.name-hero.revealed .name-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--cream) 0%, var(--coffee-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.name-hero.revealed .name-glitch::before {
  animation: glitch-1 2.5s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  text-shadow: -3px 0 var(--amber);
}

.name-hero.revealed .name-glitch::after {
  animation: glitch-2 3s infinite;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  text-shadow: 3px 0 var(--coffee-gold);
}

@keyframes glitch-1 {
  0%, 85%, 100% { transform: translate(0); opacity: 0; }
  86% { transform: translate(-4px, -2px) skew(-0.5deg); opacity: 0.8; }
  88% { transform: translate(4px, 1px) skew(0.5deg); opacity: 0; }
  90% { transform: translate(-2px, 2px); opacity: 0.6; }
  92% { transform: translate(0); opacity: 0; }
}

@keyframes glitch-2 {
  0%, 80%, 100% { transform: translate(0); opacity: 0; }
  82% { transform: translate(3px, 2px) skew(0.3deg); opacity: 0.7; }
  84% { transform: translate(-3px, -1px) skew(-0.3deg); opacity: 0; }
  87% { transform: translate(2px, -2px); opacity: 0.5; }
  89% { transform: translate(0); opacity: 0; }
}

/* ============================================
   TAGLINE - Terminal Style
   ============================================ */
.tagline {
  margin-bottom: 2rem;
}

.tagline .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: var(--coffee-gold);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tagline .label .prompt {
  color: var(--amber);
  font-weight: 700;
  text-shadow: 0 0 10px var(--amber);
}

.tagline .label .cursor {
  animation: blink 1s step-end infinite;
  color: var(--amber);
  font-weight: 400;
}

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

.tagline .highlight {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--cream);
  margin-bottom: 1.2rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.tagline .highlight .bracket {
  color: var(--coffee-gold);
  font-weight: 700;
  opacity: 0.7;
  font-size: 0.9em;
}

.tagline .highlight .code {
  color: #0a0a0a;
  background: linear-gradient(135deg, var(--amber) 0%, var(--coffee-gold) 100%);
  padding: 0.2em 0.6em;
  border-radius: 6px;
  font-weight: 700;
  text-shadow: none;
  box-shadow: 
    0 0 20px rgba(255, 179, 71, 0.4),
    0 4px 15px rgba(0, 0, 0, 0.3);
  animation: codePulse 2s ease-in-out infinite;
}

@keyframes codePulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 179, 71, 0.4), 0 4px 15px rgba(0, 0, 0, 0.3); }
  50% { box-shadow: 0 0 30px rgba(255, 179, 71, 0.6), 0 4px 20px rgba(0, 0, 0, 0.4); }
}

.tagline .description {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.8rem, 2vw, 1rem);
  color: var(--text-secondary);
  line-height: 1.9;
}

.tagline .description .line {
  display: block;
}

.tagline .description .accent {
  color: var(--coffee-gold);
  font-weight: 500;
}

.tagline .description .emphasis {
  color: var(--cream);
  font-weight: 500;
  position: relative;
}

.tagline .description .emphasis::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--coffee-gold), var(--amber));
  opacity: 0.6;
}

/* ============================================
   CONTACT - Glowing Email
   ============================================ */
.contact {
  margin-top: 2rem;
}

.email-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.email-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.email {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--cream);
  letter-spacing: 0.02em;
  padding: 0.6rem 1.2rem;
  background: rgba(212, 165, 116, 0.08);
  border: 1px solid rgba(212, 165, 116, 0.2);
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.email:hover {
  background: rgba(212, 165, 116, 0.15);
  border-color: var(--coffee-gold);
  box-shadow: 0 0 25px rgba(212, 165, 116, 0.3);
  transform: translateY(-2px);
}

.email .at {
  color: var(--amber);
  font-weight: 700;
  text-shadow: 0 0 8px var(--amber);
}

/* Hand status panel */
.hand-status-panel {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 165, 116, 0.2);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  pointer-events: none;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hand-status-panel .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
  transition: all 0.3s ease;
}

.hand-status-panel.detected .status-dot {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.hand-status-panel.fist .status-dot {
  background: var(--amber);
  box-shadow: 0 0 12px var(--amber);
  animation: pulse 0.4s ease;
}

.hand-status-panel.error .status-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.hand-status-panel .status-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Progress dots */
.reveal-progress {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  gap: 8px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 165, 116, 0.2);
  border-radius: 10px;
}

.reveal-progress .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(212, 165, 116, 0.2);
  border: 1px solid rgba(212, 165, 116, 0.3);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-progress .dot.filled {
  background: var(--coffee-gold);
  border-color: var(--amber);
  box-shadow: 0 0 8px var(--coffee-gold);
  transform: scale(1.1);
}

/* Instructions */
.instructions {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--coffee-gold);
  pointer-events: none;
  user-select: none;
  animation: breathe 2s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(212, 165, 116, 0.3);
}

.instructions.complete {
  animation: none;
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.6;
  text-shadow: none;
}

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

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

/* Webcam preview */
.webcam-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 180px;
  height: 135px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(212, 165, 116, 0.3);
  background: rgba(10, 10, 10, 0.8);
  pointer-events: auto;
  z-index: 100;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.webcam-container.active {
  opacity: 1;
  transform: translateY(0);
}

.webcam-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.webcam-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: scaleX(-1);
}

/* Gesture hint */
.gesture-hint {
  color: var(--coffee-gold);
  opacity: 1;
}

/* Subtle background gradient */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(212, 165, 116, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .content {
    padding: 1rem;
  }
  
  .tagline .description {
    font-size: 0.85rem;
  }
  
  .email {
    font-size: 0.9rem;
  }
  
  .webcam-container {
    width: 140px;
    height: 105px;
    bottom: 1rem;
    right: 1rem;
  }
  
  .reveal-progress {
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 0.75rem;
    gap: 6px;
  }
  
  .reveal-progress .dot {
    width: 8px;
    height: 8px;
  }
}
