:root {
  --think: #b45309;
  --think-bg: #fffbeb;
  --eng: #1d4ed8;
  --eng-bg: #eff6ff;
  --math: #6d28d9;
  --math-bg: #f5f3ff;
}

/* Engineer-first callouts from the old course.css */
.md-typeset .admonition.think,
.md-typeset details.think {
  border-color: #f59e0b;
}
.md-typeset .think > .admonition-title,
.md-typeset .think > summary {
  background-color: var(--think-bg);
  border-color: #f59e0b;
}
.md-typeset .think > .admonition-title::before,
.md-typeset .think > summary::before {
  background-color: var(--think);
}

.md-typeset .admonition.engineer,
.md-typeset details.engineer {
  border-color: #3b82f6;
}
.md-typeset .engineer > .admonition-title,
.md-typeset .engineer > summary {
  background-color: var(--eng-bg);
  border-color: #3b82f6;
}
.md-typeset .engineer > .admonition-title::before,
.md-typeset .engineer > summary::before {
  background-color: var(--eng);
}

.md-typeset .admonition.math,
.md-typeset details.math {
  border-color: #a78bfa;
}
.md-typeset .math > .admonition-title,
.md-typeset .math > summary {
  background-color: var(--math-bg);
  border-color: #a78bfa;
}
.md-typeset .math > .admonition-title::before,
.md-typeset .math > summary::before {
  background-color: var(--math);
}

/* Dark mode: the light pastel title bars above are unreadable on slate.
   Swap to translucent tints over the page background instead of solid pale colors. */
[data-md-color-scheme="slate"] .md-typeset .admonition.think,
[data-md-color-scheme="slate"] .md-typeset details.think {
  background-color: rgba(245, 158, 11, 0.07);
  color: var(--md-typeset-color);
}
[data-md-color-scheme="slate"] .md-typeset .think > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset .think > summary {
  background-color: rgba(245, 158, 11, 0.16);
  color: #fef3c7;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.engineer,
[data-md-color-scheme="slate"] .md-typeset details.engineer {
  background-color: rgba(59, 130, 246, 0.07);
  color: var(--md-typeset-color);
}
[data-md-color-scheme="slate"] .md-typeset .engineer > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset .engineer > summary {
  background-color: rgba(59, 130, 246, 0.16);
  color: #dbeafe;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.math,
[data-md-color-scheme="slate"] .md-typeset details.math {
  background-color: rgba(167, 139, 250, 0.07);
  color: var(--md-typeset-color);
}
[data-md-color-scheme="slate"] .md-typeset .math > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset .math > summary {
  background-color: rgba(167, 139, 250, 0.16);
  color: #ede9fe;
}

.md-typeset pre, .md-typeset code {
  font-variant-ligatures: none;
}

.md-typeset table {
  font-size: 0.92em;
}

/* Site-wide polish (shared across learn-ml / AIEngineering / interview-prep) */
.md-header {
  box-shadow: 0 1px 0 rgba(148, 163, 184, 0.2);
}

.md-header__title {
  font-weight: 700;
  letter-spacing: -0.015em;
}

.md-tabs__link {
  font-weight: 600;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  letter-spacing: -0.025em;
}

.md-typeset h2 {
  margin-top: 3.2rem;
  font-weight: 750;
}

/* Landing page hero (shared component pattern, ported from AIEngineering) */
:root {
  --course-navy: #0b1220;
  --course-accent: #0d9488;
  --course-accent-light: #2dd4bf;
  --course-line: rgba(148, 163, 184, 0.28);
}

.md-content:has(.course-hero) .md-content__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding-top: 1.5rem;
}

.course-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  margin: 0 -1rem;
  padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 4rem);
  overflow: hidden;
}

.course-hero::before {
  content: "";
  position: absolute;
  width: 30rem;
  height: 30rem;
  right: -12rem;
  top: -14rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.18), transparent 68%);
  pointer-events: none;
}

.course-eyebrow {
  display: inline-block;
  color: var(--course-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.course-hero h1 {
  max-width: 15ch;
  margin: 0.8rem 0 1.2rem;
  color: var(--course-navy);
  font-size: clamp(2rem, 3.2vw, 3.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.course-hero h1 span {
  color: var(--course-accent);
}

.course-hero__lead {
  max-width: 38rem;
  margin: 0;
  color: #475569;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.7;
}

.course-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.md-typeset .course-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.8rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.md-typeset .course-button:hover {
  transform: translateY(-1px);
}

.md-typeset .course-button--primary {
  background: var(--course-accent);
  color: #fff;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.28);
}

.md-typeset .course-button--secondary {
  border-color: #cbd5e1;
  background: rgba(255, 255, 255, 0.7);
  color: #1e293b;
}

.md-typeset .course-button--coffee {
  border-color: #ffdd00;
  background: #ffdd00;
  color: #0b1220;
  box-shadow: 0 8px 24px rgba(255, 221, 0, 0.28);
}

.md-typeset .course-button--coffee:hover {
  background: #ffe94d;
  border-color: #ffe94d;
}

.course-hero__note {
  margin: 1rem 0 0;
  color: #64748b;
  font-size: 0.72rem;
}

.course-terminal {
  position: relative;
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: 0.85rem;
  background: #101827;
  color: #ccfbf1;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  overflow: hidden;
  transform: perspective(1000px) rotateY(-2deg) rotateX(1deg);
}

.course-terminal__bar {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  background: #0b1220;
}

.course-terminal__bar i {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #fb7185;
}

.course-terminal__bar i:nth-child(2) { background: #fbbf24; }
.course-terminal__bar i:nth-child(3) { background: #34d399; }
.course-terminal__bar span { margin-left: 0.4rem; color: #64748b; }
.course-terminal__body { padding: 1rem 1.1rem 1.2rem; }
.course-terminal__body p { margin: 0.7rem 0; }
.terminal-muted { margin-right: 0.65rem; color: var(--course-accent-light); }
.terminal-status { margin-top: 1.2rem; padding-top: 0.9rem; border-top: 1px solid rgba(148, 163, 184, 0.14); color: #94a3b8; }
.terminal-status span { display: inline-block; width: 0.45rem; height: 0.45rem; margin-right: 0.4rem; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1); }

.course-proof {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 0 3rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--course-line);
  border-bottom: 1px solid var(--course-line);
}

.course-proof > div { padding: 0.2rem 1.2rem; border-right: 1px solid var(--course-line); text-align: center; }
.course-proof > div:last-child { border-right: 0; }
.course-proof strong { display: block; color: var(--course-navy); font-size: 1.25rem; }
.course-proof span { display: block; margin-top: 0.12rem; color: #64748b; font-size: 0.68rem; }

[data-md-color-scheme="slate"] .course-hero h1,
[data-md-color-scheme="slate"] .course-proof strong { color: #f8fafc; }
[data-md-color-scheme="slate"] .course-hero__lead { color: #94a3b8; }
[data-md-color-scheme="slate"] .course-button--secondary { border-color: #475569; background: rgba(15, 23, 42, 0.5); color: #e2e8f0; }

@media (max-width: 1100px) {
  .course-hero { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .course-hero h1 { max-width: none; }
  .course-terminal { max-width: 34rem; transform: none; }
}

@media (max-width: 800px) {
  .course-proof { grid-template-columns: repeat(2, 1fr); }
  .course-proof > div:nth-child(2) { border-right: 0; }
  .course-proof > div:nth-child(-n+2) { padding-bottom: 0.9rem; }
  .course-proof > div:nth-child(n+3) { padding-top: 0.9rem; border-top: 1px solid var(--course-line); }
}

@media (max-width: 560px) {
  .course-hero h1 { font-size: 2.2rem; }
  .course-actions { flex-direction: column; }
  .course-actions .course-button { width: 100%; }
}
