/* ============================================
   Portfolio Project Showcase - Shared Styles
   2D/3D Animations & Modern Design System
   ============================================ */

/* CSS Variables */
:root {
  --neon-cyan: #00ffff;
  --neon-purple: #a855f7;
  --neon-pink: #ec4899;
  --neon-blue: #3b82f6;
  --surface-dark: #0a0a0f;
  --surface-glass: rgba(255, 255, 255, 0.05);
  --surface-glass-hover: rgba(255, 255, 255, 0.1);
  --text-primary: #f5f5f5;
  --text-secondary: #9ca3af;
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-hero: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
}

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

body {
  background: var(--surface-dark);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================
   Background Animations
   ============================================ */

.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--gradient-hero);
  overflow: hidden;
}

.animated-bg::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(56, 189, 248, 0.2) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
}

/* Floating Particles */
.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--neon-cyan);
  border-radius: 50%;
  opacity: 0.6;
  animation: particleFloat 15s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 12s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 15s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 18s; }
.particle:nth-child(4) { left: 40%; animation-delay: 1s; animation-duration: 14s; }
.particle:nth-child(5) { left: 50%; animation-delay: 3s; animation-duration: 16s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; animation-duration: 13s; }
.particle:nth-child(7) { left: 70%; animation-delay: 2s; animation-duration: 17s; }
.particle:nth-child(8) { left: 80%; animation-delay: 4s; animation-duration: 11s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1s; animation-duration: 19s; }

/* ============================================
   2D Keyframe Animations
   ============================================ */

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(2%, 2%) rotate(1deg); }
  50% { transform: translate(-1%, 3%) rotate(-1deg); }
  75% { transform: translate(3%, -2%) rotate(0.5deg); }
}

@keyframes particleFloat {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-100vh) scale(1); opacity: 0; }
}

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 255, 0.3); }
  50% { box-shadow: 0 0 40px rgba(0, 255, 255, 0.6); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  0%, 50% { border-color: var(--neon-cyan); }
  51%, 100% { border-color: transparent; }
}

@keyframes slideInFromBottom {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes glow {
  0%, 100% { filter: drop-shadow(0 0 10px var(--neon-cyan)); }
  50% { filter: drop-shadow(0 0 20px var(--neon-purple)); }
}

/* ============================================
   3D Animations
   ============================================ */

@keyframes rotate3d {
  0% { transform: perspective(1000px) rotateY(0deg); }
  100% { transform: perspective(1000px) rotateY(360deg); }
}

@keyframes tilt3d {
  0%, 100% { transform: perspective(1000px) rotateX(0deg) rotateY(0deg); }
  25% { transform: perspective(1000px) rotateX(2deg) rotateY(-2deg); }
  50% { transform: perspective(1000px) rotateX(-2deg) rotateY(2deg); }
  75% { transform: perspective(1000px) rotateX(1deg) rotateY(-1deg); }
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0) rotateX(0deg); }
  50% { transform: translateY(-10px) rotateX(2deg); }
}

/* ============================================
   Layout Components
   ============================================ */

.page-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation */
.nav-back {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-back:hover {
  background: var(--surface-glass-hover);
  transform: translateX(-5px);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.nav-back svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.nav-back:hover svg {
  transform: translateX(-3px);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
}

.hero-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 2rem;
  animation: floatCard 4s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.5));
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, var(--neon-cyan) 50%, var(--neon-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.8;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Tech Stack Pills */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.tech-pill {
  padding: 0.5rem 1.25rem;
  background: var(--surface-glass);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--neon-cyan);
  transition: all 0.3s ease;
  cursor: default;
}

.tech-pill:hover {
  background: rgba(0, 255, 255, 0.1);
  border-color: var(--neon-cyan);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 255, 255, 0.2);
}

/* ============================================
   Screenshot Carousel
   ============================================ */

.carousel-section {
  padding: 4rem 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

.carousel-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  perspective: 1000px;
}

.carousel-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.carousel-slides {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  min-width: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
}

.slide-description {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
  border-radius: 0 0 20px 20px;
}

.slide-number {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--neon-cyan);
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}

.slide-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.slide-text {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Carousel Controls */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.carousel-btn:hover {
  background: rgba(0, 255, 255, 0.2);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.carousel-btn.prev { left: -25px; }
.carousel-btn.next { right: -25px; }

/* Carousel Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan);
  transform: scale(1.2);
}

.carousel-dot:hover:not(.active) {
  background: rgba(255, 255, 255, 0.4);
}

/* ============================================
   Cards & Glassmorphism
   ============================================ */

.glass-card {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.4s ease;
}

.glass-card:hover {
  background: var(--surface-glass-hover);
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* 3D Tilt Card Effect */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.tilt-card:hover {
  animation: tilt3d 3s ease-in-out infinite;
}

/* ============================================
   Footer
   ============================================ */

.page-footer {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.page-footer a {
  color: var(--neon-cyan);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-footer a:hover {
  color: var(--neon-purple);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
  .hero {
    padding: 5rem 1rem 3rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .carousel-btn.prev { left: 10px; }
  .carousel-btn.next { right: 10px; }

  .nav-back {
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .slide-title {
    font-size: 1.2rem;
  }

  .slide-text {
    font-size: 0.9rem;
  }
}

/* ============================================
   Utility Classes
   ============================================ */

.fade-in-up {
  animation: fadeInUp 0.8s ease-out both;
}

.fade-in-left {
  animation: fadeInLeft 0.8s ease-out both;
}

.fade-in-right {
  animation: fadeInRight 0.8s ease-out both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

.glow-text {
  text-shadow: 0 0 10px currentColor;
}

.glow-box {
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}
