/* ── Navbar ─────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}
.navbar-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 800; font-size: .95rem;
  color: var(--ink); text-decoration: none; letter-spacing: -.01em;
}
.navbar-brand:hover { color: var(--ink); }
.navbar-logo { height: 32px; width: auto; border-radius: 4px; }
.navbar-logo-placeholder {
  width: 32px; height: 32px; border-radius: 4px;
  background: var(--accent-lt); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; color: var(--ink-muted);
}
.navbar-sep { color: var(--border-md); margin: 0 2px; font-weight: 300; }
.navbar-tagline { font-weight: 500; font-size: .85rem; color: var(--ink-soft); font-family: var(--font-body); }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  padding: 7px 13px; border-radius: var(--r-sm);
  font-size: .875rem; font-weight: 500; color: var(--ink-soft);
  transition: background var(--ease), color var(--ease);
}
.nav-links a:hover  { background: var(--bg); color: var(--ink); }
.nav-links a.active { color: var(--accent); background: var(--accent-lt); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: all var(--ease); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border-radius: var(--r-sm);
  font-size: .875rem; font-weight: 600;
  transition: background var(--ease), box-shadow var(--ease), transform var(--ease), color var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-primary  { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #1d4ed8; color: #fff; }
.btn-outline  { border: 1.5px solid var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-ghost    { border: 1.5px solid var(--border); color: var(--ink-soft); }
.btn-ghost:hover  { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-white { background: #fff; color: var(--ink); font-weight: 700; }
.btn-white:hover { background: #f0f0f0; color: var(--ink); }
.btn-white-outline { border: 1.5px solid rgba(255,255,255,.6); color: #fff; }
.btn-white-outline:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 100px;
  font-size: .72rem; font-weight: 700; letter-spacing: .3px; line-height: 1.8;
}
.badge-ap    { background: var(--ap-lt);    color: var(--ap);    }
.badge-cie   { background: var(--cie-lt);   color: var(--cie);   }
.badge-igcse { background: var(--igcse-lt); color: var(--igcse); }
.badge-new   { background: #FEF2F2; color: #DC2626; }
.badge-lang  { background: #F1F5F9; color: var(--ink-soft); }
.badge-tag   { background: var(--bg); color: var(--ink-soft); border: 1px solid var(--border); }

/* ── Card ───────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 24px;
  transition: box-shadow var(--ease), transform var(--ease);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.card-icon {
  width: 44px; height: 44px; border-radius: var(--r-sm);
  background: var(--accent-lt); display: flex; align-items: center;
  justify-content: center; font-size: 1.3rem; margin-bottom: 14px;
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 72px 0 64px;
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.hero-eyebrow {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--font-display); font-size: 2.6rem; font-weight: 800;
  line-height: 1.15; letter-spacing: -.03em; color: var(--ink);
  margin-bottom: 16px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: var(--ink-soft); font-size: 1rem; max-width: 420px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* IDE window (signature element) */
.ide-window {
  background: var(--code-bg); border-radius: var(--r);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.ide-bar {
  padding: 10px 16px;
  background: #1E293B;
  display: flex; align-items: center; gap: 10px;
}
.ide-dots { display: flex; gap: 6px; }
.ide-dot  { width: 12px; height: 12px; border-radius: 50%; }
.ide-dot.r { background: #FF5F57; }
.ide-dot.y { background: #FEBC2E; }
.ide-dot.g { background: #28C840; }
.ide-filename { font-family: var(--font-mono); font-size: .78rem; color: #64748B; margin-left: 4px; }
.ide-code { padding: 20px 24px; margin: 0; font-size: .82rem; line-height: 1.8; }
/* syntax colors */
.kw  { color: #93C5FD; }  /* keywords */
.fn  { color: #86EFAC; }  /* functions */
.str { color: #FCA5A5; }  /* strings */
.cm  { color: #475569; }  /* comments */
.num { color: #FDE68A; }  /* numbers */
.cls { color: #C4B5FD; }  /* class names */

/* ── Accordion ──────────────────────────────────────────── */
.accordion {
  border: 1px solid var(--border); border-radius: var(--r); overflow: hidden;
}
.accordion + .accordion { margin-top: 8px; }
.accordion-header {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: var(--bg);
  font-size: .9rem; font-weight: 600; color: var(--ink);
  transition: background var(--ease);
}
.accordion-header:hover  { background: var(--accent-lt); }
.accordion-header.open   { background: var(--accent-lt); color: var(--accent); }
.acc-arrow { font-size: .7rem; color: var(--ink-muted); transition: transform var(--ease); }
.accordion-header.open .acc-arrow { transform: rotate(180deg); }
.accordion-body { display: none; padding: 20px; border-top: 1px solid var(--border); background: var(--surface); }
.accordion-body.open { display: block; }

/* ── Resource item ──────────────────────────────────────── */
.resource-list { display: flex; flex-direction: column; gap: 8px; }
.resource-item {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 14px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.resource-item:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-lt); }
.resource-name  { font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: 8px; }
.resource-meta  { font-size: .78rem; color: var(--ink-muted); margin-top: 2px; }
.resource-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Project card ───────────────────────────────────────── */
.project-card { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.project-head {
  padding: 14px 20px; background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.project-head h3 { font-size: .95rem; margin: 0; }
.project-body  { padding: 20px; }
.project-tags  { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.project-desc  { color: var(--ink-soft); font-size: .875rem; margin-bottom: 12px; }
.project-goals { padding-left: 18px; list-style: disc; color: var(--ink-soft); font-size: .85rem; margin-bottom: 12px; }
.project-goals li { margin-bottom: 4px; }

/* ── Tool card ──────────────────────────────────────────── */
.tool-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--r);
  color: var(--ink); background: var(--surface);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.tool-card:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-lt); color: var(--ink); }
.tool-icon { width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--accent-lt);
             display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.tool-info h4 { font-size: .875rem; margin-bottom: 2px; }
.tool-info p  { font-size: .78rem; color: var(--ink-soft); margin: 0; }

/* ── Teacher card ───────────────────────────────────────── */
.teacher-card { text-align: center; }
.teacher-avatar {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px;
  background: var(--accent-lt); display: flex; align-items: center;
  justify-content: center; font-size: 1.8rem; overflow: hidden;
  border: 2px solid var(--border);
}
.teacher-avatar img { width: 100%; height: 100%; object-fit: cover; }
.teacher-card h3 { font-size: 1rem; margin-bottom: 4px; }
.teacher-role { font-size: .8rem; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.teacher-bio  { font-size: .85rem; color: var(--ink-soft); }

/* ── System section heading ─────────────────────────────── */
.system-heading {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.system-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}
.system-heading h2 { margin: 0; font-size: 1.25rem; }
.section-gap { height: 48px; }

/* ── Divider label ──────────────────────────────────────── */
.divider-label {
  display: flex; align-items: center; gap: 12px;
  margin: 32px 0 16px; font-size: .75rem; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase; color: var(--ink-muted);
}
.divider-label::before, .divider-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

pre code[class*="language-"] .token.keyword      { color: #93C5FD; }
pre code[class*="language-"] .token.builtin      { color: #86EFAC; }
pre code[class*="language-"] .token.function     { color: #86EFAC; }
pre code[class*="language-"] .token.string,
pre code[class*="language-"] .token.template-string { color: #FCA5A5; }
pre code[class*="language-"] .token.comment      { color: #475569; font-style: italic; }
pre code[class*="language-"] .token.number       { color: #FDE68A; }
pre code[class*="language-"] .token.boolean      { color: #FCA5A5; }
pre code[class*="language-"] .token.class-name   { color: #C4B5FD; }
pre code[class*="language-"] .token.operator     { color: #E2E8F0; }
pre code[class*="language-"] .token.punctuation  { color: #94A3B8; }
pre code[class*="language-"] .token.decorator    { color: #FDE68A; }
pre code[class*="language-"] .token.annotation   { color: #FDE68A; }
/* 禁用 Prism 默认背景，保留我们自己的 --code-bg */
code[class*="language-"] { background: none; text-shadow: none; }
pre[class*="language-"]  { background: var(--code-bg); color: var(--code-text); text-shadow: none; }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .ide-window { display: none; }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.9rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 8px 16px 16px;
    box-shadow: var(--shadow-lg); z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 8px; border-radius: var(--r-sm); }
  .resource-item { flex-direction: column; align-items: flex-start; }
}

