/* =======================
   RESET & VARIABLES
======================== */

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

:root {
  --bg: #060816;
  --bg-2: #0d1228;
  --primary: #7c5cff;
  --primary-light: #9b8cff;
  --text: #ffffff;
  --muted: #b7bfd3;
  --border: rgba(255,255,255,0.08);
  --card: rgba(255,255,255,0.04);
  --glow: rgba(124, 92, 255, 0.45);
}

body {
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124,92,255,0.25), transparent 30%),
    radial-gradient(circle at bottom right, rgba(0,183,255,0.12), transparent 25%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: min(1200px, 92%);
  margin: auto;
}

/* =======================
   NAVBAR
======================== */

.navbar-wrap {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(6, 8, 22, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
}

.logo {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 1px;
}

.logo span {
  background: linear-gradient(135deg, #7c5cff, #46c2ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links a {
  color: white;
  transition: 0.3s ease;
  font-size: 14px;
}

.nav-links a:hover {
  color: white;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  cursor: pointer;
}

.lang-toggle button {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
  font-family: 'Inter', sans-serif;
}

.lang-toggle button.active {
  background: var(--primary);
  color: white;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c5cff, #46c2ff);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s ease;
  box-shadow: 0 4px 15px rgba(124,92,255,0.35);
  border: none;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124,92,255,0.5);
  color: white;
}

/* =======================
   HERO
======================== */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  min-height: calc(100vh - 120px);
  padding-bottom: 80px;
}

.hero-text small {
  display: inline-block;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 24px;
  font-weight: 600;
}

.hero-text h1 {
  font-size: clamp(60px, 10vw, 110px);
  line-height: 0.95;
  font-weight: 800;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, #7c5cff, #46c2ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
  max-width: 550px;
  margin-bottom: 36px;
}

/* =======================
   EMAIL FORM
======================== */

.notify-box {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.notify-box input {
  flex: 1;
  min-width: 250px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  height: 58px;
  border-radius: 14px;
  padding: 0 20px;
  color: white;
  outline: none;
  font-size: 15px;
  transition: 0.3s;
}

.notify-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124,92,255,0.15);
}

.notify-box button {
  height: 58px;
  padding: 0 28px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #7c5cff, #46c2ff);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s ease;
  box-shadow: 0 10px 30px rgba(124,92,255,0.35);
  font-family: 'Inter', sans-serif;
}

.notify-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(124,92,255,0.5);
}

/* =======================
   HERO VISUAL
======================== */

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

.main-card {
  width: 100%;
  max-width: 520px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  border-radius: 28px;
  padding: 36px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.02),
    0 30px 80px rgba(0,0,0,0.5);
}

.main-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      135deg,
      rgba(124,92,255,0.18),
      transparent 35%
    );
  pointer-events: none;
}

.floating {
  position: absolute;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 18px 22px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  animation: float 4s ease-in-out infinite;
}

.floating.one {
  top: -20px;
  left: -30px;
}

.floating.two {
  bottom: -10px;
  right: -20px;
  animation-delay: 1s;
}

.floating.three {
  top: 50%;
  right: -40px;
  animation-delay: 2s;
}

.floating span {
  font-size: 30px;
}

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

.code-window {
  background: #0b1022;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}

.window-top {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  background: rgba(255,255,255,0.02);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red {
  background: #ff5f57;
}

.dot.yellow {
  background: #febc2e;
}

.dot.green {
  background: #28c840;
}

.code-content {
  padding: 24px;
  font-family: monospace;
  line-height: 1.9;
  color: #d7ddf2;
  font-size: 14px;
}

.code-content .purple {
  color: #b28dff;
}

.code-content .blue {
  color: #6fd3ff;
}

.code-content .green {
  color: #7fffaf;
}

/* =======================
   STATS BAR
======================== */

.stats-bar {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 100px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-item h3 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #7c5cff, #46c2ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-item p {
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}

/* =======================
   SERVICES
======================== */

.services {
  padding-bottom: 120px;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 40px;
  margin-bottom: 14px;
}

.section-title p {
  color: var(--muted);
  max-width: 700px;
  margin: auto;
  line-height: 1.8;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px 26px;
  transition: 0.35s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(124,92,255,0.15),
    transparent 40%
  );
  opacity: 0;
  transition: 0.35s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(124,92,255,0.3);
}

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

.service-icon {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 30px;
  background: rgba(124,92,255,0.12);
  border: 1px solid rgba(124,92,255,0.2);
  box-shadow: 0 0 30px rgba(124,92,255,0.18);
}

.service-card h3 {
  margin-bottom: 14px;
  font-size: 22px;
}

.service-card p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

/* =======================
   TECH STACK
======================== */

.tech-stack {
  margin-top: 80px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.tech {
  padding: 14px 22px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: #dbe4ff;
  font-size: 14px;
  transition: 0.3s ease;
}

.tech:hover {
  transform: translateY(-4px);
  border-color: rgba(124,92,255,0.4);
  box-shadow: 0 10px 25px rgba(124,92,255,0.2);
}

/* =======================
   PORTFOLIO
======================== */

.portfolio {
  padding: 100px 0 120px;
}

.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(124,92,255,0.3);
}

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

.portfolio-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: 0.35s ease;
  display: flex;
  flex-direction: column;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  border-color: rgba(124,92,255,0.35);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.portfolio-thumb {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
  overflow: hidden;
}

.portfolio-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(6,8,22,0.9));
}

.portfolio-thumb.bg-1 { background: linear-gradient(135deg, #1a1040, #0d1228); }
.portfolio-thumb.bg-2 { background: linear-gradient(135deg, #0d2040, #061020); }
.portfolio-thumb.bg-3 { background: linear-gradient(135deg, #1a0d30, #100828); }
.portfolio-thumb.bg-4 { background: linear-gradient(135deg, #0d2820, #061810); }
.portfolio-thumb.bg-5 { background: linear-gradient(135deg, #281a0d, #1a1008); }
.portfolio-thumb.bg-6 { background: linear-gradient(135deg, #0d1a28, #08101a); }
.portfolio-thumb.bg-7 { background: linear-gradient(135deg, #280d1a, #1a0810); }
.portfolio-thumb.bg-8 { background: linear-gradient(135deg, #1a280d, #101a08); }

.portfolio-info {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.portfolio-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 8px;
  background: rgba(124,92,255,0.15);
  color: var(--primary-light);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  width: fit-content;
}

.portfolio-info h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.portfolio-info p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
  flex: 1;
}

.portfolio-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.portfolio-tech span {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 12px;
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-light);
  font-size: 14px;
  font-weight: 600;
  transition: 0.3s;
}

.portfolio-link:hover {
  color: #46c2ff;
}

.portfolio-link svg {
  width: 16px;
  height: 16px;
  transition: 0.3s;
}

.portfolio-link:hover svg {
  transform: translateX(4px);
}

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

/* =======================
   CONTACT
======================== */

.contact {
  padding: 100px 0 120px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info h3 {
  font-size: 28px;
  margin-bottom: 16px;
}

.contact-info > p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 36px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.contact-detail-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124,92,255,0.12);
  border: 1px solid rgba(124,92,255,0.2);
  font-size: 20px;
  flex-shrink: 0;
}

.contact-detail-text p {
  color: var(--muted);
  font-size: 13px;
}

.contact-detail-text a,
.contact-detail-text span {
  font-size: 16px;
  font-weight: 500;
}

.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.form-group label .required {
  color: #ff6b6b;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  color: white;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124,92,255,0.15);
}

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

.form-submit {
  width: 100%;
  height: 54px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #7c5cff, #46c2ff);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s ease;
  box-shadow: 0 10px 30px rgba(124,92,255,0.35);
  font-family: 'Inter', sans-serif;
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(124,92,255,0.5);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-message {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  display: none;
}

.form-message.success {
  display: block;
  background: rgba(40, 200, 64, 0.12);
  border: 1px solid rgba(40, 200, 64, 0.3);
  color: #7fffaf;
}

.form-message.error {
  display: block;
  background: rgba(255, 91, 91, 0.12);
  border: 1px solid rgba(255, 91, 91, 0.3);
  color: #ff8a8a;
}

/* =======================
   FOOTER
======================== */

footer {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 28px 0;
  margin-top: 20px;
}

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

.footer-content p {
  color: var(--muted);
  font-size: 14px;
}

/* =======================
   WHATSAPP BUTTON
======================== */

.whatsapp-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  transition: 0.3s ease;
  z-index: 999;
  cursor: pointer;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn svg {
  width: 32px;
  height: 32px;
  fill: white;
}

/* =======================
   TOAST
======================== */

.toast {
  position: fixed;
  bottom: 100px;
  right: 28px;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: 0.3s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  background: rgba(40, 200, 64, 0.95);
  color: white;
  box-shadow: 0 6px 20px rgba(40, 200, 64, 0.3);
}

.toast.error {
  background: rgba(255, 91, 91, 0.95);
  color: white;
  box-shadow: 0 6px 20px rgba(255, 91, 91, 0.3);
}

/* =======================
   RTL SUPPORT
======================== */

[dir="rtl"] .code-content div {
  direction: ltr;
  text-align: left;
}

[dir="rtl"] .tech-stack {
  font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
}

[dir="rtl"] .service-card p,
[dir="rtl"] .hero-text p,
[dir="rtl"] .section-title p,
[dir="rtl"] .contact-info > p {
  font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
}

[dir="rtl"] .notify-box input {
  font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
  text-align: right;
}

[dir="rtl"] .form-group input,
[dir="rtl"] .form-group textarea {
  font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
  text-align: right;
}

[dir="rtl"] .portfolio-info p,
[dir="rtl"] .portfolio-info h3,
[dir="rtl"] .service-card h3,
[dir="rtl"] .stat-item p,
[dir="rtl"] .section-title h2,
[dir="rtl"] .hero-text h1,
[dir="rtl"] .contact-info h3 {
  font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
}

/* =======================
   RESPONSIVE
======================== */

@media (max-width: 1050px) {

  .hero {
    grid-template-columns: 1fr;
    padding-top: 40px;
    gap: 80px;
  }

  .hero-text {
    text-align: center;
  }

  .hero-text p {
    margin-inline: auto;
  }

  .notify-box {
    justify-content: center;
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 640px) {

  .hero-text h1 {
    font-size: 64px;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .navbar {
    flex-direction: column;
    gap: 20px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-content {
    text-align: center;
    justify-content: center;
  }

  .floating {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .stat-item h3 {
    font-size: 36px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-filters {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .section-title h2 {
    font-size: 30px;
  }
}
