  :root {
    --bg: #ffffff;
    --ink: #14181f;
    --muted: #5c6470;
    --line: #e8eaee;
    --accent: #2f5bea;
    --accent-soft: #eef2ff;
    --card-bg: #ffffff;
    --soft-bg: #fafbfc;
    --cta-bg: #14181f;          /* dark box on light theme */
    --cta-ink: #ffffff;
    --cta-muted: #b7bdc7;
    --radius: 14px;
    --max: 1100px;
  }
  [data-theme="dark"] {
    --bg: #0f1217;
    --ink: #e8eaee;
    --muted: #9aa3b0;
    --line: #262b34;
    --accent: #5b82ff;
    --accent-soft: #1a2236;
    --card-bg: #161a21;
    --soft-bg: #12151b;
    --cta-bg: #1a2030;          /* readable surface on dark theme */
    --cta-ink: #f3f5f8;
    --cta-muted: #aeb6c4;
  }
  [data-theme="dark"] .cta-box {
    background: #f3f5f8;       /* light surface */
  }
  [data-theme="dark"] .cta-box h2 {
    color: #000000;            /* black text on light box */
  }
  [data-theme="dark"] .cta-box p,
  [data-theme="dark"] .cta-box .cta-note {
    color: #5c6470;            /* readable muted gray */
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { transition: background-color .25s ease, color .25s ease; }

  /* Toggle button */
  .theme-toggle {
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--line); background: transparent; color: var(--ink);
    display: grid; place-items: center; cursor: pointer;
    transition: border-color .15s ease, color .15s ease, transform .15s ease;
  }
  .theme-toggle:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
  /* show correct icon per theme */
  .theme-toggle .icon-sun { display: none; }
  [data-theme="dark"] .theme-toggle .icon-sun { display: block; }
  [data-theme="dark"] .theme-toggle .icon-moon { display: none; }

  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  .wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
  a { color: inherit; text-decoration: none; }

  /* Nav */
  header {
    position: sticky; top: 0; z-index: 10;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }

  .header, header { background: color-mix(in srgb, var(--bg) 85%, transparent); }
  
  .nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
  .logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
  .logo svg { display: block; }
  .nav-links { display: flex; gap: 32px; }
  .nav-links a { color: var(--muted); font-size: 0.95rem; }
  .nav-links a:hover { color: var(--ink); }
  .btn {
    display: inline-block;
    background: var(--accent); color: #fff;
    padding: 11px 22px; border-radius: 999px;
    font-weight: 600; font-size: 0.95rem;
    border: none; cursor: pointer;
    transition: transform .15s ease, opacity .15s ease;
  }
  .btn:hover { transform: translateY(-1px); opacity: .92; }
  .btn-ghost {
    background: transparent; color: var(--ink);
    border: 1px solid var(--line);
  }

  /* Hero */
  .hero { padding: 96px 0 80px; text-align: center; }
  .pill {
    display: inline-block; background: var(--accent-soft);
    color: var(--accent); font-size: .82rem; font-weight: 600;
    padding: 6px 14px; border-radius: 999px; margin-bottom: 24px;
  }
  .hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.1; letter-spacing: -0.03em;
    max-width: 720px; margin: 0 auto 20px;
  }
  .hero p {
    color: var(--muted); font-size: 1.15rem;
    max-width: 560px; margin: 0 auto 36px;
  }
  .hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

  /* Section base */
  section { padding: 72px 0; }
  .section-head { text-align: center; margin-bottom: 48px; }
  .section-head h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    letter-spacing: -0.02em; margin-bottom: 10px;
  }
  .section-head p { color: var(--muted); max-width: 480px; margin: 0 auto; }

  /* Courses */
  .grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
  }  
  .card {
    flex: 0 0 320px;
  }
  .card {
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 28px; transition: box-shadow .2s ease, transform .2s ease;
    background: var(--card-bg);
  }
  .card:hover { box-shadow: 0 12px 30px rgba(20,24,31,.07); transform: translateY(-3px); }
  .card .tag {
    font-size: .78rem; color: var(--accent); font-weight: 600;
    text-transform: uppercase; letter-spacing: .05em;
  }
  .card h3 { margin: 12px 0 8px; font-size: 1.25rem; letter-spacing: -0.01em; }
  .card p { color: var(--muted); font-size: .96rem; }
  .card .meta {
    margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; font-size: .88rem; color: var(--muted);
  }

  /* People */
  .people { 
    background: #fafbfc; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); 
    background: var(--soft-bg);
  }
  .people-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; }
  .person { text-align: center; flex: 0 0 220px; }
  .avatar {
    position: relative;
    width: 96px; height: 96px; border-radius: 50%;
    margin: 0 auto 14px; overflow: hidden;
    background: linear-gradient(135deg, var(--accent-soft), #dfe6ff);
    display: grid; place-items: center;
    font-weight: 700; font-size: 1.6rem; color: var(--accent);
  }
  .avatar img {
    width: 100%; height: 100%; object-fit: cover; display: block;
  }
  .person h4 { font-size: 1.05rem; }
  .person span { color: var(--muted); font-size: .9rem; }

  /* Email capture */
  .cta { text-align: center; }
  .cta-box {
    background: var(--ink); color: #fff;
    border-radius: 24px; padding: 60px 40px; max-width: 760px; margin: 0 auto;
  }
  .cta-box h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -0.02em; margin-bottom: 12px; }
  .cta-box p { color: #b7bdc7; margin-bottom: 28px; }
  .form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; flex-wrap: wrap; }
  .form input[type="email"] {
    flex: 1; min-width: 200px; padding: 13px 18px;
    border-radius: 999px; border: none; font-size: .98rem; outline: none;
  }
  .form .note { width: 100%; color: #8b93a0; font-size: .8rem; margin-top: 14px; }
  .form-msg { width: 100%; margin-top: 14px; font-size: .92rem; min-height: 1.2em; }
  .form-msg.ok { color: #7ee2a8; }
  .form-msg.err { color: #ff9b9b; }

  /* Footer */
  footer { padding: 40px 0; }
  .footer-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
  .social { display: flex; gap: 18px; }
  .social a {
    width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center;
    color: var(--muted); border: 1px solid var(--line);
    transition: color .15s ease, border-color .15s ease, transform .15s ease;
  }
  .social a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
  .footer-meta { color: var(--muted); font-size: .9rem; }

  /* Responsive */
  @media (max-width: 860px) {
    .nav-links { display: none; }
    .card { flex: 0 0 100%; }       /* full width on mobile */
    .person { flex: 0 0 45%; }
  }