/* ==========================================================================
   PROJECT LANDING PAGE & DOCUMENTATION DESIGN SYSTEM
   Modern Dark Glassmorphic Aesthetic (Vercel / Linear / Apple Caliber)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0c101a;
  --bg-card: rgba(16, 22, 35, 0.75);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(6, 182, 212, 0.4);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --accent-cyan: #06b6d4;
  --accent-violet: #8b5cf6;
  --accent-emerald: #10b981;
  --accent-orange: #f97316;
  
  --gradient-primary: linear-gradient(135deg, #06b6d4, #3b82f6, #8b5cf6);
  --gradient-glow: radial-gradient(circle, rgba(6, 182, 212, 0.25), transparent 70%);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --font-arabic: 'Cairo', sans-serif;
  --font-latin: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-arabic);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
  direction: rtl;
}

body.lang-en {
  direction: ltr;
  font-family: var(--font-latin);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Ambient Backdrops */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.ambient-top {
  width: 600px;
  height: 600px;
  background: var(--gradient-glow);
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
}

/* Landing Navigation */
.project-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(7, 9, 14, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-color);
}

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

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.25s ease;
}

.back-link:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  transform: translateX(4px);
}

body.lang-en .back-link:hover {
  transform: translateX(-4px);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.55);
}

.btn-github {
  background: #181d28;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-github:hover {
  background: #242c3d;
  border-color: #fff;
  transform: translateY(-2px);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* Hero Showcase */
.project-hero {
  padding-top: 130px;
  padding-bottom: 70px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.project-hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.project-hero-desc {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 34px auto;
  line-height: 1.8;
}

.project-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 50px;
}

/* App Mockup Showcase Frame */
.mockup-showcase-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(6, 182, 212, 0.12);
  backdrop-filter: blur(20px);
  max-width: 960px;
  margin: 0 auto 60px auto;
  overflow: hidden;
  position: relative;
}

.mockup-showcase-box img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
}

/* Screenshot Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: all 0.3s ease;
  overflow: hidden;
}

.gallery-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-cyan);
}

.gallery-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.gallery-caption {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 10px;
  text-align: center;
}

/* Feature Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(6, 182, 212, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Documentation Tabs & Code Blocks */
.docs-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 80px 0;
  margin: 60px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 45px;
}

.section-head h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.doc-box {
  background: #080b12;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.doc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
}

.doc-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.doc-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-subtle);
  direction: ltr;
}

.doc-content {
  padding: 30px;
  direction: ltr;
  text-align: left;
}

pre code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.8;
  color: #e2e8f0;
  display: block;
  overflow-x: auto;
}

.token-keyword { color: #c084fc; font-weight: 600; }
.token-type { color: #38bdf8; font-weight: 600; }
.token-func { color: #60a5fa; }
.token-string { color: #4ade80; }
.token-comment { color: #64748b; font-style: italic; }

/* Interactive Tech Specs Table */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
}

.specs-table th, .specs-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  text-align: right;
  font-size: 0.95rem;
}

body.lang-en .specs-table th, body.lang-en .specs-table td {
  text-align: left;
}

.specs-table th {
  color: var(--accent-cyan);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.015);
}

.specs-table td {
  color: var(--text-muted);
}

.specs-table td strong {
  color: var(--text-main);
}

/* Footer */
.project-footer {
  padding: 50px 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
  color: var(--text-subtle);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .project-navbar {
    padding: 10px 0;
  }

  .nav-flex {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .back-link {
    align-self: flex-start;
    font-size: 0.82rem;
  }

  .project-nav-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  .project-nav-actions .btn {
    flex: 1 1 calc(50% - 6px);
    padding: 8px 10px;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .project-hero {
    padding-top: 140px;
    padding-bottom: 40px;
  }

  .project-hero-title {
    font-size: clamp(1.8rem, 6.5vw, 2.3rem);
    line-height: 1.3;
  }

  .project-hero-desc {
    font-size: 0.98rem;
    line-height: 1.7;
    margin-bottom: 24px;
  }

  .project-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-bottom: 34px;
  }

  .project-cta-group .btn {
    width: 100%;
    padding: 12px;
  }

  .mockup-showcase-box {
    padding: 10px;
    border-radius: var(--radius-md);
    margin-bottom: 36px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-card {
    padding: 22px 18px;
  }

  .docs-section {
    padding: 45px 0;
  }

  .doc-content {
    padding: 18px 14px;
  }

  pre code {
    font-size: 0.8rem;
  }

  .specs-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .specs-table th, .specs-table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
}
