:root {
  font-size: 18px;
  --font-base: 'Space Grotesk', 'Noto Sans Arabic', 'Noto Sans', system-ui,
    -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bg: #01030f;
  --bg-alt: #070a1f;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.16);
  --accent: #bcff5e;
  --accent-strong: #7b5dff;
  --text: #f9fbff;
  --muted: rgba(249, 251, 255, 0.76);
  --border: rgba(255, 255, 255, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-base);
  background: radial-gradient(circle at 20% 20%, #1f1541 0%, transparent 45%),
    radial-gradient(circle at 80% 0%, #0b4964 0%, transparent 35%), var(--bg);
  color: var(--text);
  line-height: 1.7;
  padding-bottom: 4rem;
}

code {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 0.95em;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.background-glow {
  position: fixed;
  inset: -30% auto auto 50%;
  width: 1400px;
  height: 1400px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(124, 93, 255, 0.45), transparent 65%);
  filter: blur(160px);
  opacity: 0.7;
  z-index: 0;
  pointer-events: none;
}

main,
.hero,
footer {
  position: relative;
  z-index: 1;
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.hero {
  padding: 4.5rem 0 2.5rem;
  text-align: center;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  font-size: 0.9rem;
  color: var(--accent);
  margin: 0;
}

.language-select {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  font-size: 0.82rem;
  letter-spacing: 0.08rem;
}

.language-select label {
  color: var(--muted);
}

#language-picker {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  padding: 0.5rem 2.75rem 0.5rem 1rem;
  font-size: 0.95rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 4.6rem);
  letter-spacing: -1.5px;
  margin: 0 0 1rem;
}

.hero .tagline {
  font-size: 1.2rem;
  max-width: 720px;
  margin: 0 auto 2rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-actions a {
  padding: 0.95rem 2.4rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 200ms ease, opacity 200ms ease,
    box-shadow 250ms ease;
}

.hero-actions .primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #080808;
  box-shadow: 0 20px 45px rgba(124, 93, 255, 0.35);
}

.hero-actions .secondary {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.hero-actions a:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

section {
  padding: 4rem 0 0;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 1.4rem;
}

p {
  margin-top: 0.3rem;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.8rem;
}

.card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(8, 10, 25, 0.6));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.75rem;
  min-height: 200px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

.card a {
  margin-top: auto;
  font-weight: 600;
  color: var(--accent);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.timeline {
  margin-top: 4rem;
  padding: 3rem;
  border-radius: 32px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(188, 255, 94, 0.15), rgba(20, 19, 40, 0.9));
}

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

.timeline article {
  background: rgba(4, 5, 20, 0.55);
  border-radius: 20px;
  padding: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.timestamp {
  text-transform: uppercase;
  letter-spacing: 0.25rem;
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.cta {
  margin-top: 4rem;
  text-align: center;
}

.cta p {
  max-width: 760px;
  margin: 0 auto 2rem;
}

footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3rem 0 1rem;
  text-align: center;
  color: var(--muted);
}

/* RTL adjustments */
html[dir='rtl'] body {
  direction: rtl;
}

html[dir='rtl'] .top-bar,
html[dir='rtl'] .section-header,
html[dir='rtl'] .hero-actions {
  flex-direction: row-reverse;
}

html[dir='rtl'] .hero,
html[dir='rtl'] .card,
html[dir='rtl'] .timeline,
html[dir='rtl'] .cta,
html[dir='rtl'] footer {
  text-align: right;
}

html[dir='rtl'] .language-select {
  align-items: flex-end;
}

html[dir='rtl'] #language-picker {
  text-align: right;
  direction: rtl;
}

#language-picker {
  direction: ltr;
}

@media (max-width: 900px) {
  .hero-actions a {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 640px) {
  :root {
    font-size: 17px;
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline {
    padding: 2.4rem;
  }
}

@media (max-width: 480px) {
  #language-picker {
    width: 100%;
  }

  html[dir='rtl'] .top-bar {
    align-items: flex-end;
  }
}
