/* GBM Presentation — minimal native personal-site aesthetic */

:root {
  --bg: #ffffff;
  --text: #171717;
  --muted: #6f6f6f;
  --faint: #a6a6a6;
  --line: #eeeeee;
  --line-strong: #1f1f1f;
  --panel: #fafafa;
  --panel-2: #f5f5f5;
  --accent: #111111;
  --blue: #2563eb;
  --green: #16803c;
  --amber: #8a5a00;
  --red: #c62828;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app,
.deck {
  height: 100vh;
}

/* top bar, modeled after the reference site's restraint */

.chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 44px;
  padding: 0 clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.progress-wrap {
  position: fixed;
  top: 43px;
  left: 0;
  right: 0;
  height: 1px;
  background: transparent;
}

.progress-bar {
  width: 7.143%;
  height: 1px;
  background: #111;
  transition: width 0.55s var(--ease);
}

.meta {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
}

.slide-label {
  display: inline;
  opacity: 0.5;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.timer {
  min-width: 42px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.timer.timer--warn {
  color: var(--amber);
}

.timer.timer--over {
  color: var(--red);
}

/* stage */

.deck {
  position: relative;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px clamp(24px, 7vw, 96px) 96px;
  background: #fff;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition:
    opacity 520ms var(--ease),
    transform 620ms var(--ease);
}

body.is-reverse .slide {
  transform: translateY(-18px);
}

.slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.slide-inner {
  width: min(720px, 100%);
  max-height: calc(100vh - 150px);
  overflow: auto;
  scrollbar-width: thin;
}

.slide-inner::-webkit-scrollbar {
  width: 6px;
}

.slide-inner::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 999px;
}

.slide-inner > * {
  animation: contentIn 560ms var(--ease) both;
}

@keyframes contentIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* type */

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  color: #111;
  font-size: clamp(44px, 7vw, 76px);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.065em;
  text-align: center;
}

h2 {
  display: block;
  margin-bottom: 36px;
  color: #131313;
  font-size: clamp(24px, 3.4vw, 40px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

h3 {
  margin-bottom: 12px;
  color: #191919;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.title-slide {
  text-align: center;
}

.subtitle {
  max-width: 640px;
  margin: 0 auto 64px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.4;
}

.tagline {
  color: var(--faint);
  font-size: 13px;
}

.section-kicker {
  margin-bottom: 14px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lead,
.hint,
.problem,
.demo-copy p,
.card p,
.closing {
  color: #333;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.62;
}

.hint {
  color: var(--muted);
  font-size: 15px;
}

.math-inline {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

strong {
  color: #111;
}

/* content */

.bullets {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bullets li {
  color: #2b2b2b;
  font-size: clamp(17px, 1.9vw, 22px);
  line-height: 1.52;
}

.bullets li::before {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  margin-bottom: 14px;
  background: #111;
}

.compact-bullets {
  gap: 18px;
}

.compact-bullets li {
  font-size: clamp(16px, 1.55vw, 19px);
}

.definition-list {
  display: grid;
  gap: 18px;
  margin: 26px 0 0;
}

.definition-list > div {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: #333;
  font-size: clamp(16px, 1.65vw, 20px);
  line-height: 1.5;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  margin-bottom: 34px;
}

.card {
  padding-top: 18px;
  border-top: 1px solid #111;
}

.card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
}

.proof-block {
  color: #333;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.62;
}

.callout {
  margin: 10px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  color: #222;
  font-size: 18px;
  line-height: 1.55;
}

.timeline {
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.timeline strong {
  display: inline-block;
  min-width: 64px;
  color: #111;
  font-size: 18px;
}

/* equations and examples */

.equation-block {
  margin: 8px 0 26px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #111;
  font-family: var(--font-mono);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.4;
}

.equation-block.big {
  font-size: clamp(20px, 2.5vw, 30px);
}

.equation-block.small-eq {
  font-size: clamp(16px, 1.8vw, 21px);
}

.eq-sde {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25em;
}

.highlight-drift,
.highlight-diff {
  color: #111;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.highlight-drift {
  text-decoration-color: #8fb996;
}

.highlight-diff {
  text-decoration-color: #9aa7c7;
}

.param-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.param-grid > div {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.solution-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  margin-top: 26px;
}

.solution-grid > div {
  padding-top: 18px;
  border-top: 1px solid #111;
}

.solution-grid p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.eq-quote {
  margin: 28px 0;
  padding: 26px 0;
  border-top: 1px solid #111;
  border-bottom: 1px solid var(--line);
  color: #111;
  font-size: clamp(23px, 3.1vw, 36px);
  font-weight: 750;
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.explain {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.explain.compact li {
  color: var(--muted);
  font-size: 15px;
}

.reveal[data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 420ms var(--ease),
    transform 460ms var(--ease);
}

.reveal[data-reveal].is-shown {
  opacity: 1;
  transform: none;
}

.steps {
  display: grid;
  gap: 16px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  color: #b5b5b5;
  font-size: 16px;
  line-height: 1.55;
  transition: color 320ms var(--ease);
}

.step::before {
  content: counter(step);
  padding-top: 2px;
  color: #c8c8c8;
  font-variant-numeric: tabular-nums;
}

.step.step--active {
  color: #2b2b2b;
}

.step.step--active::before {
  color: #111;
}

/* KaTeX in minimal theme */
.katex-display {
  margin: 0.85em 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.katex {
  font-size: 1.02em;
}

/* Exam / research-sheet problem framing */
.exam-problem {
  margin: 24px 0;
  padding: 26px 30px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.exam-problem p {
  color: #333;
  font-size: 15px;
  line-height: 1.55;
}

.exam-problem__meta {
  margin-bottom: 12px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.exam-problem__body > p:last-child {
  margin-bottom: 0;
}

.exam-sheet-part {
  margin: 20px 0 8px;
  color: #111;
  font-size: 14px;
  font-weight: 800;
}

.exam-sheet-part:first-of-type {
  margin-top: 0;
}

.slide-inner.slide-inner--dense {
  width: min(840px, 100%);
}

/* controls and simulation */

.btn,
.btn-reveal,
.btn-ghost {
  cursor: pointer;
  margin-top: 18px;
  padding: 10px 14px;
  border: 1px solid #111;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
}

.btn + .btn {
  margin-left: 8px;
}

.btn:hover,
.btn-reveal:hover {
  background: #111;
  color: #fff;
}

.slide-demo-stack {
  width: min(980px, 100%);
}

.demo-title {
  margin-bottom: 28px;
}

.demo-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}

.demo-copy {
  padding-top: 4px;
}

.demo-copy p {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 15px;
}

.controls {
  display: grid;
  gap: 13px;
  margin-bottom: 10px;
}

.ctl-row {
  display: grid;
  grid-template-columns: 74px 1fr 44px;
  gap: 12px;
  align-items: center;
}

.ctl-row label,
.val {
  color: var(--muted);
  font-size: 12px;
}

.val {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ctl-row input[type="range"] {
  width: 100%;
  min-width: 0;
  accent-color: #111;
}

.canvas-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

#gbmCanvas {
  display: block;
  width: 100%;
  min-height: 320px;
}

.code-panel {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.code-label {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.code-block {
  max-height: min(25vh, 210px);
  margin: 0;
  overflow: auto;
  padding: 16px 0;
  color: #242424;
  font-family: var(--font-mono);
  font-size: clamp(11px, 1vw, 13px);
  line-height: 1.55;
  white-space: pre;
}

/* speaker notes as a subtle footer */

.speaker-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 650px);
  justify-content: center;
  gap: 8px;
  padding: 18px 24px 22px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.speaker-text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.help {
  color: var(--faint);
  font-size: 11px;
  text-align: center;
}

.help kbd {
  font-family: var(--font-sans);
  font-size: 11px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 900px) {
  .slide {
    padding: 78px 24px 132px;
  }

  .slide-inner {
    max-height: calc(100vh - 190px);
  }

  .two-col,
  .param-grid,
  .demo-layout,
  .solution-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(38px, 13vw, 64px);
  }
}
