/* ==========================================================================
   CVR — academic.css
   "Academic Hub". Loads after base.css, which carries the tokens, the shared
   chrome, the expertise panel and the segmented control.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Banner
   The panel component run once, with the programme filter in place of the
   usual control. The title runs at h01 here, not the panels' h02.
   -------------------------------------------------------------------------- */

.academic-banner .expertise__inner {
  /* without an explicit width, aspect-ratio transfers the max-height cap back
     into the width and letterboxes the panel */
  width: 100%;
  max-height: 100svh;
  padding-block: var(--space-11);
}

.academic-banner .expertise__body {
  gap: var(--space-6);
}

/* This photo is brighter behind the block than the service images, so the
   shared panel scrim needs a little more here to clear AA for the eyebrow. */
.academic-banner .expertise__inner::after {
  background: radial-gradient(
    70% 66% at 50% 50%,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.3) 55%,
    rgba(0, 0, 0, 0) 80%
  );
}

.academic-banner .segmented {
  margin-top: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 768px) {
  .academic-banner .expertise__inner {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

@media (min-width: 1024px) {
  .academic-banner .expertise__body {
    gap: var(--space-8);
  }
  .academic-banner .segmented {
    margin-top: var(--space-7);
  }
  .academic-banner .segmented__item {
    padding: var(--space-2) var(--space-8);
    font-size: var(--size-body-03);
    line-height: 1.2;
  }
}

/* --------------------------------------------------------------------------
   Programme list
   Ten of the twelve columns, centred. Row height is 114 rule to rule, the
   same rhythm the projects list runs.
   -------------------------------------------------------------------------- */

.programme {
  position: relative;
  background-color: var(--color-ink);
  background-image:
    radial-gradient(
      34% 50% at 104% 100%,
      rgba(24, 169, 93, 0.42) 0%,
      rgba(24, 169, 93, 0.14) 46%,
      rgba(24, 169, 93, 0) 78%
    ),
    radial-gradient(
      36% 62% at -4% 0%,
      rgba(24, 169, 93, 0.85) 0%,
      rgba(24, 169, 93, 0.4) 34%,
      rgba(24, 169, 93, 0) 72%
    );
  padding-block: var(--space-11) var(--space-13);
  overflow: hidden;
}

.course-list {
  margin: 0 auto;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(190, 208, 32, 0.5);
}

.course {
  display: grid;
  gap: var(--space-2) var(--space-5);
  align-items: center;
  padding-block: var(--space-5);
  border-bottom: 1px solid rgba(190, 208, 32, 0.5);
}

.course[hidden] {
  display: none;
}

.course__name {
  color: var(--color-white);
  font-size: var(--size-h03);
  line-height: var(--leading-tight);
  transition: color var(--duration-base) var(--ease);
}

.course:hover .course__name {
  color: var(--color-lime);
}

/* Below 1440 the metas sit as their own wrapped row under the name; at 1440
   the group dissolves and they become columns of the row grid. */
.course__metas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-6);
}

.course__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-white);
  white-space: nowrap;
}

.course .pill {
  justify-self: start;
}

@media (min-width: 1024px) {
  .programme {
    padding-block: calc(var(--space-12) * 1.9) calc(var(--space-12) * 1.6);
  }
  .course-list {
    /* ten of the twelve columns */
    max-width: calc(10 * 125px + 9 * 20px);
  }
  .course {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-4) var(--space-6);
    padding-block: var(--space-6);
    padding-inline: var(--space-8);
  }
  .course__name {
    font-size: 32px;
  }
  .course__metas {
    grid-column: 1 / -1;
  }
  .course .pill {
    justify-self: end;
    padding: var(--space-4) var(--space-8);
    font-size: var(--size-body-03);
    line-height: 1.2;
  }
}

/* The single-line row needs about 1680px before the name column is wide
   enough to hold a course title without wrapping; below that the metas drop
   to their own line. */
@media (min-width: 1680px) {
  /* the mockup's single-line row: name, four meta columns, then the action */
  .course {
    grid-template-columns: minmax(0, 1fr) 0.78fr 0.65fr 0.79fr 0.63fr auto;
    gap: 0;
    /* 114 rule to rule, the rhythm the projects list runs */
    padding-block: var(--space-7);
  }
  .course__metas {
    display: contents;
  }
  .course__name {
    font-size: 36px;
  }
  .projects__action {
    margin-top: var(--space-11);
    text-align: center;
  }
  .projects__action .pill {
    padding: var(--space-4) var(--space-8);
    font-size: var(--size-body-03);
    line-height: 1.2;
  }
}
