:root {
  --ink: #151716;
  --muted: #646964;
  --paper: #f3f1eb;
  --surface: #fbfaf6;
  --line: #d7d6cf;
  --red: #b74635;
  --cyan: #7eb4b1;
  --yellow: #d0aa56;
  --white: #fffefa;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(21, 23, 22, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 48px;
}

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 5vw;
  color: var(--white);
  background: rgba(21, 23, 22, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.course-mark {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 600;
  text-decoration: none;
}

.course-symbol {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  font-family: "Newsreader", serif;
  font-size: 18px;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 50%;
}

nav {
  display: flex;
  gap: 28px;
}

nav a,
footer a {
  font-size: 14px;
  color: inherit;
  text-decoration: none;
}

nav a:hover,
footer a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.hero {
  position: relative;
  display: grid;
  min-height: min(690px, calc(100vh - 64px));
  align-items: end;
  overflow: hidden;
  color: var(--white);
  background: #1a1c1b;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center;
  filter: brightness(1.08) contrast(1.12) saturate(1.05);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(15, 17, 16, 0.78) 0%, rgba(15, 17, 16, 0.32) 52%, rgba(15, 17, 16, 0.06) 100%),
    linear-gradient(0deg, rgba(15, 17, 16, 0.52), transparent 58%);
}

.hero-content {
  position: relative;
  width: min(720px, 90vw);
  padding: 9vh 5vw;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: var(--yellow);
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: "Newsreader", serif;
  font-weight: 600;
}

h1 {
  max-width: 680px;
  margin-bottom: 20px;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 0.92;
}

.hero-content > p:not(.eyebrow) {
  max-width: 620px;
  margin: 0;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.6;
  color: rgba(255, 254, 250, 0.82);
}

.hero-link {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  margin-top: 34px;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid var(--yellow);
  padding-bottom: 7px;
}

.library {
  width: min(1180px, 90vw);
  margin: 0 auto;
  padding: 100px 0 120px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink);
}

.section-heading h2,
.about h2 {
  margin-bottom: 0;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1;
}

#lesson-count {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--muted);
}

.library-tools {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 12px;
}

.search-box {
  display: flex;
  width: min(380px, 100%);
  height: 44px;
  gap: 10px;
  align-items: center;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.search-box:focus-within {
  border-color: var(--ink);
  outline: 2px solid rgba(126, 180, 177, 0.36);
  outline-offset: 1px;
}

.search-box svg {
  width: 19px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.7;
}

.search-box input {
  width: 100%;
  min-width: 0;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.topic-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 3px;
}

.filter-button {
  height: 36px;
  padding: 0 13px;
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
}

.filter-button:hover {
  color: var(--ink);
  border-color: var(--line);
}

.filter-button.active {
  color: var(--white);
  background: var(--ink);
}

.lesson-list {
  border-top: 1px solid var(--line);
}

.lesson {
  display: grid;
  grid-template-columns: 88px minmax(280px, 0.9fr) minmax(300px, 1.2fr);
  gap: clamp(24px, 4vw, 58px);
  padding: 38px 0;
  border-bottom: 1px solid var(--line);
}

.lesson-number {
  padding-top: 2px;
  font-family: "Newsreader", serif;
  font-size: 27px;
  color: var(--red);
}

.slide-preview {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  min-width: 0;
  overflow: hidden;
  align-items: start;
  justify-items: start;
  color: #25312f;
  text-decoration: none;
  background:
    repeating-linear-gradient(90deg, rgba(21, 23, 22, 0.075) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(0deg, rgba(21, 23, 22, 0.075) 0 1px, transparent 1px 34px),
    linear-gradient(135deg, rgba(244, 231, 184, 0.82), rgba(237, 243, 239, 0.96) 36%, rgba(255, 254, 250, 0.98)),
    #f5f4ee;
  border: 1px solid rgba(21, 23, 22, 0.12);
  border-radius: 4px;
  box-shadow: 0 10px 24px rgba(21, 23, 22, 0.1);
}

.slide-preview::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='960' height='540' viewBox='0 0 960 540'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M130 416V96' stroke='%23151716' stroke-opacity='.28' stroke-width='4'/%3E%3Cpath d='M104 374H846' stroke='%23151716' stroke-opacity='.25' stroke-width='4'/%3E%3Cpath d='M846 374l-18-11m18 11l-18 11' stroke='%23151716' stroke-opacity='.25' stroke-width='4'/%3E%3Cpath d='M130 96l-11 18m11-18l11 18' stroke='%23151716' stroke-opacity='.28' stroke-width='4'/%3E%3Cpath d='M178 376C271 272 365 276 455 342S630 423 760 190' stroke='%237f9f6e' stroke-opacity='.64' stroke-width='7'/%3E%3Cpath d='M190 420C316 318 426 307 535 343S671 354 810 224' stroke='%23b74635' stroke-opacity='.52' stroke-width='5'/%3E%3Cpath d='M610 180c82-70 182-12 159 68-24 84-158 94-194 20-25-53 9-114 75-133' stroke='%237f9f6e' stroke-opacity='.48' stroke-width='5'/%3E%3Cpath d='M635 251c56-47 129-6 111 48-19 58-112 63-136 12-17-36 7-78 54-92' stroke='%23b74635' stroke-opacity='.42' stroke-width='4'/%3E%3Cpath d='M185 236C254 260 405 263 504 232' stroke='%2325312f' stroke-opacity='.16' stroke-width='3'/%3E%3C/g%3E%3Cg opacity='.62'%3E%3Ccircle cx='262' cy='310' r='7' fill='%23b74635'/%3E%3Ccircle cx='536' cy='382' r='7' fill='%237f9f6e'/%3E%3Ccircle cx='760' cy='190' r='7' fill='%23b74635'/%3E%3C/g%3E%3Cg font-family='Georgia,serif' font-size='24' fill='%2325312f' opacity='.55'%3E%3Ctext x='92' y='126'%3E%CF%89%3C/text%3E%3Ctext x='812' y='358'%3Eq%3C/text%3E%3Ctext x='642' y='132'%3Ephase trace%3C/text%3E%3C/g%3E%3Cpath d='M638 139c-18 12-33 25-45 40m0 0l2-15m-2 15l14-5' fill='none' stroke='%23b74635' stroke-opacity='.45' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.slide-preview::after {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 2;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 600;
  content: "Open PDF";
  color: var(--ink);
  background: var(--yellow);
  border-radius: 3px;
}

.slide-preview.pending::after {
  content: "Examples session";
  color: var(--ink);
  background: rgba(255, 254, 250, 0.88);
  border: 1px solid rgba(21, 23, 22, 0.16);
}

.slide-preview:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(21, 23, 22, 0.17);
}

.slide-preview.pending:hover {
  transform: none;
  box-shadow: 0 12px 30px rgba(21, 23, 22, 0.12);
}
.slide-equation {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 88px);
  margin: clamp(18px, 4vw, 34px) 0 0 clamp(40px, 6vw, 68px);
  padding: 0;
  font-family: "Newsreader", serif;
  font-size: clamp(17px, 2.15vw, 28px);
  line-height: 1.25;
  text-align: left;
  text-shadow: 0 10px 18px rgba(21, 23, 22, 0.13);
}

.slide-equation sub,
.slide-equation sup {
  font-size: 0.58em;
  line-height: 0;
}

.lesson-copy {
  align-self: center;
}

.lesson-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
}

.lesson-topic::before {
  margin-right: 12px;
  content: "•";
  color: var(--cyan);
}

.lesson h3 {
  margin-bottom: 10px;
  font-size: clamp(27px, 3vw, 36px);
  line-height: 1.05;
}

.lesson-description {
  max-width: 590px;
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

.lesson-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.lesson-tags span {
  padding-bottom: 3px;
  font-size: 12px;
  color: var(--ink);
  border-bottom: 2px solid var(--cyan);
}

.lesson-notes {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 14px 16px;
  background: rgba(255, 254, 250, 0.7);
  border-left: 3px solid var(--red);
}

.lesson-notes span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.lesson-notes a {
  width: fit-content;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration-color: rgba(126, 180, 177, 0.85);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.lesson-notes a:hover {
  color: var(--red);
}

.lesson-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 700;
}

.lesson-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(126, 180, 177, 0.18);
  border: 1px solid rgba(21, 23, 22, 0.14);
  border-radius: 4px;
}

.lesson-actions a:hover {
  background: var(--yellow);
  border-color: rgba(21, 23, 22, 0.22);
}

.lesson-actions.muted {
  color: var(--muted);
  font-weight: 600;
}

.empty-state {
  padding: 70px 0;
  text-align: center;
  color: var(--muted);
}

.about {
  display: grid;
  grid-template-columns: minmax(140px, 0.35fr) minmax(280px, 1fr);
  gap: 5vw;
  padding: 100px 5vw;
  color: var(--white);
  background: var(--ink);
}

.about .eyebrow {
  color: var(--cyan);
}

.about > div {
  max-width: 820px;
}

.about p:not(.eyebrow) {
  max-width: 760px;
  margin: 24px 0 0;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.7;
  color: rgba(255, 254, 250, 0.7);
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 26px 5vw;
  font-size: 13px;
  color: var(--white);
  background: #0c0d0d;
}

footer p {
  margin: 0;
}

@media (max-width: 850px) {
  .lesson {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .lesson-copy {
    grid-column: 2;
  }

  .library-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .topic-filters {
    margin-left: -3px;
  }
}

@media (max-width: 580px) {
  .site-header {
    min-height: 58px;
  }

  .course-mark span:last-child {
    display: none;
  }

  nav {
    gap: 20px;
  }

  .hero {
    min-height: 620px;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, rgba(15, 17, 16, 0.84) 5%, rgba(15, 17, 16, 0.36) 75%, rgba(15, 17, 16, 0.12));
  }

  .hero-content {
    padding: 54px 5vw;
  }

  .library {
    padding: 74px 0 90px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 14px;
  }

  .lesson {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .lesson-number {
    font-size: 20px;
  }

  .lesson-copy {
    grid-column: 1;
  }

  .about {
    grid-template-columns: 1fr;
    padding: 72px 5vw;
  }

  footer {
    gap: 12px;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .slide-preview {
    transition: transform 180ms ease, box-shadow 180ms ease;
  }
}
