:root {
  --bg: #050505;
  /* Deepest black */
  --surface: #0a0a0a;
  /* Slightly elevated */
  --card: rgba(255, 255, 255, 0.02);
  /* Glass background */
  --card-border: rgba(255, 255, 255, 0.06);
  /* Subtle border */

  --accent: #8B5CF6;
  /* Vibrant Violet */
  --accent-alt: #EC4899;
  /* Vibrant Pink */
  --accent-cyan: #06B6D4;
  /* Cyan highlight */

  --text: #f3f4f6;
  /* Crisp white */
  --muted: #9ca3af;
  /* Elegant gray */
  --glow: rgba(139, 92, 246, 0.15);
  /* Ambient glow */

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
}

a {
  color: var(--text);
  text-decoration: none;
}

/* Typography Utilities */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* 3D Context */
.perspective-container {
  perspective: 1200px;
}

/* Three.js Canvas Container */
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  /* Let clicks pass through */
}

main {
  position: relative;
  z-index: 1;
}

/* Clean Minimal Navbar */
.navbar.clean-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100000;
  padding: 2rem 0;
  transition: all 0.4s ease;
  background: transparent;
}

.navbar.clean-nav.scrolled {
  background: rgba(8, 8, 12, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1rem 0;
}

.navbar.clean-nav.nav-hidden {
  transform: translateY(-100%);
  opacity: 0;
}

.nav-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

/* Preloader */
.site-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preloader-logo-container {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 30px 0;
}

.preloader-animating-logo {
  width: 120px;
  height: auto;
  object-fit: contain;
  opacity: 0;
  /* Logo appears gracefully over 0.7s (slower and smoother), starting EXACTLY when the laser is at the middle (1.375s in) */
  animation: logoReveal 0.7s ease-in-out 1.375s forwards;
}

/* The sweeping laser scanner */
.preloader-logo-container::after {
  content: '';
  position: absolute;
  left: -10%;
  width: 120%;
  height: 2px;
  /* Fixed pixel soft edges so it never looks like a box even when width is 0 */
  background: linear-gradient(90deg, transparent 0px, var(--accent-alt) 40px, var(--accent-alt) calc(100% - 40px), transparent 100%);
  box-shadow: 0 0 15px 5px rgba(236, 72, 153, 0.8), 0 0 30px 10px rgba(168, 85, 247, 0.5);
  /* 2.5s total time for explicit, highly visible pauses */
  animation: scannerSweep 2.5s linear forwards;
  z-index: 2;
  opacity: 0;
  will-change: width, opacity, top;
}

@keyframes scannerSweep {

  /* Initial blank wait for browser paint lag */
  0% {
    top: -10%;
    opacity: 0;
    width: 0%;
  }

  10% {
    top: -10%;
    opacity: 0;
    width: 0%;
  }

  /* Turn on laser and draw-in at the top from left to right */
  11% {
    top: -10%;
    opacity: 1;
    width: 0%;
  }

  20% {
    top: -10%;
    opacity: 1;
    width: 120%;
  }

  /* EXPLICIT PAUSE AT TOP (half a second) */
  40% {
    top: -10%;
    opacity: 1;
    width: 120%;
  }

  /* Sweep down exactly through the middle */
  55% {
    top: 50%;
    opacity: 1;
    width: 120%;
  }

  70% {
    top: 110%;
    opacity: 1;
    width: 120%;
  }

  /* Stay at bottom briefly (half a second) */
  90% {
    top: 110%;
    opacity: 1;
    width: 120%;
  }

  /* Disappear */
  100% {
    top: 110%;
    opacity: 0;
    width: 0%;
  }
}

@keyframes logoReveal {
  0% {
    opacity: 0;
    filter: drop-shadow(0 0 0px rgba(168, 85, 247, 0));
    transform: scale(0.95);
  }

  30% {
    opacity: 1;
    filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.9));
    transform: scale(1.02);
  }

  100% {
    opacity: 1;
    filter: drop-shadow(0 0 15px rgba(168, 85, 247, 0.5));
    transform: scale(1);
  }
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

/* HERO SECTION */
.hero.clean-hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  position: relative;
  z-index: 20;
  /* Keep text above the fade gradient */
  padding: 0 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-content {
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 1;
  /* Above canvas */
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
}

/* Top Hero Badge (Minimalist) */
.hero-top-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
}

.badge-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.hero-top-badge:hover .badge-avatar {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.badge-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
}

.badge-info-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
}

.badge-brand {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 500;
}

.badge-location {
  font-family: var(--font-body);
  font-size: 1.1rem;

  /* Traveling Light Effect */
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.6) 0%,
      rgba(255, 255, 255, 0.6) 40%,
      var(--accent-cyan) 50%,
      rgba(255, 255, 255, 1) 55%,
      rgba(255, 255, 255, 0.6) 65%,
      rgba(255, 255, 255, 0.6) 100%);
  background-size: 300% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine-text 5s linear infinite;
}

@keyframes shine-text {
  0% {
    background-position: 150% center;
  }

  100% {
    background-position: -150% center;
  }
}

.hero-top-badge:hover .badge-location {
  color: rgba(255, 255, 255, 1);
}


.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
}

.text-cyan {
  color: var(--accent-cyan);
}

.highlight {
  background: linear-gradient(90deg, #A855F7, #EC4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-muted {
  color: rgba(255, 255, 255, 0.5);
}

.hero-actions {
  opacity: 0;
  transform: translateY(20px);
}

.btn-clean {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: border-color 0.3s ease, color 0.3s ease;
}

.btn-clean:hover {
  border-color: var(--text);
}

/* Split Text Global utility for JS */
.split-text span,
.char-wrap span {
  display: inline-block;
}

/* Hero Scroll Indicator (Counterweight) */
.hero-scroll-indicator {
  position: absolute;
  right: 4rem;
  bottom: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  opacity: 0.5;
  z-index: 1;
  transition: opacity 0.3s ease;
}

.hero-scroll-indicator:hover {
  opacity: 1;
}

.scroll-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--text);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  /* Faint background track */
  position: relative;
  overflow: hidden;
}



.scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 15px;
  /* The bright falling dash */
  background: var(--accent-cyan);
  animation: scroll-drop 1.5s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes scroll-drop {
  0% {
    top: -15px;
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  80% {
    opacity: 1;
  }

  100% {
    top: 60px;
    opacity: 0;
  }
}

/* ABOUT SECTION */
.about {
  position: relative;
  width: 100%;
  height: 300vh;
  background: var(--surface);
  z-index: 10;
}

/* Gradient fade to smooth the transition from the hero canvas to the solid about section */
.about::before {
  content: '';
  position: absolute;
  top: -300px;
  left: 0;
  width: 100%;
  height: 300px;
  background: linear-gradient(to bottom, transparent, var(--surface));
  pointer-events: none;
}

.about-grid {
  display: flex;
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  z-index: 10;
}

.about-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 4rem;
  height: 100%;
}

.about-text-content h2 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

/* Section Toast Overlay (Time-based JS Trigger) */
.section-toast-overlay {
  position: sticky;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  pointer-events: none;
  text-align: center;
  width: 100%;
  height: 0;
  overflow: visible;
  opacity: 0;
}

.section-toast-overlay.is-active {
  animation: toastFadeIn 0.5s ease forwards;
}

@keyframes toastFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-50%) scale(0.9);
  }

  100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

.section-toast-text {
  font-size: clamp(3rem, 8vw, 6rem);
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--text);
  margin: 0;
  text-transform: uppercase;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.9), 0 0 20px var(--glow);
  opacity: 0.8;
}

.about-text-content p {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 1.5rem;
  max-width: 600px;
}

.accent-line {
  margin-top: 3rem;
  font-style: italic;
  color: var(--accent-cyan);
  font-size: 1.2rem;
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
}

.about-right {
  flex: 1;
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.about-cards-container {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 460px;
  perspective: 1200px;
}

.ambient-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  background: var(--glow);
  filter: blur(80px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.about-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  /* JS will handle */
  transform: translateY(100px);
  /* JS will handle */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  z-index: 1;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

/* CSS Scroll-driven animations — only on browsers that support it (Chrome/Edge).
   Safari/iOS falls back to GSAP in app.js */
@supports (animation-timeline: view()) {
  .about-card {
    animation-timeline: --about-section;
    animation-fill-mode: both;
    animation-timing-function: ease-in-out;
  }

  .about {
    view-timeline-name: --about-section;
    view-timeline-axis: block;
  }

  .about-card.code-card {
    animation-name: card1-scroll;
  }

  .about-card.daw-card {
    animation-name: card2-scroll;
  }

  .about-card.philosophy-card {
    animation-name: card3-scroll;
  }
}

@keyframes card1-scroll {
  0%, 35% { opacity: 1; transform: translateY(0); }
  45%, 100% { opacity: 0; transform: translateY(-50px); }
}

@keyframes card2-scroll {
  0%, 35% { opacity: 0; transform: translateY(50px); }
  45%, 55% { opacity: 1; transform: translateY(0); }
  65%, 100% { opacity: 0; transform: translateY(-50px); }
}

@keyframes card3-scroll {
  0%, 55% { opacity: 0; transform: translateY(50px); }
  65%, 100% { opacity: 1; transform: translateY(0); }
}

/* DAW card needs to stretch its children to fill the card */
.about-card.daw-card {
  transition: border-color 0.3s ease;
  padding: 0;
  align-items: stretch;
}

.about-card.daw-card:hover {
  transform: none;
}

.about-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(600px circle at var(--mouse-x, 0) var(--mouse-y, 0),
      rgba(255, 255, 255, 0.04),
      transparent 40%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
  z-index: 0;
}

.about-card:hover::before {
  opacity: 1;
}

.about-card>* {
  position: relative;
  z-index: 1;
}

.about-card h3 {
  position: absolute;
  top: 2.5rem;
  left: 2.5rem;
  font-size: 1.25rem;
  color: var(--muted);
}

/* Code Card (Developer) */
.code-card {
  justify-content: flex-start;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}

.code-header {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-body {
  padding: 1.5rem;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.6;
  color: #c9d1d9;
  overflow-x: auto;
}

/* Custom scrollbar for code body */
.code-body::-webkit-scrollbar {
  height: 6px;
}

.code-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.code-body .keyword {
  color: #ff7b72;
  font-weight: 500;
}

.code-body .property {
  color: #d2a8ff;
}

.code-body .string {
  color: #a5d6ff;
}

.code-body .method {
  color: #d2a8ff;
  font-weight: 500;
}

.code-body .class-name {
  color: #79c0ff;
  font-weight: 600;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red {
  background: #ff5f56;
}

.dot.yellow {
  background: #ffbd2e;
}

.dot.green {
  background: #27c93f;
}

.code-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--muted);
}

/* Audio Card (Producer) */
.audio-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}

.daw-toolbar {
  background: #111;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
}

.daw-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 2rem;
}

.daw-btn {
  background: #222;
  border-radius: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
}

.daw-btn.play {
  color: #27c93f;
}

.daw-time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #fff;
  margin-left: 0.5rem;
  letter-spacing: 1px;
}

.daw-ruler {
  display: flex;
  flex: 1;
  justify-content: space-between;
  padding-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #666;
}

.daw-workspace {
  display: flex;
  flex: 1;
  background: #1a1a1a;
  position: relative;
}

.daw-track-headers {
  width: 100px;
  background: #141414;
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  z-index: 5;
}

.track-header {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  border-bottom: 1px solid #222;
  gap: 8px;
}

.track-color {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.track-name {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #aaa;
}

.daw-timeline {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #1c1c1c;
  display: flex;
  flex-direction: column;
}

.daw-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 25% 100%;
  pointer-events: none;
}

.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.8);
  left: 0%;
  z-index: 10;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  animation: playheadSweep 4s linear infinite;
}

.playhead::before {
  content: '';
  position: absolute;
  top: 0;
  left: -4px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid rgba(255, 255, 255, 0.8);
}

@keyframes playheadSweep {
  0% {
    left: 0%;
  }

  100% {
    left: 100%;
  }
}

.daw-tracks {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.track {
  height: 40px;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.region {
  position: absolute;
  top: 4px;
  height: 32px;
  border-radius: 4px;
  opacity: 0.9;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.region-name {
  background: rgba(0, 0, 0, 0.2);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: #fff;
  padding: 1px 4px;
  white-space: nowrap;
}

.waveform {
  flex: 1;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0px, rgba(255, 255, 255, 0.3) 1px, transparent 1px, transparent 3px);
  margin-top: 2px;
  margin-bottom: 2px;
  opacity: 0.7;
}

.midi-notes {
  flex: 1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.8) 1px, transparent 1px);
  background-size: 8px 4px;
  background-position: 0 0;
  opacity: 0.8;
}

/* Philosophy Card */
.philosophy-card {
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 3rem;
  overflow: hidden;
}

.philosophy-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  height: 100%;
}

.typewriter-text {
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--muted);
  font-weight: 400;
  margin: 0;
  min-height: 150px;
  font-family: var(--font-mono);
}

.glitch-char {
  color: var(--accent);
  font-weight: 600;
  text-shadow: 0 0 5px var(--accent);
}


/* SKILLS SECTION */
.skills {
  padding: 14rem 2rem 12rem 2rem;
  /* Blend the var(--surface) of About into the var(--bg) of Skills over the first 300px */
  background: linear-gradient(to bottom, var(--surface) 0%, var(--bg) 300px);
  position: relative;
  z-index: 20;
}



.skills-grid-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.skills-wrapper {
  display: flex;
  gap: 2rem;
  perspective: 1200px;
  width: max-content;
}

.marquee-track {
  animation: cardMarquee 25s linear infinite;
}

.skills-wrapper:hover,
.skills-wrapper.production.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes cardMarquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-50% - 1rem));
  }

  /* -50% shifts halfway, -1rem accounts for half the gap */
}

@keyframes cardMarqueeReverse {
  0% {
    transform: translateX(calc(-50% - 1rem));
  }

  100% {
    transform: translateX(0);
  }
}

.skills-wrapper.engineering {
  position: relative;
}

.skills-wrapper.production {
  position: relative;
}

.skills-wrapper.production.marquee-track {
  animation: cardMarqueeReverse 25s linear infinite;
}

.skill-card {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  transform-style: preserve-3d;
  transition: box-shadow 0.3s ease;
  overflow: hidden;
  width: 340px;
  flex-shrink: 0;
  /* Glow overlay initialized */
}

/* Glow effect */
.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--glow), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 0;
}

.skill-card:hover::before {
  opacity: 1;
}

.skill-card>* {
  position: relative;
  z-index: 1;
  /* Slight push forward on hover for parallax feel */
  transform: translateZ(20px);
}

.skill-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--accent);
}

.skill-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* Skill Specific Content */

/* Tags/Pills */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--muted);
  transition: all 0.3s;
}

.skill-card:hover .tag {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* VISUAL REPRESENTATIONS */
.vis-container {
  height: 150px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin: 1.5rem 0;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

/* 1. IDE */
.vis-ide {
  display: flex;
  flex-direction: column;
}

.ide-header {
  height: 30px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ide-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #555;
}

.ide-dot.r {
  background: #ff5f56;
}

.ide-dot.y {
  background: #ffbd2e;
}

.ide-dot.g {
  background: #27c93f;
}

.ide-tabs {
  display: flex;
  margin-left: 10px;
}

.ide-tab {
  padding: 0 12px;
  height: 30px;
  line-height: 30px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--muted);
  background: transparent;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.ide-tab.active {
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
}

.ide-content {
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #f8f8f2;
}

.code-line {
  transition: opacity 0.3s ease;
}

.ide-cursor {
  animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* 2. UI Preview */
.vis-ui {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
}

.ui-glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.ui-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ui-skeleton {
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  width: 60%;
}

/* 3. Node Graph */
.vis-nodes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  position: relative;
}

.node {
  width: 50px;
  height: 50px;
  background: var(--card);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
  font-size: 0.7rem;
  color: var(--muted);
}

.node.active {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(121, 40, 202, 0.4);
  color: #fff;
}

.node-line {
  position: absolute;
  top: 50%;
  left: 30%;
  right: 30%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.node-pulse {
  position: absolute;
  top: 50%;
  left: 20%;
  width: 10px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: nodePulse 2s infinite;
}

@keyframes nodePulse {
  0% {
    left: 20%;
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    left: 80%;
    opacity: 0;
  }
}

/* 4. AI Prompt */
.vis-ai {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 1rem;
}

.ai-prompt {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(121, 40, 202, 0.3);
  padding: 10px 15px;
  border-radius: 20px;
  display: inline-block;
  align-self: flex-end;
  color: #fff;
  font-size: 0.8rem;
  box-shadow: 0 0 15px rgba(121, 40, 202, 0.2);
}

.ai-response {
  display: flex;
  gap: 10px;
}

.ai-icon {
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-code {
  background: #000;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #a5d6ff;
}

/* 5. DAW */
.vis-daw {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
}

.daw-track {
  height: 30px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding-left: 60px;
  position: relative;
}

.daw-header {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 50px;
  background: rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: var(--muted);
}

.daw-clip {
  height: 20px;
  border-radius: 4px;
  margin-left: 10px;
  background: var(--accent);
  opacity: 0.8;
  position: relative;
  overflow: hidden;
}

.daw-clip::after {
  content: '';
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  right: 5px;
  background-image: repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255, 255, 255, 0.3) 2px, rgba(255, 255, 255, 0.3) 4px);
}

.daw-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #fff;
  left: 20%;
  box-shadow: 0 0 10px #fff;
  z-index: 10;
  animation: dawPlay 4s linear infinite;
}

@keyframes dawPlay {
  0% {
    left: 20%;
  }

  100% {
    left: 90%;
  }
}

/* 6. EQ */
.vis-eq {
  position: relative;
  padding: 20px;
}

.eq-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

.eq-curve {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

/* 7. Spectro */
.vis-spectro {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  padding: 0 10px;
}

.spectro-bar {
  flex: 1;
  background: linear-gradient(to top, var(--accent), var(--accent-alt));
  border-radius: 2px 2px 0 0;
  animation: spectroDance 0.5s ease-in-out infinite alternate;
}

@keyframes spectroDance {
  0% {
    height: 10px;
    opacity: 0.5;
  }

  100% {
    height: 100px;
    opacity: 1;
  }
}

/* PROJECTS SECTION */
.projects {
  position: relative;
  /* Blend from the deep black of skills to the elevated surface color */
  background: linear-gradient(to bottom, var(--bg) 0%, var(--surface) 300px);
  z-index: 30;
  padding-bottom: 25vh;
  /* Stops sticky text from hitting the boundary */
}

.projects-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 14rem 2rem 0;
  display: flex;
  flex-direction: column;
}

.project-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  color: var(--text);
  transition: all 0.4s ease;
  position: relative;
}

.project-row:hover {
  opacity: 0.5;
  /* Fade out slightly when hovered */
}

/* Specific hover state: When the list is hovered, un-hovered items fade out, hovered item stays bright */
.project-list:hover .project-row {
  opacity: 0.3;
}

.project-list:hover .project-row:hover {
  opacity: 1;
  padding-left: 2rem;
  padding-right: 2rem;
}

.project-info {
  display: flex;
  align-items: baseline;
  gap: 2rem;
}

.project-num {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--muted);
}

.project-title {
  font-size: clamp(1.5rem, 3vw, 3rem);
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.02em;
}

.project-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-desc-inline {
  font-size: 1rem;
  color: var(--muted);
  opacity: 0.8;
  margin: 0;
  line-height: 1.5;
  max-width: 500px;
}

.project-tags {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
}

/* FLOATING PREVIEW (Borderless Gradient Box) */
.floating-preview-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 250px;
  background: linear-gradient(135deg, rgba(10, 10, 15, 0.9), rgba(10, 10, 15, 0.95));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  pointer-events: none;
  opacity: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  /* Opacity, scale, and positioning handled entirely by GSAP */
}

.floating-preview-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  z-index: 1;
}

.floating-preview-content {
  display: none;
}

/* PROJECT DETAILS SIDE PANEL */
.project-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.project-panel-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.project-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 600px;
  height: 100vh;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Prevent scrolling here, scroll happens in child */
}

.project-panel.active {
  transform: translateX(0);
}

.panel-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.panel-close:hover {
  background: var(--accent);
  color: #fff;
  transform: rotate(90deg);
}

.panel-visual {
  width: 100%;
  height: 60vh;
  min-height: 400px;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.2), rgba(108, 99, 255, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-visual-content {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1.5rem;
  opacity: 0.8;
}

.panel-content {
  padding: 4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.panel-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.panel-content p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.tech-stack-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.tech-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tech-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.tech-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(108, 99, 255, 0.3), transparent);
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.tech-pill {
  position: relative;
  padding: 0.5rem 1rem;
  background: linear-gradient(145deg, rgba(108, 99, 255, 0.08), rgba(108, 99, 255, 0.02));
  border: 1px solid rgba(108, 99, 255, 0.15);
  border-radius: 8px;
  font-size: 0.85rem;
  color: #e0e0e0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tech-pill::after {
  content: '';
  position: absolute;
  top: -5px;
  bottom: -10px;
  left: -5px;
  right: -5px;
  z-index: -1;
}

.tech-pill:hover {
  transform: translateY(-2px);
  background: linear-gradient(145deg, rgba(108, 99, 255, 0.15), rgba(108, 99, 255, 0.05));
  border-color: rgba(108, 99, 255, 0.4);
  box-shadow: 0 8px 25px rgba(108, 99, 255, 0.2);
  color: #fff;
}

.tech-icon {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1) opacity(0.7);
  transition: all 0.3s ease;
}

.tech-pill:hover .tech-icon {
  filter: none;
  transform: scale(1.1);
}

.pill-desc {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding-left: 0.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.tech-pill:hover .pill-desc {
  color: rgba(255, 255, 255, 0.7);
  border-left-color: rgba(108, 99, 255, 0.3);
}

.btn-primary {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 2rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.2);
  margin-top: 1rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(108, 99, 255, 0.4);
  background: #7a73ff;
}


/* MUSIC SECTION */
.music {
  min-height: 100vh;
  position: relative;
  z-index: 1;
  /* Explicitly lower than .projects */
  /* Blend from the surface color of Projects down to pure black */
  background: linear-gradient(to bottom, var(--surface) 0%, #000 300px);
  overflow: hidden;
}

.visualizer-container {
  position: absolute;
  bottom: 5vh;
  left: 0;
  width: 100%;
  height: 60vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  padding: 0 5%;
}

.vis-bar {
  flex: 1;
  background: var(--accent);
  height: 0px;
  /* Managed by JS */
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  transition: background 0.3s;
}

.music-overlay {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 14rem 2rem 10rem;
  pointer-events: none;
  /* Let hovers pass through to visualizer if needed */
}

.floating-eyebrow {
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.music-overlay h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
}

.music-overlay p {
  max-width: 600px;
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
}

/* AUDIO PROJECTS GRID */
.audio-projects-grid {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  width: 100%;
  max-width: 900px;
}

@media (max-width: 768px) {
  .audio-projects-grid {
    flex-direction: column;
  }
}

.audio-card {
  flex: 1;
  background: rgba(10, 10, 10, 0.85);
  /* Darker background */
  backdrop-filter: blur(24px);
  /* Strong blur so visualizer doesn't bleed through text */
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  pointer-events: auto;
  cursor: pointer;
}

.audio-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.audio-card-image {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audio-card-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  transition: background 0.3s ease;
}

.audio-card:hover .audio-card-image::after {
  background: rgba(0, 0, 0, 0.2);
}

.play-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  opacity: 0.8;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.audio-card:hover .play-btn {
  opacity: 1;
  transform: scale(1.1);
}

.audio-card-content {
  padding: 1.5rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.audio-card-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.audio-card-content p {
  font-size: 0.95rem;
  opacity: 0.7;
  background: none;
  padding: 0;
  margin: 0;
  line-height: 1.5;
}


/* CONTACT SECTION */
.contact {
  padding: 10rem 2rem;
  background: linear-gradient(to bottom, #000 0%, var(--bg) 300px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.terminal {
  width: 100%;
  max-width: 700px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.terminal-header {
  height: 36px;
  background: #1a1a24;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-header .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red {
  background: #ff5f56;
}

.dot.yellow {
  background: #ffbd2e;
}

.dot.green {
  background: #27c93f;
}

.terminal-body {
  padding: 2rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.6;
}

.term-line {
  margin-bottom: 1rem;
}

.hidden {
  display: none !important;
}

.prompt-symbol {
  color: var(--accent-alt);
}

.cmd {
  color: var(--text);
}

.output-symbol {
  color: var(--muted);
}

.output1,
.output2 {
  color: var(--muted);
}

.terminal-form {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-group {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.input-prefix {
  color: var(--accent);
  margin-top: 4px;
  /* align with input text */
}

input,
textarea {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 4px 0;
  outline: none;
  resize: none;
  transition: border-color 0.3s;
}

input:focus,
textarea:focus {
  border-bottom-color: var(--accent);
}

.submit-btn {
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.5rem 1.5rem;
  font-family: var(--font-mono);
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.submit-btn:hover {
  background: var(--accent);
  color: #fff;
}

.submit-btn .arrow {
  transition: transform 0.3s ease;
}

.submit-btn:hover .arrow {
  transform: translateX(5px);
}

.form-status {
  margin-top: 1rem;
  color: var(--accent-alt);
}


/* RESPONSIVE Adjustments */
@media (max-width: 768px) {
  .project-card {
    flex-direction: column;
    padding: 2rem;
  }

  .project-mockup {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent);
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.cursor-hover {
  width: 60px;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.1);
  border-color: transparent;
  mix-blend-mode: difference;
}

/* Scroll Container */
#scroll-container {
  width: 100%;
  transform-origin: center top;
  will-change: transform;
}

/* 3D Tilt utility */
.tilt-card {
  transition: transform 0.1s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.tilt-content {
  transform: translateZ(30px);
  transition: transform 0.1s ease;
}

/* ==========================================================================
   CUSTOM CURSOR
   ========================================================================== */
@media (pointer: fine) {

  body,
  a,
  button,
  input,
  textarea,
  .nav-links a {
    cursor: none !important;
  }
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background-color 0.2s;
  mix-blend-mode: exclusion;
}

.custom-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--accent-cyan);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, border-color 0.2s, background-color 0.2s;
}

.custom-cursor.hover {
  width: 12px;
  height: 12px;
  background-color: var(--accent-alt);
}

.custom-cursor-ring.hover {
  width: 50px;
  height: 50px;
  border-color: var(--accent-alt);
  background-color: rgba(236, 72, 153, 0.1);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  padding: 4rem 2rem 2rem 2rem;
  background: var(--bg);
  text-align: center;
  position: relative;
  z-index: 5;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.3s, color 0.3s;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--accent-cyan);
}

.footer-copyright {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.5;
}

.form-status {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* ==========================================================================
   MOBILE HAMBURGER MENU & OVERLAY
   ========================================================================== */
.hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 22px;
  height: 12px;
  position: relative;
  z-index: 1000;
  flex-shrink: 0;
}

.hamburger .bar {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  position: absolute;
  left: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger .bar:nth-child(1) {
  top: 0;
}

.hamburger .bar:nth-child(2) {
  bottom: 0;
}

.hamburger.active .bar:nth-child(1) {
  transform: translateY(5.25px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
  transform: translateY(-5.25px) rotate(-45deg);
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.mobile-link {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.mobile-menu-overlay.active .mobile-link {
  transform: translateY(0);
  opacity: 1;
}

.mobile-link:nth-child(1) {
  transition-delay: 0.1s;
}

.mobile-link:nth-child(2) {
  transition-delay: 0.15s;
}

.mobile-link:nth-child(3) {
  transition-delay: 0.2s;
}

.mobile-link:nth-child(4) {
  transition-delay: 0.25s;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS OVERRIDES
   ========================================================================== */
@media (max-width: 768px) {

  /* Prevent horizontal scroll bleed on mobile Safari */
  /* NOTE: Do NOT put overflow-x:hidden on html — it breaks position:fixed (GSAP pinning) */
  body {
    width: 100%;
    overflow-x: hidden;
  }

  /* Navbar */
  .nav-content {
    padding: 1rem 1.5rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .nav-logo-img {
    height: 24px;
  }

  .nav-links {
    display: none;
    /* Hide desktop links on mobile */
  }

  .hamburger {
    display: block;
    /* Show hamburger button */
  }

  /* Disable Custom Cursor on Mobile */
  .cursor-dot,
  .cursor-outline {
    display: none !important;
  }

  /* Hero Section */
  .hero.clean-hero {
    padding: 0 1.5rem;
  }

  .hero-top-badge {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0.75rem;
    margin-bottom: 2rem;
  }

  .badge-avatar {
    width: 64px;
    height: 64px;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 2.5rem);
    word-break: break-word;
    text-align: left;
    margin-bottom: 2rem;
  }

  .scroll-indicator,
  .hero-scroll-indicator {
    display: none !important;
  }

  .hero-subtitle {
    font-size: 0.85rem;
    text-align: left;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
  }

  .badge-info-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .badge-brand {
    font-size: 0.85rem;
    text-align: left;
    letter-spacing: 0.1em;
  }

  .badge-location {
    text-align: left;
    font-size: 0.8rem;
    max-width: 280px;
    margin: 0;
    line-height: 1.4;
    opacity: 0.8;
  }

  /* About Section — pinned deck works on mobile too */
  .about-grid {
    flex-direction: column;
    height: 100vh;
  }

  .about-left {
    padding: 7rem 1.5rem 1rem 1.5rem;
    width: 100%;
    height: auto;
    align-items: stretch;
    flex: 0 0 auto;
  }

  .about-text-content {
    width: 100%;
  }

  .about-text-content h2 {
    font-size: clamp(2rem, 8vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 0.75rem;
  }

  .about-text-content p {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
  }

  .accent-line {
    font-size: 0.85rem;
    margin-top: 0.75rem;
    margin-bottom: 0;
  }

  .about-right {
    flex: 1;
    padding: 0 1.5rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .about-cards-container {
    width: 100%;
    max-width: 340px;
    height: 380px;
    perspective: 1200px;
  }

  .about-card {
    position: absolute;
    margin-bottom: 0;
  }

  .code-body {
    padding: 1.25rem 1rem;
    font-size: 0.7rem;
  }

  .code-header {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  /* Skills Section Spacing */
  .skills {
    padding: 10rem 0 8rem;
    margin-top: -2vh;
    margin-bottom: -5vh;
  }

  /* Projects List (Selected Works) */
  .project-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 0;
  }

  .project-tags {
    margin-top: 1rem;
    align-self: flex-start;
    padding-left: 3.1rem;
    /* Aligns with text based on num width + 2rem gap */
  }

  .project-title {
    font-size: clamp(1.2rem, 5vw, 2rem);
  }

  .projects {
    padding-bottom: 20vh;
  }

  .projects-container {
    padding: 10rem 1.5rem 0;
  }

  /* Project Panel Mobile Overrides */
  .project-panel {
    width: 100vw;
  }

  .panel-visual {
    height: 40vh;
    min-height: 300px;
  }

  .panel-content {
    padding: 2rem 1.5rem 5rem 1.5rem;
  }

  .panel-content h2 {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
  }

  .tech-pills {
    gap: 0.5rem;
  }

  .tech-pill {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .panel-close {
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }

  /* Audio/Music Section */
  .music {
    height: auto;
    min-height: 100vh;
  }

  .music-overlay {
    height: auto;
    padding: 8rem 1.5rem;
  }

  .audio-projects-grid {
    flex-direction: column;
  }

  #visualizerCanvas {
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
  }

  /* Skills Section (Marquees) */
  .ide-card,
  .daw-card,
  .vis-ai {
    width: 90vw !important;
    max-width: 100%;
  }

  /* Terminal Contact Form */
  .contact {
    padding: 6rem 1.5rem 4rem;
    /* Increased padding for better mobile spacing */
  }

  .terminal {
    width: 100%;
    margin: 0;
    border-radius: 8px;
    /* Give subtle border radius back */
    border-left: 1px solid var(--card-border);
    border-right: 1px solid var(--card-border);
  }

  .terminal-body {
    padding: 1.5rem 1rem;
  }

  /* Skills Section Mobile Overrides */
  .skill-card {
    width: 280px;
    padding: 1.25rem;
  }

  .skill-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
  }

  .skill-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 1rem;
    border-radius: 8px;
  }

  .skill-icon svg {
    width: 20px;
    height: 20px;
  }

  .vis-container {
    height: 140px;
    /* Increased slightly to prevent vertical squeezing */
    margin: 1rem 0;
  }

  /* IDE Card specific mobile fixes */
  .ide-header {
    padding: 0 8px;
  }

  .ide-dot {
    flex-shrink: 0;
  }

  .ide-tab {
    padding: 0 8px;
    font-size: 0.65rem;
  }

  .ide-content {
    padding: 0.75rem;
    font-size: 0.7rem;
    line-height: 1.4;
  }

  /* AI Card specific mobile fixes */
  .vis-ai {
    padding: 0.75rem !important;
    gap: 0.5rem !important;
  }

  .ai-prompt {
    padding: 6px 12px;
    font-size: 0.7rem;
  }

  .ai-code {
    padding: 8px;
  }

  .skill-tags {
    margin-top: 0.75rem !important;
    /* Override inline styles if any */
    gap: 0.4rem;
  }

  .tag {
    padding: 2px 6px;
    font-size: 0.65rem;
  }

  /* Social Footer */
  .site-footer {
    padding: 2rem 1.5rem 2rem 1.5rem;
  }

  .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem 2rem;
    /* horizontal, vertical */
  }
}

/* ACCESSIBILITY: Ensure content visible when motion is reduced */
@media (prefers-reduced-motion: reduce) {

  .hero-top-badge,
  .hero-eyebrow,
  .hero-title,
  .hero-actions,
  .fade-text,
  .split-text .word-inner,
  .about-card,
  .skill-card,
  .project-card,
  .tech-icon {
    opacity: 1 !important;
    transform: none !important;
  }
}