/* ==========================================================================
   PORTFOLIO STYLES - DARK TECH LUXURY & CREATIVE AESTHETICS
   ========================================================================== */

:root {
  --bg-primary: #0b0d13;
  --bg-secondary: #131722;
  --bg-card: rgba(22, 27, 39, 0.7);
  --bg-card-hover: rgba(30, 37, 54, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(56, 239, 125, 0.3);
  
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-mint: #38ef7d;
  --accent-cyan: #00c6ff;
  --accent-orange: #ff9900;
  --accent-purple: #8a2be2;
  --accent-pink: #ff2a6d;
  --accent-blue: #0070f3;
  
  --ps-blue: #001e36;
  --ps-accent: #31a8ff;
  --ai-orange: #330000;
  --ai-accent: #ff9a00;
  --id-pink: #49021f;
  --id-accent: #ff3366;
  --figma-accent: #f24e1e;
  --blender-accent: #e87d0d;

  --glow-mint: rgba(56, 239, 125, 0.25);
  --glow-cyan: rgba(0, 198, 255, 0.25);
  --glow-orange: rgba(255, 153, 0, 0.25);
  
  --font-arabic: 'IBM Plex Sans Arabic', 'Cairo', sans-serif;
  --font-latin: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* Light Mode Overrides */
html.light {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-highlight: rgba(16, 185, 129, 0.3);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --glow-mint: rgba(16, 185, 129, 0.15);
  --glow-cyan: rgba(6, 182, 212, 0.15);
  --glow-orange: rgba(245, 158, 11, 0.15);
}

/* Base resets & typography */
* {
  font-family: var(--font-arabic);
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ambient glow backgrounds */
.ambient-glow-1 {
  position: absolute;
  top: -10%;
  left: -5%;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 239, 125, 0.12) 0%, rgba(0, 198, 255, 0.05) 50%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.ambient-glow-2 {
  position: absolute;
  top: 25%;
  right: -10%;
  width: 55vw;
  height: 55vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 153, 0, 0.08) 0%, rgba(138, 43, 226, 0.06) 50%, transparent 70%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

.ambient-glow-3 {
  position: absolute;
  bottom: 10%;
  left: 20%;
  width: 45vw;
  height: 45vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 198, 255, 0.08) 0%, rgba(56, 239, 125, 0.04) 60%, transparent 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

/* Glassmorphism Classes */
.glass-nav {
  background: rgba(11, 13, 19, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

html.light .glass-nav {
  background: rgba(255, 255, 255, 0.85);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

html.light .glass-card {
  box-shadow: 0 8px 30px 0 rgba(0, 0, 0, 0.04);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.4);
}

html.light .glass-card:hover {
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.08);
}

/* Software Badges (Ps, Ai, Id, Figma, Blender) */
.badge-ps {
  background: #001e36;
  color: #31a8ff;
  border: 1px solid rgba(49, 168, 255, 0.35);
  box-shadow: 0 8px 25px -4px rgba(49, 168, 255, 0.3);
}

.badge-ai {
  background: #330000;
  color: #ff9a00;
  border: 1px solid rgba(255, 154, 0, 0.35);
  box-shadow: 0 8px 25px -4px rgba(255, 154, 0, 0.3);
}

.badge-id {
  background: #49021f;
  color: #ff3366;
  border: 1px solid rgba(255, 51, 102, 0.35);
  box-shadow: 0 8px 25px -4px rgba(255, 51, 102, 0.3);
}

.badge-figma {
  background: #1e1e1e;
  color: #f24e1e;
  border: 1px solid rgba(242, 78, 30, 0.35);
  box-shadow: 0 8px 25px -4px rgba(242, 78, 30, 0.3);
}

.badge-blender {
  background: #201710;
  color: #e87d0d;
  border: 1px solid rgba(232, 125, 13, 0.35);
  box-shadow: 0 8px 25px -4px rgba(232, 125, 13, 0.3);
}

.badge-flutter {
  background: #02203c;
  color: #54c5f8;
  border: 1px solid rgba(84, 197, 248, 0.35);
  box-shadow: 0 8px 25px -4px rgba(84, 197, 248, 0.3);
}

.badge-desktop {
  background: #1e102f;
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.35);
  box-shadow: 0 8px 25px -4px rgba(192, 132, 252, 0.3);
}

.badge-mobile {
  background: #002b1b;
  color: #38ef7d;
  border: 1px solid rgba(56, 239, 125, 0.35);
  box-shadow: 0 8px 25px -4px rgba(56, 239, 125, 0.3);
}

/* Floating Animations */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}

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

@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.animate-float-1 {
  animation: floatSlow 5s ease-in-out infinite;
}

.animate-float-2 {
  animation: floatReverse 6s ease-in-out infinite 0.5s;
}

.animate-float-3 {
  animation: floatSlow 7s ease-in-out infinite 1s;
}

.animate-pulse-glow {
  animation: pulseGlow 4s ease-in-out infinite;
}

/* Glow Buttons & Elements */
.btn-glow-primary {
  background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
  color: #0b0d13;
  box-shadow: 0 0 25px rgba(56, 239, 125, 0.4);
  transition: all 0.3s ease;
}

.btn-glow-primary:hover {
  box-shadow: 0 0 35px rgba(56, 239, 125, 0.65);
  transform: translateY(-2px);
}

.btn-glow-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

html.light .btn-glow-secondary {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}

.btn-glow-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-mint);
  color: var(--accent-mint);
  transform: translateY(-2px);
}

/* Before / After Slider Component */
.before-after-container {
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  cursor: col-resize;
  border-radius: 1rem;
}

.before-after-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.before-after-overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.before-after-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.8), 0 0 20px rgba(56, 239, 125, 0.6);
  cursor: col-resize;
  z-index: 10;
}

.before-after-handle-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: #0b0d13;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-mint);
}

/* Infinite Marquee Ticker */
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  display: flex;
  width: max-content;
  animation: marquee 25s linear infinite;
}

.animate-marquee:hover {
  animation-play-state: paused;
}

/* Filter Pills Active State */
.filter-pill.active {
  background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
  color: #0b0d13;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(56, 239, 125, 0.35);
  border-color: transparent;
}

/* ==========================================================================
   RESPONSIVE OPTIMIZATIONS (MOBILE, TABLET, LAPTOP & 4K)
   ========================================================================== */

/* Touch-action and Smooth Momentum Scrolling */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

/* Prevent auto-zoom on mobile inputs */
input, select, textarea {
  font-size: 16px !important;
}

/* Mobile Screens (Phones < 640px) */
@media (max-width: 640px) {
  .hero-title-responsive {
    font-size: clamp(2rem, 8vw, 2.75rem);
    line-height: 1.2;
  }
  
  .floating-badge {
    padding: 0.5rem !important;
    border-radius: 0.875rem !important;
  }

  .floating-badge .badge-icon-box {
    width: 2.25rem !important;
    height: 2.25rem !important;
    font-size: 0.875rem !important;
  }

  .verified-metric-badge {
    padding: 0.5rem 0.75rem !important;
    border-radius: 0.875rem !important;
  }
  
  .verified-metric-badge .metric-icon {
    width: 2rem !important;
    height: 2rem !important;
  }

  .verified-metric-badge .metric-text {
    font-size: 0.75rem !important;
  }

  .glass-card {
    padding: 1.25rem !important;
    border-radius: 1.25rem !important;
  }

  .before-after-handle-button {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }
}

/* Tablet Screens (641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
  .hero-title-responsive {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
  }

  .glass-card {
    padding: 1.5rem;
  }
}

/* Laptop & Desktop Screens (> 1024px) */
@media (min-width: 1025px) {
  .hero-title-responsive {
    font-size: clamp(3rem, 5vw, 4.5rem);
  }
}

/* Safe Area Insets for Modern Mobile Devices (iPhone notch & navigation bars) */
@supports (padding: max(0px)) {
  header {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
  
  footer {
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }
}

