/* balance-code — CSS Design System & Tokens (Tile.pt Inspired Theme) */
/* المستند بالكامل إلى وثيقة التصميم الفنية الراقية المستوحاة من Tile.pt */

:root {
  /* Surface colors (Tile.pt Clean Palette) */
  --color-surface: #ffffff;
  --color-surface-dim: #f5f5f7;
  --color-surface-bright: #ffffff;
  --color-surface-container-lowest: #ffffff;
  --color-surface-container-low: #fafafb;
  --color-surface-container: #f5f5f7;
  --color-surface-container-high: #eaeaea;
  --color-surface-container-highest: #dddddd;
  --color-on-surface: #000000;
  --color-on-surface-variant: #7f7f7f;
  --color-inverse-surface: #111111;
  --color-inverse-on-surface: #ffffff;
  --color-outline: #7f7f7f;
  --color-outline-variant: #eaeaea;
  --color-surface-tint: #0037ff;

  /* Primary (Vibrant Logo Gradient-aligned Purple/Indigo) */
  --color-primary: #6366F1;
  --color-primary-light: #A855F7;
  --color-accent: #3B82F6;
  --color-primary-rgb: 99, 102, 241;
  --color-primary-light-rgb: 168, 85, 247;
  --color-accent-rgb: 59, 130, 246;

  --color-on-primary: #ffffff;
  --color-primary-container: #eef2ff;
  --color-on-primary-container: #6366F1;
  --color-inverse-primary: #c7d2fe;

  /* UI Token mappings */
  --color-text-primary: #111111;
  --color-text-secondary: #7f7f7f;
  --color-bg-card: #ffffff;
  --color-border: rgba(99, 102, 241, 0.08);

  --color-tag-glass-bg: rgba(0, 0, 0, 0.45);
  --color-tag-glass-border: rgba(255, 255, 255, 0.15);
  --color-tag-glass-text: #ffffff;

  /* Secondary (Pure Black / Tech Accent) */
  --color-secondary: #000000;
  --color-on-secondary: #ffffff;
  --color-secondary-container: #eaeaea;
  --color-on-secondary-container: #000000;

  /* Tertiary (Indigo/Blue-Gray Accent) */
  --color-tertiary: #0c1a30;
  --color-on-tertiary: #ffffff;
  --color-tertiary-container: #f7f3ff;
  --color-on-tertiary-container: #6366F1;

  /* Error */
  --color-error: #ff3333;
  --color-on-error: #ffffff;
  --color-error-container: #ffeaea;
  --color-on-error-container: #ff3333;

  /* Brand Gradients (Blue -> Purple -> Magenta) */
  --gradient-brand: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  --gradient-cta: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  --gradient-glow: 0 10px 45px rgba(var(--color-primary-rgb), 0.08);

  /* Glassmorphism Tokens */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-bg-strong: rgba(255, 255, 255, 0.9);
  --glass-bg-subtle: rgba(255, 255, 255, 0.45);
  --glass-border: rgba(140, 0, 255, 0.08);
  --glass-border-subtle: rgba(0, 0, 0, 0.05);
  --glass-blur: 16px;
  --glass-blur-strong: 28px;

  --glow-electric: 0 0 25px rgba(140, 0, 255, 0.25);
  --gradient-glass-border: linear-gradient(135deg, rgba(255,255,255,0.7), rgba(140, 0, 255, 0.05));
  --gradient-shimmer: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);

  /* Spacing system (8px Base Grid) */
  --space-unit: 8px;
  --space-gutter: 24px;
  --space-margin-desktop: 80px;
  --space-margin-mobile: 20px;
  --space-container-max: 1280px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* Border radius system */
  --radius-sm: 0.25rem;   /* 4px */
  --radius-default: 0.375rem; /* 6px - sharp clean buttons like tile.pt */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.625rem;  /* 10px - tile.pt standard nav/cards */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;

  /* Typography DM Sans & Playfair Display fallback for editorial look */
  --font-primary: 'IBM Plex Sans Arabic', 'Cairo', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', monospace;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.28s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-slow: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Base resets & layout settings */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-surface);
  color: var(--color-on-surface);
  font-family: var(--font-primary);
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

html[dir="ltr"] body {
  direction: ltr;
  text-align: left;
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-secondary);
  margin-top: 0;
  font-weight: 500; /* Medium clean weight like Vercel/Tile */
  line-height: 1.15;
  letter-spacing: -0.02em;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

a:hover {
  color: #0022aa;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-surface-dim);
}
::-webkit-scrollbar-thumb {
  background: var(--color-outline-variant);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* ═══════════════════════════════════════════════════════════════
   3D / GLASS / ANIMATION UTILITIES
   ═══════════════════════════════════════════════════════════════ */

/* Three.js Canvas Container */
.three-canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.three-canvas-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.three-canvas-container.three-fallback {
  background: var(--color-surface-dim);
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

.glass-card:hover {
  background: var(--glass-bg-strong);
  border-color: rgba(140, 0, 255, 0.18);
  box-shadow: var(--gradient-glow);
  transform: translateY(-2px);
}

.glass-card-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur-strong));
  -webkit-backdrop-filter: blur(var(--glass-blur-strong));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

/* Tilt Card */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform var(--transition-normal);
}

/* Shimmer Button */
.shimmer-btn {
  position: relative;
  overflow: hidden;
}

.shimmer-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-shimmer);
  transition: left 0.4s ease;
}

.shimmer-btn:hover::after {
  left: 100%;
}

/* Scroll Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  right: 0;
  width: 0;
  height: 3px;
  background: var(--color-primary);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* Navbar scrolled state */
.navbar-scrolled {
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
}

/* Active tab sliding pill indicator (GSAP managed) */
.nav-slider-pill {
  position: absolute;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  z-index: -1;
  transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Service card 3D mini container & flat icon overlays */
.service-icon-wrapper, .coverflow-icon-wrapper {
  position: relative;
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  perspective: 800px;
}

.coverflow-icon-wrapper {
  margin-bottom: 0;
}

.service-three-mini {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin-bottom: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  z-index: 1;
}

.service-three-mini canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.icon-inner-fa, .coverflow-card-icon {
  position: relative;
  z-index: 2;
  font-size: 20px;
  color: var(--color-primary);
  pointer-events: none;
  background: none !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  border: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transform: translateZ(10px); /* 3D pop effect */
  transition: color 0.3s ease, transform 0.3s ease;
}

.card-service:hover .icon-inner-fa, .coverflow-card:hover .coverflow-card-icon {
  color: #ffffff; /* Contrast switch inside active/hover state */
  transform: translateZ(18px) scale(1.1);
}

/* ═══════════════════════════════════════════════════════════════
   PREMIUM CUSTOM CURSOR (TILE.PT STYLE - 3D ARROW)
   ═══════════════════════════════════════════════════════════════ */
@media (pointer: fine) and (min-width: 992px) {
  body.has-custom-cursor {
    cursor: default;
  }
  
  a, button, [role="button"], .btn, select, .portfolio-filter-btn {
    cursor: pointer !important;
  }

  input, textarea {
    cursor: text !important;
  }

  .custom-cursor {
    width: 24px;
    height: 24px;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 999999;
    transform: translate3d(-50%, -50%, 0);
    opacity: 0;
    transition: opacity 0.25s ease, width 0.35s cubic-bezier(0.16, 1, 0.3, 1), height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
    will-change: transform;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .custom-cursor-arrow {
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 2L20 9L12 12L9 20L4 2Z' fill='%238C00FF' stroke='%23440088' stroke-width='1.5'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    filter: drop-shadow(2px 2px 0px #310061);
    transform-origin: center center;
    transition: transform 0.1s ease-out, background-image 0.2s ease, filter 0.2s ease;
  }

  /* White cursor for dark backgrounds */
  .custom-cursor.white-cursor .custom-cursor-arrow {
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 2L20 9L12 12L9 20L4 2Z' fill='%23FFFFFF' stroke='%238C00FF' stroke-width='1.5'/%3E%3C/svg%3E");
    filter: drop-shadow(2px 2px 0px rgba(140, 0, 255, 0.4));
  }

  /* Project Card Hover State (Circular blue VIEW badge) */
  .custom-cursor.project-hover {
    width: 80px;
    height: 80px;
  }

  .custom-cursor.project-hover .custom-cursor-arrow {
    background-color: var(--color-primary);
    background-image: none;
    border-radius: 50%;
    filter: var(--glow-electric);
    transform: scale(1) rotate(0deg) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(140, 0, 255, 0.25);
  }

  .custom-cursor.project-hover .custom-cursor-arrow::after {
    content: 'شاهد';
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-primary);
    letter-spacing: 0.5px;
  }

  html[lang="en"] .custom-cursor.project-hover .custom-cursor-arrow::after,
  html[dir="ltr"] .custom-cursor.project-hover .custom-cursor-arrow::after,
  [lang="en"] .custom-cursor.project-hover .custom-cursor-arrow::after,
  [dir="ltr"] .custom-cursor.project-hover .custom-cursor-arrow::after {
    content: 'VIEW';
  }

  .custom-cursor-follower {
    width: 24px;
    height: 24px;
    border: 1px solid rgba(140, 0, 255, 0.25);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 999998;
    transform: translate3d(-50%, -50%, 0);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, background-color 0.3s ease;
    will-change: transform;
  }

  .custom-cursor-follower.hovered {
    width: 44px;
    height: 44px;
    border-color: var(--color-primary);
    background-color: rgba(140, 0, 255, 0.04);
  }

  .custom-cursor-follower.project-hover {
    width: 0;
    height: 0;
    border-color: transparent;
    background-color: transparent;
  }
}

/* ═══════════════════════════════════════════════════════════════
   PREMIUM SPLASH SCREEN (LOADING SCREEN) WITH ADVANCED EFFECTS
   ═══════════════════════════════════════════════════════════════ */
.splash-screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000000;
  background: radial-gradient(circle at 50% 50%, #0d0a21 0%, #05030f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  direction: ltr;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

.splash-particles-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.splash-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(168, 85, 247, 0.4);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.8), 0 0 20px rgba(99, 102, 241, 0.6);
  pointer-events: none;
}

.splash-ripples-container {
  position: absolute;
  width: 500px;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.ripple-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(99, 102, 241, 0.08);
  width: 100px;
  height: 100px;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.splash-content {
  position: relative;
  z-index: 3;
  text-align: center;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.splash-logo-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
}

.splash-logo-glow {
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, rgba(99, 102, 241, 0.15) 50%, rgba(99, 102, 241, 0) 70%);
  filter: blur(15px);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}

.splash-logo-container {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.splash-logo-container img {
  max-height: 48px;
  width: auto;
}

.splash-circular-svg {
  position: absolute;
  inset: 0;
  width: 140px;
  height: 140px;
  transform: rotate(-90deg);
  z-index: 1;
}

.circular-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.03);
  stroke-width: 2px;
}

.circular-fill {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 2px;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  stroke-linecap: round;
}

.splash-text {
  font-family: 'Cairo', var(--font-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 24px;
  margin-bottom: var(--space-1);
  letter-spacing: 0.5px;
  opacity: 0;
  transform: translateY(12px);
  text-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.splash-tagline {
  font-family: 'Cairo', var(--font-primary);
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  font-size: 13.5px;
  letter-spacing: 0.2px;
}

.splash-skip-prompt {
  font-family: 'Cairo', var(--font-primary);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  margin-top: var(--space-8);
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.01);
  transition: all 0.3s ease;
}

.splash-skip-prompt:hover {
  color: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
}

/* ═══════════════════════════════════════════════════════════════
   3D OVERLAPPING COVERFLOW SLIDER (SPOTGOV STYLE)
   ═══════════════════════════════════════════════════════════════ */
.coverflow-section {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  padding: var(--space-20) 0;
}

.coverflow-viewport {
  position: relative;
  width: 100%;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1500px;
  transform-style: preserve-3d;
  padding: var(--space-6) 0;
}

.coverflow-wrapper {
  position: relative;
  width: 100%;
  max-width: 1100px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}

.coverflow-card {
  position: absolute;
  width: 310px;
  height: 370px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(99, 102, 241, 0.22);
  box-shadow: 0 15px 35px rgba(0, 17, 38, 0.08);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.65s ease, border-color 0.65s ease, background-color 0.3s ease;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  user-select: none;
  z-index: 1;
  text-align: right;
}

.coverflow-card.active-card {
  z-index: 10;
  border: 2px solid rgba(79, 70, 229, 0.65) !important;
  box-shadow: 0 20px 50px rgba(79, 70, 229, 0.35), 0 0 35px rgba(124, 58, 237, 0.45) !important;
  background: #ffffff;
}

.coverflow-card.active-card:hover {
  transform: scale(1.04) translateY(-8px) !important;
  box-shadow: 0 25px 65px rgba(79, 70, 229, 0.45), 0 0 45px rgba(124, 58, 237, 0.6) !important;
  border-color: rgba(67, 56, 202, 0.85) !important;
}

/* Pulsing Circle CTA Button inside Coverflow footer */
.coverflow-circle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.55);
  animation: circleBtnPulse 1.8s infinite;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes circleBtnPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.6);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(99, 102, 241, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

.coverflow-card:hover .coverflow-circle-btn {
  transform: scale(1.18);
  background: #ff007c; /* Shift to glowing brand magenta on hover */
}

.coverflow-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  width: 100%;
}

.coverflow-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(var(--color-primary-rgb), 0.08);
  border: 1px solid rgba(var(--color-primary-rgb), 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--color-primary);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.coverflow-card.active-card .coverflow-card-icon {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 0 12px rgba(var(--color-primary-light-rgb), 0.35);
}

.coverflow-card-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(var(--color-primary-rgb), 0.05);
  color: var(--color-primary);
  border: 1px solid rgba(var(--color-primary-rgb), 0.1);
}

.coverflow-card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-bottom: 16px;
}

.coverflow-card-title {
  font-size: 19px;
  font-weight: 700;
  color: #111111;
  margin-bottom: 16px;
}

.coverflow-card-desc {
  font-size: 13.5px;
  color: var(--color-on-surface-variant);
  line-height: 1.85;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 75px;
}

.coverflow-card-footer {
  border-top: 1px solid rgba(0, 55, 255, 0.08);
  padding-top: var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.coverflow-controls {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.coverflow-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(140, 0, 255, 0.15);
  background: #ffffff;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.coverflow-btn:hover {
  background: var(--color-primary);
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--glow-electric);
}

/* ═══════════════════════════════════════════════════════════════
   PORTFOLIO COVERFLOW SLIDER & DETAILS STYLING
   ═══════════════════════════════════════════════════════════════ */
.coverflow-portfolio-viewport {
  position: relative;
  width: 100%;
  height: 490px;
  margin: var(--space-8) auto 0;
  overflow: hidden;
  perspective: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}

.coverflow-portfolio-card {
  position: absolute;
  width: 340px;
  height: 440px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(99, 102, 241, 0.08);
  box-shadow: 0 20px 45px rgba(0, 17, 38, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.65s ease, border-color 0.65s ease;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  user-select: none;
  z-index: 1;
  text-align: right;
}

.coverflow-portfolio-card.active-card {
  z-index: 10;
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 30px 70px rgba(99, 102, 241, 0.15), var(--glow-electric);
}

.coverflow-portfolio-card.active-card:hover {
  transform: scale(1.04) translateY(-8px) !important;
  box-shadow: 0 30px 70px rgba(99, 102, 241, 0.22), var(--glow-electric) !important;
  border-color: rgba(99, 102, 241, 0.45) !important;
}

.coverflow-portfolio-card .card-image {
  position: relative;
  height: 200px;
  width: 100%;
  overflow: hidden;
  transform-style: preserve-3d;
}

.coverflow-portfolio-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.coverflow-portfolio-card:hover .card-image img {
  transform: scale(1.06);
}

.coverflow-portfolio-card .card-body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.coverflow-portfolio-card .project-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(140, 0, 255, 0.05);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-2);
  border: 1px solid rgba(140, 0, 255, 0.1);
  align-self: flex-start;
}

.coverflow-portfolio-card .project-title {
  font-size: 18px;
  font-weight: 700;
  color: #111111;
  margin-bottom: var(--space-2);
}

.coverflow-portfolio-card .project-desc {
  font-size: 13px;
  color: var(--color-on-surface-variant);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sideways scroll coding parallax layers */
.coverflow-portfolio-section {
  position: relative;
  overflow: hidden !important;
  padding-top: 80px !important;
  padding-bottom: 100px !important;
  background: radial-gradient(circle at 50% 100%, rgba(var(--color-primary-rgb), 0.04) 0%, #ffffff 100%);
}

.space-journey-wrapper .coverflow-portfolio-section {
  background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.03) 0%, rgba(var(--color-primary-light-rgb), 0.03) 100%) !important;
  padding-bottom: 120px !important;
}

.scroll-parallax-code-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.045;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.scroll-parallax-code-row {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 80px;
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-primary);
  letter-spacing: 5px;
  margin: var(--space-6) 0;
}

.scroll-parallax-code-row span {
  display: inline-block;
  will-change: transform;
}

.scroll-parallax-code-row.dir-left span {
  animation: marqueeLeft 45s linear infinite;
}

.scroll-parallax-code-row.dir-right span {
  animation: marqueeRight 45s linear infinite;
}

@keyframes marqueeLeft {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes marqueeRight {
  0% { transform: translate3d(-50%, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* Portfolio controls & indicators styling overrides */
.coverflow-portfolio-controls-wrapper {
  z-index: 5;
  position: relative;
}

.coverflow-portfolio-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(var(--color-primary-rgb), 0.15);
  background: #ffffff;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.coverflow-portfolio-btn:hover {
  background: var(--color-primary);
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--glow-electric);
}

/* Product/Project Details Styling */
.project-details-header {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #060918;
  overflow: hidden;
  text-align: center;
}

.project-details-header-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: blur(4px);
}

.project-details-header-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
  padding: var(--space-10) 0;
}

.project-details-container {
  background: var(--color-surface-container-lowest);
  padding: var(--space-16) 0;
  border-bottom: 1px solid var(--color-surface-container-high);
}

.project-details-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--space-8);
}

@media (max-width: 991px) {
  .project-details-grid {
    grid-template-columns: 1fr;
  }
}

.details-glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(140, 0, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.02);
}

.meta-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.meta-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.meta-info-item:last-child {
  border-bottom: none;
}

.meta-info-label {
  font-weight: 600;
  color: var(--color-on-surface-variant);
}

.meta-info-value {
  color: var(--color-secondary);
  font-weight: 700;
}

.related-projects-section {
  padding: var(--space-16) 0;
  background-color: var(--color-surface-container-low);
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════
   SPACE JOURNEY SCROLL EXPERIENCE STYLING
   ═══════════════════════════════════════════════════════════════ */
.space-journey-wrapper {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: #060918;
  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.65);
  --color-bg-card: rgba(255, 255, 255, 0.02);
  --color-border: rgba(255, 255, 255, 0.06);
}

.space-journey-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 140px;
  background: linear-gradient(to bottom, transparent, #060918);
  pointer-events: none;
  z-index: 2;
}

/* Glassmorphic space feature cards */
.space-feature-card {
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease !important;
}

.space-feature-card:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(99, 102, 241, 0.35) !important;
  transform: translateY(-8px) translateZ(10px) !important;
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15), 0 0 20px rgba(99, 102, 241, 0.1) !important;
}

/* Testimonial slider layouts */
.testimonials-carousel-viewport {
  position: relative;
  width: 100%;
  height: 340px;
  margin-top: var(--space-4);
}

.testimonial-card.glass-card {
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.65s ease, border-color 0.65s ease;
  text-align: right;
}

.testimonial-card.glass-card.active-slide {
  border-color: rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 30px 60px rgba(99, 102, 241, 0.12), 0 0 25px rgba(99, 102, 241, 0.08) !important;
}

.testimonial-card.glass-card:not(.active-slide) {
  pointer-events: none;
}

/* Pulse glow final call to action button */
.pulse-glow-btn {
  position: relative;
  box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5);
  animation: pulseGlow 2.2s infinite;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.6);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(99, 102, 241, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

.space-cta-title {
  text-shadow: 0 0 20px rgba(99, 102, 241, 0.35);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE PROJECTS GRID SHOWCASE STYLING
   ═══════════════════════════════════════════════════════════════ */
.projects-showcase-grid-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.projects-showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 100%;
}

.project-showcase-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(99, 102, 241, 0.08);
  box-shadow: 0 15px 35px rgba(0, 17, 38, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  text-align: right;
  height: 100%;
}

.project-showcase-card:hover {
  transform: translateY(-8px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 25px 50px rgba(99, 102, 241, 0.12), var(--glow-electric);
}

.project-showcase-card .card-image {
  position: relative;
  height: 200px;
  width: 100%;
  overflow: hidden;
}

.project-showcase-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-showcase-card:hover .card-image img {
  transform: scale(1.06);
}

.project-showcase-card .card-body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
  min-height: 220px;
}

.project-showcase-card .project-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(99, 102, 241, 0.05);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-2);
  border: 1px solid rgba(99, 102, 241, 0.1);
  align-self: flex-start;
}

.project-showcase-card .project-title {
  font-size: 18px;
  font-weight: 700;
  color: #111111;
  margin-bottom: var(--space-2);
}

.project-showcase-card .project-desc {
  font-size: 13.5px;
  color: var(--color-on-surface-variant);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Hide indicators and controls on desktop/tablet */
@media (min-width: 768px) {
  .projects-controls-wrapper {
    display: none !important;
  }
}

@media (max-width: 991px) {
  .projects-showcase-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 767px) {
  .projects-showcase-grid {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding: 10px 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .projects-showcase-grid::-webkit-scrollbar {
    display: none;
  }
  
  .project-showcase-card {
    flex: 0 0 88%;
    scroll-snap-align: center;
  }
  
  .projects-controls-wrapper {
    display: flex !important;
  }
}

/* Mesh Gradient Glows for Projects Showcase */
.projects-mesh-glow {
  position: absolute;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, rgba(99, 102, 241, 0.05) 50%, transparent 80%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.projects-center-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.04) 50%, transparent 75%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Glassmorphic Floating Badge */
.project-tag-glass {
  position: absolute;
  top: 16px;
  right: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--color-tag-glass-bg);
  border: 1px solid var(--color-tag-glass-border);
  color: var(--color-tag-glass-text) !important;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  z-index: 2;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
}

/* Tech Text Ellipsis and Overflow Prevention */
.project-tech-wrapper {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55) !important;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

/* Tech Icon Token color */
.project-tech-icon {
  color: var(--color-primary) !important;
}

/* 3D Glassmorphic Space Project Cards */
.space-journey-wrapper .project-showcase-card {
  position: relative;
  background: var(--color-bg-card) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 40px rgba(var(--color-primary-rgb), 0.08), 0 8px 16px rgba(0, 0, 0, 0.3) !important;
  transition: box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease !important;
  will-change: transform, box-shadow;
}

.space-journey-wrapper .project-showcase-card:hover {
  border-color: rgba(var(--color-primary-light-rgb), 0.3) !important;
  box-shadow: 0 30px 60px rgba(var(--color-primary-rgb), 0.25), 0 0 35px rgba(var(--color-primary-rgb), 0.1) !important;
}

.space-journey-wrapper .project-showcase-card .card-image {
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.space-journey-wrapper .project-showcase-card .project-title {
  color: var(--color-text-primary) !important;
  font-size: 20px;
  font-weight: 700;
  margin-top: var(--space-1);
}

.space-journey-wrapper .project-showcase-card .project-desc {
  color: var(--color-text-secondary) !important;
  font-size: 13.5px;
  line-height: 1.75;
}

.space-journey-wrapper .project-showcase-card .border-top {
  border-color: var(--color-border) !important;
}

/* Arrow circle gradient btn */
.space-journey-wrapper .coverflow-circle-btn {
  background: var(--color-primary) !important;
  border: none !important;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(var(--color-primary-rgb), 0.3);
  transition: transform 0.4s ease, box-shadow 0.4s ease !important;
}

.space-journey-wrapper .coverflow-circle-btn i {
  font-size: 12px;
  transition: transform 0.4s ease;
}

.project-showcase-card:hover .coverflow-circle-btn {
  transform: scale(1.12);
  background: var(--color-primary-light) !important;
  box-shadow: 0 6px 15px rgba(var(--color-primary-light-rgb), 0.6), 0 0 10px rgba(var(--color-primary-rgb), 0.3);
}

.project-showcase-card:hover .coverflow-circle-btn i {
  transform: rotate(-45deg);
}

/* Underline link animation for عرض المشروع */
.project-view-link {
  position: relative;
  color: var(--color-primary-light) !important;
  transition: color 0.3s ease;
}

.project-view-link::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1.5px;
  bottom: -2px;
  left: 0;
  background-color: var(--color-primary-light);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.project-showcase-card:hover .project-view-link::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.project-showcase-card:hover .project-view-link {
  color: var(--color-primary-light) !important;
  filter: brightness(1.2);
}

/* Browse all projects btn */
.projects-btn-secondary {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.projects-btn-secondary:hover {
  transform: scale(1.03);
  color: #ffffff;
  border-color: rgba(var(--color-primary-light-rgb), 0.6);
  background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.1) 0%, rgba(var(--color-primary-light-rgb), 0.1) 100%);
  box-shadow: 0 15px 35px rgba(var(--color-primary-rgb), 0.25);
}

/* ═══════════════════════════════════════════════════════════════
   SPACE JOURNEY INTEGRATED COVERFLOW OVERRIDES
   ═══════════════════════════════════════════════════════════════ */
.space-journey-wrapper .coverflow-section {
  background: transparent !important;
  border-top: none !important;
}

.space-journey-wrapper .coverflow-card {
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
}

.space-journey-wrapper .coverflow-card.active-card {
  border: 2px solid rgba(99, 102, 241, 0.55) !important;
  box-shadow: 0 20px 50px rgba(99, 102, 241, 0.25), 0 0 35px rgba(99, 102, 241, 0.2) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.space-journey-wrapper .coverflow-card.active-card:hover {
  border-color: rgba(99, 102, 241, 0.75) !important;
  box-shadow: 0 25px 65px rgba(99, 102, 241, 0.35), 0 0 45px rgba(99, 102, 241, 0.3) !important;
}

.space-journey-wrapper .coverflow-card-title {
  color: #ffffff !important;
}

.space-journey-wrapper .coverflow-card-desc {
  color: rgba(255, 255, 255, 0.7) !important;
}

.space-journey-wrapper .coverflow-card-badge {
  background: rgba(99, 102, 241, 0.15) !important;
  border: 1px solid rgba(99, 102, 241, 0.3) !important;
  color: #a5b4fc !important;
}

.space-journey-wrapper .coverflow-card-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.space-journey-wrapper .coverflow-card-footer .text-muted {
  color: rgba(255, 255, 255, 0.4) !important;
}

.space-journey-wrapper .coverflow-card-footer .text-primary {
  color: #a5b4fc !important;
}

.space-journey-wrapper .coverflow-btn {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

.space-journey-wrapper .coverflow-btn:hover {
  background: rgba(99, 102, 241, 0.15) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
}

/* Secondary white-outline button inside Space Journey */
.space-journey-wrapper .btn-secondary {
  border: 1.5px solid #ffffff !important;
  color: #ffffff !important;
  background: transparent !important;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.space-journey-wrapper .btn-secondary:hover {
  background: #ffffff !important;
  color: #060918 !important;
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.25), 0 0 15px rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-2px) scale(1.02);
}

.space-journey-wrapper .btn-secondary:active {
  transform: translateY(0) scale(1.0);
}
