/* ============================================
   WIJHA — Corporate Website Styles
   Design System: Dark + Purple Gradient
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand colours */
  --purple-50:  #f5f3ff;
  --purple-100: #ede9fe;
  --purple-200: #ddd6fe;
  --purple-300: #c4b5fd;
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --purple-700: #6d28d9;
  --purple-800: #5b21b6;
  --purple-900: #4c1d95;

  /* Surfaces */
  --bg-primary:   #06060f;
  --bg-secondary: #0c0c1d;
  --bg-card:      rgba(15, 15, 35, 0.65);
  --bg-glass:     rgba(139, 92, 246, 0.06);

  /* Text */
  --text-primary:   #f1f0f5;
  --text-secondary: #a8a3b8;
  --text-muted:     #6b6580;

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #c084fc 100%);
  --gradient-hero:  linear-gradient(160deg, rgba(124,58,237,.25) 0%, rgba(6,6,15,.95) 50%, rgba(168,85,247,.12) 100%);
  --gradient-card:  linear-gradient(145deg, rgba(139,92,246,.08) 0%, rgba(15,15,35,.5) 100%);
  --gradient-glow:  radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(139,92,246,.12), transparent 40%);

  /* Borders */
  --border-subtle: 1px solid rgba(139, 92, 246, 0.12);
  --border-glow:   1px solid rgba(139, 92, 246, 0.3);

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,.3);
  --shadow-md:  0 8px 32px rgba(0,0,0,.4);
  --shadow-lg:  0 16px 64px rgba(0,0,0,.5);
  --shadow-glow: 0 0 40px rgba(139,92,246,.2);

  /* Spacing */
  --section-pad: clamp(4rem, 10vw, 8rem);
  --container-max: 1240px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; font-family: inherit; }

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--purple-400);
  margin-bottom: 1rem;
}

.section-label::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--gradient-brand);
  border-radius: 2px;
}

.section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 1.25rem;
}

.section-title .highlight {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 620px;
  line-height: 1.8;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 2rem;
  border-radius: 60px;
  font-weight: 600;
  font-size: .95rem;
  border: none;
  transition: all .4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 24px rgba(124,58,237,.35);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.18) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .4s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(124,58,237,.5);
}

.btn-primary:hover::before { opacity: 1; }

.btn-outline {
  background: transparent;
  color: var(--purple-300);
  border: 1.5px solid rgba(139,92,246,.35);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: rgba(139,92,246,.1);
  border-color: var(--purple-400);
  transform: translateY(-2px);
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform .3s var(--ease-spring);
}

.btn:hover svg { transform: translateX(3px); }

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.1rem 0;
  transition: all .45s var(--ease-out);
}

.navbar.scrolled {
  background: rgba(6, 6, 15, 0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: var(--border-subtle);
  padding: .75rem 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.nav-brand img {
  height: 42px;
  width: auto;
  filter: drop-shadow(0 0 12px rgba(139,92,246,.25));
  transition: filter .3s;
}

.nav-brand:hover img {
  filter: drop-shadow(0 0 20px rgba(139,92,246,.45));
}

.nav-brand span {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}

.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: .3rem 0;
  transition: color .3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-brand);
  border-radius: 2px;
  transition: width .35s var(--ease-out);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  margin-left: .8rem;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  z-index: 1002;
}

/* Mobile nav overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease-out);
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all .3s var(--ease-out);
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) { opacity: 0; }

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .35;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
}

/* Particle canvas */
#particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
}

.hero-content { max-width: 600px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem 1.1rem;
  background: rgba(139,92,246,.1);
  border: var(--border-subtle);
  border-radius: 60px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--purple-300);
  margin-bottom: 1.6rem;
  backdrop-filter: blur(8px);
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
  50% { opacity: .8; box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

.hero h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2.4rem, 5.2vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 1.4rem;
}

.hero h1 .line { display: block; }

.hero h1 .gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2.2rem;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  padding-top: 2rem;
  border-top: var(--border-subtle);
}

.stat-item {}

.stat-number {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-text {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: .15rem;
}

/* Hero visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-orbit {
  position: relative;
  width: 420px;
  height: 420px;
}

.orbit-ring {
  position: absolute;
  border: 1px solid rgba(139,92,246,.12);
  border-radius: 50%;
  animation: spin 30s linear infinite;
}

.orbit-ring:nth-child(1) {
  inset: 0;
}

.orbit-ring:nth-child(2) {
  inset: 40px;
  animation-duration: 25s;
  animation-direction: reverse;
  border-color: rgba(139,92,246,.08);
}

.orbit-ring:nth-child(3) {
  inset: 80px;
  animation-duration: 20s;
  border-color: rgba(139,92,246,.06);
}

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

/* Orbit dots */
.orbit-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--purple-500);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(139,92,246,.5);
}

.orbit-ring:nth-child(1) .orbit-dot { top: -5px; left: 50%; }
.orbit-ring:nth-child(2) .orbit-dot { bottom: -5px; right: 20%; }
.orbit-ring:nth-child(3) .orbit-dot { top: 50%; right: -5px; }

.orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit-center img {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 0 40px rgba(139,92,246,.4));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Orbit service icons floating around */
.orbit-icon {
  position: absolute;
  width: 48px;
  height: 48px;
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  backdrop-filter: blur(8px);
  animation: float-icon 5s ease-in-out infinite;
  box-shadow: var(--shadow-sm);
}

.orbit-icon:nth-child(5) { top: 10%; left: -10%; animation-delay: 0s; }
.orbit-icon:nth-child(6) { top: -5%; right: 5%; animation-delay: 1s; }
.orbit-icon:nth-child(7) { bottom: 15%; right: -8%; animation-delay: 2s; }
.orbit-icon:nth-child(8) { bottom: -5%; left: 10%; animation-delay: 3s; }

@keyframes float-icon {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}

/* ---------- ABOUT ---------- */
.about {
  padding: var(--section-pad) 0;
  position: relative;
}

.about .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image-wrapper {
  position: relative;
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: var(--border-subtle);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.about-image img {
  width: 100%;
  height: auto;
  transition: transform .6s var(--ease-out);
}

.about-image:hover img {
  transform: scale(1.03);
}

.about-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6,6,15,.4), transparent 50%);
  pointer-events: none;
}

.about-floating-card {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.6rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-md);
  z-index: 2;
}

.about-floating-card .afc-icon {
  width: 48px;
  height: 48px;
  background: var(--gradient-brand);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.about-floating-card .afc-text strong {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}

.about-floating-card .afc-text span {
  font-size: .78rem;
  color: var(--text-muted);
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-top: 2rem;
}

.about-feature {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem;
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all .35s var(--ease-out);
}

.about-feature:hover {
  border-color: rgba(139,92,246,.25);
  background: rgba(139,92,246,.06);
  transform: translateY(-2px);
}

.about-feature .af-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: rgba(139,92,246,.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-400);
  font-size: 1rem;
}

.about-feature .af-text h4 {
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: .15rem;
}

.about-feature .af-text p {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------- SERVICES ---------- */
.services {
  padding: var(--section-pad) 0;
  position: relative;
  background: var(--bg-secondary);
}

.services::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139,92,246,.08) 0%, transparent 70%);
  pointer-events: none;
}

.services-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.services-header .section-subtitle {
  margin: 0 auto;
}

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

.service-card {
  position: relative;
  background: var(--gradient-card);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all .45s var(--ease-out);
  overflow: hidden;
  cursor: default;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0;
  transition: opacity .45s;
  pointer-events: none;
}

.service-card:hover {
  border-color: rgba(139,92,246,.3);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}

.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 56px;
  height: 56px;
  background: rgba(139,92,246,.1);
  border: 1px solid rgba(139,92,246,.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.4rem;
  transition: all .4s var(--ease-out);
  position: relative;
  z-index: 1;
}

.service-card:hover .service-icon {
  background: var(--gradient-brand);
  border-color: transparent;
  transform: scale(1.08);
  box-shadow: 0 0 24px rgba(139,92,246,.3);
}

.service-card h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: .6rem;
  position: relative;
  z-index: 1;
}

.service-card p {
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.service-card .service-arrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1.2rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--purple-400);
  position: relative;
  z-index: 1;
  transition: gap .3s var(--ease-spring);
}

.service-card:hover .service-arrow { gap: .7rem; }

/* ---------- PORTFOLIO ---------- */
.portfolio {
  padding: var(--section-pad) 0;
  position: relative;
}

.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: .6rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.pf-filter {
  padding: .55rem 1.4rem;
  background: transparent;
  border: 1px solid rgba(139,92,246,.15);
  border-radius: 60px;
  color: var(--text-secondary);
  font-size: .85rem;
  font-weight: 500;
  transition: all .35s var(--ease-out);
  cursor: pointer;
}

.pf-filter:hover {
  border-color: rgba(139,92,246,.35);
  color: var(--text-primary);
}

.pf-filter.active {
  background: var(--gradient-brand);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(124,58,237,.3);
}

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

.portfolio-card {
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .5s var(--ease-out);
}

.portfolio-card:hover {
  border-color: rgba(139,92,246,.3);
  transform: translateY(-8px);
  box-shadow: var(--shadow-glow);
}

.portfolio-card.hidden {
  display: none;
}

.portfolio-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease-out);
}

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

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6,6,15,.8);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .45s var(--ease-out);
}

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

.portfolio-overlay-content {
  text-align: center;
  padding: 1.5rem;
  transform: translateY(15px);
  transition: transform .45s var(--ease-out);
}

.portfolio-card:hover .portfolio-overlay-content {
  transform: translateY(0);
}

.portfolio-overlay-content h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  margin: .6rem 0;
}

.portfolio-overlay-content p {
  font-size: .88rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.btn-sm {
  padding: .6rem 1.4rem;
  font-size: .82rem;
}

.portfolio-category-badge {
  display: inline-block;
  padding: .3rem .9rem;
  background: rgba(139,92,246,.15);
  border: 1px solid rgba(139,92,246,.25);
  border-radius: 60px;
  font-size: .72rem;
  font-weight: 600;
  color: var(--purple-300);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.portfolio-info {
  padding: 1.4rem 1.6rem 1.6rem;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .8rem;
}

.ptag {
  padding: .2rem .6rem;
  background: rgba(139,92,246,.08);
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 500;
  color: var(--purple-400);
}

.portfolio-info h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.portfolio-info p {
  font-size: .88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---------- PROJECT MODAL ---------- */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all .4s var(--ease-out);
}

.project-modal.open {
  opacity: 1;
  visibility: visible;
}

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6,6,15,.85);
  backdrop-filter: blur(12px);
}

.project-modal-content {
  position: relative;
  width: 90%;
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transform: scale(0.92) translateY(20px);
  transition: transform .5s var(--ease-spring);
}

.project-modal.open .project-modal-content {
  transform: scale(1) translateY(0);
}

.project-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: rgba(15,15,35,.7);
  border: var(--border-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  z-index: 2;
  transition: all .3s;
  backdrop-filter: blur(8px);
}

.project-modal-close:hover {
  background: rgba(139,92,246,.2);
  color: var(--text-primary);
  transform: rotate(90deg);
}

.project-modal-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.project-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-modal-body {
  padding: 2rem 2.5rem 2.5rem;
}

.project-modal-body h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  margin: .8rem 0 .6rem;
}

.project-modal-desc {
  font-size: .95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.project-modal-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.pmd-item h4 {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .8rem;
}

.pmd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.pmd-tags .ptag {
  padding: .3rem .7rem;
  font-size: .75rem;
}

.pmd-item ul {
  list-style: none;
  padding: 0;
}

.pmd-item ul li {
  padding: .35rem 0;
  font-size: .88rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.pmd-item ul li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--purple-500);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Scrollbar for modal */
.project-modal-content::-webkit-scrollbar {
  width: 6px;
}
.project-modal-content::-webkit-scrollbar-track {
  background: transparent;
}
.project-modal-content::-webkit-scrollbar-thumb {
  background: rgba(139,92,246,.2);
  border-radius: 3px;
}

/* ---------- CONTACT ---------- */
.contact {
  padding: var(--section-pad) 0;
  position: relative;
}

.contact .container {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3.5rem;
  align-items: start;
}

.contact-info { padding-top: 1rem; }

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 2rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all .35s var(--ease-out);
}

.contact-card:hover {
  border-color: rgba(139,92,246,.25);
  transform: translateX(6px);
}

.contact-card .cc-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: rgba(139,92,246,.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-400);
  font-size: 1.2rem;
}

.contact-card .cc-content h4 {
  font-size: .85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: .15rem;
}

.contact-card .cc-content p {
  font-size: .95rem;
  color: var(--text-primary);
  font-weight: 500;
}

.contact-socials {
  display: flex;
  gap: .8rem;
  margin-top: 2rem;
}

.social-link {
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: all .35s var(--ease-out);
}

.social-link:hover {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(139,92,246,.3);
}

/* Form */
.contact-form-wrapper {
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
}

.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }

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

.form-group { display: flex; flex-direction: column; gap: .4rem; }

.form-group label {
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .85rem 1.1rem;
  background: rgba(15,15,35,.7);
  border: 1px solid rgba(139,92,246,.12);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: .92rem;
  transition: all .35s var(--ease-out);
  outline: none;
}

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

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(139,92,246,.12);
  background: rgba(15,15,35,.9);
}

.form-group textarea {
  min-height: 130px;
  resize: vertical;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-submit {
  margin-top: .5rem;
}

.form-submit .btn {
  width: 100%;
  justify-content: center;
  padding: 1rem;
  font-size: 1rem;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--bg-secondary);
  border-top: var(--border-subtle);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  font-size: .9rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  line-height: 1.7;
  max-width: 300px;
}

.footer-col h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--text-primary);
}

.footer-col ul li { margin-bottom: .7rem; }

.footer-col ul li a {
  font-size: .88rem;
  color: var(--text-secondary);
  transition: all .3s;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

.footer-col ul li a:hover {
  color: var(--purple-400);
  transform: translateX(4px);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: var(--border-subtle);
}

.footer-bottom p {
  font-size: .82rem;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  font-size: .82rem;
  color: var(--text-muted);
  transition: color .3s;
}

.footer-bottom-links a:hover { color: var(--purple-400); }

/* ---------- Scroll Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger */
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }
.reveal-delay-5 { transition-delay: .5s; }
.reveal-delay-6 { transition-delay: .6s; }

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--gradient-brand);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all .4s var(--ease-out);
  box-shadow: 0 4px 20px rgba(139,92,246,.35);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(139,92,246,.5);
}

/* ---------- Loading Screen ---------- */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity .6s, visibility .6s;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  width: 80px;
  animation: float 2s ease-in-out infinite;
}

.loader-bar {
  width: 120px;
  height: 3px;
  background: rgba(139,92,246,.15);
  border-radius: 3px;
  margin-top: 1.5rem;
  overflow: hidden;
}

.loader-bar::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 3px;
  animation: loader-slide 1.2s ease-in-out infinite;
}

@keyframes loader-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ---------- Glowing line separator ---------- */
.glow-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,.4), transparent);
  border: none;
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-content { max-width: 100%; margin: 0 auto; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-buttons { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { display: none; }
  .about .container { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-image-wrapper { max-width: 550px; margin: 0 auto; }
  .contact .container { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .project-modal-details { grid-template-columns: 1fr; }
}

/* ---- Tablet & Mobile ---- */
@media (max-width: 768px) {
  /* --- Typography --- */
  .section-title { font-size: clamp(1.6rem, 6vw, 2.2rem); margin-bottom: 1rem; }
  .section-subtitle { font-size: .95rem; line-height: 1.7; }
  .section-label { font-size: .72rem; margin-bottom: .75rem; }

  /* --- Navigation Mobile Drawer --- */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: rgba(6,6,15,.97);
    backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 5rem 1.5rem 2rem;
    gap: 1rem;
    transition: right .4s var(--ease-out);
    border-left: var(--border-subtle);
    overflow-y: auto;
    z-index: 1001;
  }
  .nav-links.open { right: 0; }
  .nav-toggle { display: flex; }
  .nav-cta { margin-left: 0; margin-top: .5rem; width: 100%; justify-content: center; }
  .nav-links a { font-size: 1rem; padding: .6rem 0; }
  .lang-switch { margin-top: .5rem; justify-content: center; width: 100%; }

  /* --- Hero Mobile --- */
  .hero { min-height: auto; padding-top: 6rem; padding-bottom: 3rem; }
  .hero h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); }
  .hero-badge { font-size: .7rem; padding: .35rem .8rem; margin-bottom: 1.2rem; }
  .hero-desc { font-size: .92rem; line-height: 1.65; }
  .hero-buttons { flex-direction: column; gap: .8rem; align-items: center; }
  .hero-buttons .btn { width: 100%; max-width: 320px; justify-content: center; }
  .hero-stats { flex-direction: column; gap: 1rem; align-items: center; margin-top: 2rem; }
  .hero-stats .stat-item { 
    min-width: 200px; 
    text-align: center; 
    padding: .8rem 1.2rem;
  }
  .stat-number { font-size: 1.8rem; }

  /* --- About Mobile --- */
  .about-features { grid-template-columns: 1fr; gap: 1rem; }
  .about-feature { padding: 1rem; }
  .about-floating-card { 
    position: relative; 
    bottom: auto; right: auto; left: auto;
    margin-top: -2rem; 
    margin-left: auto; 
    margin-right: 1rem;
    width: fit-content;
  }

  /* --- Services Mobile --- */
  .services-grid { grid-template-columns: 1fr; gap: 1rem; }
  .service-card { padding: 1.5rem; }
  .service-icon { width: 48px; height: 48px; margin-bottom: 1rem; }
  .service-card h3 { font-size: 1.1rem; }

  /* --- Portfolio Mobile --- */
  .portfolio-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .portfolio-filters { gap: .4rem; margin-bottom: 2rem; }
  .pf-filter { font-size: .78rem; padding: .45rem .9rem; }
  .portfolio-info h3 { font-size: 1.05rem; }

  /* --- Project Modal Mobile --- */
  .project-modal-content { width: 95%; max-height: 90vh; max-height: 90dvh; }
  .project-modal-body { padding: 1.25rem; }
  .project-modal-body h2 { font-size: 1.3rem; }
  .project-modal-image img { max-height: 180px; }

  /* --- Contact Mobile --- */
  .form-row { grid-template-columns: 1fr; }
  .contact-form-wrapper { padding: 1.25rem; }
  .contact-cards { gap: .8rem; }
  .contact-card { padding: 1rem; }
  .cc-icon { width: 42px; height: 42px; min-width: 42px; }
  .contact-socials { justify-content: center; }

  /* --- Footer Mobile --- */
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .footer-brand p { font-size: .9rem; }

  /* --- Toast Mobile --- */
  .toast { font-size: .82rem; padding: .8rem 1.2rem; }

  /* --- Glow line --- */
  .glow-line { margin: 0 1rem; }

  /* --- Back to top --- */
  .back-to-top { bottom: 1.2rem; right: 1.2rem; width: 42px; height: 42px; }
}

/* ---- Small phones ---- */
@media (max-width: 480px) {
  html { font-size: 15px; }

  .navbar { padding: .8rem 0; }
  .nav-brand img { height: 34px; }
  .nav-brand span { font-size: 1.25rem; }

  .hero { padding-top: 5rem; padding-bottom: 2.5rem; }
  .hero h1 { font-size: 1.65rem; line-height: 1.2; }
  .hero-badge { font-size: .65rem; }
  .hero-desc { font-size: .85rem; }
  .hero-buttons .btn { font-size: .88rem; padding: .75rem 1.5rem; }
  .stat-number { font-size: 1.5rem; }
  .stat-text { font-size: .72rem; }

  .section-title { font-size: 1.45rem; }
  .section-subtitle { font-size: .88rem; }

  .about-feature .af-text h4 { font-size: .92rem; }
  .about-feature .af-text p { font-size: .8rem; }

  .service-card { padding: 1.2rem; }
  .service-card h3 { font-size: 1rem; }
  .service-card p { font-size: .85rem; }

  .portfolio-info { padding: 1rem; }
  .pf-filter { font-size: .72rem; padding: .4rem .7rem; }

  .project-modal-content { width: 98%; border-radius: var(--radius-md); }
  .project-modal-body { padding: 1rem; }
  .project-modal-body h2 { font-size: 1.15rem; }
  .project-modal-desc { font-size: .85rem; }

  .contact-form-wrapper { padding: 1rem; border-radius: var(--radius-md); }
  .form-group label { font-size: .82rem; }
  .form-group input,
  .form-group textarea,
  .form-group select { font-size: .88rem; padding: .7rem .9rem; }
  .contact-card { padding: .8rem; }
  .cc-content h4 { font-size: .85rem; }
  .cc-content p { font-size: .82rem; }

  .footer { padding: 3rem 0 1.5rem; }
  .footer-col h4 { font-size: .9rem; }
  .footer-col a { font-size: .85rem; }
  .footer-bottom p { font-size: .78rem; }
  .footer-bottom-links a { font-size: .78rem; }
}

/* ---- Touch target sizes ---- */
@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 48px; }
  .nav-links a { min-height: 44px; display: flex; align-items: center; }
  .social-link { min-width: 44px; min-height: 44px; }
  .pf-filter { min-height: 40px; }
  .back-to-top { width: 48px; height: 48px; }
  .cursor-glow { display: none; }
}

/* ---------- Mouse glow on service cards ---------- */
.services-grid {
  --mouse-x: 50%;
  --mouse-y: 50%;
}

/* ---------- Cursor dot (optional flair) ---------- */
.cursor-glow {
  position: fixed;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(139,92,246,.06), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: opacity .3s;
  opacity: 0;
}

body:hover .cursor-glow { opacity: 1; }

/* ---------- Success toast ---------- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15,15,35,.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(34,197,94,.3);
  border-radius: var(--radius-md);
  padding: 1rem 1.8rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #22c55e;
  font-weight: 600;
  font-size: .92rem;
  z-index: 10000;
  opacity: 0;
  transition: all .5s var(--ease-spring);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   RTL SUPPORT (Arabic Version)
   ============================================ */
html[dir="rtl"] {
  text-align: right;
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
}

html[dir="rtl"] .nav-brand {
  flex-direction: row;
}

html[dir="rtl"] .nav-cta {
  margin-left: 0;
  margin-right: .8rem;
}

html[dir="rtl"] .btn svg,
html[dir="rtl"] .service-arrow svg {
  transform: scaleX(-1);
}

html[dir="rtl"] .btn:hover svg {
  transform: scaleX(-1) translateX(-3px);
}

html[dir="rtl"] .service-arrow svg {
  transition: transform .3s var(--ease-spring);
}

html[dir="rtl"] .service-card:hover .service-arrow svg {
  transform: scaleX(-1) translateX(-5px);
}

html[dir="rtl"] .about-feature .af-icon {
  margin-right: 0;
}

html[dir="rtl"] .about-floating-card {
  right: auto;
  left: -20px;
}

html[dir="rtl"] .project-modal-close {
  right: auto;
  left: 1rem;
}

html[dir="rtl"] .pmd-item ul li::before {
  margin-right: 0;
  margin-left: .5rem;
}

html[dir="rtl"] .contact-info {
  text-align: right;
}

html[dir="rtl"] .cc-icon {
  margin-right: 0;
  margin-left: 1rem;
}

@media (max-width: 768px) {
  html[dir="rtl"] .nav-links {
    right: auto;
    left: -100%;
    border-left: none;
    border-right: var(--border-subtle);
  }
  html[dir="rtl"] .nav-links.open {
    left: 0;
  }
  html[dir="rtl"] .nav-cta {
    margin-right: 0;
  }
  html[dir="rtl"] .about-floating-card {
    left: auto;
    margin-left: 1rem;
    margin-right: auto;
  }
  html[dir="rtl"] .hero-content,
  html[dir="rtl"] .services-header,
  html[dir="rtl"] .hero-stats .stat-item {
    text-align: center;
  }
  html[dir="rtl"] .hero-buttons {
    align-items: center;
  }
  html[dir="rtl"] .contact-socials {
    justify-content: center;
  }
  html[dir="rtl"] .footer-bottom {
    text-align: center;
  }
  html[dir="rtl"] .back-to-top {
    right: auto;
    left: 1.2rem;
  }
}

@media (max-width: 480px) {
  html[dir="rtl"] .back-to-top {
    left: 1rem;
    right: auto;
  }
}

/* Nav Switch */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(139,92,246,.15);
  padding: 0.4rem 0.8rem;
  border-radius: 60px;
  border: 1px solid rgba(139,92,246,.3);
  transition: all 0.3s;
}

.lang-switch:hover {
  background: rgba(139,92,246,.25);
  border-color: var(--purple-400);
}
