/* ═══════════════════════════════════════════════════════════
   OWL OS — Premium Design System
   Khaled Haddad · Security Platform Engineering
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #05060b;
  --bg-elevated: #0a0c14;
  --bg-card: rgba(16, 18, 32, 0.72);
  --bg-card-solid: #101220;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(139, 92, 246, 0.35);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --purple: #8b5cf6;
  --purple-bright: #a78bfa;
  --purple-deep: #5b21b6;
  --cyan: #22d3ee;
  --cyan-dim: #0891b2;
  --pink: #f472b6;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --gradient: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #22d3ee 100%);
  --gradient-hot: linear-gradient(135deg, #f472b6 0%, #8b5cf6 50%, #22d3ee 100%);
  --gradient-soft: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(34, 211, 238, 0.08));
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.25);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --radius-full: 999px;
  --font: "Outfit", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --nav-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --max: 1180px;
  --transition: 0.35s var(--ease);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul { list-style: none; }
::selection { background: rgba(139, 92, 246, 0.4); color: #fff; }

/* ── Ambient canvas / mesh ── */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ambient__mesh {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 50% 40% at 15% 20%, rgba(139, 92, 246, 0.18), transparent 55%),
    radial-gradient(ellipse 45% 35% at 85% 70%, rgba(34, 211, 238, 0.12), transparent 55%),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgba(99, 102, 241, 0.1), transparent 50%);
  animation: meshDrift 22s ease-in-out infinite alternate;
}
.ambient__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}
.ambient__noise {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
@keyframes meshDrift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-3%, 2%) scale(1.05); }
}

/* ── Scroll progress ── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  z-index: 9999;
  background: var(--gradient);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.6);
  transition: width 0.08s linear;
}

/* ── Preloader ── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.preloader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader__logo {
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.18em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.preloader__bar {
  width: 160px;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.preloader__fill {
  height: 100%;
  width: 0%;
  background: var(--gradient);
  animation: loadFill 1.1s var(--ease) forwards;
}
@keyframes loadFill {
  to { width: 100%; }
}

/* ── Layout ── */
.page { position: relative; z-index: 1; }
.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}
.container--narrow { width: min(100% - 2.5rem, 720px); }
.section {
  padding: 6.5rem 0;
  position: relative;
}
.section--tight { padding: 4.5rem 0; }
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple-bright);
  margin-bottom: 1rem;
}
.section-eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: blink 2s ease infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.section-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.85rem;
}
.section-title .grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ── Typography helpers ── */
.grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.mono { font-family: var(--font-mono); }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }

/* ── Navbar ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.35s var(--ease), box-shadow 0.35s, backdrop-filter 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(5, 6, 11, 0.78);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}
.nav__inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  z-index: 1002;
}
.nav__mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--gradient);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  color: #fff;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.45);
  flex-shrink: 0;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav__link {
  position: relative;
  padding: 0.5rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  transition: color 0.25s, background 0.25s;
}
.nav__link:hover,
.nav__link.active {
  color: var(--text);
}
.nav__link.active {
  background: rgba(139, 92, 246, 0.12);
  color: var(--purple-bright);
}
.nav__cta {
  margin-left: 0.5rem;
}
.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  place-items: center;
  z-index: 1002;
  flex-direction: column;
  gap: 5px;
}
.nav__toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav.open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, background 0.3s, border-color 0.3s, color 0.3s;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: scale(0.97); }
.btn--primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.35);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.5);
}
.btn--ghost {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--border-strong);
  background: rgba(139, 92, 246, 0.1);
  transform: translateY(-2px);
}
.btn--sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.82rem;
}
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0), rgba(139, 92, 246, 0.4), rgba(34, 211, 238, 0));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.25);
  box-shadow: var(--shadow), var(--shadow-glow);
}
.card:hover::before { opacity: 1; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}
.badge--live {
  background: rgba(52, 211, 153, 0.12);
  color: var(--green);
  border-color: rgba(52, 211, 153, 0.3);
}
.badge--full {
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
  border-color: rgba(248, 113, 113, 0.3);
}
.badge--soon {
  background: rgba(251, 191, 36, 0.12);
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.3);
}
.badge--free {
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.3);
}
.badge--purple {
  background: rgba(139, 92, 246, 0.12);
  color: var(--purple-bright);
  border-color: rgba(139, 92, 246, 0.3);
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 2rem) 0 4rem;
  position: relative;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem;
  align-items: center;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--purple-bright);
  margin-bottom: 1.5rem;
}
.hero__badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: blink 1.5s ease infinite;
}
.hero__title {
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 1.25rem;
}
.hero__title span {
  display: block;
  background: var(--gradient-hot);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 32rem;
  margin-bottom: 2rem;
  line-height: 1.75;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.25rem;
}
.hero__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}
.social-pill:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(139, 92, 246, 0.1);
  transform: translateY(-2px);
}
.social-pill svg { width: 16px; height: 16px; }

/* Hero visual */
.hero__visual {
  position: relative;
}
.hero__frame {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow), 0 0 80px rgba(139, 92, 246, 0.2);
  aspect-ratio: 16 / 11;
  background: var(--bg-elevated);
}
.hero__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.hero__frame:hover img { transform: scale(1.04); }
.hero__frame-glow {
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  background: var(--gradient);
  opacity: 0.35;
  filter: blur(40px);
  z-index: -1;
}
.hero__float {
  position: absolute;
  padding: 0.85rem 1.1rem;
  border-radius: 14px;
  background: rgba(10, 12, 20, 0.88);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  font-size: 0.8rem;
  animation: floatY 5s ease-in-out infinite;
}
.hero__float--1 {
  top: 12%;
  left: -8%;
  animation-delay: 0s;
}
.hero__float--2 {
  bottom: 14%;
  right: -6%;
  animation-delay: 1.2s;
}
.hero__float strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.15rem;
}
.hero__float span { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.72rem; }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Terminal overlay on hero */
.terminal {
  margin-top: 1.25rem;
  border-radius: 14px;
  background: rgba(8, 10, 18, 0.9);
  border: 1px solid var(--border);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  box-shadow: var(--shadow);
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}
.terminal__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.terminal__dot--r { background: #ff5f57; }
.terminal__dot--y { background: #febc2e; }
.terminal__dot--g { background: #28c840; }
.terminal__title {
  margin-left: 0.5rem;
  color: var(--text-dim);
  font-size: 0.72rem;
}
.terminal__body {
  padding: 1.1rem 1.2rem 1.3rem;
  line-height: 1.85;
  color: var(--text-muted);
}
.terminal__body .kw { color: var(--purple-bright); }
.terminal__body .fn { color: var(--pink); }
.terminal__body .str { color: var(--green); }
.terminal__body .out { color: var(--cyan); }
.terminal__cursor {
  display: inline-block;
  width: 8px; height: 1em;
  background: var(--cyan);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursorBlink 1s step-end infinite;
}
@keyframes cursorBlink {
  50% { opacity: 0; }
}

/* ── Stats strip ── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: -2rem;
  position: relative;
  z-index: 2;
}
.stat {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.stat__num {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-mono);
  line-height: 1.2;
}
.stat__label {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 500;
}

/* ── Profile ── */
.profile {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3rem;
  align-items: start;
}
.profile__card {
  text-align: center;
  padding: 2rem 1.5rem;
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}
.profile__avatar-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 1.25rem;
}
.profile__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid transparent;
  background:
    linear-gradient(var(--bg-card-solid), var(--bg-card-solid)) padding-box,
    var(--gradient) border-box;
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
}
.profile__status {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid var(--bg-card-solid);
  box-shadow: 0 0 12px var(--green);
}
.profile__name {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.profile__role {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.profile__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}
.chip {
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 500;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: var(--purple-bright);
}
.profile__body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  margin-top: 1.75rem;
}
.profile__body h3:first-child { margin-top: 0; }
.profile__body p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.skill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.skill {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: var(--transition);
}
.skill:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: rgba(139, 92, 246, 0.1);
  transform: translateY(-2px);
}

/* ── Expertise ── */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.exp-card {
  padding: 1.75rem;
  height: 100%;
}
.exp-card__icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  font-size: 1.35rem;
  background: var(--gradient-soft);
  border: 1px solid rgba(139, 92, 246, 0.2);
}
.exp-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}
.exp-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  line-height: 1.6;
}
.exp-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.tag {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* ── Courses ── */
.course-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.filter-btn {
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--border-strong);
  color: var(--text);
}
.courses-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.course-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.course-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.course-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.course-card:hover .course-card__media img { transform: scale(1.06); }
.course-card__media .badge {
  position: absolute;
  top: 14px;
  right: 14px;
  backdrop-filter: blur(8px);
}
.course-card__body {
  padding: 1.4rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.course-card__meta {
  display: flex;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 0.65rem;
}
.course-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.55rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.course-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 1.25rem;
}
.course-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ── Tools page ── */
.page-hero {
  padding: calc(var(--nav-h) + 3.5rem) 0 3rem;
}
.page-hero__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}
.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.page-hero p {
  color: var(--text-muted);
  max-width: 32rem;
  font-size: 1.05rem;
}
.tools-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.search {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}
.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-dim);
  pointer-events: none;
}
.search input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-card);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.search input:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.search input::placeholder { color: var(--text-dim); }
.tools-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.tool-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.tool-card__img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}
.tool-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.tool-card:hover .tool-card__img img { transform: scale(1.05); }
.tool-card__body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.tool-card__type {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cyan);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}
.tool-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.tool-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 1.15rem;
  line-height: 1.6;
}
.tool-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.empty-state {
  display: none;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  grid-column: 1 / -1;
}
.empty-state.show { display: block; }

/* ── Connect ── */
.connect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.connect-card {
  padding: 2.25rem;
  text-align: center;
}
.connect-card__icon {
  width: 64px; height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: var(--gradient);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
}
.connect-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.65rem;
}
.connect-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.social-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 2.5rem;
}

/* ── Free course page ── */
.enroll-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: start;
}
.form-card {
  padding: 2rem 2rem 2.25rem;
}
.form-card h2 {
  font-size: 1.3rem;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.form-card > .hint {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1.75rem;
}
.field { margin-bottom: 1.2rem; }
.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.45rem;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-dim); }
.phone-row {
  display: flex;
  gap: 0.5rem;
}
.phone-row select {
  flex: 0 0 auto;
  width: auto;
  max-width: 150px;
  cursor: pointer;
}
.phone-row input { flex: 1; }
.field-error {
  font-size: 0.78rem;
  color: var(--red);
  margin-top: 0.35rem;
  display: none;
}
.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: rgba(248, 113, 113, 0.5);
}
.field.has-error .field-error { display: block; }
.side-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.info-card {
  padding: 1.5rem;
}
.info-card h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.sched-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.sched-item {
  text-align: center;
  padding: 0.9rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}
.sched-item strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}
.sched-item span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}
.topic-list li {
  display: flex;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
  line-height: 1.45;
}
.topic-list li::before {
  content: "›";
  color: var(--purple-bright);
  font-weight: 700;
  flex-shrink: 0;
}
.free-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem;
  border-radius: 12px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: var(--green);
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Success modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(5, 6, 11, 0.85);
  backdrop-filter: blur(12px);
}
.modal.show { display: flex; }
.modal__box {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow), var(--shadow-glow);
  animation: popIn 0.4s var(--ease);
}
@keyframes popIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal__icon {
  width: 68px; height: 68px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.12);
  border: 2px solid var(--green);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  color: var(--green);
}
.modal__box h2 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.modal__box p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Admin panel */
.admin {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: none;
  overflow-y: auto;
  padding: 2rem 1rem;
  background: rgba(5, 6, 11, 0.92);
  backdrop-filter: blur(16px);
}
.admin.show { display: block; }
.admin__inner {
  max-width: 880px;
  margin: 0 auto;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
}
.admin__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}
.admin__head h2 { font-size: 1.2rem; }
.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.admin-stat {
  text-align: center;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}
.admin-stat strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.admin-stat span {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.entry {
  padding: 1.1rem 1.25rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem 1rem;
}
.entry__label {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}
.entry__val { font-size: 0.9rem; }
.entry__reason { grid-column: 1 / -1; }
.entry__ts {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}
.admin-pass {
  text-align: center;
  padding: 3rem 1rem;
}
.admin-pass input {
  max-width: 280px;
  margin: 1rem auto;
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  outline: none;
  text-align: center;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
  background: rgba(0, 0, 0, 0.25);
}
.footer__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}
.footer__brand {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}
.footer__text {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 360px;
  margin-bottom: 0.75rem;
}
.footer__copy {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.6;
}
.footer__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer a:hover { color: var(--purple-bright); }

/* ── Reveal animations ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.4s; }

/* ── Custom cursor (desktop) ── */
.cursor-dot,
.cursor-ring {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .cursor-dot,
  .cursor-ring {
    display: block;
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9998;
    border-radius: 50%;
    transform: translate(-50%, -50%);
  }
  .cursor-dot {
    width: 6px; height: 6px;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
  }
  .cursor-ring {
    width: 36px; height: 36px;
    border: 1px solid rgba(139, 92, 246, 0.55);
    transition: width 0.2s, height 0.2s, background 0.2s, border-color 0.2s;
  }
  body.cursor-hover .cursor-ring {
    width: 52px; height: 52px;
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--purple-bright);
  }
}

/* ── Back to top ── */
.to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(10, 12, 20, 0.85);
  backdrop-filter: blur(10px);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: var(--transition);
  box-shadow: var(--shadow);
}
.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.to-top:hover {
  border-color: var(--border-strong);
  color: var(--purple-bright);
}

/* ── Utility ── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__visual { max-width: 560px; margin-inline: auto; }
  .hero__float--1 { left: 0; }
  .hero__float--2 { right: 0; }
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .profile { grid-template-columns: 1fr; }
  .profile__card { position: static; max-width: 360px; margin-inline: auto; }
  .enroll-layout { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav__toggle { display: grid; }
  .nav__links {
    position: fixed;
    inset: 0;
    background: rgba(5, 6, 11, 0.96);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s, visibility 0.35s;
    z-index: 1001;
  }
  .nav.open .nav__links {
    opacity: 1;
    visibility: visible;
  }
  .nav__link {
    font-size: 1.15rem;
    padding: 0.75rem 1.5rem;
  }
  .nav__cta { margin-left: 0; margin-top: 0.75rem; }
  .courses-grid { grid-template-columns: 1fr; }
  .connect-grid { grid-template-columns: 1fr; }
  .section { padding: 4.5rem 0; }
  .entry { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .social-pill { flex: 1 1 calc(50% - 0.55rem); justify-content: center; }
}

@media (max-width: 520px) {
  .tools-grid { grid-template-columns: 1fr; }
  .expertise-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .container { width: min(100% - 1.5rem, var(--max)); }
  .hero__float { display: none; }
  .sched-grid { grid-template-columns: 1fr 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
