/* ============================================
   MODERN PORTFOLIO DESIGN - FRESH START
   ============================================ */

:root {
  /* Personal portfolio palette - warmer, more inviting */
  --primary: #7c3aed;
  --primary-light: #8b5cf6;
  --primary-dark: #6d28d9;
  --accent: #ec4899;
  --accent-light: #f472b6;
  --success: #10b981;
  --warning: #f59e0b;
  
  /* Light mode - warmer, more personal */
  --bg: #fefefe;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  
  /* Shadows - subtle and modern */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --header-height: 80px;
  --radius: 16px;
  --radius-lg: 24px;
}

/* Dark mode */
.dark {
  --bg: #0a0e1a;
  --bg-elevated: #131827;
  --surface: #1a1f2e;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border: #1e293b;
  --border-strong: #334155;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
}

html, body {
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header - Modern, minimal */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(250, 251, 252, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  transition: all 0.3s ease;
}

.dark .header {
  background: rgba(10, 14, 26, 0.8);
  border-color: var(--border);
}

.brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: transform 0.2s ease;
}

.brand:hover {
  transform: scale(1.05);
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 4px;
  background: var(--bg-elevated);
  border-radius: 50px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 8px 16px;
  border-radius: 50px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
}

.nav-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 50px;
  z-index: -1;
}

.nav-pill:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.nav-pill:hover::before {
  opacity: 1;
}

.nav-pill[aria-current="page"],
.nav-pill.active {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.nav-pill[aria-current="page"]::before,
.nav-pill.active::before {
  opacity: 1;
}

.nav-icon {
  font-size: 16px;
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-pill:hover .nav-icon {
  transform: scale(1.2) rotate(5deg);
}

.nav-text {
  position: relative;
  z-index: 1;
}

.nav-external .nav-icon::after {
  content: '↗';
  font-size: 10px;
  margin-left: 2px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-external:hover .nav-icon::after {
  opacity: 1;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .nav {
    gap: 4px;
    padding: 2px;
  }
  
  .nav-pill {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .nav-text {
    display: none;
  }
  
  .nav-icon {
    font-size: 18px;
  }
}

.header-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.toggle, .tilt-select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text);
}

.toggle:hover, .tilt-select:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

#funToggle {
  animation: paintSpin 1s ease-in-out;
}

@keyframes paintSpin {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.15);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

#funToggle:hover {
  transform: translateY(-1px);
}

.tilt-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='currentColor' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Typography */
h1 {
  font-size: clamp(39px, 7.5vw, 69px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 0 0 24px;
  color: var(--text);
}

h2 {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--text);
}

h3 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 12px;
  color: var(--text);
}

.lead {
  font-size: clamp(18px, 2.5vw, 22px);
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 700px;
  font-weight: 400;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: block;
}

.muted {
  color: var(--text-muted);
  font-size: 15px;
}

/* Hero Section - Personal & Warm */
.hero--fullscreen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-top: var(--header-height);
  overflow: hidden;
  background: linear-gradient(135deg, #7c3aed 0%, #ec4899 50%, #f59e0b 100%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
}

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

.dark .hero--fullscreen {
  background: linear-gradient(135deg, #1e1b4b 0%, #581c87 50%, #7c2d12 100%);
  background-size: 200% 200%;
}

#nebula {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 1;
}

/* VR Eye that follows cursor */
.vr-eye {
  position: relative;
  z-index: 2;
  transform: scale(0.55);
  transition: transform 0.3s ease;
  pointer-events: none;
  margin: 0 auto 10px auto;
  display: flex;
  justify-content: center;
}

.vr-eye:hover {
  transform: scale(0.75);
}

/* Hero centered layout */
.hero-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.vr-headset {
  position: relative;
  width: 180px;
  height: 100px;
}

.vr-visor {
  position: absolute;
  width: 180px;
  height: 80px;
  background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.5),
    inset 0 2px 10px rgba(255, 255, 255, 0.1),
    0 0 30px rgba(124, 58, 237, 0.3);
  border: 2px solid rgba(124, 58, 237, 0.4);
}

.vr-visor::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 4px;
  background: linear-gradient(90deg, #7c3aed, #ec4899);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
}

.vr-strap-left, .vr-strap-right {
  position: absolute;
  top: 30px;
  width: 40px;
  height: 20px;
  background: linear-gradient(180deg, #2d2d44, #1a1a2e);
  border-radius: 5px;
}

.vr-strap-left {
  left: -30px;
  transform: rotate(-15deg);
}

.vr-strap-right {
  right: -30px;
  transform: rotate(15deg);
}

.eye-socket {
  width: 55px;
  height: 55px;
  background: radial-gradient(circle, #0a0a15 0%, #000 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
  border: 2px solid rgba(124, 58, 237, 0.3);
}

.eye {
  width: 45px;
  height: 45px;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #e8e8e8 50%, #d0d0d0 100%);
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.pupil {
  position: absolute;
  width: 22px;
  height: 22px;
  background: radial-gradient(circle at 30% 30%, #4a1c7a 0%, #1a0a30 70%, #000 100%);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
}

.pupil::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: #000;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.eye-shine {
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  top: 25%;
  left: 60%;
  pointer-events: none;
}

/* Responsive VR eye */
@media (max-width: 1024px) {
  .vr-eye {
    transform: scale(0.55);
  }
}

@media (max-width: 768px) {
  .vr-eye {
    transform: scale(0.5);
    margin-bottom: 10px;
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 24px;
  max-width: 1400px;
  width: 100%;
}

.hero--fullscreen h1,
.hero--fullscreen .lead,
.hero--fullscreen .eyebrow {
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.grad {
  background: linear-gradient(135deg, #ffffff, #e0e7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.hero-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 20px 0;
}

.hero-stat {
  text-align: center;
}

.hero-stat strong {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.hero-stat span {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 16px 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transition: all 0.2s ease;
}

.tag:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.cta-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  margin-top: 20px;
  color: #ffffff;
  font-size: 24px;
  transition: all 0.3s ease;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

.scroll-cue:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn:not(.secondary) {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  box-shadow: var(--shadow-lg);
}

.btn:not(.secondary):hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Secondary button for non-hero pages */
main:not(.on-hero) .btn.secondary,
body:not(.on-hero) main .btn.secondary {
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--text);
}

main:not(.on-hero) .btn.secondary:hover,
body:not(.on-hero) main .btn.secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--primary);
  color: var(--primary);
}

/* Cards - Modern, clean */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.img-card {
  padding: 0;
  overflow: hidden;
  position: relative;
  background: var(--surface);
  min-height: 300px;
}

.img-card::before {
  content: '';
  display: block;
  aspect-ratio: 16 / 10;
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 0;
}

.img-card:hover::before {
  transform: scale(1.1);
}

/* Icon overlay for gradient cards */
.img-card > div[style*="position:absolute"] {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.img-card .card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
  color: #ffffff;
}

.img-card .card-body h3 {
  color: #ffffff;
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.img-card .card-body .muted {
  color: rgba(255, 255, 255, 0.9);
}

.img-card .card-body .tag {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 4px 10px;
  font-size: 11px;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 24px;
}

.cards-3 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.link {
  color: var(--primary);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.link:hover {
  color: var(--accent);
  gap: 8px;
}

/* Timeline */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.t-item {
  position: relative;
  padding-left: 56px;
  margin-bottom: 32px;
}

.t-dot {
  position: absolute;
  left: 12px;
  top: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 4px var(--bg), 0 4px 12px rgba(99, 102, 241, 0.3);
  border: 2px solid var(--surface);
}

.t-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.t-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

/* Pills/Filters */
.pill {
  padding: 10px 20px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--bg-elevated);
}

.pill.is-active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  border: none;
  box-shadow: var(--shadow-md);
}

/* Case Study */
.cs-hero {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  padding: 64px;
  border-radius: var(--radius-lg);
  margin-bottom: 48px;
  box-shadow: var(--shadow-xl);
}

.cs-hero .lead {
  color: rgba(255, 255, 255, 0.9);
}

.cs-section {
  margin: 40px 0;
}

.cs-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.metric {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: #ffffff;
}

.metric h3 {
  color: #ffffff;
  margin-bottom: 8px;
}

.code {
  font-family: 'Fira Code', 'Courier New', monospace;
  background: var(--bg-elevated);
  color: var(--text);
  border-radius: 12px;
  padding: 24px;
  overflow-x: auto;
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.6;
}

.dark .code {
  background: #0f172a;
  color: #e2e8f0;
}

/* Footer */
.footer {
  padding: 64px 0;
  text-align: center;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 80px;
}

/* Hero on dark background */
.on-hero .header {
  background: rgba(10, 14, 26, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

.on-hero .brand,
.on-hero .nav a {
  color: #ffffff;
}

.on-hero .toggle,
.on-hero .tilt-select {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.on-hero .toggle:hover,
.on-hero .tilt-select:hover {
  background: rgba(255, 255, 255, 0.2);
}

.on-hero .nav {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, 0.2);
}

.on-hero .nav-pill {
  color: rgba(255, 255, 255, 0.9);
}

.on-hero .nav-pill:hover {
  color: white;
}

.on-hero .nav-pill[aria-current="page"],
.on-hero .nav-pill.active {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  color: white;
}

/* RAINBOW MODE - Secret Hyper Mode 🌈 */
@keyframes rainbowShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes rainbowPulse {
  0%, 100% { filter: hue-rotate(0deg) saturate(1); }
  25% { filter: hue-rotate(90deg) saturate(1.2); }
  50% { filter: hue-rotate(180deg) saturate(1); }
  75% { filter: hue-rotate(270deg) saturate(1.2); }
}

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

@keyframes partyFadeIn {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes partyFadeOut {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px) scale(0.8);
  }
}

.rainbow-mode {
  --primary: #ff006e;
  --accent: #8338ec;
  animation: rainbowPulse 3s ease-in-out infinite;
}

.rainbow-mode body {
  background: linear-gradient(135deg, #ff006e 0%, #8338ec 25%, #3a86ff 50%, #06ffa5 75%, #ffbe0b 100%, #ff006e 100%);
  background-size: 400% 400%;
  animation: rainbowShift 5s ease infinite;
}

.rainbow-mode .brand,
.rainbow-mode h1 .grad,
.rainbow-mode h2,
.rainbow-mode h3 {
  background: linear-gradient(135deg, #ff006e, #8338ec, #3a86ff, #06ffa5, #ffbe0b, #ff006e);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbowText 3s ease infinite;
}

.rainbow-mode .nav-pill {
  background: linear-gradient(135deg, rgba(255,0,110,0.2), rgba(131,56,236,0.2), rgba(58,134,255,0.2));
  background-size: 200% 200%;
  animation: rainbowShift 2s ease infinite;
  border-color: rgba(255,255,255,0.3);
}

.rainbow-mode .nav-pill:hover::before {
  background: linear-gradient(135deg, #ff006e, #8338ec, #3a86ff, #06ffa5, #ffbe0b);
  background-size: 200% 200%;
  animation: rainbowShift 1s ease infinite;
}

.rainbow-mode .nav-pill[aria-current="page"],
.rainbow-mode .nav-pill.active {
  background: linear-gradient(135deg, #ff006e, #8338ec, #3a86ff, #06ffa5, #ffbe0b);
  background-size: 200% 200%;
  animation: rainbowShift 1s ease infinite;
}

.rainbow-mode .card {
  border-color: rgba(255,255,255,0.2);
  background: linear-gradient(135deg, rgba(255,0,110,0.1), rgba(131,56,236,0.1), rgba(58,134,255,0.1));
  background-size: 200% 200%;
  animation: rainbowShift 4s ease infinite;
}

.rainbow-mode .card:hover {
  border-color: rgba(255,255,255,0.5);
  box-shadow: 0 8px 24px rgba(255,0,110,0.3), 0 0 40px rgba(131,56,236,0.2);
}

.rainbow-mode .btn {
  background: linear-gradient(135deg, #ff006e, #8338ec, #3a86ff, #06ffa5, #ffbe0b);
  background-size: 200% 200%;
  animation: rainbowShift 2s ease infinite;
  border: 2px solid rgba(255,255,255,0.3);
}

.rainbow-mode .btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(255,0,110,0.5), 0 0 40px rgba(131,56,236,0.3);
}

.rainbow-mode .tag {
  background: linear-gradient(135deg, rgba(255,0,110,0.3), rgba(131,56,236,0.3), rgba(58,134,255,0.3));
  background-size: 200% 200%;
  animation: rainbowShift 3s ease infinite;
  border-color: rgba(255,255,255,0.4);
}

.rainbow-mode .hero--fullscreen {
  background: linear-gradient(135deg, #ff006e 0%, #8338ec 20%, #3a86ff 40%, #06ffa5 60%, #ffbe0b 80%, #ff006e 100%);
  background-size: 400% 400%;
  animation: rainbowShift 8s ease infinite;
}

.rainbow-mode .toggle,
.rainbow-mode .tilt-select {
  background: linear-gradient(135deg, rgba(255,0,110,0.3), rgba(131,56,236,0.3));
  background-size: 200% 200%;
  animation: rainbowShift 2s ease infinite;
  border-color: rgba(255,255,255,0.4);
}

.rainbow-mode .toggle:hover,
.rainbow-mode .tilt-select:hover {
  background: linear-gradient(135deg, rgba(255,0,110,0.5), rgba(131,56,236,0.5));
  transform: scale(1.1);
}

.rainbow-mode #funToggle {
  animation: paintSpin 1s ease-in-out, rainbowShift 2s ease infinite;
}

.rainbow-mode #themeToggle {
  animation: rainbowShift 2s ease infinite;
}

.rainbow-mode .header {
  background: linear-gradient(135deg, rgba(255,0,110,0.9), rgba(131,56,236,0.9), rgba(58,134,255,0.9));
  background-size: 200% 200%;
  animation: rainbowShift 3s ease infinite;
  border-color: rgba(255,255,255,0.3);
}

.rainbow-mode .section-head h2 {
  background: linear-gradient(135deg, #ff006e, #8338ec, #3a86ff, #06ffa5, #ffbe0b, #ff006e);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbowText 3s ease infinite;
}

.rainbow-mode a {
  transition: all 0.2s ease;
}

.rainbow-mode a:hover {
  filter: hue-rotate(90deg) saturate(1.2);
}

/* Search input styling */
input[type="search"] {
  transition: all 0.2s ease;
}

input[type="search"]:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .cards-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header {
    padding: 0 20px;
  }
  
  .nav {
    gap: 20px;
  }
  
  .nav a {
    font-size: 14px;
  }
  
  .cards-3 {
    grid-template-columns: 1fr;
  }
  
  .hero-stats {
    gap: 24px;
  }
  
  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Accessibility */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Card shine effect */
.img-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  pointer-events: none;
  background: radial-gradient(600px 500px at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.2), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.img-card:hover::after {
  opacity: 1;
}

/* VR Eye Rainbow Mode Effects - Temporary (3 seconds) */
.rainbow-vr-temp .vr-visor {
  background: linear-gradient(145deg, #ff006e 0%, #8338ec 50%, #3a86ff 100%);
  background-size: 200% 200%;
  animation: rainbowShift 3s ease infinite;
  border-color: rgba(255,255,255,0.6);
  box-shadow: 
    0 10px 40px rgba(255,0,110,0.5),
    inset 0 2px 10px rgba(255,255,255,0.3),
    0 0 60px rgba(131,56,236,0.6),
    0 0 100px rgba(58,134,255,0.4);
}

.rainbow-vr-temp .vr-visor::before {
  background: linear-gradient(90deg, #ff006e, #8338ec, #3a86ff, #06ffa5, #ffbe0b, #ff006e);
  background-size: 200% 100%;
  animation: rainbowShift 2s linear infinite;
  box-shadow: 0 0 20px rgba(255,0,110,0.8), 0 0 40px rgba(131,56,236,0.6);
}

.rainbow-vr-temp .eye-socket {
  background: radial-gradient(circle, rgba(255,0,110,0.3) 0%, rgba(131,56,236,0.2) 50%, rgba(58,134,255,0.1) 100%);
  border-color: rgba(255,255,255,0.5);
  box-shadow: inset 0 0 30px rgba(255,0,110,0.4), 0 0 20px rgba(131,56,236,0.3);
  animation: rainbowPulse 2s ease-in-out infinite;
}

.rainbow-mode .eye {
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #e8e8e8 50%, #d0d0d0 100%);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2), 0 0 20px rgba(255,0,110,0.3);
}

.rainbow-mode .pupil {
  background: radial-gradient(circle at 30% 30%, #ff006e 0%, #8338ec 50%, #3a86ff 70%, #000 100%);
  background-size: 200% 200%;
  animation: rainbowShift 2s ease infinite;
  box-shadow: 0 0 20px rgba(255,0,110,0.8), 0 0 40px rgba(131,56,236,0.6), 0 0 60px rgba(58,134,255,0.4);
}

.rainbow-vr-temp .pupil::before {
  background: radial-gradient(circle, rgba(255,0,110,0.8), rgba(131,56,236,0.6), #000);
  animation: rainbowPulse 1.5s ease-in-out infinite;
}

.rainbow-mode .eye-shine {
  background: rgba(255, 255, 255, 0.9);
  animation: rainbowPulse 1s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(255,255,255,0.8), 0 0 20px rgba(255,0,110,0.4);
}

.rainbow-vr-temp .vr-eye {
  animation: rainbowPulse 3s ease-in-out infinite;
}

.rainbow-vr-temp .vr-eye:hover {
  transform: scale(0.85);
  filter: drop-shadow(0 0 30px rgba(255,0,110,0.8)) drop-shadow(0 0 60px rgba(131,56,236,0.6));
}
