.teaching-page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--global-divider-color);
}

.teaching-page-header .post-title {
  margin: 0;
  font-size: clamp(2.75rem, 5vw, 3.75rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.teaching-page > h2 {
  margin: 0 0 0.85rem;
}

.teaching-page > h2:not(:first-child) {
  margin-top: 2.5rem;
}

.teaching-page > h3 {
  margin: 1.5rem 0 0.85rem;
  font-size: 1.5rem;
}

.teaching-page > h4 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  line-height: 1.35;
}

.teaching-page > p {
  margin-bottom: 0.75rem;
}

.teaching-page > .teaching-level {
  margin-top: 1.25rem;
  font-weight: 500;
}

.teaching-page .teaching-course-list {
  margin-bottom: 1.5rem;
  padding-left: 1.25rem;
}

.teaching-page .teaching-course-list li + li {
  margin-top: 0.35rem;
}

.teaching-page .teaching-links {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.teaching-page .teaching-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--global-divider-color);
  border-radius: 0.4rem;
  background: transparent;
  color: var(--global-theme-color);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}

.teaching-page button.teaching-action {
  min-width: 8.25rem;
}

.teaching-page button.teaching-action::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-top: -0.2rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.teaching-page button.teaching-action[aria-expanded="true"]::after {
  margin-top: 0.2rem;
  transform: rotate(225deg);
}

.teaching-page .teaching-action:hover,
.teaching-page .teaching-action[aria-expanded="true"],
.teaching-page .teaching-slides a:hover {
  border-color: var(--global-theme-color);
  background: var(--global-code-bg-color);
  color: var(--global-theme-color);
  text-decoration: none;
}

.teaching-page .teaching-action:focus-visible,
.teaching-page .teaching-slides a:focus-visible {
  outline: 2px solid var(--global-theme-color);
  outline-offset: 3px;
}

.teaching-page .teaching-slides {
  flex-basis: 100%;
  min-width: 0;
  margin-top: 0.25rem;
}

.teaching-page .teaching-slides[hidden] {
  display: none;
}

.teaching-page .teaching-slides ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.4rem;
  width: 100%;
  max-width: 48rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.teaching-page #programmingcamp-slide-links ul {
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.teaching-page .teaching-slides a {
  display: flex;
  align-items: center;
  height: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--global-divider-color);
  border-radius: 0.35rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

@media (max-width: 575px) {
  .teaching-page > h4 {
    font-size: 1.25rem;
  }

  .teaching-page #programmingcamp-slide-links ul {
    grid-template-columns: minmax(0, 1fr);
  }
}
