/* ============================================
   CSS Design System - Jamal Almarhabi Portfolio
   Purple / Dark creative theme
   ============================================ */

@font-face {
  font-family: 'VLAX-01';
  src: url('../assets/fonts/VLAX-01.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* الخلفيات (من الأغمق للأفتح لخلق عمق بصري) */
  --bg-body: #020A24;          /* خلفية الصفحة الرئيسية */
  --bg-section: #04123B;       /* خلفية الأقسام المتبادلة */
  --bg-card: rgba(11, 30, 79, 0.7); /* خلفية البطاقات الشفافة */
  --bg-input: #071742;         /* خلفية حقول النماذج */

  /* الهوية اللونية والتوهج */
  --primary: #1E64F0;          /* اللون الأساسي للأزرار والروابط */
  --primary-hover: #2E75FF;    /* لون الزر عند التمرير */
  --royal-blue: #0D3DB8;       /* للتدرجات الخلفية */
  --glow-cyan: #4DA3FF;        /* التوهج والحدود المضيئة */

  /* النصوص */
  --text-heading: #FFFFFF;     /* العناوين الرئيسية */
  --text-body: #CBD5E1;        /* الفقرات */
  --text-muted: #94A3B8;       /* النصوص الثانوية */

  /* الحدود والحالات */
  --border-subtle: rgba(77, 163, 255, 0.2);
  --border-active: rgba(77, 163, 255, 0.6);
  --success: #22C55E;          /* نسب النمو والنجاح */

  /* مشتقات مساعدة من نفس الهوية */
  --bg-deep: #010616;
  --bg-card-solid: #0B1E4F;
  --primary-soft: var(--glow-cyan);
  --primary-light: #8EC5FF;
  --primary-deep: var(--royal-blue);
  --glow: rgba(30, 100, 240, 0.55);

  /* Sizing */
  --container-width: 1200px;
  --section-padding: 110px 20px;
  --card-radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: all 0.35s var(--ease);
}

/* ============================================
   Reset & Base
   ============================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 94%;
}

body {
  background-color: var(--bg-body);
  color: var(--text-body);
  font-family: 'Cairo', sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

[dir="rtl"] { text-align: right; }
[dir="ltr"] { text-align: left; }

a {
  color: var(--primary-soft);
  text-decoration: none;
  transition: var(--transition);
}

a:hover { color: var(--primary-light); }

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

button { font-family: inherit; }

::selection {
  background: var(--primary);
  color: #fff;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--primary-deep), var(--primary));
  border-radius: 10px;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  position: relative;
  padding: var(--section-padding);
  scroll-margin-top: 70px;
}

main { position: relative; z-index: 1; }

/* Ambient page glow */
.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.page-glow .glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}

.glow-top {
  width: 120vw;
  height: 380px;
  top: -260px;
  left: -10vw;
  background: radial-gradient(ellipse at center, rgba(30, 100, 240, 0.75), rgba(13, 61, 184, 0.25) 55%, transparent 75%);
}

.glow-mid {
  width: 60vw;
  height: 60vw;
  bottom: -30vw;
  left: 20vw;
  background: radial-gradient(circle, rgba(13, 61, 184, 0.28), transparent 65%);
}

/* ============================================
   Section headings (purple bar + title)
   ============================================ */

.section-header {
  margin-bottom: 48px;
}

.section-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  font-weight: 900;
  color: var(--text-heading);
  line-height: 1.25;
}

.section-title::before {
  content: '';
  width: 5px;
  height: 0.95em;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  box-shadow: 0 0 14px var(--glow);
  flex-shrink: 0;
}

.section-title--sm {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.section-subtitle,
.works-section-title {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-inline-start: 19px;
}

.works-section-title {
  margin-top: 4px;
  font-size: 0.92rem;
  color: var(--primary-soft);
}

/* ============================================
   Buttons
   ============================================ */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--royal-blue));
  border: 1px solid var(--glow-cyan);
  color: var(--text-heading);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(30, 100, 240, 0.4);
  transition: var(--transition);
}

.btn-primary:hover {
  color: #fff;
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(77, 163, 255, 0.6);
}

/* ============================================
   Navbar
   ============================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 18px 24px;
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 10px 24px;
  background: rgba(2, 10, 36, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-logo img {
  height: 38px;
  width: auto;
}

.logo-fallback {
  display: none;
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--text-heading);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 6px;
  border-radius: 999px;
  background: rgba(4, 18, 59, 0.55);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-link {
  display: block;
  padding: 8px 18px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-heading);
  background: rgba(77, 163, 255, 0.12);
}

.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  box-shadow: 0 6px 20px -4px var(--glow);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle {
  min-width: 46px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(4, 18, 59, 0.55);
  color: var(--text-heading);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.lang-toggle:hover {
  border-color: var(--border-active);
  background: rgba(30, 100, 240, 0.25);
}

[dir="rtl"] .lang-en { display: inline; }
[dir="rtl"] .lang-ar { display: none; }
[dir="ltr"] .lang-en { display: none; }
[dir="ltr"] .lang-ar { display: inline; }

.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 11px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: rgba(4, 18, 59, 0.55);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--text-heading);
  transition: var(--transition);
}

.mobile-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px;
  overflow: hidden;
  background: radial-gradient(circle at 85% 15%, rgba(30, 100, 240, 0.35) 0%, rgba(13, 61, 184, 0.15) 40%, transparent 80%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  min-height: calc(100svh - 180px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-title {
  font-family: 'VLAX-01', 'Cairo', sans-serif;
  font-weight: normal;
  text-align: center;
  line-height: 1.05;
  font-size: clamp(3.4rem, 10.5vw, 9.5rem);
  letter-spacing: 0;
  position: relative;
  z-index: 1;
  margin-top: -6vh;
}

.hero-text,
.hero-glow {
  display: block;
}

.hero-text {
  color: var(--text-heading);
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.4);
  animation: heroLine 1s var(--ease) both;
}

.hero-glow {
  background: linear-gradient(180deg, #8EC5FF 0%, #4DA3FF 45%, #1E64F0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 28px rgba(77, 163, 255, 0.45));
  animation: heroLine 1s 0.15s var(--ease) both;
}

[dir="rtl"] .hero-glow { padding-inline-end: 0.25em; }

@keyframes heroLine {
  from { opacity: 0; transform: translateY(40px); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-avatar {
  position: relative;
  z-index: 2;
  width: clamp(190px, 19vw, 270px);
  margin-top: clamp(-50px, -3.5vw, -20px);
  animation: avatarRise 1.1s 0.35s var(--ease) both;
}

.hero-avatar img {
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 25px 40px rgba(0, 0, 0, 0.55));
  animation: avatarFloat 6s ease-in-out infinite;
}

.hero-avatar-halo {
  position: absolute;
  inset: 10% 5% -5%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(77, 163, 255, 0.55), transparent 68%);
  filter: blur(30px);
}

@keyframes avatarRise {
  from { opacity: 0; transform: translateY(80px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.hero-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  z-index: 3;
  animation: heroLine 1s 0.55s var(--ease) both;
}

.hero-info {
  max-width: 320px;
}

.hero-name {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-heading);
  line-height: 1.3;
}

.hero-subtitle {
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.hero-cta {
  padding: 11px 26px;
  font-size: 0.95rem;
}

/* background shapes */
.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}

.shape-1 {
  width: 520px;
  height: 520px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -30%);
  background: radial-gradient(circle, rgba(30, 100, 240, 0.35), transparent 65%);
  animation: pulse 8s ease-in-out infinite;
}

.shape-2 {
  width: 300px;
  height: 300px;
  top: 12%;
  left: -80px;
  background: rgba(13, 61, 184, 0.22);
  animation: drift 14s ease-in-out infinite;
}

.shape-3 {
  width: 260px;
  height: 260px;
  bottom: 5%;
  right: -60px;
  background: rgba(77, 163, 255, 0.14);
  animation: drift 16s ease-in-out infinite reverse;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -30%) scale(1); opacity: 0.8; }
  50% { transform: translate(-50%, -30%) scale(1.15); opacity: 1; }
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

/* ============================================
   Works — 3D Coverflow
   ============================================ */

.works-section {
  padding-bottom: 40px;
}

.works-mockups {
  padding-top: 60px;
}

.works-carousel-wrapper {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
}

.carousel-container.coverflow {
  position: relative;
  height: 440px;
  perspective: 1400px;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
}

.carousel-container.coverflow.dragging { cursor: grabbing; }

.carousel-track {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.carousel-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 280px;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transition: transform 0.75s var(--ease), opacity 0.75s var(--ease), filter 0.75s var(--ease), box-shadow 0.5s ease;
  will-change: transform;
}

.carousel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.carousel-card.is-active {
  border-color: var(--border-active);
  box-shadow: 0 30px 70px -18px rgba(30, 100, 240, 0.65), 0 0 0 1px rgba(77, 163, 255, 0.25);
}

.carousel-card:focus-visible,
.mockup-card:focus-visible {
  outline: 2px solid var(--primary-soft);
  outline-offset: 4px;
}

/* Mockups variant: floating tilted print pieces */
.coverflow--mockups {
  height: 480px;
}

.mockup-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  aspect-ratio: 6 / 5;
  cursor: pointer;
  transition: transform 0.85s var(--ease), opacity 0.85s var(--ease), filter 0.85s var(--ease);
  will-change: transform;
}

.mockup-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.mockup-card.is-active .mockup-inner {
  animation: mockFloat 6s ease-in-out infinite;
}

.mockup-media {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-card-solid);
  box-shadow: 0 40px 70px -20px rgba(0, 0, 0, 0.8), 0 0 50px -10px rgba(30, 100, 240, 0.35);
}

.mockup-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

@keyframes mockFloat {
  0%, 100% { transform: rotateX(14deg) rotateY(-12deg) rotateZ(-6deg) translateY(0); }
  50% { transform: rotateX(10deg) rotateY(-6deg) rotateZ(-3deg) translateY(-16px); }
}

.mockup-badge {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  box-shadow: 0 10px 24px -6px var(--glow);
  transform: translateZ(40px);
  opacity: 0;
  transition: opacity 0.5s ease 0.3s;
}

.mockup-badge svg { width: 20px; height: 20px; }

.mockup-card.is-active .mockup-badge { opacity: 1; }

.mockup-badge--1 { top: -14px; right: 18%; }
.mockup-badge--2 { top: 26%; left: -16px; }
.mockup-badge--3 { top: -12px; left: 12%; width: 34px; height: 34px; border-radius: 10px; }

/* carousel arrows */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: rgba(4, 18, 59, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding-bottom: 4px;
  transition: var(--transition);
}

.carousel-btn:hover {
  background: var(--primary);
  border-color: var(--primary-soft);
  box-shadow: 0 0 24px var(--glow);
}

.carousel-prev { inset-inline-start: 4%; }
.carousel-next { inset-inline-end: 4%; }

/* dots / progress */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.carousel-dot {
  width: 8px;
  height: 4px;
  border-radius: 4px;
  border: none;
  background: rgba(77, 163, 255, 0.25);
  cursor: pointer;
  transition: var(--transition);
}

.carousel-dot.active {
  width: 34px;
  background: linear-gradient(90deg, var(--primary-soft), var(--primary));
  box-shadow: 0 0 12px var(--glow);
}

/* ============================================
   About
   ============================================ */

.about-content {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 70px;
  align-items: center;
}

.about-kicker {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-soft);
  letter-spacing: 0.02em;
}

.about-name {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 900;
  color: var(--text-heading);
  line-height: 1.2;
  margin-top: 4px;
}

.about-underline {
  display: block;
  width: 70px;
  height: 4px;
  margin: 16px 0 26px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary-soft), var(--primary));
  box-shadow: 0 0 14px var(--glow);
}

.about-text p {
  font-size: 1.04rem;
  color: var(--text-body);
  margin-bottom: 16px;
  line-height: 1.95;
}

.about-text strong { color: var(--text-heading); }
.about-text em { color: var(--primary-light); font-style: normal; }

.about-image {
  position: relative;
  border-radius: 26px;
  padding: 14px;
  background: linear-gradient(160deg, rgba(30, 100, 240, 0.35), rgba(4, 18, 59, 0.6) 60%);
  border: 1px solid var(--border-active);
  box-shadow: 0 30px 80px -25px rgba(30, 100, 240, 0.65);
}

.about-image img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 18px;
  background: var(--bg-card-solid);
}

.about-glow {
  position: absolute;
  inset: -40px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 100, 240, 0.45), transparent 65%);
  filter: blur(40px);
}

/* ============================================
   Stats
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 260px));
  justify-content: center;
  gap: 26px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 40px 24px 34px;
  border-radius: 26px;
  text-align: center;
  background: linear-gradient(180deg, rgba(13, 40, 105, 0.55) 0%, rgba(4, 18, 59, 0.85) 100%);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  transition: var(--transition);
}

.stat-card::after {
  content: '';
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: -60px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(30, 100, 240, 0.45), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-active);
  box-shadow: 0 30px 60px -20px rgba(30, 100, 240, 0.55);
}

.stat-icon-circle {
  width: 64px;
  height: 64px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: radial-gradient(circle at 30% 30%, var(--primary-hover), var(--primary) 60%, var(--primary-deep));
  box-shadow: 0 0 0 8px rgba(30, 100, 240, 0.15), 0 0 34px var(--glow);
}

.stat-icon-circle svg { width: 28px; height: 28px; }

.stat-number {
  font-family: 'Inter', 'Cairo', sans-serif;
  font-size: clamp(2.6rem, 4.5vw, 3.4rem);
  font-weight: 900;
  color: var(--text-heading);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ============================================
   Contact
   ============================================ */

.contact-card {
  position: relative;
  padding: 50px;
  border-radius: 30px;
  background: linear-gradient(160deg, rgba(13, 40, 105, 0.5), rgba(2, 10, 36, 0.85));
  border: 1px solid var(--border-subtle);
  box-shadow: 0 40px 90px -40px rgba(30, 100, 240, 0.55);
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  top: -200px;
  inset-inline-end: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 100, 240, 0.35), transparent 65%);
  pointer-events: none;
}

.contact-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-subtitle {
  margin: 14px 0 28px;
  color: var(--text-body);
  font-size: 1.02rem;
}

.direct-contacts {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 26px;
}

.direct-contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(7, 23, 66, 0.6);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.direct-contact-card:hover { border-color: var(--border-active); }

.direct-contact-main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
}

.direct-contact-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  box-shadow: 0 8px 20px -6px var(--glow);
}

.direct-contact-icon svg { width: 22px; height: 22px; }

.direct-contact-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.direct-contact-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.direct-contact-value {
  font-weight: 700;
  color: var(--text-heading);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.copy-btn {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-active);
  background: transparent;
  color: var(--primary-light);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.copy-btn:hover { background: var(--primary); color: #fff; }

.copy-btn.copied {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-heading);
  background: rgba(4, 18, 59, 0.7);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.social-link svg { width: 20px; height: 20px; }

.social-link:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary-soft);
  transform: translateY(-4px);
  box-shadow: 0 10px 24px -6px var(--glow);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-heading);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-heading);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

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

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

.contact-form .btn-primary {
  align-self: flex-start;
  padding: 14px 36px;
}

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

.footer {
  position: relative;
  z-index: 1;
  padding: 34px 20px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(1, 6, 22, 0.6);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 30px;
  flex: 1;
}

.footer-copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover { color: var(--primary-light); }

.back-to-top {
  position: fixed;
  bottom: 26px;
  inset-inline-start: 26px;
  z-index: 900;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--border-active);
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 12px 30px -8px var(--glow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
}

.back-to-top svg { width: 22px; height: 22px; }

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

.back-to-top:hover { transform: translateY(-4px); }

/* ============================================
   Lightbox
   ============================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(1, 6, 22, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lightbox.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.lightbox-content {
  max-width: 900px;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-active);
  box-shadow: 0 40px 100px -30px rgba(30, 100, 240, 0.7);
  animation: zoomIn 0.4s var(--ease);
}


.lightbox-info { padding: 22px 28px 28px; }

.lightbox-info h3 {
  color: var(--text-heading);
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.lightbox-info p { color: var(--text-body); }

.lightbox-close {
  position: absolute;
  top: 22px;
  inset-inline-end: 22px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-active);
  background: rgba(4, 18, 59, 0.8);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: var(--primary);
  transform: rotate(90deg);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============================================
   Scroll reveal
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

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

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

@media (max-width: 1024px) {
  .nav-link { padding: 8px 13px; font-size: 0.86rem; }
  .about-content { grid-template-columns: 1fr 300px; gap: 44px; }
}

@media (max-width: 900px) {
  .mobile-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    border-radius: 22px;
    background: rgba(2, 10, 36, 0.96);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
  }

  .nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-link {
    padding: 12px 18px;
    font-size: 1rem;
    text-align: center;
  }
}

@media (max-width: 768px) {
  :root { --section-padding: 80px 16px; }

  .hero { padding: 110px 18px 40px; }

  .hero-content { min-height: calc(100svh - 150px); }

  .hero-title { margin-top: 0; }

  .hero-bottom {
    position: static;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 26px;
  }

  .hero-info { max-width: none; }

  .carousel-container.coverflow { height: 400px; }
  .carousel-card { width: 230px; }

  .coverflow--mockups { height: 360px; }
  .mockup-card { width: 280px; }

  .carousel-btn { width: 40px; height: 40px; font-size: 1.4rem; }
  .carousel-prev { inset-inline-start: 2%; }
  .carousel-next { inset-inline-end: 2%; }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    order: -1;
    max-width: 300px;
    margin: 0 auto;
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .stat-card { padding: 26px 10px 22px; border-radius: 20px; }
  .stat-icon-circle { width: 48px; height: 48px; margin-bottom: 14px; }
  .stat-icon-circle svg { width: 22px; height: 22px; }
  .stat-number { font-size: 1.9rem; }
  .stat-label { font-size: 0.85rem; }


  .contact-card { padding: 30px 20px; border-radius: 24px; }
  .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .contact-form .btn-primary { align-self: stretch; }

  .footer-inner,
  .footer-meta { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 480px) {
  .nav-logo img { height: 32px; }
  .lang-toggle { height: 38px; padding: 0 12px; }
  .mobile-toggle { width: 38px; height: 38px; }

  .hero-title { font-size: clamp(2.9rem, 15vw, 4.4rem); }

  .stats-grid { grid-template-columns: 1fr; max-width: 280px; margin: 0 auto; }
  .stat-number { font-size: 2.6rem; }

  .mockup-badge { width: 32px; height: 32px; border-radius: 10px; }
  .mockup-badge svg { width: 16px; height: 16px; }
}

/* ============================================
   Motion cards (video posters) & shared media box
   ============================================ */

.coverflow--motion { height: 470px; }

.motion-card {
  width: 250px;
  aspect-ratio: 9 / 14;
}

.card-media,
.mockup-media {
  position: relative;
  overflow: hidden;
}

.card-media {
  position: absolute;
  inset: 0;
}

.media-blur {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(18px) brightness(0.55) saturate(1.2);
  transform: scale(1.1);
}

.card-media img,
.mockup-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.motion-card--v .card-media img { object-fit: cover; }

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 62px;
  height: 62px;
  margin: -31px 0 0 -31px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--royal-blue));
  border: 1px solid var(--glow-cyan);
  box-shadow: 0 0 0 8px rgba(30, 100, 240, 0.2), 0 10px 30px -6px var(--glow);
  transition: var(--transition);
  pointer-events: none;
}

.play-btn svg {
  width: 26px;
  height: 26px;
  margin-left: 3px;
}

.carousel-card.is-active .play-btn {
  animation: playPulse 2.2s ease-in-out infinite;
}

.carousel-card:hover .play-btn { transform: scale(1.1); }

.motion-card .play-btn,
.motion-card .card-caption {
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.35s ease;
}

.motion-card.is-active .play-btn,
.motion-card.is-active .card-caption { opacity: 1; }

@keyframes playPulse {
  0%, 100% { box-shadow: 0 0 0 8px rgba(30, 100, 240, 0.2), 0 10px 30px -6px var(--glow); }
  50% { box-shadow: 0 0 0 16px rgba(30, 100, 240, 0.08), 0 10px 40px -6px var(--glow); }
}

.card-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 40px 16px 14px;
  background: linear-gradient(180deg, transparent, rgba(2, 10, 36, 0.92));
  color: var(--text-heading);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
}

.card-caption--project {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: start;
  padding: 46px 18px 16px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.mockup-card.is-active .card-caption--project { opacity: 1; }

.caption-title {
  font-size: 1rem;
  font-weight: 800;
}

.caption-count {
  flex-shrink: 0;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: rgba(30, 100, 240, 0.85);
  border: 1px solid var(--glow-cyan);
}

/* ============================================
   Graphics filters
   ============================================ */

.graphics-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  margin: -14px auto 10px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(4, 18, 59, 0.55);
  border: 1px solid var(--border-subtle);
}

.filter-btn {
  padding: 9px 22px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover { color: var(--text-heading); }

.filter-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  box-shadow: 0 6px 20px -4px var(--glow);
}

/* ============================================
   Lightbox: video + gallery
   ============================================ */

.lightbox-content {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 60px);
}

.lightbox-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 200px;
  background: var(--bg-deep);
}

.lightbox-media img {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.lightbox-media img.is-loading { opacity: 0.35; }

.lightbox-media iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.lightbox.is-video.is-vertical .lightbox-content { max-width: 440px; }

.lightbox.is-video.is-vertical .lightbox-media iframe {
  aspect-ratio: 9 / 16;
  max-height: 72vh;
  width: auto;
  height: 72vh;
  max-width: 100%;
}

.lightbox.is-video.is-vertical .lightbox-media img { max-height: 72vh; }

.lightbox-soon {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 20px;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: rgba(2, 10, 36, 0.85);
  border: 1px solid var(--border-active);
}

.lightbox-info-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.lightbox-counter {
  flex-shrink: 0;
  color: var(--glow-cyan);
  font-weight: 700;
  font-family: 'Inter', 'Cairo', sans-serif;
  font-size: 0.9rem;
  direction: ltr;
}

.lightbox-thumbs {
  display: flex;
  gap: 8px;
  padding: 0 28px 22px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.lightbox-thumbs:empty { display: none; }

.lightbox-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--bg-deep);
  cursor: pointer;
  opacity: 0.55;
  transition: var(--transition);
}

.lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox-thumb:hover { opacity: 0.85; }

.lightbox-thumb.active {
  opacity: 1;
  border-color: var(--glow-cyan);
  box-shadow: 0 0 14px var(--glow);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 52px;
  height: 52px;
  margin-top: -26px;
  border-radius: 50%;
  border: 1px solid var(--border-active);
  background: rgba(4, 18, 59, 0.85);
  color: #fff;
  font-size: 1.9rem;
  line-height: 1;
  padding-bottom: 4px;
  cursor: pointer;
  display: none;
  transition: var(--transition);
}

.lightbox.is-gallery .lightbox-nav { display: grid; place-items: center; }

.lightbox-nav:hover {
  background: var(--primary);
  box-shadow: 0 0 24px var(--glow);
}

.lightbox-prev { inset-inline-start: 22px; }
.lightbox-next { inset-inline-end: 22px; }

@media (max-width: 768px) {
  .coverflow--motion { height: 400px; }
  .motion-card { width: 210px; }

  .graphics-filters { margin-top: -20px; flex-wrap: nowrap; gap: 2px; padding: 5px; }
  .filter-btn { padding: 8px 12px; font-size: 0.8rem; white-space: nowrap; }

  .lightbox { padding: 14px; }
  .lightbox-nav {
    top: auto;
    bottom: 22px;
    margin-top: 0;
    width: 44px;
    height: 44px;
  }
  .lightbox-thumbs { padding: 0 16px 16px; }
  .lightbox-info { padding: 16px 18px 18px; }
  .lightbox.is-gallery .lightbox-content { margin-bottom: 60px; }
}

/* ============================================
   Logo (monogram + name) & personal photos
   ============================================ */

.nav-logo img {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(77, 163, 255, 0.45));
}

.nav-logo .logo-fallback {
  display: block;
  font-size: 1.05rem;
  white-space: nowrap;
}

.hero-avatar img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(77, 163, 255, 0.85);
  box-shadow: 0 0 0 8px rgba(30, 100, 240, 0.18), 0 0 60px rgba(30, 100, 240, 0.55), 0 25px 50px rgba(0, 0, 0, 0.5);
  filter: none;
}

.hero-avatar-halo { inset: -8% -8% -8%; }

.hero-avatar {
  width: clamp(170px, 16vw, 230px);
  margin-top: clamp(22px, 3vw, 40px);
}

.about-image img { aspect-ratio: 1 / 1; }

/* ============================================
   Websites
   ============================================ */

.websites-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.website-card {
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  color: inherit;
  background: linear-gradient(180deg, rgba(13, 40, 105, 0.5), rgba(2, 10, 36, 0.85));
  border: 1px solid var(--border-subtle);
  box-shadow: 0 30px 60px -35px rgba(0, 0, 0, 0.9);
  transition: transform 0.45s var(--ease), border-color 0.35s ease, box-shadow 0.45s ease;
}

.website-card:hover {
  color: inherit;
  transform: translateY(-10px);
  border-color: var(--border-active);
  box-shadow: 0 30px 70px -25px rgba(30, 100, 240, 0.6);
}

.browser-frame {
  margin: 14px 14px 0;
  border-radius: 14px;
  overflow: hidden;
  background: #0B1E4F;
  border: 1px solid rgba(77, 163, 255, 0.25);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  direction: ltr;
  background: rgba(4, 18, 59, 0.95);
  border-bottom: 1px solid rgba(77, 163, 255, 0.15);
}

.browser-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.browser-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #FF5F57;
}

.browser-dots i:nth-child(2) { background: #FEBC2E; }
.browser-dots i:nth-child(3) { background: #28C840; }

.browser-url {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-family: 'Inter', 'Cairo', sans-serif;
  font-size: 0.76rem;
}

.browser-url svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  color: #28C840;
}

.browser-url span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-screen {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #fff;
}

.browser-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.9s var(--ease);
}

.website-card:hover .browser-screen img { transform: scale(1.06); }

.website-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 22px;
}

.website-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.website-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--text-heading);
  line-height: 1.35;
}

.website-domain {
  flex-shrink: 0;
  font-family: 'Inter', 'Cairo', sans-serif;
  font-size: 0.8rem;
  color: var(--glow-cyan);
}

.website-desc {
  flex: 1;
  font-size: 0.93rem;
  color: var(--text-body);
  line-height: 1.8;
}

.website-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.website-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.website-tags span {
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-light);
  background: rgba(30, 100, 240, 0.14);
  border: 1px solid var(--border-subtle);
}

.website-visit {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--royal-blue));
  border: 1px solid var(--glow-cyan);
  transition: var(--transition);
}

.website-visit svg { width: 15px; height: 15px; }

[dir="rtl"] .website-visit svg { transform: scaleX(-1); }

.website-card:hover .website-visit {
  background: var(--primary-hover);
  box-shadow: 0 8px 22px -6px rgba(77, 163, 255, 0.7);
}

@media (max-width: 1024px) {
  .websites-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .websites-grid { grid-template-columns: 1fr; }
  .nav-logo .logo-fallback { font-size: 0.95rem; }
}

@media (max-width: 380px) {
  .nav-logo .logo-fallback { display: none; }
}

/* ============================================
   SEO helpers & prerendered content
   ============================================ */

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Prerendered coverflow cards stay hidden until main.js positions them */
.coverflow .carousel-card:not([style]),
.coverflow .mockup-card:not([style]) { opacity: 0; }

.hero-info .hero-name,
.hero-info .hero-subtitle { display: block; }

.hero-info { font-weight: inherit; }

/* =====================================================================
   Motion system (smooth editorial style)
   ===================================================================== */

:root {
  --ease-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 1300;
  transform: scaleX(0);
  transform-origin: right center;
  background: linear-gradient(90deg, var(--royal-blue), var(--glow-cyan));
  pointer-events: none;
}

[dir="ltr"] .scroll-progress { transform-origin: left center; }

/* ---------- Intro loader ---------- */
html.intro-pending::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: #01081C;
}

.intro-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #01081C;
  transition: transform 0.95s var(--ease-io);
}

.intro-loader.is-out { transform: translateY(-100%); }

.intro-curve {
  position: absolute;
  left: -10%;
  width: 120%;
  top: 99%;
  height: 22vh;
  background: #01081C;
  border-radius: 0 0 50% 50%;
  transform-origin: top;
  transition: transform 0.95s var(--ease-io);
}

.intro-loader.is-out .intro-curve { transform: scaleY(0); }

.intro-word {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  direction: ltr;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.8s var(--ease-expo);
}

.intro-loader.is-in .intro-word { opacity: 1; transform: none; }
.intro-loader.is-out .intro-word { opacity: 0; transform: translateY(-40px); transition-duration: 0.5s; }

.intro-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--glow-cyan);
  box-shadow: 0 0 18px var(--glow-cyan);
}

/* Hero entrance waits for the loader */
.intro-pending .hero-text,
.intro-pending .hero-glow,
.intro-pending .hero-avatar,
.intro-pending .hero-bottom,
.is-loading .hero-text,
.is-loading .hero-glow,
.is-loading .hero-avatar,
.is-loading .hero-bottom { animation-play-state: paused; }

.hero-text { animation-duration: 1.3s; animation-timing-function: var(--ease-expo); }
.hero-glow { animation-duration: 1.3s; animation-timing-function: var(--ease-expo); }

.hero-content { will-change: transform, opacity; }

/* ---------- Mask text reveal ---------- */
.mask-reveal {
  transform: translateY(70%);
  clip-path: inset(-25% -6% 100% -6%);
  opacity: 0.001;
  transition:
    transform 1.25s var(--ease-expo) var(--mask-delay, 0s),
    clip-path 1.25s var(--ease-expo) var(--mask-delay, 0s),
    opacity 0.4s ease var(--mask-delay, 0s);
}

.mask-reveal.is-revealed {
  transform: none;
  clip-path: inset(-25% -6% -25% -6%);
  opacity: 1;
}

/* Cards / paragraphs */
.reveal {
  transform: translateY(60px);
  transition: opacity 1.1s ease var(--stagger, 0s), transform 1.3s var(--ease-expo) var(--stagger, 0s);
}

/* ---------- Navbar hides after the hero (desktop) ---------- */
.navbar { transition: transform 0.7s var(--ease-io), padding 0.35s ease, background 0.35s ease; }
.nav-hidden .navbar { transform: translateY(-115%); }

/* ---------- Round menu button ---------- */
.menu-fab {
  position: fixed;
  top: 22px;
  inset-inline-end: 26px;
  z-index: 1250;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 1px solid rgba(142, 197, 255, 0.55);
  background: linear-gradient(135deg, var(--primary), var(--royal-blue));
  box-shadow: 0 14px 34px -10px var(--glow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transform: scale(0);
  transition: transform 0.6s var(--ease-expo), translate 0.45s var(--ease-expo);
}

.menu-fab.is-visible { transform: scale(1); }

.menu-fab span {
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.45s var(--ease-expo);
}

.menu-open .menu-fab span:first-child { transform: translateY(4.5px) rotate(45deg); }
.menu-open .menu-fab span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* ---------- Side menu ---------- */
.side-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 1150;
  background: rgba(1, 6, 22, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.menu-open .side-menu-overlay { opacity: 1; pointer-events: auto; }

.side-menu {
  position: fixed;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  z-index: 1200;
  width: min(380px, 88vw);
  background: #04123B;
  color: #fff;
  transform: translateX(calc(-100% - 140px));
  visibility: hidden;
  transition: transform 0.9s var(--ease-io), visibility 0s linear 0.9s;
}

[dir="ltr"] .side-menu { transform: translateX(calc(100% + 140px)); }
.menu-open .side-menu {
  transform: translateX(0) !important;
  visibility: visible;
  transition: transform 0.9s var(--ease-io), visibility 0s;
}

/* Phones & narrow screens use the top hamburger menu instead */
@media (max-width: 900px) {
  .menu-fab,
  .side-menu,
  .side-menu-overlay { display: none !important; }
}

.side-menu-curve {
  position: absolute;
  top: -10%;
  bottom: -10%;
  inset-inline-start: -99px;
  width: 200px;
  border-radius: 50%;
  background: #04123B;
  transform: scaleX(1);
  transition: transform 1s var(--ease-io);
  pointer-events: none;
}

.menu-open .side-menu-curve { transform: scaleX(0); }

.side-menu-inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 120px 48px 44px;
}

.side-menu-label {
  padding-bottom: 18px;
  margin-bottom: 26px;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(142, 197, 255, 0.18);
}

.side-menu-label--social { margin-top: auto; }

.side-menu-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-menu-links a {
  position: relative;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.5;
  padding: 7px 0;
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.5s ease, transform 0.9s var(--ease-expo), color 0.3s ease;
}

[dir="ltr"] .side-menu-links a { transform: translateX(60px); }

.menu-open .side-menu-links a { opacity: 1; transform: none; }
.menu-open .side-menu-links a:nth-child(1) { transition-delay: 0.15s; }
.menu-open .side-menu-links a:nth-child(2) { transition-delay: 0.2s; }
.menu-open .side-menu-links a:nth-child(3) { transition-delay: 0.25s; }
.menu-open .side-menu-links a:nth-child(4) { transition-delay: 0.3s; }
.menu-open .side-menu-links a:nth-child(5) { transition-delay: 0.35s; }
.menu-open .side-menu-links a:nth-child(6) { transition-delay: 0.4s; }

.side-menu-links a::before {
  content: '';
  position: absolute;
  top: 50%;
  inset-inline-start: -18px;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--glow-cyan);
  transform: scale(0);
  transition: transform 0.4s var(--ease-expo);
}

.side-menu-links a:hover { color: var(--primary-light); }
.side-menu-links a:hover::before { transform: scale(1); }

.side-menu-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.side-menu-social a {
  color: var(--text-body);
  font-size: 0.95rem;
}

.side-menu-social a:hover { color: #fff; }

/* ---------- Custom cursor (small glowing dot + pulsing ring) ---------- */
html.has-custom-cursor,
html.has-custom-cursor * { cursor: none; }

html.has-custom-cursor input,
html.has-custom-cursor textarea { cursor: text; }

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cursor-active .cursor-dot,
.cursor-active .cursor-ring { opacity: 1; }

.cursor-text .cursor-dot,
.cursor-text .cursor-ring { opacity: 0; }

.cursor-dot::before {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: #EAF4FF;
  box-shadow: 0 0 8px 2px rgba(77, 163, 255, 0.95), 0 0 18px 4px rgba(30, 100, 240, 0.55);
  animation: cursorBlink 1.6s ease-in-out infinite;
  transition: transform 0.35s var(--ease-expo);
}

.cursor-ring::before {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  border: 1px solid rgba(142, 197, 255, 0.55);
  animation: cursorPulse 2.4s ease-out infinite;
  transition: width 0.4s var(--ease-expo), height 0.4s var(--ease-expo), margin 0.4s var(--ease-expo), border-color 0.3s ease, background-color 0.3s ease;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@keyframes cursorPulse {
  0% { box-shadow: 0 0 0 0 rgba(77, 163, 255, 0.35); }
  70% { box-shadow: 0 0 0 10px rgba(77, 163, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(77, 163, 255, 0); }
}

/* over links / buttons / cards */
.cursor-hover .cursor-ring::before {
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-color: rgba(142, 197, 255, 0.9);
  background-color: rgba(30, 100, 240, 0.12);
}

.cursor-hover .cursor-dot::before { transform: scale(0.6); }

.cursor-down .cursor-ring::before {
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
}

/* ---------- Magnetic + fill buttons ---------- */
.btn-primary,
.carousel-btn,
.social-link,
.back-to-top,
.lang-toggle,
.filter-btn,
.website-visit {
  transition: var(--transition), translate 0.5s var(--ease-expo);
}

.btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-primary::before {
  content: '';
  position: absolute;
  left: -25%;
  top: 100%;
  z-index: -1;
  width: 150%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #EAF2FF;
  transition: top 0.7s var(--ease-expo);
}

.btn-primary:hover::before { top: -40%; }
.btn-primary:hover { color: var(--bg-body); }

/* ---------- Big services marquee ---------- */
.services-ribbon {
  position: relative;
  z-index: 2;
  padding: 26px 0 14px;
  overflow: hidden;
  direction: ltr;
  pointer-events: none;
}

.ribbon-track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.ribbon-group {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding-inline-end: 0.5em;
  list-style: none;
  white-space: nowrap;
  font-size: clamp(1.15rem, 2.2vw, 1.75rem);
  line-height: 1.4;
}

.ribbon-group li {
  display: flex;
  align-items: center;
  gap: 0.5em;
  color: #fff;
  font-weight: 800;
}

.ribbon-group li:nth-child(even) {
  color: transparent;
  -webkit-text-stroke: 1px rgba(142, 197, 255, 0.85);
  font-family: 'Inter', 'Cairo', sans-serif;
  font-weight: 700;
}

.ribbon-group li::after {
  content: '—';
  color: var(--glow-cyan);
  -webkit-text-stroke: 0;
  font-weight: 300;
}

/* ---------- Parallax images ---------- */
.browser-screen img,
.about-image img { will-change: transform; transform: scale(1.14); }

.about-image { overflow: hidden; }

.website-card:hover .browser-screen img { transform: none; }

/* ---------- Sliding gallery ---------- */
.sliding-gallery {
  position: relative;
  z-index: 1;
  padding: 70px 0 110px;
  overflow: hidden;
  direction: ltr;
}

.slide-row {
  display: flex;
  gap: 20px;
  width: max-content;
  position: relative;
  left: 50%;
  translate: -50% 0;
  will-change: transform;
}

.slide-row + .slide-row { margin-top: 20px; }

.slide-tile {
  flex-shrink: 0;
  width: clamp(200px, 22vw, 330px);
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: #0B1E4F;
  border: 1px solid var(--border-subtle);
}

.slide-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Curved divider into contact ---------- */
.curve-wrap {
  position: relative;
  height: clamp(80px, 12vw, 180px);
  margin-bottom: calc(-1 * clamp(80px, 12vw, 180px));
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.curve {
  position: absolute;
  top: -1px;
  left: -10%;
  width: 120%;
  height: clamp(80px, 12vw, 180px);
  background: var(--bg-body);
  border-radius: 0 0 50% 50%;
  transform-origin: top;
  box-shadow: 0 30px 60px -30px rgba(30, 100, 240, 0.35);
}

.contact-section.has-curve {
  background: linear-gradient(180deg, #04123B 0%, #031033 100%);
  padding-top: 170px;
}

.footer { background: #031033; }

/* ---------- Small screens ---------- */
@media (max-width: 768px) {
  .services-ribbon { padding: 18px 0 6px; }
  .sliding-gallery { padding: 40px 0 70px; }
  .contact-section.has-curve { padding-top: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  .mask-reveal { transform: none; clip-path: none; opacity: 1; }
  .intro-loader { display: none; }
}

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