/* =============================================================================
   Get Claude Certified — clean & professional theme
   ============================================================================= */

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --border: #e4e7ec;
  --text: #0f172a;
  --muted: #5b6472;
  --accent: #4f46e5;
  --accent-dark: #4338ca;
  --accent-soft: #eef2ff;
  --success: #16a34a;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(16, 24, 40, 0.06);
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color-scheme: light;
}

/* ---- Dark mode (toggled via <html data-theme="dark">) ------------------- */
:root[data-theme="dark"] {
  --bg: #0b1120;
  --surface: #131c2e;
  --border: #273349;
  --text: #e6eaf2;
  --muted: #9aa6b8;
  --accent: #818cf8;
  --accent-dark: #6366f1;
  --accent-soft: #1e293b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
/* Theme-specific touch-ups for surfaces that used literal light colors. */
:root[data-theme="dark"] .site-header { background: rgba(11, 17, 32, 0.85); }
:root[data-theme="dark"] .panel-associate { background: linear-gradient(170deg, #0e2b27 0%, var(--surface) 60%); }
:root[data-theme="dark"] .panel-architect { background: linear-gradient(170deg, #1b2347 0%, var(--surface) 60%); }
:root[data-theme="dark"] .panel-time { background: rgba(255, 255, 255, 0.04); }
:root[data-theme="dark"] .course-band { background: linear-gradient(170deg, #1b2347 0%, var(--surface) 70%); }
:root[data-theme="dark"] .tag-free { background: #14361f; color: #4ade80; }

body { transition: background-color 0.2s ease, color 0.2s ease; }

* { box-sizing: border-box; }

/* Ensure the `hidden` attribute always hides, even on flex containers
   like .gate-overlay / .g-signin (author CSS otherwise overrides it). */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

/* ---- Disclaimer bar ------------------------------------------------------ */
.disclaimer-bar {
  background: #1f2937;
  color: #e5e7eb;
  font-size: 12px;
  text-align: center;
  padding: 6px 16px;
  letter-spacing: 0.01em;
}

/* ---- Layout helpers ------------------------------------------------------ */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section-sm { padding: 44px 0; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* ---- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo { font-weight: 700; font-size: 18px; color: var(--text); letter-spacing: -0.01em; }
.logo span { color: var(--accent); }
.nav { display: flex; gap: 26px; align-items: center; }
.nav a { color: var(--muted); font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }

/* ---- Navbar: theme toggle + logged-in account chip --------------------- */
.nav-account { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  background: transparent; border: 1px solid var(--border); border-radius: 10px;
  width: 38px; height: 38px; font-size: 16px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); transition: background 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { background: var(--surface); border-color: var(--accent); }

.user-menu { position: relative; }
.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 12px 4px 4px; cursor: pointer; font: inherit; font-size: 14px;
  font-weight: 600; color: var(--text); transition: border-color 0.15s ease;
}
.user-chip:hover { border-color: var(--accent); }
.user-chip .caret { color: var(--muted); font-size: 11px; }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0; text-transform: uppercase;
}
.user-chip .chip-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); min-width: 210px; padding: 8px; z-index: 40;
}
.user-dropdown .u-email {
  font-size: 13px; color: var(--muted); padding: 8px 10px; word-break: break-all;
  border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.user-dropdown a, .user-dropdown button {
  display: block; width: 100%; text-align: left; box-sizing: border-box;
  background: none; border: none; padding: 9px 10px; border-radius: 8px;
  cursor: pointer; font: inherit; font-size: 14px; color: var(--text);
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--bg); text-decoration: none; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 15px; font-weight: 600;
  padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: all 0.15s ease; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); text-decoration: none; }
.btn-block { width: 100%; }
.btn:disabled, .btn.is-disabled {
  opacity: 0.55; cursor: not-allowed; pointer-events: none;
}

/* ---- Hero ---------------------------------------------------------------- */
.hero { padding: 84px 0 56px; }
.hero h1 {
  font-size: clamp(32px, 5vw, 52px); line-height: 1.1; letter-spacing: -0.02em;
  margin: 0 0 18px; max-width: 760px;
}
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 620px; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.badge {
  font-size: 13px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 5px 12px; border-radius: 999px;
}

/* ---- Instructor intro (photo left, blurb right) ------------------------- */
.instructor {
  display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: center;
}
.instructor-photo { display: flex; justify-content: center; }
.instructor-photo img {
  width: 210px; height: 210px; border-radius: 50%; object-fit: cover;
  object-position: center 30%;
  border: 6px solid var(--surface);
  box-shadow: 0 0 0 2px var(--accent-soft), 0 14px 40px rgba(79, 70, 229, 0.18);
}
.instructor-copy .badge { display: inline-block; margin-bottom: 16px; }
.instructor-copy h1 {
  font-size: clamp(26px, 3.4vw, 38px); line-height: 1.12; letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.instructor-blurb {
  font-size: 17px; color: var(--muted); line-height: 1.7; margin: 0 0 26px; max-width: 640px;
}
.instructor-blurb em { font-style: italic; }

@media (max-width: 760px) {
  .instructor { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .instructor-blurb { margin-left: auto; margin-right: auto; }
  .instructor .hero-actions { justify-content: center; }
}

/* ---- Product cards ------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card.featured { border-color: var(--accent); box-shadow: 0 8px 30px rgba(79, 70, 229, 0.15); }
.card .kicker { font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.card h3 { font-size: 21px; margin: 10px 0 8px; }
.card .blurb { color: var(--muted); font-size: 15px; flex-grow: 1; }
.card .price { font-size: 32px; font-weight: 700; margin: 18px 0 16px; }
.card .price small { font-size: 14px; font-weight: 500; color: var(--muted); }

/* ---- Cert comparison panels (soft, minimal) ----------------------------- */
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel {
  border-radius: 20px; padding: 34px 32px; display: flex; flex-direction: column;
  border: 1px solid var(--border); box-shadow: 0 10px 40px rgba(16, 24, 40, 0.05);
}
.panel-associate { background: linear-gradient(170deg, #f0fdfa 0%, #ffffff 60%); }
.panel-architect { background: linear-gradient(170deg, #eef2ff 0%, #ffffff 60%); }
.panel-tag {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
}
.panel-associate .panel-tag { color: #0d9488; }
.panel-architect .panel-tag { color: #4f46e5; }
.panel h3 { font-size: 30px; margin: 10px 0 2px; letter-spacing: -0.02em; }
.panel-sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; font-family: var(--mono); }
.panel-who h4 { margin: 0 0 6px; font-size: 15px; }
.panel-who p { margin: 0 0 22px; color: var(--muted); font-size: 15px; }
.panel-time {
  display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.7); border: 1px solid var(--border); margin-bottom: 20px;
}
.time-num { font-size: 22px; font-weight: 700; }
.panel-associate .time-num { color: #0d9488; }
.panel-architect .time-num { color: #4f46e5; }
.time-label { font-size: 13px; color: var(--muted); }
.panel-facts { list-style: none; margin: 0 0 24px; padding: 0; }
.panel-facts li {
  display: flex; justify-content: space-between; padding: 9px 0;
  border-bottom: 1px solid var(--border); font-size: 15px;
}
.panel-facts li:last-child { border-bottom: none; }
.panel-facts span { color: var(--muted); }
.panel-facts strong { font-weight: 600; }
.panel .btn { margin-top: auto; }

/* ---- Login page --------------------------------------------------------- */
.login-wrap {
  min-height: calc(100vh - 64px - 29px);
  display: flex; align-items: center; justify-content: center; padding: 40px 20px;
}
.login-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow); padding: 40px; max-width: 440px; width: 100%; text-align: center;
}
.login-card h1 { font-size: 24px; margin: 0 0 10px; letter-spacing: -0.01em; }
.login-card .muted { font-size: 15px; margin: 0 0 24px; }
.g-signin { display: flex; justify-content: center; margin-bottom: 8px; min-height: 44px; }
.login-card input {
  width: 100%; padding: 12px 14px; font-size: 16px; border: 1px solid var(--border);
  border-radius: 10px; font-family: var(--font);
}
.signed-in { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.btn-link {
  background: none; border: none; color: var(--muted); font-size: 13px; cursor: pointer;
  margin-top: 14px; text-decoration: underline;
}
.btn-link:hover { color: var(--text); }

/* ---- Modal close -------------------------------------------------------- */
.gate-card { position: relative; }
.modal-close {
  position: absolute; top: 14px; right: 16px; background: none; border: none;
  font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer;
}
.modal-close:hover { color: var(--text); }

/* ---- Course enroll band ------------------------------------------------- */
.course-band {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  background: linear-gradient(170deg, #eef2ff 0%, #ffffff 70%);
  border: 1px solid var(--accent); border-radius: 18px; padding: 28px 32px;
  box-shadow: 0 10px 40px rgba(79, 70, 229, 0.12);
}
.course-band .kicker {
  font-size: 13px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.course-band h3 { font-size: 24px; margin: 8px 0 6px; }
.course-band .js-blurb { margin: 0; font-size: 15px; max-width: 520px; }
.course-band-buy { text-align: right; flex-shrink: 0; }
.course-band-buy .price { font-size: 30px; font-weight: 700; margin-bottom: 12px; }
.course-band-buy .price small { font-size: 14px; font-weight: 500; color: var(--muted); }

@media (max-width: 760px) {
  .course-band { flex-direction: column; align-items: flex-start; text-align: left; }
  .course-band-buy { text-align: left; width: 100%; }
  .course-band-buy .btn { width: 100%; }
}

/* ---- Feature list -------------------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature h4 { margin: 0 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border); background: var(--surface);
  padding: 36px 0; color: var(--muted); font-size: 14px;
}
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* =============================================================================
   COURSE PAGE (NeetCode-style layout)
   ============================================================================= */
.course-shell { display: flex; min-height: calc(100vh - 64px - 29px); }

.sidebar {
  width: 320px; flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--border); overflow-y: auto;
  max-height: calc(100vh - 64px - 29px); position: sticky; top: 0;
}
.sidebar-head { padding: 20px; border-bottom: 1px solid var(--border); }
.sidebar-head h2 { margin: 0 0 4px; font-size: 18px; }
.sidebar-head .progress-text { font-size: 13px; color: var(--muted); }

.module { border-bottom: 1px solid var(--border); }
.module-title {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 14px 20px; background: none; border: none; cursor: pointer;
  font-family: var(--font); font-size: 14px; font-weight: 700; color: var(--text);
  text-align: left;
}
.module-title .chev { margin-left: auto; transition: transform 0.15s ease; color: var(--muted); }
.module.collapsed .chev { transform: rotate(-90deg); }
.module.collapsed .lesson-list { display: none; }
.lesson-list { list-style: none; margin: 0; padding: 0 0 8px; }
.lesson {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px 9px 40px; font-size: 14px; color: var(--muted);
  cursor: pointer; border-left: 3px solid transparent;
}
.lesson:hover { background: var(--bg); color: var(--text); }
.lesson.active { background: var(--accent-soft); color: var(--accent-dark); border-left-color: var(--accent); font-weight: 600; }
.lesson .dot {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border);
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; color: #fff;
}
.lesson.done .dot { background: var(--success); border-color: var(--success); }
.lesson-label { flex-grow: 1; }
.tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 7px; border-radius: 999px; flex-shrink: 0;
}
.tag-free { background: #dcfce7; color: #15803d; }
.tag-lock { background: transparent; color: var(--muted); font-size: 12px; padding: 0; }

/* Lock status under the sidebar title */
.lock-status { font-size: 12px; color: var(--muted); margin-top: 8px; }
.lock-status.unlocked { color: var(--success); font-weight: 600; }
.link-btn {
  background: none; border: none; color: var(--accent); cursor: pointer;
  font-size: 12px; text-decoration: underline; padding: 0; font-family: var(--font);
}

/* Locked lesson paywall card */
.video-frame.locked { background: #0f172a; }
.lock-card { text-align: center; max-width: 440px; padding: 24px; color: #e2e8f0; }
.lock-card .big { font-size: 42px; margin-bottom: 10px; }
.lock-card .lock-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: #fff; }
.lock-card .muted { color: #94a3b8; font-size: 14px; margin: 0 0 18px; }
.lock-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---- Main lesson pane ---------------------------------------------------- */
.lesson-main { flex-grow: 1; overflow-y: auto; max-height: calc(100vh - 64px - 29px); }
.lesson-inner { max-width: 820px; margin: 0 auto; padding: 36px 32px 80px; }
.video-frame {
  aspect-ratio: 16 / 9; width: 100%; background: #0f172a; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; color: #cbd5e1;
  font-size: 15px; overflow: hidden; margin-bottom: 26px;
}
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-placeholder { text-align: center; }
.video-placeholder .big { font-size: 40px; margin-bottom: 8px; }
.lesson-main h1 { font-size: 26px; margin: 0 0 6px; }
.lesson-meta { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.lesson-notes h2 { font-size: 19px; margin: 28px 0 10px; }
.lesson-notes ul { padding-left: 20px; }
.lesson-nav { display: flex; justify-content: space-between; margin-top: 40px; gap: 12px; }

/* ---- Access gate --------------------------------------------------------- */
.gate-overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.gate-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  max-width: 420px; width: 100%; padding: 34px; text-align: center;
}
.gate-card h2 { margin: 0 0 8px; }
.gate-card p { color: var(--muted); margin: 0 0 20px; font-size: 15px; }
.gate-card input {
  width: 100%; padding: 12px 14px; font-size: 16px; border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 12px; font-family: var(--mono);
}
.gate-error { color: #dc2626; font-size: 14px; min-height: 20px; margin-bottom: 8px; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 860px) {
  .cards, .features, .panels { grid-template-columns: 1fr; }
  .nav { gap: 16px; }
  .nav a.nav-hide { display: none; }
}
@media (max-width: 760px) {
  .course-shell { flex-direction: column; }
  .sidebar { width: 100%; position: static; max-height: 340px; }
  .lesson-main { max-height: none; }
}
