/* Footer styles */
.site-footer {
  background: linear-gradient(180deg, rgba(6,6,10,0.95), rgba(12,12,16,0.98));
  color: rgba(255,255,255,0.85);
  padding: 1.25rem 1rem;
}

/* Country card hover effect */
.country-card { transition: transform 300ms cubic-bezier(.22,.9,.3,1), box-shadow 300ms ease, border-color 300ms ease; }
.country-card:hover, .country-card:focus-within { transform: translateY(-10px) scale(1.02); box-shadow: 0 18px 40px rgba(0,40,80,0.45); border-color: rgba(0,212,255,0.18); }
.country-card:hover .flag-img, .country-card:focus-within .flag-img { transform: translateY(-6px) scale(1.02); filter: drop-shadow(0 10px 24px rgba(0,160,255,0.12)); }
.country-card:hover .guidance-btn, .country-card:focus-within .guidance-btn { transform: translateY(-6px) scale(1.03); box-shadow: 0 12px 30px rgba(0,160,255,0.2); }
.country-card:active { transform: translateY(-4px) scale(1.01); }

/* Make hover accessible for keyboard users */
.country-card:focus-within { outline: 2px solid rgba(0,212,255,0.12); outline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  .country-card, .country-card:hover, .country-card:focus-within, .country-card .flag-img, .country-card .guidance-btn { transition: none !important; transform: none !important; }
}

/* Flag wave animation */
@keyframes flagWave {
  0% { transform: translateY(0) rotate(0.0deg); }
  25% { transform: translateY(-3px) rotate(-0.6deg); }
  50% { transform: translateY(0) rotate(0.0deg); }
  75% { transform: translateY(3px) rotate(0.6deg); }
  100% { transform: translateY(0) rotate(0.0deg); }
}
.flag-img {
  will-change: transform;
  transform-origin: 50% 10%;
  animation: flagWave 4s ease-in-out infinite;
}
.country-card:nth-child(1) .flag-img { animation-delay: 0s; }
.country-card:nth-child(2) .flag-img { animation-delay: 0.4s; }
.country-card:nth-child(3) .flag-img { animation-delay: 0.8s; }
.country-card:nth-child(4) .flag-img { animation-delay: 1.2s; }

@media (prefers-reduced-motion: reduce) {
  .flag-img { animation: none !important; }
}

/* Guidance button styles inside country cards */
.guidance-btn {
  margin-top: 0.9rem;
  display: inline-block;
  padding: 0.6rem 1rem;
  background: linear-gradient(90deg, rgba(0,212,255,0.12), rgba(0,140,255,0.08));
  color: var(--primary-color);
  border: 1px solid rgba(0,212,255,0.18);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 200ms cubic-bezier(.22,.9,.3,1), box-shadow 200ms ease, background 200ms ease;
}
.guidance-btn:hover, .guidance-btn:focus {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 30px rgba(0,160,255,0.18), inset 0 -2px 8px rgba(0,0,0,0.1);
  background: linear-gradient(90deg, rgba(0,212,255,0.18), rgba(0,140,255,0.12));
}
.guidance-btn:active { transform: translateY(-1px) scale(0.995); }

@media (max-width: 480px) {
  .guidance-btn { width: 90%; margin-left: auto; margin-right: auto; }
}

/* Country details list styles */
.country-details { list-style: none; margin: 0.75rem 0 0; padding: 0; color: rgba(255,255,255,0.85); }
.country-details li { position: relative; padding-left: 22px; margin: 0.45rem 0; font-size: 0.95rem; }
.country-details li::before { content: '\2022'; position: absolute; left: 0; top: 0; color: var(--primary-color); font-weight:700; }

@media (max-width: 480px) { .country-details li { font-size: 0.92rem; } }

/* Video Gallery (4x4) styles */
.video-gallery .section-title { margin-bottom: 0.25rem; }
.video-gallery > .container > p.font-body { color: var(--primary-color); font-weight:600; margin-top:0.5rem; text-align:center; }
.video-gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-top: 1rem; }
.gallery-card { display: block; border-radius: 8px; overflow: hidden; background: rgba(255,255,255,0.02); text-decoration: none; color: inherit; }
.gallery-card .thumb { width: 100%; padding-top: 56.25%; background-size: cover; background-position: center; }
.gallery-caption { padding: 0.6rem 0.75rem; font-weight:600; text-align:center; }

@media (max-width: 1100px) { .video-gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .video-gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .video-gallery-grid { grid-template-columns: 1fr; } }

/* Demos section */
.demos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.demo-card { background: rgba(255,255,255,0.02); padding: 1rem; border-radius: 8px; text-align:center; }
.see-more-wrap { text-align:center; margin-top: 1rem; }
.see-more-btn { display:inline-block; padding: 0.6rem 1rem; border-radius: 999px; border:1px solid rgba(255,255,255,0.06); background: linear-gradient(90deg, rgba(0,212,255,0.06), rgba(78,205,196,0.03)); color: var(--primary-color); text-decoration:none; }

@media (max-width: 900px) { .demos-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .demos-grid { grid-template-columns: 1fr; } }

.videos-section { border: none; box-shadow: none; }
.videos-section .section-title { margin-bottom: 0.25rem; }
.videos-section > .container > p.font-body { color: var(--primary-color); font-weight:600; margin-top:0.5rem; text-align:center; }
.videos-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.25rem; }
.video-card { background: rgba(255,255,255,0.02); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; align-items: stretch; }
.video-inner { width: 100%; position: relative; padding-top: 56.25%; /* 16:9 ratio */ }
.video-inner iframe { position: absolute; top:0; left:0; width:100%; height:100%; border:0; }
.video-title { padding: 0.5rem 0.75rem; margin: 0; color: var(--text-primary); font-size: 0.95rem; }

@media (max-width: 1100px) {
  .videos-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .videos-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .videos-grid { grid-template-columns: 1fr; }
}

/* Collapsed videos: show only first 4 */
.videos-grid.collapsed > .video-card { display: none; }
.videos-grid.collapsed > .video-card:nth-child(-n+4) { display: flex; }

.videos-actions .see-more-btn { cursor: pointer; }

/* PERFORMANCE OPTIMIZATIONS */
/* Reduce paint complexity */
.page-loader,
.space-background,
.floating-particles,
.sticky-logo,
.navbar {
  contain: layout style paint;
}

/* Optimize animations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Professional Font System */
:root {
  /* Font Variables */
  --font-display: 'Orbitron', monospace;
  --font-title: 'Rajdhani', sans-serif;
  --font-nav: 'Space Grotesk', sans-serif;
  --font-body: 'Exo 2', sans-serif;
  
  /* Enhanced Color Palette */
  --primary-color: #00d4ff;
  --secondary-color: #ff6b6b;
  --accent-color: #4ecdc4;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-primary: 0 20px 40px rgba(0, 212, 255, 0.3);
  --shadow-secondary: 0 10px 20px rgba(0, 0, 0, 0.5);
}

/* ===============================================
   PAGE LOADING SCREEN - PROFESSIONAL
   =============================================== */

.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    var(--bg-primary) 0%, 
    #0f0f23 25%, 
    #1a1a2e 50%, 
    #0f0f23 75%, 
    var(--bg-primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: all 1s cubic-bezier(0.23, 1, 0.320, 1);
  overflow: hidden;
}

.page-loader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  max-width: 400px;
  width: 90%;
}

.loader-content {
  text-align: center;
  position: relative;
}

/* Logo Section */
.loader-logo {
  margin-bottom: 3rem;
  position: relative;
}

.logo-text {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.logo-z {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-color) 0%, #ff8c00 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: logoGlow 3s ease-in-out infinite, gradientShift 4s ease-in-out infinite;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
  position: relative;
}

.logo-name {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-left: 0.5rem;
  animation: fadeInUp 1s ease-out 0.5s both;
}

.logo-subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 400;
  animation: fadeInUp 1s ease-out 1s both;
  letter-spacing: 2px;
  text-transform: uppercase;
}

@keyframes logoGlow {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.05); filter: brightness(1.2); }
}

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

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Loader Animation Section */
.loader-animation {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 2rem auto;
}

/* Loading Page Rings - RESTORED */
.loader-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ring {
  position: absolute;
  border: 2px solid transparent;
  border-radius: 50%;
  animation: ringRotate 30s linear infinite;
}

.ring-1 {
  width: 80px;
  height: 80px;
  border-top-color: var(--primary-color);
  border-right-color: var(--primary-color);
  margin: -40px 0 0 -40px;
  animation-duration: 2s;
}

.ring-2 {
  width: 120px;
  height: 120px;
  border-bottom-color: #ff8c00;
  border-left-color: #ff8c00;
  margin: -60px 0 0 -60px;
  animation-duration: 3s;
  animation-direction: reverse;
}

.ring-3 {
  width: 160px;
  height: 160px;
  border-top-color: var(--secondary-color);
  border-right-color: var(--secondary-color);
  margin: -80px 0 0 -80px;
  animation-duration: 1.5s;
}

@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Particles */
.loader-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: particleFloat 2s ease-in-out infinite;
  box-shadow: 0 0 10px currentColor;
}

.p1 { top: 20%; left: 10%; animation-delay: 0s; background: var(--primary-color); }
.p2 { top: 80%; left: 20%; animation-delay: 0.3s; background: #ff8c00; }
.p3 { top: 30%; left: 80%; animation-delay: 0.6s; background: var(--secondary-color); }
.p4 { top: 70%; left: 90%; animation-delay: 0.9s; background: var(--primary-color); }
.p5 { top: 10%; left: 60%; animation-delay: 1.2s; background: #ff8c00; }
.p6 { top: 90%; left: 70%; animation-delay: 1.5s; background: var(--secondary-color); }

@keyframes particleFloat {
  0%, 100% { transform: translateY(0px) scale(1); opacity: 0.7; }
  50% { transform: translateY(-20px) scale(1.2); opacity: 1; }
}

/* Enhanced Section Particle Effects */
.section-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.drift-particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.4;
  box-shadow: 0 0 10px currentColor;
  animation: driftAcross 200s linear infinite;
}

.drift-1 {
  width: 2px;
  height: 2px;
  background: var(--primary-color);
  top: 15%;
  left: -50px;
  animation-delay: 0s;
}

.drift-2 {
  width: 3px;
  height: 3px;
  background: #ff8c00;
  top: 45%;
  left: -50px;
  animation-delay: -30s;
}

.drift-3 {
  width: 2px;
  height: 2px;
  background: var(--secondary-color);
  top: 75%;
  left: -50px;
  animation-delay: -60s;
}

.drift-4 {
  width: 4px;
  height: 4px;
  background: var(--primary-color);
  top: 25%;
  left: -50px;
  animation-delay: -90s;
}

.drift-5 {
  width: 3px;
  height: 3px;
  background: #ff8c00;
  top: 55%;
  left: -50px;
  animation-delay: -120s;
}

.drift-6 {
  width: 2px;
  height: 2px;
  background: var(--secondary-color);
  top: 85%;
  left: -50px;
  animation-delay: -150s;
}

@keyframes driftAcross {
  0% {
    transform: translateX(0) translateY(0) scale(0.5);
    opacity: 0;
  }
  5% {
    opacity: 0.4;
  }
  50% {
    transform: translateX(50vw) translateY(-20px) scale(1);
    opacity: 0.6;
  }
  95% {
    opacity: 0.4;
  }
  100% {
    transform: translateX(100vw) translateY(-40px) scale(0.5);
    opacity: 0;
  }
}

/* Ambient Glow Particles */
.ambient-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.glow-particle {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  animation: gentleGlow 180s ease-in-out infinite;
}

.glow-small {
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
  top: 20%;
  left: 80%;
  animation-delay: 0s;
}

.glow-medium {
  width: 12px;
  height: 12px;
  background: radial-gradient(circle, #ff8c00 0%, transparent 70%);
  top: 60%;
  left: 20%;
  animation-delay: -60s;
}

.glow-large {
  width: 16px;
  height: 16px;
  background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
  top: 40%;
  left: 70%;
  animation-delay: -120s;
}

@keyframes gentleGlow {
  0%, 100% {
    transform: scale(0.8) translateY(0);
    opacity: 0.3;
  }
  25% {
    transform: scale(1.2) translateY(-10px);
    opacity: 0.6;
  }
  50% {
    transform: scale(1) translateY(-20px);
    opacity: 0.8;
  }
  75% {
    transform: scale(1.1) translateY(-10px);
    opacity: 0.5;
  }
}

/* Progress Section */
.loading-progress {
  margin: 2rem 0;
  width: 100%;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1rem;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, 
    var(--primary-color) 0%, 
    #ff8c00 50%, 
    var(--primary-color) 100%);
  background-size: 200% 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
  animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
  0%, 100% { background-position: 0% 50%; box-shadow: 0 0 10px rgba(0, 212, 255, 0.5); }
  50% { background-position: 100% 50%; box-shadow: 0 0 20px rgba(255, 140, 0, 0.5); }
}

.progress-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Loading Stages */
.loading-stages {
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stage {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
  position: absolute;
}

.stage.active {
  opacity: 1;
  transform: translateY(0);
  color: var(--primary-color);
  font-weight: 500;
}

/* Background Effects */
.loader-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.bg-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 212, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 300s linear infinite;
  opacity: 0.3;
}

@keyframes gridMove {
  from { transform: translate(0, 0); }
  to { transform: translate(50px, 50px); }
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  animation: glowFloat 45s ease-in-out infinite;
}

.glow-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.2) 0%, transparent 70%);
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.glow-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 140, 0, 0.15) 0%, transparent 70%);
  top: 60%;
  right: 10%;
  animation-delay: 2s;
}

.glow-3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(255, 107, 107, 0.1) 0%, transparent 70%);
  bottom: 20%;
  left: 30%;
  animation-delay: 4s;
}

@keyframes glowFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Responsive Design for Loader */
@media (max-width: 768px) {
  /* Prevent transformed navbar from creating containing block that clips fixed menu */
  .navbar, .navbar.navbar-hidden, .navbar.navbar-visible {
    transform: none !important;
  }
  .logo-z {
    font-size: 3rem;
  }
  
  .logo-name {
    font-size: 2rem;
  }
  
  .loader-animation {
    width: 150px;
    height: 150px;
  }
  
  .ring-1 {
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
  }
  
  .ring-2 {
    width: 90px;
    height: 90px;
    margin: -45px 0 0 -45px;
  }
  
  .ring-3 {
    width: 120px;
    height: 120px;
    margin: -60px 0 0 -60px;
  }
}

/* Light Mode Support for Loader */
body.light-mode .page-loader {
  background: linear-gradient(135deg, 
    #f8fafc 0%, 
    #e2e8f0 25%, 
    #cbd5e0 50%, 
    #e2e8f0 75%, 
    #f8fafc 100%);
}

body.light-mode .logo-name {
  color: var(--bg-primary);
}

body.light-mode .logo-subtitle {
  color: rgba(0, 0, 0, 0.6);
}

body.light-mode .stage {
  color: rgba(0, 0, 0, 0.6);
}

body.light-mode .stage.active {
  color: #007bff;
}

/* Font Classes */
.font-display { font-family: var(--font-display); font-weight: 700; }
.font-title { font-family: var(--font-title); font-weight: 600; }
.font-nav { font-family: var(--font-nav); font-weight: 500; }
.font-body { font-family: var(--font-body); font-weight: 400; }

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

html {
  scroll-behavior: auto; /* DISABLED: was smooth - testing modal fix */
  overflow-x: hidden;
  scroll-padding-top: 80px;
}

/* Performance optimizations */
* {
  will-change: auto;
}

/* GPU acceleration for critical elements */
.space-background,
.floating-particles,
.particle,
.sticky-logo,
.navbar,
.hero-section,
section {
  will-change: transform;
  transform: translateZ(0);
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: all 0.3s ease;
}

/* Animated Space Background with Particles - OPTIMIZED */
.space-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: 
    radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.05) 0%, transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(255, 107, 107, 0.05) 0%, transparent 30%),
    radial-gradient(circle at 40% 80%, rgba(78, 205, 196, 0.05) 0%, transparent 30%),
    linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  z-index: -1;
  animation: backgroundShift 60s ease-in-out infinite;
  overflow: hidden;
  will-change: transform;
  transform: translateZ(0);
}

.space-background::before,
.space-background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  will-change: transform;
  transform: translateZ(0);
}

.space-background::before {
  background-image: 
    radial-gradient(1px 1px at 20px 30px, rgba(0, 212, 255, 0.2), transparent),
    radial-gradient(1px 1px at 40px 70px, rgba(255, 140, 0, 0.15), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(78, 205, 196, 0.2), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.1), transparent);
  background-repeat: repeat;
  background-size: 400px 200px;
  animation: gentleDrift 120s linear infinite;
}

.space-background::after {
  background-image: 
    radial-gradient(1px 1px at 50px 50px, rgba(255, 255, 255, 0.1), transparent),
    radial-gradient(1px 1px at 100px 25px, rgba(78, 205, 196, 0.1), transparent),
    radial-gradient(1px 1px at 150px 75px, rgba(255, 140, 0, 0.1), transparent);
  background-repeat: repeat;
  background-size: 450px 220px;
  animation: gentleDrift 150s linear infinite reverse;
}

@keyframes backgroundShift {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.01); }
}

@keyframes gentleDrift {
  0% { 
    transform: translateY(0) translateX(0); 
    opacity: 0.6;
  }
  25% { 
    transform: translateY(-25vh) translateX(10px); 
    opacity: 0.8;
  }
  50% { 
    transform: translateY(-50vh) translateX(-8px); 
    opacity: 0.7;
  }
  75% { 
    transform: translateY(-75vh) translateX(12px); 
    opacity: 0.8;
  }
  100% { 
    transform: translateY(-100vh) translateX(0); 
    opacity: 0.6;
  }
}

/* Floating Particles - PERFORMANCE OPTIMIZED */
.floating-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
  will-change: transform;
  transform: translateZ(0);
}

.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 4px currentColor;
  animation-fill-mode: both;
  will-change: transform, opacity;
  transform: translateZ(0);
}

/* Reduced particle count for better performance */
.particle-1 {
  width: 3px;
  height: 3px;
  background: rgba(0, 212, 255, 0.4);
  left: 15%;
  animation: floatUp 40s infinite linear, twinkle 4s infinite;
  animation-delay: 0s, 0s;
}

.particle-2 {
  width: 2px;
  height: 2px;
  background: rgba(255, 107, 107, 0.4);
  left: 35%;
  animation: floatUp 45s infinite linear, twinkle 3s infinite;
  animation-delay: 3s, 0.5s;
}

.particle-3 {
  width: 2px;
  height: 2px;
  background: rgba(78, 205, 196, 0.5);
  left: 55%;
  animation: floatUp 50s infinite linear, twinkle 5s infinite;
  animation-delay: 6s, 1s;
}

.particle-4 {
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  left: 75%;
  animation: floatUp 35s infinite linear, twinkle 4s infinite;
  animation-delay: 2s, 1.5s;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) translateX(0) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: translateY(90vh) translateX(10px) scale(1);
  }
  90% {
    opacity: 1;
    transform: translateY(-10vh) translateX(-10px) scale(1);
  }
  100% {
    transform: translateY(-20vh) translateX(0) scale(0);
    opacity: 0;
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* REMOVED: Orbital, Drift, Pulse, Streak, Spiral, Cross, and Dot particles for performance */
/* These complex animations were causing lag - kept only essential particles above */

/* REMOVED: Complex animation keyframes for better performance */
/* Only keeping essential floatUp and twinkle animations */

@keyframes floatUp {
  0% {
    transform: translateY(100vh) translateX(0) scale(0.8);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: translateY(90vh) translateX(5px) scale(1);
  }
  90% {
    opacity: 1;
    transform: translateY(-10vh) translateX(-5px) scale(1);
  }
  100% {
    transform: translateY(-20vh) translateX(0) scale(0.8);
    opacity: 0;
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Sticky Logo */
.sticky-logo {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(50px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}

.sticky-logo.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sticky-logo-text {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--text-primary);
  letter-spacing: 1.5px;
}

.sticky-main-text {
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sticky-small-i {
  position: relative;
  display: inline-block;
  margin-left: 2px;
}

.sticky-i-body {
  font-size: inherit;
  position: relative;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sticky-dot {
  position: absolute;
  left: 40%;
  top: 0px;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: #ff4500;
  border-radius: 50%;
  animation: glow 2s ease-in-out infinite;
}

/* Sticky fire particles */
.sticky-fire-particle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 2px;
  background: radial-gradient(circle, #ff4500, #ff6b35);
  border-radius: 50%;
  animation: stickyFireRise 1.5s ease-out infinite;
}

.sticky-fire-particle.sfp1 {
  animation-delay: 0s;
  left: 46%;
  animation-name: stickyFireRiseSmoothLeft;
}

.sticky-fire-particle.sfp2 {
  animation-delay: 0.2s;
  left: 54%;
  animation-name: stickyFireRiseSmoothRight;
}

.sticky-fire-particle.sfp3 {
  animation-delay: 0.4s;
  left: 50%;
  width: 3px;
  height: 3px;
  animation-name: stickyFireRiseSmoothCenter;
}

.sticky-fire-particle.sfp4 {
  animation-delay: 0.6s;
  left: 48%;
  width: 1.5px;
  height: 1.5px;
  animation-name: stickyFireRiseSmoothLeft;
}

.sticky-fire-particle.sfp5 {
  animation-delay: 0.8s;
  left: 52%;
  width: 1.5px;
  height: 1.5px;
  animation-name: stickyFireRiseSmoothRight;
}

/* Sticky fire animations - smaller scale */
@keyframes stickyFireRiseSmoothLeft {
  0% {
    transform: translate(-50%, -50%) translateY(0) translateX(0) scale(1);
    opacity: 1;
    background: radial-gradient(circle, #ff4500 0%, #ff8c00 50%, transparent 80%);
  }
  25% {
    transform: translate(-50%, -50%) translateY(-5px) translateX(-1px) scale(0.9);
    opacity: 0.8;
    background: radial-gradient(circle, #ff4500 0%, #ff6b35 40%, transparent 75%);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-12px) translateX(-2px) scale(0.7);
    opacity: 0.6;
    background: radial-gradient(circle, #ff6b35 0%, #ff8c00 35%, transparent 70%);
  }
  75% {
    transform: translate(-50%, -50%) translateY(-18px) translateX(-3px) scale(0.4);
    opacity: 0.3;
    background: radial-gradient(circle, #ff8c00 0%, #ffaa44 25%, transparent 60%);
  }
  100% {
    transform: translate(-50%, -50%) translateY(-22px) translateX(-4px) scale(0.1);
    opacity: 0;
    background: radial-gradient(circle, #ffaa44 0%, transparent 40%);
  }
}

@keyframes stickyFireRiseSmoothRight {
  0% {
    transform: translate(-50%, -50%) translateY(0) translateX(0) scale(1);
    opacity: 1;
    background: radial-gradient(circle, #ff4500 0%, #ff8c00 50%, transparent 80%);
  }
  25% {
    transform: translate(-50%, -50%) translateY(-5px) translateX(1px) scale(0.9);
    opacity: 0.8;
    background: radial-gradient(circle, #ff4500 0%, #ff6b35 40%, transparent 75%);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-12px) translateX(2px) scale(0.7);
    opacity: 0.6;
    background: radial-gradient(circle, #ff6b35 0%, #ff8c00 35%, transparent 70%);
  }
  75% {
    transform: translate(-50%, -50%) translateY(-18px) translateX(3px) scale(0.4);
    opacity: 0.3;
    background: radial-gradient(circle, #ff8c00 0%, #ffaa44 25%, transparent 60%);
  }
  100% {
    transform: translate(-50%, -50%) translateY(-22px) translateX(4px) scale(0.1);
    opacity: 0;
    background: radial-gradient(circle, #ffaa44 0%, transparent 40%);
  }
}

@keyframes stickyFireRiseSmoothCenter {
  0% {
    transform: translate(-50%, -50%) translateY(0) scale(1);
    opacity: 1;
    background: radial-gradient(circle, #ff4500 0%, #ff8c00 50%, transparent 80%);
  }
  25% {
    transform: translate(-50%, -50%) translateY(-6px) scale(0.9);
    opacity: 0.8;
    background: radial-gradient(circle, #ff4500 0%, #ff6b35 40%, transparent 75%);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-14px) scale(0.7);
    opacity: 0.6;
    background: radial-gradient(circle, #ff6b35 0%, #ff8c00 35%, transparent 70%);
  }
  75% {
    transform: translate(-50%, -50%) translateY(-20px) scale(0.4);
    opacity: 0.3;
    background: radial-gradient(circle, #ff8c00 0%, #ffaa44 25%, transparent 60%);
  }
  100% {
    transform: translate(-50%, -50%) translateY(-25px) scale(0.1);
    opacity: 0;
    background: radial-gradient(circle, #ffaa44 0%, transparent 40%);
  }
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem 0;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 4000; /* above overlay */
  /* removed isolation to allow nav-menu to exceed overlay stacking */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
  will-change: transform;
}

.navbar.navbar-hidden {
  transform: translateY(-100%) !important;
}

.navbar.navbar-visible {
  transform: translateY(0) !important;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  overflow: visible;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hamburger {
  display: none; /* shown via media query on mobile */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  transition: all 0.3s ease;
  position: relative;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: center;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.nav-logo {
  font-size: 2rem;
  font-weight: 900;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  position: relative;
}

.main-text {
  font-size: 2rem;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.small-i {
  position: relative;
  display: inline-block;
  margin-left: 2px; /* slight gap from SAM */
}

/* i body same size as SAM */
.i-body {
  font-size: 2rem;
  position: relative;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* perfectly aligned glowing dot with fire effect */
.dot {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #ff8c00;
  border-radius: 50%;
  left: 52%;
  top: 4px; /* closer to the capital I */
  transform: translateX(-50%);
  animation: glow 2s infinite alternate;
}

/* fire particles that rise from the dot */
.dot::before,
.dot::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  background: radial-gradient(circle, #ff4500 0%, #ff8c00 50%, transparent 80%);
  border-radius: 50%;
  animation: fireRise 1.5s infinite ease-out;
}

.dot::before {
  left: -1px;
  top: -2px;
  animation-delay: 0s;
}

.dot::after {
  right: -1px;
  top: -2px;
  animation-delay: 0.7s;
}

/* glowing animation */
@keyframes glow {
  from {
    box-shadow: 0 0 5px #ff8c00, 0 0 10px #ff8c00;
    opacity: 0.7;
    background: #ff8c00;
  }
  to {
    box-shadow: 0 0 15px #ff6b35, 0 0 25px #ff8c00;
    opacity: 1;
    background: #ff6b35;
  }
}

/* fire particles rising animation */
@keyframes fireRise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
    background: radial-gradient(circle, #ff4500 0%, #ff8c00 50%, transparent 80%);
  }
  50% {
    transform: translateY(-8px) scale(0.8);
    opacity: 0.6;
    background: radial-gradient(circle, #ff6b35 0%, #ff8c00 30%, transparent 70%);
  }
  100% {
    transform: translateY(-15px) scale(0.3);
    opacity: 0;
    background: radial-gradient(circle, #ffaa44 0%, transparent 50%);
  }
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link:hover::after {
  width: 100%;
}

.mode-toggle {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.mode-toggle:hover {
  background: var(--primary-color);
  transform: scale(1.1);
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 2rem;
  overflow: hidden;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s ease;
}

/* Announcement Marquee (continuous right → left) */
.announcement-slider {
  width: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-top: 1px solid rgba(255,255,255,0.03);
  padding: 0.4rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2500;
}
.announcement-inner { max-width: 1100px; width: 100%; background: transparent; border: none; box-shadow: none; }

/* Marquee */
.marquee-viewport {
  overflow: hidden;
  width: 100%;
}
.marquee-track {
  display: inline-flex;
  gap: 3rem;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
}
.marquee-track.animating { animation-timing-function: linear; animation-iteration-count: infinite; animation-name: marqueeMove; }
.announce-item {
  display: inline-block;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-weight: 600;
  padding: 0 0.25rem;
  font-size: 1rem;
}

@keyframes marqueeMove {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Pause the marquee when user hovers or focuses */
.marquee-viewport:hover .marquee-track,
.marquee-viewport:focus .marquee-track { animation-play-state: paused !important; }

@media (max-width: 768px) {
  .announce-item { font-size: 0.92rem; }
  .announcement-inner { padding: 0 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none !important; }
}

/* Announcement floating over hero - not a full section */
#announcement {
  position: absolute; /* positioned relative to nearest positioned ancestor (we'll place it above hero) */
  left: 50%;
  transform: translateX(-50%);
  top: 12vh; /* slightly below top, overlapping hero */
  width: calc(100% - 2rem);
  max-width: 1200px;
  pointer-events: auto;
  z-index: 3000;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
  border-radius: 10px;
}

/* If you prefer the announcement pinned to the viewport, use fixed positioning instead */
/* #announcement { position: fixed; top: 12vh; } */

/* Countries section restored styles */
.countries-section {
  padding: 3rem 1rem;
  /* keep section background flush: remove any container border/shadow */
  border: none;
  box-shadow: none;
}
.countries-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  align-items: start;
}
.country-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 1rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 300ms cubic-bezier(.22,.9,.3,1), box-shadow 300ms ease, border-color 300ms ease;
}
.country-card .flag-wrap { display: block; max-height: 84px; overflow: hidden; border-radius: 8px; }
.country-card .flag-img { width: 100%; height: auto; display: block; }
.country-name { font-weight: 700; color: var(--text-primary); margin-top: 0.25rem; }
.country-details { margin: 0.5rem 0 0; }
.country-card .guidance-btn { margin-top: auto; align-self: flex-start; }

@media (max-width: 1100px) { .countries-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .countries-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .countries-grid { grid-template-columns: 1fr; } #announcement { top: 6vh; } }

/* Plane icon sizing inline with title */
.section-title .icon-plane {
  display: inline-flex;
  align-items: center;
  margin-left: 0.6rem;
}
.section-title .icon-plane img {
  width: 20px;
  height: auto;
  display: inline-block;
  vertical-align: middle;
}

.hero-section.scroll-hide {
  transform: translateY(-20vh) scale(0.95) rotateX(-5deg);
  opacity: 0.3;
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  z-index: 2;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
  animation: fadeInUp 1.5s ease 0.2s both;
}

.gradient-text {
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(60deg); }
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  min-height: 60px;
  animation: fadeInUp 1.5s ease 0.4s both;
}

.cursor {
  animation: blink 1s infinite;
}

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

/* Hero section animated i styles */
.small-i-hero {
  position: relative;
  display: inline-block;
}

.i-body-hero {
  font-size: inherit;
  position: relative;
}

.dot-hero {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: #ff4500;
  border-radius: 50%;
  animation: glow 2s ease-in-out infinite;
}

/* Fire particles for hero dot */
.fire-particle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, #ff4500, #ff6b35);
  border-radius: 50%;
  animation: heroFireRise 1.2s ease-out infinite;
}

.fire-particle.fp1 {
  animation-delay: 0s;
  left: 48%;
  animation-name: fireRiseSmoothLeft;
  animation-duration: 1.8s;
}

.fire-particle.fp2 {
  animation-delay: 0.2s;
  left: 52%;
  animation-name: fireRiseSmoothRight;
  animation-duration: 1.6s;
}

.fire-particle.fp3 {
  animation-delay: 0.4s;
  left: 50%;
  width: 5px;
  height: 5px;
  animation-name: fireRiseSmoothCenter;
  animation-duration: 2s;
}

.fire-particle.fp4 {
  animation-delay: 0.6s;
  left: 46%;
  width: 3px;
  height: 3px;
  animation-name: fireRiseSmoothLeft;
  animation-duration: 1.4s;
}

.fire-particle.fp5 {
  animation-delay: 0.8s;
  left: 54%;
  width: 3px;
  height: 3px;
  animation-name: fireRiseSmoothRight;
  animation-duration: 1.7s;
}

/* Smooth fire rise animations */
@keyframes fireRiseSmoothLeft {
  0% {
    transform: translate(-50%, -50%) translateY(0) translateX(0) scale(1);
    opacity: 1;
    background: radial-gradient(circle, #ff4500 0%, #ff8c00 50%, transparent 80%);
  }
  25% {
    transform: translate(-50%, -50%) translateY(-8px) translateX(-2px) scale(0.95);
    opacity: 0.9;
    background: radial-gradient(circle, #ff4500 0%, #ff6b35 40%, transparent 75%);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-18px) translateX(-4px) scale(0.8);
    opacity: 0.7;
    background: radial-gradient(circle, #ff6b35 0%, #ff8c00 35%, transparent 70%);
  }
  75% {
    transform: translate(-50%, -50%) translateY(-28px) translateX(-6px) scale(0.5);
    opacity: 0.4;
    background: radial-gradient(circle, #ff8c00 0%, #ffaa44 25%, transparent 60%);
  }
  100% {
    transform: translate(-50%, -50%) translateY(-35px) translateX(-8px) scale(0.2);
    opacity: 0;
    background: radial-gradient(circle, #ffaa44 0%, transparent 40%);
  }
}

@keyframes fireRiseSmoothRight {
  0% {
    transform: translate(-50%, -50%) translateY(0) translateX(0) scale(1);
    opacity: 1;
    background: radial-gradient(circle, #ff4500 0%, #ff8c00 50%, transparent 80%);
  }
  25% {
    transform: translate(-50%, -50%) translateY(-8px) translateX(2px) scale(0.95);
    opacity: 0.9;
    background: radial-gradient(circle, #ff4500 0%, #ff6b35 40%, transparent 75%);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-18px) translateX(4px) scale(0.8);
    opacity: 0.7;
    background: radial-gradient(circle, #ff6b35 0%, #ff8c00 35%, transparent 70%);
  }
  75% {
    transform: translate(-50%, -50%) translateY(-28px) translateX(6px) scale(0.5);
    opacity: 0.4;
    background: radial-gradient(circle, #ff8c00 0%, #ffaa44 25%, transparent 60%);
  }
  100% {
    transform: translate(-50%, -50%) translateY(-35px) translateX(8px) scale(0.2);
    opacity: 0;
    background: radial-gradient(circle, #ffaa44 0%, transparent 40%);
  }
}

@keyframes fireRiseSmoothCenter {
  0% {
    transform: translate(-50%, -50%) translateY(0) scale(1);
    opacity: 1;
    background: radial-gradient(circle, #ff4500 0%, #ff8c00 50%, transparent 80%);
  }
  25% {
    transform: translate(-50%, -50%) translateY(-10px) scale(0.95);
    opacity: 0.9;
    background: radial-gradient(circle, #ff4500 0%, #ff6b35 40%, transparent 75%);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-22px) scale(0.8);
    opacity: 0.7;
    background: radial-gradient(circle, #ff6b35 0%, #ff8c00 35%, transparent 70%);
  }
  75% {
    transform: translate(-50%, -50%) translateY(-32px) scale(0.5);
    opacity: 0.4;
    background: radial-gradient(circle, #ff8c00 0%, #ffaa44 25%, transparent 60%);
  }
  100% {
    transform: translate(-50%, -50%) translateY(-40px) scale(0.2);
    opacity: 0;
    background: radial-gradient(circle, #ffaa44 0%, transparent 40%);
  }
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  animation: fadeInUp 1.5s ease 0.6s both;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  animation: fadeInUp 1.5s ease 0.8s both;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  color: var(--bg-primary);
  box-shadow: var(--shadow-primary);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.stats-container {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  animation: fadeInUp 1.5s ease 1s both;
}

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

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced Professional Sections with 3D Scroll Animation */
section {
  max-width: 900px; 
  margin: 8vh auto;
  padding: 60px 40px; 
  border-radius: 30px;
  background: linear-gradient(135deg, 
    rgba(10, 10, 10, 0.95) 0%, 
    rgba(0, 20, 40, 0.95) 50%, 
    rgba(10, 10, 10, 0.95) 100%);
  backdrop-filter: blur(15px) saturate(120%); /* Reduced for performance */
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 20px 40px rgba(0, 212, 255, 0.2), /* Simplified shadow */
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  opacity: 0; /* JS will reveal; fallback below ensures visibility if JS fails */
  transform: translateY(50px) scale(0.95); /* Simplified transform */
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1); /* Faster transition */
  position: relative;
  overflow: hidden;
  perspective: 800px; /* Reduced for performance */
  min-height: 60vh; /* Reduced height */
  display: flex;
  flex-direction: column;
  justify-content: center;
  will-change: transform, opacity;
  isolation: isolate;
  scroll-margin-top: 15vh;
  transform: translateZ(0); /* Force GPU acceleration */
}

section.visible {
  opacity: 1;
  transform: translateY(0) scale(1); /* Simplified transform */
  animation: smoothSlideIn 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards; /* Faster */
}

/* Hard fallback if JS fails to add .visible within 2s */
@media (prefers-reduced-motion: reduce) {
  section { opacity: 1 !important; transform: none !important; animation: none !important; }
}
body.loaded-fallback section { opacity: 1 !important; transform: none !important; animation: none !important; }

/* When mobile menu open dim background slightly without heavy blur stacking */
body.menu-open .hero-section, body.menu-open section { filter: blur(2px) brightness(.85); transition: filter .3s ease; }
@media (max-width:768px){ body.menu-open { overflow:hidden; } }

section.animate-in {
  transform: translateY(0) scale(1); /* Simplified */
}

/* Prevent sections from overlapping */
section:not(.visible) {
  z-index: 1;
}

section.visible {
  z-index: 10;
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.04) 0%, transparent 50%), /* Reduced opacity */
    radial-gradient(circle at 80% 70%, rgba(255, 140, 0, 0.03) 0%, transparent 50%),
    linear-gradient(135deg, 
      rgba(0, 212, 255, 0.02) 0%, 
      transparent 50%, 
      rgba(78, 205, 196, 0.02) 100%);
  border-radius: inherit;
  z-index: -1;
  animation: sectionAmbient 30s ease-in-out infinite alternate; /* Slower for performance */
}

/* DISABLED: Complex particle effects in section::after for better performance */
section::after {
  display: none; /* Disabled complex background particles */
}

@keyframes simpleParticleFloat {
  0% { 
    background-position: 
      0% 0%, 
      100% 100%, 
      50% 100%, 
      0% 50%;
    opacity: 0.3;
    transform: translateY(0);
  }
  25% { 
    background-position: 
      25% -10%, 
      75% 90%, 
      25% 75%, 
      25% 75%;
    opacity: 0.5;
    transform: translateY(-3px);
  }
  50% { 
    background-position: 
      50% -20%, 
      50% 80%, 
      0% 50%, 
      50% 100%;
    opacity: 0.6;
    transform: translateY(0);
  }
  75% { 
    background-position: 
      75% -30%, 
      25% 70%, 
      75% 25%, 
      75% 125%;
    opacity: 0.4;
    transform: translateY(3px);
  }
  100% { 
    background-position: 
      100% -40%, 
      0% 60%, 
      100% 0%, 
      100% 150%;
    opacity: 0.3;
    transform: translateY(0);
  }
}

/* Optimized 3D Animation Keyframes */
@keyframes smoothSlideIn {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.98); /* Simplified - no 3D transforms */
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes section3DIn {
  0% {
    opacity: 0;
    transform: translateY(100vh) translateZ(-500px) rotateX(90deg) scale(0.5);
  }
  30% {
    opacity: 0.3;
    transform: translateY(50vh) translateZ(-250px) rotateX(45deg) scale(0.7);
  }
  70% {
    opacity: 0.8;
    transform: translateY(-10vh) translateZ(-50px) rotateX(-5deg) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) translateZ(0) rotateX(0deg) scale(1);
  }
}

@keyframes sectionAmbient {
  0% { opacity: 0.3; transform: scale(1) rotate(0deg); }
  100% { opacity: 0.7; transform: scale(1.1) rotate(2deg); }
}

.container {
  max-width: 100%;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  text-align: center;
  margin-bottom: 3rem;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* About Section */
.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: center;
}

/* About Photo Section */
.about-photo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.about-photo-container {
  position: relative;
  margin-bottom: 1.5rem;
}

.photo-3d-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.about-photo {
  position: relative;
  width: 260px;
  height: 320px;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border: 3px solid transparent;
  background-clip: padding-box;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.1);
  transition: all 0.5s cubic-bezier(0.23, 1, 0.320, 1);
  backdrop-filter: blur(10px);
  transform: rotate(-2deg);
}

.about-photo::before {
  content: '';
  position: absolute;
  inset: -3px;
  padding: 3px;
  background: linear-gradient(135deg, 
    rgba(0, 212, 255, 0.6), 
    rgba(76, 205, 196, 0.4), 
    rgba(255, 107, 107, 0.3)
  );
  border-radius: 33px;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
}

.about-photo:hover {
  transform: rotate(0deg) translateY(-10px) scale(1.05);
  box-shadow: 
    0 25px 50px rgba(0, 212, 255, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
  filter: contrast(1.05) saturate(1.1) brightness(1.02);
}

.about-photo:hover .profile-img {
  transform: scale(1.08);
  filter: contrast(1.15) saturate(1.3) brightness(1.05);
}

.photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg, 
    rgba(0, 212, 255, 0.1) 0%, 
    transparent 60%, 
    rgba(76, 205, 196, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.about-photo:hover .photo-overlay {
  opacity: 1;
}

.photo-glow {
  position: absolute;
  top: -15px;
  left: -15px;
  width: calc(100% + 30px);
  height: calc(100% + 30px);
  background: conic-gradient(
    from 0deg,
    rgba(0, 212, 255, 0.4),
    rgba(76, 205, 196, 0.3),
    rgba(255, 107, 107, 0.2),
    rgba(0, 212, 255, 0.4)
  );
  border-radius: 35px;
  filter: blur(20px);
  opacity: 0;
  animation: photoRotateGlow 8s linear infinite;
  z-index: -1;
  transition: opacity 0.4s ease;
}

@keyframes photoRotateGlow {
  0% { transform: rotate(0deg); opacity: 0; }
  50% { opacity: 0.4; }
  100% { transform: rotate(360deg); opacity: 0; }
}

.about-photo:hover .photo-glow {
  opacity: 0.6;
  animation-duration: 4s;
}

.photo-reflection {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(
    to bottom, 
    rgba(0, 212, 255, 0.08) 0%, 
    transparent 60%
  );
  transform: scaleY(-1) rotate(2deg);
  opacity: 0.3;
  filter: blur(2px);
  border-radius: 0 0 30px 30px;
  pointer-events: none;
}

/* New Inline Stats Style */
.photo-stats {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.stats-inline {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.08), 
    rgba(255, 255, 255, 0.04)
  );
  border: 1px solid rgba(0, 212, 255, 0.2);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  backdrop-filter: blur(20px);
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s ease;
  cursor: pointer;
}

.stats-inline:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, 
    rgba(0, 212, 255, 0.1), 
    rgba(76, 205, 196, 0.08)
  );
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 
    0 12px 35px rgba(0, 212, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.stat-mini {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.3s ease;
}

.stats-inline:hover .stat-mini {
  transform: scale(1.05);
}

.mini-icon {
  font-size: 1rem;
  transition: all 0.3s ease;
}

.stats-inline:hover .mini-icon {
  transform: scale(1.2);
  filter: drop-shadow(0 2px 4px rgba(0, 212, 255, 0.4));
}

.mini-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.stats-inline:hover .mini-text {
  color: rgba(0, 212, 255, 0.9);
  text-shadow: 0 1px 3px rgba(0, 212, 255, 0.3);
}

.stat-separator {
  margin: 0 0.8rem;
  color: rgba(0, 212, 255, 0.4);
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.stats-inline:hover .stat-separator {
  color: rgba(0, 212, 255, 0.7);
  transform: scale(1.3);
}

.about-text p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.skill-category h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text-primary);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.skill-tag:hover {
  background: var(--primary-color);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(15px);
  opacity: 0;
  transform: translateY(50px) scale(0.9);
}

.service-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.service-card:hover {
  transform: translateY(-10px) scale(1.05) rotateY(5deg);
  box-shadow: var(--shadow-primary);
  background: rgba(0, 212, 255, 0.1);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
}

.service-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  transition: all 0.3s ease;
}

.service-card:hover .service-img {
  transform: scale(1.1);
  filter: brightness(1.1);
}

.service-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.service-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===============================================
   BLENDER 3D PROJECTS SECTION - PROFESSIONAL
   =============================================== */

.blender-showcase {
  background: linear-gradient(135deg, 
    var(--bg-primary) 0%, 
    rgba(0, 20, 40, 0.95) 50%, 
    var(--bg-primary) 100%);
  position: relative;
  overflow: hidden;
}

.blender-showcase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 140, 0, 0.08) 0%, transparent 50%);
  pointer-events: none;
  animation: blenderAmbient 20s ease-in-out infinite alternate;
}

@keyframes blenderAmbient {
  0% { opacity: 0.3; transform: scale(1) rotate(0deg); }
  100% { opacity: 0.7; transform: scale(1.1) rotate(2deg); }
}

.blender-header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
  z-index: 2;
}

.blender-header .section-title {
  background: linear-gradient(135deg, #00d4ff 0%, #ff8c00 50%, #00d4ff 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
  position: relative;
}

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

.blender-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 3rem;
  margin-bottom: 4rem;
  perspective: 1000px;
}

.blender-project {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(20px);
  position: relative;
  transform-style: preserve-3d;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
  overflow: hidden;
}

.blender-project::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(0, 212, 255, 0.1) 0%, 
    transparent 50%, 
    rgba(255, 140, 0, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 20px;
}

.blender-project:hover {
  transform: translateY(-15px) rotateX(5deg) rotateY(5deg);
  box-shadow: 
    0 30px 60px rgba(0, 212, 255, 0.2),
    0 15px 30px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.blender-project:hover::before {
  opacity: 1;
}

.project-3d-container {
  position: relative;
  margin-bottom: 2rem;
  transform-style: preserve-3d;
}

.project-3d-wrapper {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  transform-style: preserve-3d;
}

.project-3d-image {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-radius: 15px;
  background: linear-gradient(45deg, #1a1a2e, #16213e);
}

.project-3d-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
  filter: contrast(1.1) saturate(1.2);
}

.blender-project:hover .project-3d-image img {
  transform: scale(1.1) rotateZ(2deg);
  filter: contrast(1.3) saturate(1.4) brightness(1.1);
}

.project-3d-reflection {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, 
    rgba(0, 212, 255, 0.1) 0%, 
    transparent 70%);
  transform: scaleY(-1);
  opacity: 0.3;
  filter: blur(1px);
  border-radius: 0 0 15px 15px;
}

.render-overlay {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.render-info {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--primary-color);
  font-weight: 600;
}

.animation-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(0, 212, 255, 0.2);
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  cursor: pointer;
}

.animation-indicator:hover {
  background: rgba(0, 212, 255, 0.4);
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.play-button {
  width: 24px;
  height: 24px;
  color: var(--primary-color);
  animation: pulse 2s ease-in-out infinite;
}

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

.vfx-particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: particleFloat 3s ease-in-out infinite;
  box-shadow: 0 0 10px var(--primary-color);
}

.particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { top: 60%; left: 30%; animation-delay: 0.6s; }
.particle:nth-child(3) { top: 40%; left: 70%; animation-delay: 1.2s; }
.particle:nth-child(4) { top: 80%; left: 50%; animation-delay: 1.8s; }
.particle:nth-child(5) { top: 10%; left: 80%; animation-delay: 2.4s; }

@keyframes particleFloat {
  0%, 100% { transform: translateY(0px) scale(1); opacity: 0.6; }
  50% { transform: translateY(-20px) scale(1.2); opacity: 1; }
}

.lighting-indicator {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 40px;
  height: 40px;
}

.hdri-sphere {
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #ff8c00, #00d4ff, #ff8c00);
  border-radius: 50%;
  animation: hdriRotate 4s linear infinite;
  box-shadow: 0 0 15px rgba(255, 140, 0, 0.4);
}

@keyframes hdriRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.project-category {
  margin-bottom: 1rem;
}

.category-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-badge.modeling {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.1));
  color: var(--primary-color);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.category-badge.animation {
  background: linear-gradient(135deg, rgba(255, 140, 0, 0.2), rgba(255, 140, 0, 0.1));
  color: #ff8c00;
  border: 1px solid rgba(255, 140, 0, 0.3);
}

.category-badge.vfx {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.2), rgba(147, 51, 234, 0.1));
  color: #9333ea;
  border: 1px solid rgba(147, 51, 234, 0.3);
}

.category-badge.architectural {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.blender-content h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.blender-content p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.blender-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(0, 20, 40, 0.3);
  border-radius: 10px;
  border: 1px solid rgba(0, 212, 255, 0.1);
}

.spec-item {
  text-align: center;
}

.spec-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.spec-value {
  display: block;
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1rem;
}

.blender-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-tag {
  padding: 0.3rem 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.tool-tag:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.3);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.blender-cta {
  text-align: center;
  padding: 3rem;
  background: var(--glass-bg);
  border-radius: 25px;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.blender-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(0, 212, 255, 0.1), transparent);
  animation: conicRotate 8s linear infinite;
}

@keyframes conicRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cta-3d-content {
  position: relative;
  z-index: 2;
}

.cta-3d-content h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 2rem;
}

.cta-3d-content p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.cta-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
}

.feature-icon {
  font-size: 1.2rem;
}

.cta-btn {
  position: relative;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

.cta-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 
    0 15px 30px rgba(0, 212, 255, 0.3),
    0 0 40px rgba(0, 212, 255, 0.2);
}

.btn-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.cta-btn:hover .btn-glow {
  left: 100%;
}

/* Responsive Design for Blender Section */
@media (max-width: 768px) {
  .blender-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .blender-project {
    padding: 1.5rem;
  }
  
  .project-3d-image {
    height: 200px;
  }
  
  .blender-specs {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .cta-features {
    flex-direction: column;
    gap: 1rem;
  }
  
  .blender-header .section-title {
    font-size: 2rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .blender-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Light Mode Support for Blender Section */
body.light-mode .blender-showcase {
  background: linear-gradient(135deg, 
    var(--bg-primary) 0%, 
    rgba(240, 248, 255, 0.95) 50%, 
    var(--bg-primary) 100%);
}

body.light-mode .blender-project {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .category-badge.modeling {
  background: rgba(0, 123, 191, 0.1);
  color: #007bff;
}

body.light-mode .category-badge.animation {
  background: rgba(255, 140, 0, 0.1);
  color: #ff8c00;
}

body.light-mode .spec-value {
  color: #007bff;
}

/* Portfolio Section */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.portfolio-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(15px);
  cursor: pointer;
  position: relative;
}

.portfolio-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-primary);
}

.portfolio-image {
  height: 200px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.portfolio-item:hover .project-img {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.view-project-btn {
  background: var(--primary-color);
  color: var(--bg-primary);
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

.view-project-btn:hover {
  background: var(--accent-color);
  transform: scale(1.1);
}

.placeholder-image {
  font-size: 4rem;
  color: var(--bg-primary);
}

.portfolio-content {
  padding: 1.5rem;
}

.portfolio-content h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.portfolio-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

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

.tag {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  color: var(--text-primary);
}

/* Testimonials Section */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(15px);
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-primary);
}

.stars {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.testimonial-text {
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.testimonial-author h4 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.testimonial-author span {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Fiverr Gigs Section */
.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-size: 1.1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.fiverr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.fiverr-gig-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(15px);
  position: relative;
}

.fiverr-gig-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-primary);
}

.gig-image {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.gig-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.gig-overlay {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 212, 255, 0.9);
  color: var(--bg-primary);
  padding: 0.5rem 1rem;
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.gig-price {
  font-size: 1rem;
  font-weight: 700;
}

.gig-content {
  padding: 1.5rem;
}

.gig-content h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.1rem;
  line-height: 1.4;
}

.gig-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.gig-rating .stars {
  font-size: 1rem;
  margin-bottom: 0;
}

.rating-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.gig-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.gig-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.feature-tag {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-size: 0.8rem;
  color: var(--accent-color);
  backdrop-filter: blur(10px);
}

.gig-btn {
  width: 100%;
  text-align: center;
  padding: 0.8rem 1.5rem;
  font-size: 0.9rem;
}

.fiverr-profile-cta {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 25px;
  padding: 3rem 2rem;
  text-align: center;
  backdrop-filter: blur(15px);
  position: relative;
  overflow: hidden;
}

.fiverr-profile-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(0, 212, 255, 0.1) 0%, 
    transparent 50%, 
    rgba(78, 205, 196, 0.1) 100%);
  border-radius: inherit;
  z-index: -1;
}

.profile-cta-content h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.profile-cta-content p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.1rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.profile-btn {
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
}

/* Contact Section */
#contact {
  position: relative;
}

#contact .container {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 2rem;
  position: relative;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
}

.contact-info {
  display: block;
  visibility: visible;
  opacity: 1;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

.contact-info h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  width: 100%;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
  width: 100%;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: 50px;
}

.contact-icon {
  font-size: 1.5rem;
  width: 40px;
  min-width: 40px;
  text-align: center;
  flex-shrink: 0;
}

.contact-item h4 {
  color: var(--primary-color);
  margin-bottom: 0.3rem;
}

.contact-item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: var(--primary-color);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 100%;
  position: relative;
}

.form-group {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

/* Contact form specific styles */
.contact-form .form-group input,
.contact-form .form-group textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  resize: none;
  box-sizing: border-box;
}

.contact-form .form-group textarea {
  white-space: pre-wrap;
  overflow-y: auto;
  overflow-x: hidden;
  resize: vertical;
  min-height: 120px;
}

.form-group textarea {
  white-space: pre-wrap;
  overflow-y: auto;
  overflow-x: hidden;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-secondary);
}

/* Animated Text Area and Input Containers */
.animated-textarea-container,
.animated-input-container {
  position: relative;
  min-height: 60px;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.animated-textarea-container {
  min-height: 120px;
}

.animated-textarea,
/* Contact form specific animated inputs */
.contact-form .animated-input {
  width: 100%;
  max-width: 100%;
  padding: 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  opacity: 1;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  letter-spacing: normal;
  text-align: left;
  vertical-align: top;
}

.contact-form .animated-textarea {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow-y: auto;
  overflow-x: hidden;
}

.contact-form button[type="submit"] {
  width: 100%;
  max-width: 200px;
  align-self: flex-start;
  margin-top: 0.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.contact-form button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.form-status {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.form-status.show {
  opacity: 1;
  transform: translateY(0);
}

.form-status.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.form-status.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.contact-form .animated-textarea:focus,
.contact-form .animated-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
  opacity: 1;
  color: rgba(255, 255, 255, 1);
}

/* Text Selection Styling */
.contact-form .animated-textarea::selection,
.contact-form .animated-input::selection {
  background: rgba(0, 212, 255, 0.8);
  color: var(--bg-primary);
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.4);
}

.floating-text-display {
  display: none;
}

.floating-char {
  display: inline;
  color: var(--text-primary);
  text-shadow: 0 2px 8px rgba(0, 212, 255, 0.15);
  opacity: 0;
  transition: all 0.3s ease;
  position: relative;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: normal;
  vertical-align: baseline;
}

.floating-char.entering {
  animation: floatIn 0.6s ease-out forwards;
}

.floating-char.exiting {
  animation: floatOut 0.4s ease-in forwards;
}

.floating-char.selected {
  background: rgba(0, 212, 255, 0.8);
  color: var(--bg-primary);
  text-shadow: 0 3px 12px rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  padding: 0 1px;
}

.floating-char:hover {
  color: var(--primary-color);
  transform: translateY(-2px) scale(1.1);
  text-shadow: 0 4px 10px rgba(0, 212, 255, 0.3);
}

.floating-char.space {
  display: inline;
  width: auto;
}

.floating-char.space::before {
  content: '\00A0'; /* Non-breaking space */
  display: inline;
}

.floating-char.newline {
  display: inline;
}

.floating-char.newline::after {
  content: '\A'; /* Line break */
  white-space: pre;
}

/* Different animation delays for staggered effect */
.floating-char:nth-child(1) { animation-delay: 0.05s; }
.floating-char:nth-child(2) { animation-delay: 0.1s; }
.floating-char:nth-child(3) { animation-delay: 0.15s; }
.floating-char:nth-child(4) { animation-delay: 0.2s; }
.floating-char:nth-child(5) { animation-delay: 0.25s; }
.floating-char:nth-child(6) { animation-delay: 0.3s; }
.floating-char:nth-child(7) { animation-delay: 0.35s; }
.floating-char:nth-child(8) { animation-delay: 0.4s; }
.floating-char:nth-child(9) { animation-delay: 0.45s; }
.floating-char:nth-child(10) { animation-delay: 0.5s; }

/* Continue pattern for more characters */
.floating-char:nth-child(n+11) { 
  animation-delay: 0.55s;
}

.floating-char:nth-child(n+21) { 
  animation-delay: 0.6s;
}

.floating-char:nth-child(n+31) { 
  animation-delay: 0.65s;
}

@keyframes floatIn {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
    filter: blur(2px);
  }
  60% {
    opacity: 0.8;
    transform: translateY(-2px) scale(1.05);
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
}

@keyframes floatOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
  50% {
    opacity: 0.5;
    transform: translateY(-5px) scale(0.95);
    filter: blur(1px);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px) scale(0.9);
    filter: blur(2px);
  }
}

/* Enhanced input animations */
.animated-input {
  font-family: 'Space Grotesk', sans-serif !important;
  font-weight: 400;
  letter-spacing: 0.5px;
  transition: all 0.4s ease;
}

.animated-input:focus {
  letter-spacing: 1px;
  font-weight: 500;
}

/* Selection highlighting for floating characters */
.floating-char.cursor-selection {
  background: linear-gradient(45deg, rgba(0, 212, 255, 0.9), rgba(78, 205, 196, 0.9));
  color: var(--bg-primary);
  text-shadow: 0 3px 15px rgba(255, 255, 255, 0.5);
  border-radius: 3px;
  padding: 1px 2px;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
  animation: pulseSelection 1s ease-in-out infinite;
}

@keyframes pulseSelection {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 212, 255, 1);
    transform: scale(1.05);
  }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.open {
  opacity: 1;
  visibility: visible;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.modal-content {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  backdrop-filter: blur(20px);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  opacity: 0;
}

.modal.open .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
  transition-delay: 0.05s;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  background: none;
  border: none;
  transform: scale(0.9);
  opacity: 0;
}

.modal.open .close-btn {
  transform: scale(1);
  opacity: 1;
  transition-delay: 0.1s;
}

.close-btn:hover {
  color: var(--primary-color);
  transform: scale(1.1);
}

/* Modal Content Animation */
.modal-content h3,
.modal-content p {
  transform: translateY(10px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.open .modal-content h3 {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.1s;
}

.modal.open .modal-content p {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.15s;
}

/* Project Modal */
.project-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.project-modal.open {
  opacity: 1;
  visibility: visible;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(15px);
}

.project-modal-content {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 25px;
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  backdrop-filter: blur(25px);
  transform: scale(0.95) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow-y: auto;
  opacity: 0;
}

.project-modal.open .project-modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
  transition-delay: 0.05s;
}

.project-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transform: scale(0.9);
  opacity: 0;
}

.project-modal.open .project-close-btn {
  transform: scale(1);
  opacity: 1;
  transition-delay: 0.1s;
}

.project-close-btn:hover {
  color: var(--primary-color);
  background: var(--primary-color);
  color: var(--bg-primary);
  transform: scale(1.1) rotate(0deg);
}

.project-modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem;
  overflow-y: auto;
  max-height: 90vh;
}

.project-image-section {
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-modal.open .project-image-section {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.1s;
}

.project-modal-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: var(--shadow-secondary);
  transform: scale(0.98);
  transition: transform 0.3s ease;
}

.project-modal.open .project-modal-img {
  transform: scale(1);
  transition-delay: 0.15s;
}

.project-details-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-modal.open .project-details-section {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.15s;
}

/* Staggered animation for project details elements */
.project-details-section > * {
  transform: translateY(10px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-modal.open .project-details-section > *:nth-child(1) {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.1s;
}

.project-modal.open .project-details-section > *:nth-child(2) {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.15s;
}

.project-modal.open .project-details-section > *:nth-child(3) {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.2s;
}

.project-modal.open .project-details-section > *:nth-child(4) {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.25s;
}

.project-modal.open .project-details-section > *:nth-child(5) {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.3s;
}

.project-description {
  color: var(--text-secondary);
  line-height: 1.7;
}

.project-features h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.project-features ul {
  list-style: none;
  padding: 0;
}

.project-features li {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.project-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.project-pricing {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
}

.price-section, .delivery-time {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.price-value {
  font-size: 2rem;
  color: var(--primary-color);
  font-weight: 900;
}

.delivery-value {
  color: var(--accent-color);
  font-weight: 600;
}

.project-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Order Modal */
.order-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(15px);
  z-index: 4000;
  opacity: 0;
  transition: all 0.8s ease;
  overflow: hidden;
}

.order-modal.open {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.order-modal-content {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 25px;
  width: 90%;
  max-width: 800px;
  min-width: 320px;
  max-height: 90vh;
  backdrop-filter: blur(25px);
  transform: scale(0.9);
  transition: transform 0.8s ease;
  position: relative;
  padding: 2.5rem;
  overflow-y: auto;
  box-sizing: border-box;
}

.order-modal.open .order-modal-content {
  transform: scale(1);
}

.order-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  background: none;
  border: none;
}

.order-close-btn:hover {
  color: var(--primary-color);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.order-form label {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  display: block;
  font-weight: 600;
}

.order-form input,
.order-form textarea,
.order-form select {
  width: 100%;
  padding: 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  font-size: 1rem;
  line-height: 1.5;
  min-height: 48px;
}

.order-form select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23ffffff' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  padding-right: 3rem;
  cursor: pointer;
}

.order-form select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 0.5rem;
  font-family: var(--font-body);
}

.order-form input:focus,
.order-form textarea:focus,
.order-form select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.order-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

/* Prevent background scrolling when modals are open */
body.modal-open {
  overflow: hidden;
}

/* Light Mode */
body.light-mode {
  --bg-primary: #f5f5f5;
  --bg-secondary: #ffffff;
  --text-primary: #333333;
  --text-secondary: #666666;
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(0, 0, 0, 0.1);
}

body.light-mode .space-background {
  background: 
    radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 107, 107, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(78, 205, 196, 0.05) 0%, transparent 50%),
    linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
}

body.light-mode section { 
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.light-mode .order-form select {
  background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23333333' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
}

body.light-mode .order-form select option {
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* Tablet Responsive Styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .order-modal-content {
    width: 85%;
    max-width: 700px;
    padding: 2rem;
  }
  
  #contact .container {
    max-width: 750px;
    padding: 3rem 2rem;
  }
  
  .contact-content {
    max-width: 700px;
    gap: 2.5rem;
  }
}

/* Desktop Responsive Styles */
@media (min-width: 1025px) {
  .order-modal-content {
    width: 80%;
    max-width: 900px;
    padding: 3rem;
  }
  
  #contact .container {
    max-width: 900px;
    padding: 4rem 2rem;
  }
  
  .contact-content {
    max-width: 800px;
    gap: 3rem;
  }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  /* Force content visible on mobile (fallback) */
  section { opacity: 1 !important; transform: none !important; animation: none !important; }

  /* Mobile Navigation */
  .hamburger {
    display: flex !important;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s ease;
  }
  
  
  .nav-menu li {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.4s ease;
  }
  
  .nav-menu.active li {
    opacity: 1;
    transform: translateX(0);
  }
  
  .nav-menu.active li:nth-child(1) { transition-delay: 0.1s; }
  .nav-menu.active li:nth-child(2) { transition-delay: 0.2s; }
  .nav-menu.active li:nth-child(3) { transition-delay: 0.3s; }
  .nav-menu.active li:nth-child(4) { transition-delay: 0.4s; }
  .nav-menu.active li:nth-child(5) { transition-delay: 0.5s; }
  .nav-menu.active li:nth-child(6) { transition-delay: 0.6s; }
  .nav-menu.active li:nth-child(7) { transition-delay: 0.7s; }
  
  .nav-link {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    border-radius: 25px;
    transition: all 0.3s ease;
  width: 100%;
  text-align: center;
  }
  
  .nav-link:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: scale(1.05);
  }

  /* Improve tap targets */
  .nav-menu li { width: 100%; }
  .nav-menu li a { display: block; }

  /* About Section Mobile */
  .about-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  
  .about-photo-section {
    order: -1; /* Show photo first on mobile */
  }
  
  .about-photo {
    width: 220px;
    height: 280px;
  }
  
  .stats-inline {
    padding: 0.6rem 1.2rem;
    border-radius: 40px;
  }
  
  .mini-text {
    font-size: 0.8rem;
  }
  
  .mini-icon {
    font-size: 0.9rem;
  }
  
  .stat-separator {
    margin: 0 0.6rem;
  }
  
  .order-modal-content {
    width: 95%;
    max-width: none;
    margin: 1rem;
    padding: 1.5rem;
    border-radius: 15px;
  }
  
  .order-form input,
  .order-form textarea,
  .order-form select {
    padding: 0.8rem;
    font-size: 16px; /* Prevents zoom on iOS */
    min-height: 44px;
  }
  
  .order-form label {
    font-size: 0.9rem;
  }
  /* Hide desktop menu on mobile and show as overlay when active */
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    margin: 0;
    padding: 6rem 2rem 3rem;
    background: linear-gradient(135deg, rgba(10,10,10,0.95), rgba(26,26,46,0.95));
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(0,212,255,0.2);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    list-style: none;
    z-index: 3500;
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  .nav-menu.active { right: 0; }
  .nav-menu li { width: 100%; text-align: center; opacity: 0; transform: translateX(50px); transition: all 0.4s ease; }
  .nav-menu.active li { opacity: 1; transform: translateX(0); }
  .nav-menu .nav-link { 
    display: block; 
    width: 100%; 
    padding: 1rem 2rem; 
    border-radius: 25px; 
    font-size: 1.2rem; 
    font-weight: 500; 
    color: var(--text-secondary); 
    text-decoration: none;
    transition: all 0.3s ease;
  }
  .nav-menu .nav-link:hover { 
    background: rgba(0,212,255,0.1); 
    color: var(--primary-color);
    transform: scale(1.05);
  }
  body.menu-open .hero-section { visibility:hidden; }
  .nav-menu li { opacity:0; transform:none; transition:opacity .4s ease !important; }
  .nav-menu.active li { opacity:1; }
  .nav-menu .nav-link { color: var(--primary-color); font-weight:600; letter-spacing:.5px; font-size:1.25rem; }
  .nav-menu .nav-link:hover { background: rgba(0,212,255,0.12); color: var(--accent-color); }

  /* Overlay behind mobile menu */
  #nav-overlay[hidden] { display: none !important; }
  #nav-overlay {
    position: fixed; inset:0; background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px); z-index:1990; opacity:0; transition:opacity .3s ease; pointer-events:none;
  }
  #nav-overlay.active { opacity:1; pointer-events:auto; }
  
  /* Hero Section Mobile Fixes */
  .hero-section {
    padding-top: 100px; /* Add padding to account for fixed navbar */
    min-height: calc(100vh - 100px);
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .stats-container {
    gap: 1.5rem;
  }
  
  section {
    margin: 1rem;
    padding: 2rem 1.5rem;
  }
  
  /* Contact Section Mobile */
  #contact .container {
    padding: 2rem 1rem;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 100%;
    padding: 0;
  }
  
  .contact-info {
    text-align: center;
    margin-bottom: 1rem;
  }
  
  .contact-info h3 {
    font-size: 1.3rem;
  }
  
  .contact-details {
    gap: 1rem;
  }
  
  .contact-item {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--glass-bg);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
  }
  
  .contact-icon {
    font-size: 1.8rem;
    width: auto;
    min-width: auto;
    margin-bottom: 0.5rem;
  }
  
  .contact-form {
    width: 100%;
    max-width: 100%;
  }
  
  .contact-form .form-group {
    width: 100%;
  }
  
  .contact-form .form-group input,
  .contact-form .form-group textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.8rem;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .contact-form .animated-input,
  .contact-form .animated-textarea {
    width: 100%;
    max-width: 100%;
    font-size: 16px; /* Prevents zoom on iOS */
    min-height: 44px;
  }
  
  .contact-form .animated-textarea {
    min-height: 120px;
  }
  
  /* Ensure animated containers are responsive on mobile */
  .animated-textarea-container,
  .animated-input-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  
  .services-grid,
  .portfolio-grid,
  .testimonials-grid,
  .fiverr-grid {
    grid-template-columns: 1fr;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  /* Modal Responsive */
  .project-modal-body {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .project-actions {
    flex-direction: column;
  }
  
  .order-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  /* Small Mobile About Photo */
  .about-photo {
    width: 200px;
    height: 260px;
  }
  
  .stats-inline {
    padding: 0.5rem 1rem;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
  }
  
  .stat-mini {
    gap: 0.3rem;
  }
  
  .mini-text {
    font-size: 0.75rem;
  }
  
  .mini-icon {
    font-size: 0.85rem;
  }
  
  .stat-separator {
    display: none; /* Hide separators on very small screens */
  }
  
  .nav-menu {
    width: 250px;
  }
  
  /* Ensure hamburger is visible on small screens */
  .hamburger {
    display: flex !important;
  }
  
  .hero-content {
    padding: 1rem;
  }
  
  /* Additional Hero Section Mobile Fix for Small Screens */
  .hero-section {
    padding-top: 120px; /* Increase padding for smaller screens */
    min-height: calc(100vh - 120px);
  }
  
  .stats-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  section {
    margin: 0.5rem;
    padding: 1.5rem 1rem;
  }
  
  .project-modal-body {
    padding: 1rem;
  }
  
  /* Contact Section for Very Small Screens */
  #contact .container {
    padding: 1.5rem 0.5rem;
  }
  
  .contact-content {
    gap: 1.5rem;
    margin: 0;
    padding: 0 0.5rem;
  }
  
  .contact-form .form-group {
    margin-bottom: 1rem;
  }
  
  .animated-textarea-container,
  .animated-input-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
  }
  
  .contact-form .animated-input,
  .contact-form .animated-textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.7rem;
    font-size: 16px;
    border-radius: 8px;
  }
}

/* ===============================================
   ENHANCED SMOOTH SCROLLING - NO CONFLICTS
   =============================================== */

/* Enhanced smooth scrolling - DISABLED FOR MODAL TESTING */
html {
  scroll-behavior: auto !important; /* DISABLED: was smooth !important */
  scroll-padding-top: 80px;
}

body {
  scroll-behavior: auto !important; /* DISABLED: was smooth !important */
}

/* Gaming-quality font rendering */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Enhanced card animations */
.service-card, .portfolio-item, .blender-project {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  backface-visibility: hidden;
}

.service-card:hover, .portfolio-item:hover, .blender-project:hover {
  transform: translateY(-8px) scale(1.02);
  transition-duration: 0.3s;
  box-shadow: 
    0 20px 60px rgba(0, 212, 255, 0.2),
    0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Smooth button interactions */
.btn, button, .cta-button {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  backface-visibility: hidden;
}

.btn:hover, button:hover, .cta-button:hover {
  transform: translateY(-2px);
  transition-duration: 0.2s;
  box-shadow: 
    0 10px 30px rgba(0, 212, 255, 0.3),
    0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:active, button:active, .cta-button:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

/* Smooth modal transitions */
.modal {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Smooth form interactions */
input, textarea, select {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

input:focus, textarea:focus, select:focus {
  transform: scale(1.02);
  transition-duration: 0.2s;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .service-card:hover, .portfolio-item:hover {
    transform: none;
  }
  
  .btn:hover, button:hover {
    transform: none;
  }
  
  input:focus, textarea:focus {
    transform: scale(1.01);
  }
}

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