:root {
  --blue: #2563eb;
  --blue-2: #3b82f6;
  --cyan: #22d3ee;
  --purple: #8b5cf6;
  --grad: linear-gradient(90deg, #1d9bf0 0%, #6d5cf6 60%, #a855f7 100%);
  --navy: #101a3a;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f5f7ff;
  --paper: #FFFDF7; /* warm white used for all backgrounds */
  --radius: 16px;
  --shadow: 0 8px 30px rgba(30, 41, 99, .08);
  --font: "IBM Plex Sans Arabic", "Tajawal", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Consolas", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 28px; height: 78px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 26px; letter-spacing: -.5px; direction: ltr; }
.brand img { width: 46px; height: 46px; }
.brand .code { color: #1e293b; }
.brand .lens { margin-left: -10px; }
.brand .lens { background: linear-gradient(90deg, #6366f1, #a855f7); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sep { width: 1px; height: 34px; background: var(--line); }
.main-nav { display: flex; gap: 34px; font-weight: 600; font-size: 16px; color: #374151; }
.main-nav a { position: relative; padding: 26px 4px; }
.main-nav a.active { color: var(--blue); }
.main-nav a.active::after { content: ""; position: absolute; inset-inline: -8px; bottom: -1px; height: 3px; border-radius: 3px; background: var(--blue); }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 28px; }
.login-link { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #374151; font-size: 15px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 14px; padding: 13px 26px;
  font-weight: 700; font-size: 16px; transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(79, 70, 229, .28); }
.btn-ghost { background: var(--paper); color: #374151; border: 1.5px solid #d1d5db; }
.btn-lg { padding: 16px 30px; font-size: 17px; border-radius: 16px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 400px at 85% 110%, rgba(34, 211, 238, .18), transparent 60%),
    radial-gradient(700px 400px at 10% 20%, rgba(139, 92, 246, .10), transparent 60%),
    linear-gradient(180deg, var(--paper), color-mix(in srgb, var(--paper) 94%, #e8d9a8));
}
.hero .container { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px; min-height: 330px; padding-block: 30px; }
.hero h1 { font-size: clamp(34px, 4.4vw, 52px); margin: 0 0 14px; font-weight: 800; letter-spacing: -.5px; color: #0f172a; }
.hero p { font-size: 20px; color: #374151; margin: 0 0 34px; }
.hero-actions { display: flex; gap: 22px; flex-wrap: wrap; }
.hero-art { position: relative; height: 300px; }
.hero-art svg { width: 100%; height: 100%; }
.float { animation: float 5s ease-in-out infinite; }
.float.d2 { animation-delay: -1.5s; }
.float.d3 { animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ---------- Courses ---------- */
.section { padding: 46px 0 64px; }
.section-title { text-align: center; margin-bottom: 28px; }
.section-title h2 { display: inline-flex; align-items: center; gap: 28px; font-size: 30px; margin: 0; font-weight: 800; }
.section-title h2::before, .section-title h2::after { content: ""; width: 160px; height: 1px; background: linear-gradient(90deg, transparent, #c7cbe0); }
.section-title h2::after { transform: scaleX(-1); }
.section-title p { margin: 6px 0 0; color: #4b5563; font-size: 17px; }

.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.course-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px; box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.course-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.course-thumb { position: relative; border-radius: 10px; overflow: hidden; height: 128px; }
.course-thumb svg { width: 100%; height: 100%; display: block; }
.level { position: absolute; top: 10px; inset-inline-start: 10px; background: #ede9fe; color: #4c1d95; font-size: 13px; font-weight: 600; padding: 3px 14px; border-radius: 999px; }
.level.beginner { background: #e0f2fe; color: #0c4a6e; }
.course-body { text-align: center; padding: 18px 12px 14px; }
.course-body h3 { margin: 0 0 8px; font-size: 21px; }
.course-body p { margin: 0 0 14px; color: #4b5563; font-size: 15px; }
.course-link { color: var(--blue); font-weight: 700; font-size: 15px; display: inline-flex; gap: 8px; align-items: center; }
.course-link svg { transition: transform .2s; }
.course-card:hover .course-link svg { transform: translateX(-4px); }

/* ---------- Features (about) ---------- */
.features { background: var(--paper); border-top: 1px solid color-mix(in srgb, var(--paper) 85%, #c9b77f); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 12px; color: #fff; }
.feature h3 { margin: 0 0 6px; font-size: 18px; }
.feature p { margin: 0; color: #4b5563; line-height: 1.7; font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #cbd5e1; }
.site-footer .container { display: flex; align-items: center; gap: 40px; height: 96px; }
.site-footer .brand .code { color: #fff; }
.footer-nav { display: flex; gap: 0; font-size: 15px; }
.footer-nav a { padding: 0 26px; border-inline-start: 1px solid #475569; }
.footer-nav a:first-child { border: 0; }
.footer-nav a:hover { color: #fff; }
.social { margin-inline-start: auto; display: flex; gap: 14px; }
.social a { width: 36px; height: 36px; border-radius: 50%; background: #334155; display: grid; place-items: center; color: #cbd5e1; transition: background .2s; }
.social a:hover { background: #4f46e5; color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .main-nav { display: none; }
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-art { height: 240px; order: -1; }
  .course-grid, .feature-grid { grid-template-columns: 1fr; }
  .section-title h2::before, .section-title h2::after { width: 40px; }
  .site-footer .container { flex-direction: column; height: auto; padding-block: 26px; gap: 18px; }
  .social { margin: 0; }
}
@media (max-width: 560px) {
  .login-link span { display: none; }
  .brand-sep { display: none; }
  .header-actions { gap: 12px; }
  .header-actions .btn { padding: 10px 16px; font-size: 14px; }
  .brand { font-size: 21px; }
  .brand img { width: 38px; height: 38px; }
  .hero p { font-size: 17px; }
  .footer-nav a { padding: 0 12px; }
}
