/* WestLake presentation-specific refinements. */

.title-slide h1 {
  font-size: 2em;
  font-weight: 300;
  margin: 0 0 0.6em 0;
  color: #ffffff;
}

.title-slide .meta {
  font-size: 1em;
  font-weight: 300;
  color: #ffffff;
  line-height: 1.35;
}

.title-slide .meta .name {
  font-size: 1.08em;
  font-weight: 500;
  color: #ffffff;
}

.reveal p.formalization-image-small {
  display: flex;
  justify-content: center;
  margin: 0 0 0.6em;
}

.reveal p.formalization-image-small img {
  width: min(80vw, 1050px);
  max-width: 100%;
  max-height: 46vh;
  object-fit: contain;
  border: 1px solid var(--border-code);
  background: #ffffff;
}

.reveal p.formalization-caption {
  color: var(--text-muted);
  font-size: 0.72em;
  font-style: italic;
  margin: 0;
  text-align: center;
}

.reveal p.sga-image {
  display: flex;
  justify-content: center;
  margin: 0 0 0.5em;
}

.reveal p.sga-image img {
  max-height: 31vh;
  max-width: 66%;
  object-fit: contain;
  border: 1px solid var(--border-code);
  background: #ffffff;
}

.reveal .math-proof {
  font-size: 0.72em;
}

.reveal .math-proof p,
.reveal .math-proof ul {
  font-size: 1em;
  margin-top: 0.4em;
  margin-bottom: 0.4em;
}

.reveal .math-proof li {
  margin-bottom: 0.6em;
}

.reveal p.trust-lead {
  white-space: nowrap;
  font-size: 0.7em;
  text-align: center;
  margin: 0.9em 0 0;
}

.reveal .trust-box {
  max-width: 26em;
  margin: 0.5em auto 0;
  padding: 0.7em 1.1em;
  border: 2px solid var(--lean-teal);
  border-radius: 8px;
  background: var(--bg-code);
  text-align: center;
  font-weight: 400;
}

.reveal section:is(
  [data-state="section-formalize"],
  [data-state="section-useful"],
  [data-state="section-ai"],
  [data-state="section-achievements"]
) {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 6vh 8vw;
}

.reveal section:is(
  [data-state="section-formalize"],
  [data-state="section-useful"],
  [data-state="section-ai"],
  [data-state="section-achievements"]
) h2 {
  font-size: 1.9em;
  font-weight: 600;
  line-height: 1.25;
  max-width: 18em;
  margin: 0;
  padding: 0.1em 0 0.1em 0.7em;
  border-left: 6px solid var(--lean-teal);
}

.reveal section:is(
  [data-state="section-formalize"],
  [data-state="section-useful"],
  [data-state="section-ai"],
  [data-state="section-achievements"]
) h2::before {
  display: block;
  color: var(--lean-teal);
  font-size: 0.5em;
  font-weight: 700;
  letter-spacing: 0.22em;
  margin-bottom: 0.5em;
}

.reveal section[data-state="section-formalize"] h2::before {
  content: "PART I";
}

.reveal section[data-state="section-useful"] h2::before {
  content: "PART II";
}

.reveal section[data-state="section-ai"] h2::before {
  content: "PART III";
}

.reveal section[data-state="section-achievements"] h2::before {
  content: "PART IV";
}

.reveal section[data-state="formalization-before-computers"] {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
}

.reveal section[data-state="formalization-before-computers"] h2 {
  position: absolute;
  top: 2vh;
  left: 3vw;
  right: 3vw;
  margin: 0;
}

.reveal section:is(
  [data-state="proof-assistants"],
  [data-state="lean-overview"],
  [data-state="mathlib-overview"]
) li:not(:last-child) {
  margin-bottom: 2.7em;
}

.reveal section[data-state="mathlib-examples"] {
  display: flex !important;
  flex-direction: column;
  padding-bottom: 8vh;
}

.reveal section[data-state="mathlib-examples"] h2 {
  margin-bottom: 0.8em;
}

.reveal section[data-state="mathlib-examples"] h3 {
  margin-top: auto;
  margin-bottom: 0.05em;
}

.reveal section[data-state="mathlib-examples"] h3 + p {
  margin: 0;
}

.reveal section[data-state="mathlib-examples"] p:last-of-type {
  margin-bottom: auto;
}

.reveal section[data-state="mathlib-examples"] code.math.display {
  display: block;
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

.reveal section[data-state="mathlib-examples"] code.math.display .katex-display {
  margin: 0.55em 0 0.75em;
}

.reveal section[data-state="levels-of-trust"] li {
  margin-bottom: 1.1em;
}

.reveal section[data-state="why-formalize"] .spaced-list li {
  margin-bottom: 1.7em;
}

.reveal section[data-state="group-scheme-question"] .spaced-list li {
  margin-bottom: 1.2em;
}

.reveal section[data-state="lean-examples"] h2 {
  margin-bottom: 0.8em;
}

.reveal section[data-state="lean-examples"] pre {
  font-size: 0.95em !important;
}

.reveal section[data-state="lean-examples"] pre code {
  line-height: 1.45;
}

.reveal section[data-state="lean-examples"] pre + h3 {
  margin-top: 1.5em;
}

.reveal section[data-state="semiring-generalization"] li {
  margin-bottom: 1.4em;
}

.reveal section[data-state="filters-generalization"] p,
.reveal section[data-state="filters-generalization"] ul {
  font-size: 0.84em;
  line-height: 1.5;
}

.reveal section[data-state="filters-generalization"] h2 {
  margin-bottom: 0.8em;
}

.reveal section[data-state="filters-generalization"] p {
  margin: 0.45em 0;
}

.reveal section[data-state="filters-generalization"] p + p {
  margin-top: 0.7em;
}

.reveal section[data-state="filters-generalization"] ul {
  margin-top: 0.65em;
}

.reveal section[data-state="filters-generalization"] li {
  margin-bottom: 1.2em;
}

.reveal section[data-state="filter-definition"] p,
.reveal section[data-state="filter-definition"] ul {
  font-size: 0.8em;
  line-height: 1.5;
}

.reveal section[data-state="filter-definition"] h2 {
  margin-bottom: 0.6em;
}

.reveal section[data-state="filter-definition"] p {
  margin: 0.5em 0;
}

.reveal section[data-state="filter-definition"] ul {
  margin: 0.5em 0 0.7em;
}

.reveal section[data-state="filter-definition"] li {
  margin-bottom: 0.35em;
}

.reveal section[data-state="filter-definition"] code.math.display .katex-display {
  margin: 0.6em 0;
}

.reveal section:is(
  [data-state="formalization-overview"],
  [data-state="lean-overview"],
  [data-state="heine-cantor"],
  [data-state="semiring-generalization"],
  [data-state="scholze-quotes"],
  [data-state="which-proof"],
  [data-state="kummer-fermat"],
  [data-state="erdos-counterexample"],
  [data-state="jacobian-conjecture"],
  [data-state="jacobian-counterexample"]
) {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  padding-top: 12vh;
  padding-bottom: 6vh;
}

.reveal section:is(
  [data-state="formalization-overview"],
  [data-state="lean-overview"],
  [data-state="heine-cantor"],
  [data-state="semiring-generalization"],
  [data-state="scholze-quotes"],
  [data-state="which-proof"],
  [data-state="kummer-fermat"],
  [data-state="erdos-counterexample"],
  [data-state="jacobian-conjecture"],
  [data-state="jacobian-counterexample"]
) h2 {
  position: absolute;
  top: 2vh;
  left: 3vw;
  right: 3vw;
  margin: 0;
}

.reveal section[data-state="scholze-quotes"] blockquote {
  margin: 1em 0;
}

.reveal section:is(
  [data-state="erdos-counterexample"],
  [data-state="jacobian-conjecture"]
) ul {
  margin-top: 1.6em;
}

.reveal section[data-state="jacobian-conjecture"] ul {
  margin-top: 2.2em;
}

.reveal section[data-state="jacobian-conjecture"] .spaced-list li:not(:last-child) {
  margin-bottom: 2.8em;
}

.reveal section[data-state="jacobian-conjecture"] p,
.reveal section[data-state="jacobian-conjecture"] ul {
  font-size: 0.95em;
}

.reveal section[data-state="jacobian-counterexample"] .math-proof {
  font-size: 0.95em;
}

.reveal section[data-state="jacobian-counterexample"] code.math.display .katex-display {
  margin: 1.1em 0;
}

.reveal p.thankyou-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2em;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  margin: 0;
}
