/* ==========================================================================
   E3 Fellows Program — University of Florida
   Department of Engineering Education, Herbert Wertheim College of Engineering
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* UF core brand */
  --uf-blue: #0021a5;
  --uf-blue-700: #001a84;
  --uf-blue-900: #001057;
  --uf-orange: #fa4616;
  --uf-orange-600: #e03a0f;
  --uf-orange-ink: #b8340d; /* accessible orange for text on white */

  /* Neutrals */
  --ink: #12161f;
  --ink-2: #3b4453;
  --ink-3: #626c7d;
  --line: #e2e6ee;
  --line-strong: #ccd3e0;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --surface-3: #eef2f9;

  /* Type */
  --font: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.86rem, 0.84rem + 0.1vw, 0.92rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.09rem);
  --step-1: clamp(1.2rem, 1.13rem + 0.35vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.32rem + 0.65vw, 1.85rem);
  --step-3: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  --step-4: clamp(2.1rem, 1.6rem + 2.4vw, 3.5rem);

  /* Space & shape */
  --wrap: 1160px;
  --wrap-narrow: 800px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(18, 22, 31, 0.06),
    0 2px 8px rgba(18, 22, 31, 0.04);
  --shadow-md: 0 2px 4px rgba(18, 22, 31, 0.06),
    0 12px 28px rgba(18, 22, 31, 0.09);

  --header-h: 74px;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
h4 { font-size: var(--step-0); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--uf-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--uf-orange-ink); }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin-bottom: 0.4em; }

sup { font-size: 0.62em; top: -0.5em; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

:focus-visible {
  outline: 3px solid var(--uf-orange);
  outline-offset: 2px;
  border-radius: 2px;
}

/* External links open in a new tab. WCAG advises warning the user, so append
   a cue that is announced by screen readers but invisible on screen. */
a[target="_blank"]::after {
  content: " (opens in a new tab)";
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--uf-blue);
  color: #fff;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
  color: #fff;
}

/* --------------------------------------------------------------------------
   3. Layout helpers
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.wrap--narrow { max-width: var(--wrap-narrow); }

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.section--tight { padding-block: clamp(2.25rem, 5vw, 3.5rem); }
.section--alt { background: var(--surface-2); }
.section--ink {
  background: var(--uf-blue-900);
  color: rgba(255, 255, 255, 0.82);
}
.section--ink h2,
.section--ink h3 { color: #fff; }

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--uf-orange-ink);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 3px;
  background: var(--uf-orange);
  border-radius: 2px;
}
.section-head--center .eyebrow { justify-content: center; }
.section--ink .eyebrow { color: #ffb59b; }

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-2);
  font-weight: 350;
}
.section--ink .lede { color: rgba(255, 255, 255, 0.85); }

/* Comfortable wide reading measure for a standalone prose block. */
.measure { max-width: 850px; }

.muted { color: var(--ink-3); }
.small { font-size: var(--step--1); }
.center { text-align: center; }

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s, color 0.18s, border-color 0.18s,
    transform 0.18s;
}
.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--uf-orange);
  border-color: var(--uf-orange);
  color: #fff;
}
.btn--primary:hover {
  background: var(--uf-orange-600);
  border-color: var(--uf-orange-600);
  color: #fff;
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

.btn--outline {
  border-color: var(--uf-blue);
  color: var(--uf-blue);
}
.btn--outline:hover {
  background: var(--uf-blue);
  color: #fff;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--uf-blue);
}
.arrow-link::after {
  content: "→";
  transition: transform 0.18s;
}
.arrow-link:hover::after { transform: translateX(4px); }

/* Two or more arrow links sitting side by side. */
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-top: 1.35rem;
}

/* --------------------------------------------------------------------------
   5. Header / navigation
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--uf-orange);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 34px;
  padding-block: 0.35rem;
}
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar__right { opacity: 0.95; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

/* Text lockup — replace with official UF signature artwork when available */
.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: var(--ink);
  padding-block: 0.6rem;
}
/* Inline layout, not grid — grid would split the "E" text node and the
   <sup> into two separate items and stack them. */
.brand__mark {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: var(--uf-blue);
  color: #fff;
  font-weight: 800;
  font-size: 1.265rem; /* 1.15rem + 10% */
  /* The superscript pulls the glyph cluster's optical centre below the line
     box centre. Trimming the line-height lifts the text by half the trim,
     which re-centres the painted "E3" in the 44px square. */
  line-height: 37.4px;
  text-align: center;
  white-space: nowrap;
  letter-spacing: -0.02em;
}
.brand__mark sup { font-size: 0.6em; }
.brand__text { display: grid; line-height: 1.2; }
.brand__title {
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.22;
  max-width: 30ch;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand__sub {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 0.5rem 0.8rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle__bars {
  display: grid;
  gap: 3px;
  width: 16px;
}
.nav-toggle__bars span {
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.nav ul {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav li { margin: 0; }
/* Underline accent — no boxes or background fills. */
.nav a {
  position: relative;
  display: block;
  padding: 0.5rem 0.1rem;
  margin-inline: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--ink-2);
  white-space: nowrap;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 2px;
  background: transparent;
  transition: background-color 0.18s;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { background: var(--line-strong); }
.nav a[aria-current="page"] { color: var(--uf-blue); }
.nav a[aria-current="page"]::after { background: var(--uf-orange); }

/* Breakpoint sits at 1100px: seven links plus the expanded programme name in
   the lockup need the room. */
@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 0.6rem clamp(1.1rem, 4vw, 2rem) 1rem;
  }
  .nav.is-open { display: block; }
  .nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }
  /* Underlines read poorly in a stacked list — use a left accent instead. */
  .nav a {
    margin-inline: 0;
    padding: 0.75rem 0.8rem;
    border-radius: var(--r-sm);
  }
  .nav a::after { display: none; }
  .nav a:hover { background: var(--surface-2); }
  .nav a[aria-current="page"] {
    background: var(--surface-3);
    box-shadow: inset 3px 0 0 var(--uf-orange);
  }
  .site-header .wrap { position: relative; }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--uf-blue-900);
  background-image: radial-gradient(
      120% 100% at 85% 0%,
      var(--uf-blue) 0%,
      transparent 62%
    ),
    linear-gradient(160deg, var(--uf-blue-700) 0%, var(--uf-blue-900) 100%);
  color: rgba(255, 255, 255, 0.86);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--uf-orange) 0%,
    var(--uf-orange) 40%,
    rgba(250, 70, 22, 0.25) 100%
  );
}
.hero__grid-lines {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px
    );
  background-size: 96px 100%;
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
}
/* Inline links on the dark hero / ink sections. */
.hero p a,
.section--ink p a,
.section--ink li a,
.cta p a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.hero p a:hover,
.section--ink p a:hover,
.section--ink li a:hover,
.cta p a:hover {
  color: #ffc9b5;
  text-decoration-color: #ffc9b5;
}

/* Headline shares the wide lede's right edge so the hero fills its column
   instead of leaving a tall empty band of blue. `.hero--page h1` overrides
   this for the interior pages. */
.hero h1 { color: #fff; max-width: 850px; }
.hero .lede { max-width: 56ch; color: rgba(255, 255, 255, 0.86); }
/* Wider measure for intros that should sit on two lines rather than three.
   The text needs ~810px to break in two; 850px leaves room for word
   boundaries, and `balance` keeps the two lines close to equal length. */
.hero .lede--wide {
  max-width: 850px;
  text-wrap: balance;
}
.hero__tag {
  display: inline-block;
  margin-bottom: 1.4rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffc9b5;
}

/* Compact hero for interior pages */
.hero--page .wrap { padding-block: clamp(2.75rem, 6vw, 4.25rem); }
.hero--page h1 { font-size: var(--step-3); max-width: 22ch; }

.breadcrumb {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.62);
}
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; }
.breadcrumb a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }

/* --------------------------------------------------------------------------
   7. Stat band
   -------------------------------------------------------------------------- */
/* Individually bordered cells rather than a 1px-gap grid: with auto-fit, a
   partly filled last row would otherwise expose the gap colour as a block. */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.5rem 1.15rem;
  text-align: center;
}
.stat__num {
  display: block;
  font-size: clamp(2rem, 1.5rem + 1.8vw, 2.9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--uf-blue);
}
.stat__label {
  display: block;
  max-width: 20ch;
  margin: 0.5rem auto 0;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--ink-3);
  line-height: 1.35;
}
.stats--on-ink .stat {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}
.stats--on-ink .stat__num { color: #fff; }
.stats--on-ink .stat__label { color: rgba(255, 255, 255, 0.72); }

/* --------------------------------------------------------------------------
   8. Cards & grids
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: clamp(1.1rem, 2.4vw, 1.75rem);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
/* Exactly two per row, centred as a block. `.grid--2` uses auto-fit, which
   fits three columns at desktop widths and would leave four cards as 3 + 1. */
.grid--2up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 900px;
  margin-inline: auto;
}
@media (max-width: 700px) {
  .grid--2up { grid-template-columns: 1fr; }
}
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.35rem, 2.5vw, 1.85rem);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.card h3 { margin-bottom: 0.45rem; }
.card p:last-child { margin-bottom: 0; }

.card--link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.card__foot { margin-top: auto; padding-top: 1.1rem; }

.card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 1.1rem;
  border-radius: var(--r-md);
  background: var(--surface-3);
  color: var(--uf-blue);
}
.card__icon svg { width: 24px; height: 24px; }

.card--accent { border-top: 4px solid var(--uf-orange); }

/* Numbered component list */
.components { display: grid; gap: 1.25rem; counter-reset: comp; }
.component {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: clamp(1rem, 2.5vw, 1.9rem);
  align-items: start;
  padding: clamp(1.4rem, 3vw, 2rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  counter-increment: comp;
}
.component::before {
  content: counter(comp, decimal-leading-zero);
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--uf-blue);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.component h3 { margin-bottom: 0.5rem; }
@media (max-width: 560px) {
  .component { grid-template-columns: 1fr; gap: 1rem; }
}

/* Feature list with checkmarks */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.85rem; }
.checklist li {
  position: relative;
  margin: 0;
  padding-left: 2rem;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--uf-orange);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z' fill='%23000'/%3E%3C/svg%3E")
    center / 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z' fill='%23000'/%3E%3C/svg%3E")
    center / 100% no-repeat;
}
.section--ink .checklist li::before { background: #ffb59b; }

/* Split content block */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
}

/* Pull quote / callout */
.callout {
  border-left: 4px solid var(--uf-orange);
  background: var(--surface-2);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 1.35rem 1.6rem;
}
.callout p:last-child { margin-bottom: 0; }

/* Definition rows */
.deflist { display: grid; gap: 0; margin: 0; }
.deflist > div {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: 1.5rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}
.deflist > div:last-child { border-bottom: 1px solid var(--line); }
.deflist dt { font-weight: 700; color: var(--ink); }
.deflist dd { margin: 0; }
@media (max-width: 640px) {
  .deflist > div { grid-template-columns: 1fr; gap: 0.35rem; }
}

/* --------------------------------------------------------------------------
   9. Timeline / Gantt
   -------------------------------------------------------------------------- */
.gantt-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}
.gantt {
  min-width: 880px;
  display: grid;
  /* label | Aug..Apr (9 months) | milestone gutter */
  grid-template-columns: 250px repeat(9, minmax(58px, 1fr)) 46px;
  row-gap: 0.55rem;
  align-items: stretch;
}

.gantt__sem {
  padding: 0.5rem 1rem;
  border-radius: var(--r-sm);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}
.gantt__sem--fall { background: var(--uf-blue); }
.gantt__sem--spring { background: var(--uf-orange); }

.gantt__month {
  padding: 0.5rem 0.2rem 0.85rem;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
}

.gantt__row-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.85rem 1rem 0.85rem 0.9rem;
  background: var(--surface-2);
  border-left: 4px solid var(--uf-blue);
  border-radius: var(--r-sm);
}
.gantt__row-label strong {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.25;
}
.gantt__row-label span {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--ink-3);
}
.gantt__row-label--orange { border-left-color: var(--uf-orange); }

/* One track per row, spanning all nine months; bars are placed inside it. */
.gantt__track {
  position: relative;
  grid-column: 2 / 11;
  display: grid;
  grid-template-columns: repeat(9, minmax(58px, 1fr));
  align-items: center;
  padding: 0.35rem 0;
  background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: calc(100% / 9) 100%;
}

.gantt__bar {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 0.9rem;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--uf-blue);
  background: #e8ecfb;
  border: 1px solid #c3ccf1;
}
.gantt__bar--orange {
  color: var(--uf-orange-ink);
  background: #ffe9e2;
  border-color: #ffc4b2;
}
.gantt__bar--neutral {
  color: var(--ink-2);
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.gantt__marker {
  grid-column: 11 / 12;
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 1.05rem;
  color: var(--uf-orange);
}

/* Column placement helpers (Aug=1 … Apr=9) */
.gantt__spacer { grid-column: 1 / 2; }
.gantt--fall-span { grid-column: 2 / 7; }
.gantt--spring-span { grid-column: 7 / 11; }
.bar--fall { grid-column: 1 / 6; }
.bar--spring { grid-column: 6 / 10; }
.bar--year { grid-column: 1 / 10; }

.gantt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--ink-3);
}
.gantt-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.gantt-legend i {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: var(--uf-orange);
}
.gantt-legend i.is-open {
  background: transparent;
  border: 2px solid var(--uf-orange);
}

.scroll-hint {
  display: none;
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: var(--ink-3);
}
@media (max-width: 900px) {
  .scroll-hint { display: block; }
}

/* Vertical phase timeline */
.phases {
  position: relative;
  display: grid;
  gap: 1.75rem;
  margin: 0;
  padding: 0 0 0 2.25rem;
  list-style: none;
}
.phases::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line-strong);
}
.phases > li { position: relative; margin: 0; }
.phases > li::before {
  content: "";
  position: absolute;
  left: -2.25rem;
  top: 0.45em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--uf-blue);
}
.phases > li.is-milestone::before {
  border-color: var(--uf-orange);
  background: var(--uf-orange);
}
.phase__when {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--uf-orange-ink);
  margin-bottom: 0.2rem;
}
.phase__title {
  font-size: var(--step-1);
  margin-bottom: 0.35rem;
}

/* --------------------------------------------------------------------------
   10. Fellows
   -------------------------------------------------------------------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filter {
  padding: 0.5rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.filter:hover { border-color: var(--uf-blue); color: var(--uf-blue); }
.filter[aria-pressed="true"] {
  background: var(--uf-blue);
  border-color: var(--uf-blue);
  color: #fff;
}
.filter__count {
  opacity: 0.65;
  font-weight: 600;
  margin-left: 0.35rem;
}

.fellows-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: clamp(1.1rem, 2.4vw, 1.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.fellows-grid > li { margin: 0; }

.fellow {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.fellow:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.fellow__photo {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface-3);
  overflow: hidden;
}
.fellow__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}
.fellow__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(150deg, var(--surface-3), #dde4f2);
  color: #9aa6bd;
}
.fellow__placeholder svg { width: 42%; height: 42%; }

.fellow__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.15rem 1.2rem 1.3rem;
  flex: 1;
}
.fellow__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  margin: 0;
}
.fellow__dept {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--uf-orange-ink);
  line-height: 1.3;
}
.fellow__role {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-3);
  line-height: 1.35;
  margin: 0;
}
.fellow__bio {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0.25rem 0 0;
}
.fellow__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.fellow--tba .fellow__name { color: var(--ink-3); font-style: italic; }

/* One row on desktop whatever the department count — auto-flow: column beats
   auto-fit here, which wrapped six units to 5 + 1. Falls back to a wrapping
   grid below 1000px, where six columns would be unreadable. */
.dept-tally {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 0.7rem;
  margin: 0;
}
@media (max-width: 1000px) {
  .dept-tally {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
  }
}
.dept-tally > div {
  background: #fff;
  border: 1px solid var(--line);
  /* Top accent rather than left, so the bar stays symmetric with centred text. */
  border-top: 3px solid var(--uf-orange);
  border-radius: var(--r-md);
  padding: 1rem 0.85rem;
  text-align: center;
}
/* The measure is capped so every department name wraps to two lines, keeping
   the numbers on a common baseline. min-height holds the row even if a future
   name is short enough to fit on one. */
.dept-tally dt {
  max-width: 17ch;
  margin-inline: auto;
  min-height: 2.6em;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.3;
}
/* Keep the card's calm typography, but stay visibly a link. */
.dept-tally dt a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.16s, text-decoration-color 0.16s;
}
.dept-tally dt a:hover {
  color: var(--uf-blue);
  text-decoration-color: currentColor;
}
.dept-tally dd {
  margin: 0.35rem 0 0;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--uf-blue);
}

/* --------------------------------------------------------------------------
   11. Outcomes
   -------------------------------------------------------------------------- */
.req {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--uf-orange);
  border-radius: var(--r-md);
}
.req__num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--uf-blue);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
}
.req h3 { margin-bottom: 0.35rem; }

.tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--uf-blue);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tag--pending {
  background: #fff3e9;
  color: var(--uf-orange-ink);
}

.placeholder-note {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.15rem 1.35rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 0.92rem;
}
.placeholder-note strong { color: var(--ink-2); }

/* --------------------------------------------------------------------------
   12. CTA band
   -------------------------------------------------------------------------- */
.cta {
  background: var(--uf-blue);
  background-image: linear-gradient(120deg, var(--uf-blue) 0%, var(--uf-blue-900) 100%);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
}
.cta h2 { color: #fff; }
.cta .btn-row { justify-content: center; }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--uf-blue-900);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.94rem;
  border-top: 5px solid var(--uf-orange);
}
.site-footer a { color: rgba(255, 255, 255, 0.88); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(2, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-block: clamp(2.5rem, 5vw, 3.75rem);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-grid h4 {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
/* Match the link colour so plain entries (the address) sit at the same
   weight as the linked ones above them. */
.footer-grid li {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.footer-brand {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-block: 1.35rem;
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
}

/* --------------------------------------------------------------------------
   14. Motion
   -------------------------------------------------------------------------- */
/* Only hide content when JS is confirmed available (the inline snippet in each
   page's <head> sets .js). Without this gate, a failed main.js would leave the
   page permanently blank. */
.reveal {
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   15. Print
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .topbar, .site-footer, .cta, .btn-row, .filters { display: none; }
  .hero { background: none; color: #000; }
  .hero h1, .hero .lede { color: #000; }
  body { color: #000; }
  .gantt { min-width: 0; }
}
