/* Teaching page — academic-year first, easy to update once per year */

.teaching-main .page-intro { margin-bottom: 34px; }

/* Academic-year archive: newest years stay at the top; older years remain scrollable. */
.teaching-year-scroll {
  max-height: 620px;
  overflow-y: auto;
  padding-right: 18px;
  margin: 0 0 52px;
  scrollbar-width: thin;
  scrollbar-color: rgba(25, 47, 70, 0.32) transparent;
  overscroll-behavior: contain;
}

.teaching-year-scroll::-webkit-scrollbar { width: 8px; }
.teaching-year-scroll::-webkit-scrollbar-track { background: transparent; }
.teaching-year-scroll::-webkit-scrollbar-thumb {
  background: rgba(25, 47, 70, 0.26);
  border-radius: 999px;
}

.teaching-year {
  display: grid;
  grid-template-columns: minmax(145px, 0.28fr) minmax(0, 1fr);
  gap: clamp(42px, 7vw, 94px);
  padding: 0 0 34px;
  scroll-margin-top: 24px;
}

.teaching-year + .teaching-year {
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.year-label {
  position: sticky;
  top: 24px;
  align-self: start;
}

.year-label > * {
  position: static;
}

.year-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.year-label h2,
.phd-school-heading h2 {
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(1.75rem, 2.8vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.course-list {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.course-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 28px;
  padding: 0 0 25px;
}

.course-card + .course-card {
  padding-top: 25px;
  border-top: 1px solid rgba(216, 210, 200, 0.82);
}

.course-level {
  align-self: start;
  display: inline-flex;
  justify-content: center;
  min-width: 0;
  padding: 7px 9px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  background: rgba(255,255,255,0.28);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.065em;
  line-height: 1;
  text-transform: uppercase;
}

.licence-level { border-color: rgba(119, 82, 50, 0.35); }
.master-level { border-color: rgba(30, 48, 70, 0.32); }
.phd-level { border-color: rgba(134, 71, 48, 0.42); color: var(--accent); }

.course-copy h3 {
  margin: -3px 0 6px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 1.14rem;
  font-weight: 500;
  line-height: 1.35;
}

.course-copy h3 a { color: inherit; text-decoration: none; }
.course-copy h3 a:hover { color: var(--accent); }

.course-copy p {
  max-width: 760px;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 0.87rem;
  line-height: 1.6;
}

.course-copy .course-context,
.course-copy .course-links-line {
  color: var(--muted);
  font-size: 0.78rem;
}

.course-links-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
}

.course-links-line a {
  color: var(--navy-soft);
  font-weight: 650;
  text-decoration: none;
}

.course-links-line a:hover { color: var(--accent); }

.course-copy .login-note {
  margin-top: 10px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.69rem;
  letter-spacing: 0.02em;
}

.login-note .icon { margin-right: 5px; font-size: 0.66rem; }

.phd-school-section {
  display: grid;
  grid-template-columns: minmax(145px, 0.28fr) minmax(0, 1fr);
  gap: clamp(42px, 7vw, 94px);
  padding-top: 62px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.phd-school-heading .year-kicker { margin-bottom: 8px; }

.school-card {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 28px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  background: rgba(255,255,255,0.25);
}

.school-date {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.school-copy h3 {
  margin: -3px 0 8px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.35;
}

.school-copy h3 a { color: inherit; text-decoration: none; }
.school-copy h3 a:hover { color: var(--accent); }

.school-copy p {
  max-width: 760px;
  margin: 0;
  font-size: 0.87rem;
  line-height: 1.6;
}

.school-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 14px;
}

.school-links a {
  color: var(--navy-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-decoration: none;
}

.school-links a:hover { color: var(--accent); }
.school-links .icon { margin-right: 4px; }


@media (max-width: 900px) {
  .teaching-year-scroll { max-height: 600px; padding-right: 12px; }
}

@media (max-width: 760px) {
  .teaching-year,
  .phd-school-section {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .year-label { position: static; }
}

@media (max-width: 560px) {
  .teaching-year-scroll {
    max-height: 68vh;
    padding-right: 8px;
  }

  .course-card,
  .school-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .course-level {
    width: fit-content;
  }

  .school-card { padding: 22px 20px; }
}

/* v17.2 — prospective M2 projects and compact master supervision */
.teaching-feature,
.master-supervision {
  display: grid;
  grid-template-columns: minmax(190px, 0.34fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 82px);
  padding: 28px 0 34px;
  border-top: 1px solid var(--line);
}

.teaching-feature {
  margin-top: -6px;
  padding-top: 0;
  border-top: 0;
}

.teaching-feature-label h2,
.master-supervision-heading h2 {
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.14;
}

.teaching-feature-copy {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: rgba(255,255,255,0.30);
}
.teaching-feature-copy p { margin: 0; font-size: 0.9rem; line-height: 1.65; }
.teaching-feature-copy h3 {
  margin: 0 0 12px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 500;
}
.available-projects {
  margin: 0 0 18px 1.15rem;
  padding: 0;
}
.available-projects li {
  margin: 0 0 9px;
  padding-left: 3px;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.45;
}
.available-projects li:last-child { margin-bottom: 0; }

.master-supervision { margin-bottom: 34px; }
.supervision-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(216, 210, 200, 0.78);
}
.supervision-list li {
  display: grid;
  grid-template-columns: 58px minmax(150px, 0.36fr) minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid rgba(216, 210, 200, 0.78);
  font-size: 0.82rem;
  line-height: 1.35;
}
.supervision-list strong { color: var(--navy); font-family: var(--serif); font-weight: 500; }
.supervision-list span:last-child { color: var(--muted); }
.supervision-year { color: var(--accent); font-weight: 750; font-size: 0.7rem; letter-spacing: 0.04em; }

@media (max-width: 760px) {
  .teaching-feature,
  .master-supervision { grid-template-columns: 1fr; gap: 20px; }
  .supervision-list li { grid-template-columns: 50px minmax(0, 1fr); }
  .supervision-list li span:last-child { grid-column: 2; }
}


/* v17.3 — explicit course-section separator before the scrollable archive */
.courses-heading {
  margin: 8px 0 24px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.courses-heading h2 {
  margin: 0 0 7px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(1.65rem, 2.5vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.025em;
}
.courses-heading p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}
