/* Teaching entries share the site's palette and reading scale. */
.teaching-section { scroll-margin-top: 24px; }
.teaching-title { text-transform: none; }
.teaching-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.teaching-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--theme-line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(var(--theme-accent-rgb), .045), transparent 65%), var(--theme-surface);
}
.teaching-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
.teaching-role {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--theme-accent);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
}
.teaching-role svg { width: 18px; height: 18px; flex: 0 0 auto; }
.teaching-date {
  color: var(--theme-muted);
  font-size: 11.5px;
  line-height: 1.5;
  white-space: nowrap;
}
.teaching-card h4 {
  margin: 0;
  color: var(--theme-ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.teaching-card p { margin: 0; }
.teaching-context {
  color: var(--theme-muted);
  font-size: 12.5px;
  line-height: 1.65;
}
.teaching-context span { display: block; }
.teaching-description {
  color: var(--theme-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
}
.teaching-materials {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 7px;
  min-height: 44px;
  margin-top: auto;
  color: var(--theme-accent);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
  text-underline-offset: 4px;
}
.teaching-materials:hover { text-decoration: underline; }
.teaching-materials:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 4px;
  border-radius: 3px;
}
@media (max-width: 767px) {
  .teaching-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .teaching-card { padding: 18px; gap: 10px; }
  .teaching-card h4 { font-size: 15.5px; }
  .teaching-context { font-size: 12px; }
  .teaching-description { line-height: 1.6; }
}
@media (min-width: 1024px) {
  .teaching-section { scroll-margin-top: 88px; }
}
