:root {
  --bg: #0a0b12;
  --bg-alt: #0e1018;
  --surface: #12141f;
  --surface-2: #171a28;
  --border: rgba(255,255,255,0.08);
  --text: #eef0f7;
  --text-dim: #a6acc2;
  --text-faint: #6d7288;
  --primary: #29b6f6;
  --primary-2: #0d47a1;
  --accent: #8b5cf6;
  --gradient: linear-gradient(90deg, #54c5f8, var(--primary-2));
  --gradient-soft: linear-gradient(135deg, rgba(41,182,246,0.18), rgba(139,92,246,0.12));
  --shadow: 0 20px 50px -20px rgba(41, 182, 246, 0.4);
  --radius: 18px;
  --container: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; scroll-padding-top: 84px; }

::selection {
  background: rgba(41, 182, 246, 0.35);
  color: #fff;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--surface-2);
  border-radius: 8px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #232841; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
button, input, select, textarea { font-family: inherit; }

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

/* Interactive fluid background (all devices; quality adapts in fluid-bg.js) */
#fluid-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  display: none;
  pointer-events: none;
}
#fluid-canvas.active { display: block; }

/* Background decor (fallback / mobile) */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}
.bg-decor.fluid-active { display: none; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  will-change: transform, opacity;
}
.blob-1 {
  width: 520px;
  height: 520px;
  background: var(--primary);
  top: -180px;
  right: -120px;
  animation: blobDrift1 24s ease-in-out infinite alternate;
}
.blob-2 {
  width: 480px;
  height: 480px;
  background: var(--accent);
  bottom: -200px;
  left: -140px;
  opacity: 0.18;
  animation: blobDrift2 30s ease-in-out infinite alternate;
}
.blob-3 {
  width: 460px;
  height: 460px;
  background: #0d47a1;
  top: 30%;
  left: -80px;
  opacity: 0.2;
  animation: blobDrift3 27s ease-in-out infinite alternate;
}
.blob-4 {
  width: 380px;
  height: 380px;
  background: #142850;
  bottom: 5%;
  right: -60px;
  opacity: 0.25;
  animation: blobDrift4 34s ease-in-out infinite alternate;
}
@keyframes blobDrift1 {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.35; }
  50%  { transform: translate(-50px, 60px) scale(1.12); opacity: 0.22; }
  100% { transform: translate(30px, -30px) scale(0.96); opacity: 0.32; }
}
@keyframes blobDrift2 {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.18; }
  50%  { transform: translate(60px, -40px) scale(1.1); opacity: 0.28; }
  100% { transform: translate(-30px, 20px) scale(0.94); opacity: 0.16; }
}
@keyframes blobDrift3 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(70px, 40px) scale(1.15); }
  100% { transform: translate(-20px, -50px) scale(0.92); }
}
@keyframes blobDrift4 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-60px, -30px) scale(1.1); }
  100% { transform: translate(30px, 40px) scale(0.95); }
}
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none !important; }
}
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 70%);
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(10, 11, 18, 0.7);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.nav.scrolled {
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 48px;
  overflow: visible;
}
.brand-logo-wrap img {
  height: 128px;
  width: auto;
  transform: rotate(-90deg);
  transform-origin: center;
  display: block;
}
.nav-links {
  display: flex;
  gap: 28px;
  margin-inline-start: auto;
}
.nav-links a {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s ease;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { transform: scaleX(1); }
.nav-cta { display: inline-flex; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 8px 24px 20px;
  border-top: 1px solid var(--border);
}
.nav-mobile a {
  padding: 12px 0;
  color: var(--text-dim);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.nav-mobile.open { display: flex; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn-sm { padding: 10px 20px; font-size: 0.88rem; }
.btn-primary {
  background: linear-gradient(135deg, #2f8fe6, #123f96);
  color: #fff;
  border: 1.5px solid rgba(148, 219, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 0 0 1px rgba(41,182,246,0.12),
    0 10px 28px -8px rgba(41,182,246,0.55),
    0 0 36px -10px rgba(84,197,248,0.55);
}
.btn-primary:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 219, 255, 0.8);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 0 0 1px rgba(41,182,246,0.2),
    0 16px 40px -10px rgba(41,182,246,0.7),
    0 0 50px -8px rgba(84,197,248,0.7);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: #fff; transform: translateY(-2px); }

/* Reveal animation — gated behind html.js so content stays visible if JS ever fails */
html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.js .reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Hero entrance: pure CSS, runs on first paint (no JS dependency) */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-in { animation: heroIn 0.6s ease both; }
.hero-content .hero-in:nth-child(2) { animation-delay: 0.06s; }
.hero-content .hero-in:nth-child(3) { animation-delay: 0.12s; }
.hero-content .hero-in:nth-child(4) { animation-delay: 0.18s; }
.hero-content .hero-in:nth-child(5) { animation-delay: 0.24s; }
.hero-content .hero-in:nth-child(6) { animation-delay: 0.3s; }
.hero-showcase.hero-in { animation-delay: 0.2s; }
@media (prefers-reduced-motion: reduce) {
  .hero-in { animation: none; }
}

/* Hero */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 80px 0 60px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
  width: 100%;
}
.hero-content { text-align: right; }
.eyebrow {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 24px;
  background: var(--surface);
}
.hero-name {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 900;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.hero-title {
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}
.hero-title .sep { color: var(--text-faint); font-weight: 400; }
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Animated underline mark for emphasized words */
.marked {
  position: relative;
  display: inline-block;
}
.marked::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -3px;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(41,182,246,0.55), rgba(139,92,246,0.45));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.8s cubic-bezier(.4,0,.2,1) 0.25s;
  z-index: -1;
  pointer-events: none;
}
.reveal.in-view .marked::after,
.marked.reveal.in-view::after {
  transform: scaleX(1);
}
@media (prefers-reduced-motion: reduce) {
  .marked::after { transition: none !important; transform: scaleX(1); }
}
.hero-desc {
  color: var(--text-dim);
  font-size: 1.08rem;
  max-width: 520px;
  margin: 0 0 36px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.hero-stats {
  display: flex;
  justify-content: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}
.stat { text-align: right; }

/* Hero showcase */
.hero-showcase {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 12px;
}
.showcase-glow {
  position: absolute;
  inset: -14%;
  background: radial-gradient(circle, rgba(41,182,246,0.35), rgba(139,92,246,0.16) 45%, transparent 72%);
  filter: blur(44px);
  z-index: 0;
}
.orbit-icon {
  position: relative;
  z-index: 1;
  aspect-ratio: 1;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: iconfloat 6s ease-in-out infinite;
}
.orbit-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oi-2, .oi-5, .oi-8 { margin-top: 22px; animation-delay: -2s; }
.oi-3, .oi-6, .oi-9 { margin-top: -16px; animation-delay: -4s; }
@keyframes iconfloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.showcase-caption {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-faint);
}
.stat-num, .stat-plus {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text);
}
.stat-plus { color: var(--primary); }
.stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-faint);
  margin-top: 4px;
}
.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--border);
  border-radius: 20px;
}
.scroll-cue span {
  display: block;
  width: 4px;
  height: 8px;
  margin: 6px auto 0;
  background: var(--primary);
  border-radius: 2px;
  animation: scrollcue 1.8s ease infinite;
}
@keyframes scrollcue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* Sections */
.section { padding: 150px 0; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(139,92,246,0.05), transparent); }
.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.eyebrow-num {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.08em;
  opacity: 0.9;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 900;
  margin-bottom: 16px;
}
.section-sub {
  color: var(--text-dim);
  max-width: 640px;
  font-size: 1.05rem;
  margin-bottom: 48px;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: start;
  margin-top: 20px;
}
.about-text p { color: var(--text-dim); margin-bottom: 18px; font-size: 1.04rem; }
.about-text strong { color: var(--text); }
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.skill-chip {
  position: relative;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  opacity: 0;
  transform: scale(0.85);
}
.about-text.in-view .skill-chip {
  animation: chipIn 0.5s ease forwards;
}
.about-text.in-view .skill-chip:nth-child(1) { animation-delay: 0.1s; }
.about-text.in-view .skill-chip:nth-child(2) { animation-delay: 1s; }
.about-text.in-view .skill-chip:nth-child(3) { animation-delay: 1.9s; }
.about-text.in-view .skill-chip:nth-child(4) { animation-delay: 2.8s; }
@keyframes chipIn {
  to { opacity: 1; transform: scale(1); }
}
.skill-chip::before,
.skill-chip::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px 1px rgba(41,182,246,0.65);
  offset-path: border-box;
  offset-distance: 0%;
  animation: dotWalk 9s linear infinite;
}
.skill-chip::after {
  background: var(--accent);
  box-shadow: 0 0 6px 1px rgba(139,92,246,0.65);
  animation-delay: -4.5s;
}
.skill-chip:nth-child(2)::before,
.skill-chip:nth-child(2)::after { animation-delay: -2.2s; }
.skill-chip:nth-child(2)::after { animation-delay: -6.7s; }
.skill-chip:nth-child(3)::before { animation-delay: -4.4s; }
.skill-chip:nth-child(3)::after { animation-delay: -8.9s; }
.skill-chip:nth-child(4)::before { animation-delay: -6.6s; }
.skill-chip:nth-child(4)::after { animation-delay: -1.2s; }
@keyframes dotWalk {
  to { offset-distance: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .skill-chip { animation: none !important; opacity: 1; transform: none; }
  .skill-chip::before, .skill-chip::after { animation: none !important; opacity: 0; }
}
@property --ac-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.about-card {
  position: relative;
  border-radius: 26px;
  padding: 1px;
  background: conic-gradient(
    from var(--ac-angle),
    rgba(41, 182, 246, 0.9),
    rgba(139, 92, 246, 0.2) 25%,
    rgba(34, 211, 238, 0.9) 50%,
    rgba(139, 92, 246, 0.2) 75%,
    rgba(41, 182, 246, 0.9)
  );
  animation: acSpin 7s linear infinite;
  box-shadow: 0 30px 80px -34px rgba(41, 182, 246, 0.45);
}
@keyframes acSpin {
  to { --ac-angle: 360deg; }
}
.about-card-inner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #141727, var(--bg-alt));
  border-radius: 25px;
  padding: 42px 30px 34px;
  text-align: center;
}
/* periodic shine sweep across the card */
.about-card-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.03) 50%, transparent 58%);
  transform: translateX(-130%);
  animation: acShine 9s ease-in-out infinite 1.2s;
  pointer-events: none;
}
@keyframes acShine {
  0%, 55% { transform: translateX(-130%); }
  92%, 100% { transform: translateX(130%); }
}
.avatar-wrap {
  position: relative;
  width: 150px;
  height: 184px;
  margin: 0 auto 22px;
  padding: 1.5px;
  border-radius: 22px;
  background: var(--gradient);
  animation: avatarGlow 3.6s ease-in-out infinite;
}
@keyframes avatarGlow {
  0%, 100% { box-shadow: 0 8px 30px -12px rgba(41, 182, 246, 0.4); }
  50% { box-shadow: 0 8px 40px -6px rgba(41, 182, 246, 0.65); }
}
.avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 19px;
  object-fit: cover;
  display: block;
  border: 2px solid var(--bg);
}
.about-card-inner h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 10px; }
.about-card-role {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--gradient-soft);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 26px;
}
.about-card-list { text-align: right; display: flex; flex-direction: column; gap: 10px; }
.about-card-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(12px);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.about-card-list li:hover {
  border-color: rgba(41, 182, 246, 0.35);
  background: rgba(41, 182, 246, 0.06);
}
.li-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border-radius: 9px;
  background: var(--gradient-soft);
  border: 1px solid rgba(41, 182, 246, 0.28);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.about-card-list li:hover .li-icon {
  color: #54c5f8;
  border-color: rgba(84, 197, 248, 0.55);
}
.about-card.in-view .about-card-list li {
  animation: liIn 0.55s ease forwards;
}
.about-card.in-view .about-card-list li:nth-child(1) { animation-delay: 0.15s; }
.about-card.in-view .about-card-list li:nth-child(2) { animation-delay: 0.3s; }
.about-card.in-view .about-card-list li:nth-child(3) { animation-delay: 0.45s; }
.about-card.in-view .about-card-list li:nth-child(4) { animation-delay: 0.6s; }
@keyframes liIn {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .about-card { animation: none !important; }
  .about-card-inner::before { animation: none !important; }
  .avatar-wrap { animation: none !important; }
  .about-card-list li { animation: none !important; opacity: 1; transform: none; }
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(139,92,246,0.4);
  background: var(--surface-2);
}
.card-icon { font-size: 1.8rem; margin-bottom: 18px; }
.course-card h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 12px; }
.course-card p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 20px; }
.card-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--gradient-soft);
  color: var(--accent);
  border: 1px solid rgba(139,92,246,0.3);
}
.course-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.course-book {
  background: none;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.25s ease;
}
.course-book::after {
  content: '←';
  font-weight: 400;
  transition: transform 0.25s ease;
}
.course-book:hover { color: #54c5f8; }
.course-book:hover::after { transform: translateX(-4px); }

.courses-cta {
  margin-top: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 28px 32px;
  border-radius: var(--radius);
  background: var(--gradient-soft);
  border: 1px solid var(--border);
}
.courses-cta p { font-weight: 700; font-size: 1.05rem; }

/* Featured project spotlight */
.featured-project {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 56px;
  padding: 40px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.featured-showcase {
  position: relative;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shafa-phone {
  position: absolute;
  width: 168px;
  height: 348px;
  border-radius: 30px;
  border: 6px solid #0b0e14;
  background: #0b0e14;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
  animation: phoneFloat 7s ease-in-out infinite;
}
.shafa-phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.sp-1 { transform: rotate(-14deg) translate(-78px, 10px); z-index: 1; animation-delay: -1s; }
.sp-2 { transform: rotate(-2deg) translate(0, -14px); z-index: 3; animation-delay: -3.5s; }
.sp-3 { transform: rotate(12deg) translate(78px, 14px); z-index: 2; animation-delay: -5s; }
@keyframes phoneFloat {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -14px; }
}
.featured-info .card-tag { margin-bottom: 14px; }
.featured-info h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 14px; }
.featured-info p { color: var(--text-dim); font-size: 1rem; margin-bottom: 24px; }
@media (prefers-reduced-motion: reduce) {
  .shafa-phone { animation: none !important; }
}
@media (max-width: 900px) {
  .featured-project { grid-template-columns: 1fr; padding: 32px 20px; gap: 32px; }
  .featured-showcase { height: 320px; }
  .shafa-phone { width: 140px; height: 290px; }
  .sp-1 { transform: rotate(-14deg) translate(-56px, 10px); }
  .sp-3 { transform: rotate(12deg) translate(56px, 14px); }
}

/* Projects */
/* Collapsed projects grid: show only the first 6 cards */
.projects-grid.collapsed .project-card:nth-child(n+7) { display: none; }
.projects-more { text-align: center; margin-top: 32px; }

/* Partnership services */
.partner-services {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 26px 0 30px;
  padding: 0;
  text-align: right;
}
.partner-services li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.3s ease, background 0.3s ease;
}
.partner-services li:hover {
  border-color: rgba(139,92,246,0.4);
  background: rgba(255,255,255,0.05);
}
.ps-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--gradient-soft);
  color: var(--accent);
  border: 1px solid rgba(139,92,246,0.3);
}

/* Contact: project request CTA */
.contact-project-cta {
  margin-top: 36px;
  text-align: center;
  padding: 28px 22px;
  border-radius: var(--radius);
  border: 1px dashed rgba(139,92,246,0.35);
  background: rgba(139,92,246,0.05);
}
.contact-project-cta p {
  color: var(--text-dim);
  margin-bottom: 16px;
  font-size: 0.98rem;
}

.projects-impact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: -20px 0 40px;
}
.projects-impact span {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
}
.projects-impact span:first-child {
  color: var(--primary);
  border-color: rgba(41,182,246,0.3);
}
.project-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.project-card:hover {
  transform: translateY(-8px) scale(1.015);
  border-color: rgba(84,197,248,0.45);
  box-shadow: 0 20px 40px -18px rgba(41,182,246,0.4);
}
.project-card .project-logo,
.project-card .project-logo-img {
  transition: transform 0.25s ease;
}
.project-card:hover .project-logo,
.project-card:hover .project-logo-img {
  transform: scale(1.06);
}
.project-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 20px;
}
.placeholder-card .project-logo {
  background: var(--surface-2);
  color: var(--text-faint);
  border: 1px dashed var(--border);
}
.project-logo-img {
  background: var(--surface-2);
  object-fit: cover;
  border: 1px solid var(--border);
}
.project-card h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 10px; }
.project-card p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 24px; flex-grow: 1; }
.placeholder-card p { color: var(--text-faint); font-style: italic; }
.project-links { display: flex; gap: 12px; flex-wrap: wrap; }
.store-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.store-link:hover { color: var(--text); border-color: var(--primary); }

/* Partnership */
.partnership-box {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 56px 40px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.partner-logo {
  display: block;
  margin: 0 auto 28px;
  max-width: 220px;
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: #fff;
  padding: 14px 22px;
  box-shadow: 0 20px 44px -18px rgba(0,0,0,0.5);
}
.partnership-box .section-eyebrow { justify-content: center; }
.partnership-box .section-title { margin-top: 4px; }
.partnership-text {
  color: var(--text-dim);
  font-size: 1.08rem;
  margin: 24px 0 32px;
}
.partnership-text strong { color: var(--text); }
.partnership-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.contact-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-soft);
  color: var(--accent);
}
.contact-label { font-weight: 800; font-size: 1rem; }
.contact-value { color: var(--text-faint); font-size: 0.88rem; word-break: break-word; }

/* Booking modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 7, 12, 0.72);
  backdrop-filter: blur(6px);
}
.modal-overlay.open { display: flex; }
.modal-box {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
}
.modal-box h3 { font-size: 1.35rem; font-weight: 800; margin-bottom: 8px; }
.modal-sub { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 24px; }
.modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { color: var(--text); border-color: var(--primary); }
#bookingForm, #projectForm { display: flex; flex-direction: column; gap: 16px; }
#bookingForm label, #projectForm label { display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; font-weight: 700; color: var(--text-dim); }
#bookingForm input, #projectForm input,
#bookingForm select, #projectForm select,
#bookingForm textarea, #projectForm textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  resize: vertical;
}
#bookingForm select, #projectForm select { appearance: none; }
#bookingForm input:focus, #projectForm input:focus,
#bookingForm select:focus, #projectForm select:focus,
#bookingForm textarea:focus, #projectForm textarea:focus { outline: none; border-color: var(--primary); }
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.modal-submit { width: 100%; margin-top: 6px; }
.modal-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.modal-status {
  margin: 10px 0 0;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  min-height: 1.2em;
}
.modal-status.success { color: #22c55e; }
.modal-status.error { color: #f87171; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 56px 0 28px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.footer-logo {
  height: 44px;
  width: auto;
  display: block;
  margin-bottom: 14px;
}
.footer-brand p {
  color: var(--text-faint);
  font-size: 0.9rem;
  max-width: 300px;
}
.footer-head {
  display: block;
  font-weight: 800;
  font-size: 0.92rem;
  margin-bottom: 14px;
  color: var(--text);
}
.footer-links, .footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a, .footer-contact > a {
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: color 0.2s ease;
  width: fit-content;
}
.footer-links a:hover, .footer-contact > a:hover { color: var(--primary); }
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.footer-social a:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-3px);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-faint);
  font-size: 0.85rem;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-inner { padding-inline-end: 70px; }
}

/* Back to top */
.back-top {
  position: fixed;
  bottom: 26px;
  left: 26px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(148, 219, 255, 0.4);
  background: rgba(18, 20, 31, 0.85);
  backdrop-filter: blur(8px);
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.2s ease;
}
.back-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-top:hover {
  border-color: var(--primary);
  box-shadow: 0 0 24px -6px rgba(41, 182, 246, 0.6);
}

/* Responsive */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-content { text-align: center; }
  .hero-title, .hero-actions, .hero-stats { justify-content: center; }
  .hero-desc { margin: 0 auto 36px; }
  .stat { text-align: center; }
  .hero-showcase { max-width: 380px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .section { padding: 88px 0; }
  .hero { min-height: auto; padding-top: 120px; }
  .hero-stats { gap: 28px; }
  .courses-cta { flex-direction: column; align-items: flex-start; }
}
