/* ==========================================================================
   Medical Robotics and Devices Lab — University of Minnesota
   Palette and type pulled from the previous site (UMN "Folwell" theme).
   ========================================================================== */

:root {
  /* UMN brand colors, sampled from the old mrd.umn.edu stylesheet */
  --maroon:        #7a0019;
  --maroon-dark:   #4d0010;
  --maroon-mid:    #900021;
  --maroon-light:  #a10021;
  --gold:          #ffcc33;
  --gold-deep:     #ffb71e;
  --gold-pale:     #ffde7a;

  /* Neutrals */
  --ink:           #333333;
  --ink-soft:      #5a5a5a;
  --ink-faint:     #777677;
  --rule:          #d5d6d2;
  --paper:         #ffffff;
  --paper-warm:    #f9f7f6;
  --paper-grey:    #f0efee;

  --wrap:          1160px;
  --radius:        4px;
  --shadow:        0 1px 3px rgba(0, 0, 0, .10), 0 6px 18px rgba(0, 0, 0, .05);
  --shadow-lift:   0 2px 6px rgba(0, 0, 0, .13), 0 14px 32px rgba(0, 0, 0, .10);

  --sans: "Open Sans", Helvetica, "Helvetica Neue", Verdana, Geneva, sans-serif;
  --serif: Georgia, Times, "Times New Roman", serif;
}

/* --------------------------------------------------------------- reset -- */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--maroon); }
a:hover { color: var(--maroon-light); }

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 700;
  line-height: 1.2;
  color: var(--maroon-dark);
  margin: 0 0 .5em;
}

h1 { font-size: 2.45rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.22rem; }

p { margin: 0 0 1.1em; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--gold);
  color: var(--maroon-dark);
  padding: 10px 18px;
  font-weight: 700;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ------------------------------------------------------- texture utils -- */

/* Fine diagonal weave laid over maroon fields — carries the "texture" of the
   old site's banner without needing an image file. */
.textured {
  position: relative;
  background-color: var(--maroon);
  background-image:
    repeating-linear-gradient(135deg,
      rgba(255, 255, 255, .035) 0px,
      rgba(255, 255, 255, .035) 1px,
      transparent 1px,
      transparent 6px),
    radial-gradient(ellipse at 18% 0%,
      rgba(255, 204, 51, .16) 0%,
      transparent 58%),
    linear-gradient(160deg, var(--maroon-mid) 0%, var(--maroon-dark) 100%);
}

/* ---------------------------------------------------------- top banner -- */

.topbar {
  background: var(--maroon-dark);
  color: #fff;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 34px;
  gap: 16px;
}
.topbar a { color: var(--gold-pale); text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }

/* Light plate so the maroon/gold logo keeps its contrast */
.masthead {
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(135deg,
      rgba(122, 0, 25, .022) 0px,
      rgba(122, 0, 25, .022) 1px,
      transparent 1px,
      transparent 7px),
    linear-gradient(180deg, #fff 0%, var(--paper-warm) 100%);
  border-bottom: 1px solid var(--rule);
}
.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  min-width: 0;
}
.brand .title {
  display: block;
  font-size: 1.42rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--maroon);
  letter-spacing: -.005em;
  text-decoration: none;
}
.brand .title:hover { color: var(--maroon-light); }
/* Official University wordmark + unit name, the way UMN brands its units.
   The department has no standalone banner image — its own site sets the unit
   name as text beside the campus wordmark, so this mirrors that. */
.brand .sub {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 8px;
  min-width: 0;
}
/* UMN brand policy: the wordmark links to the College, the unit name to the
   department. Separate targets, so they are separate anchors. */
.brand .sub .umn {
  display: block;
  line-height: 0;
  flex: none;
  border-radius: 2px;
}
.brand .sub .umn:hover { opacity: .78; }
.brand .sub img {
  height: 23px;
  width: auto;
  flex: none;
}
.brand .sub .dept {
  font-size: .76rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
  padding-left: 11px;
  border-left: 2px solid var(--gold);
  line-height: 1.2;
  text-decoration: none;
}
.brand .sub .dept:hover { color: var(--maroon); text-decoration: underline; }

/* Lab logo, pinned top-right on every page */
.brand-logo {
  flex: none;
  display: block;
  line-height: 0;
}
.brand-logo img {
  height: 72px;
  width: auto;
}

/* ----------------------------------------------------------- nav (4 up) - */

.navbar {
  background-color: var(--maroon);
  background-image:
    repeating-linear-gradient(135deg,
      rgba(255, 255, 255, .04) 0px,
      rgba(255, 255, 255, .04) 1px,
      transparent 1px,
      transparent 6px),
    linear-gradient(90deg, var(--maroon-dark) 0%, var(--maroon) 46%, var(--maroon-mid) 100%);
  border-bottom: 4px solid var(--gold);
}
.navbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
  font: inherit;
  font-weight: 700;
  font-size: .9rem;
  padding: 7px 14px;
  margin: 9px 0;
  border-radius: var(--radius);
  cursor: pointer;
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2px;
}
.nav a {
  display: block;
  padding: 15px 22px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .03em;
  border-bottom: 4px solid transparent;
  margin-bottom: -4px;
}
.nav a:hover {
  background: rgba(0, 0, 0, .20);
  color: var(--gold);
}
.nav a[aria-current="page"] {
  color: var(--maroon-dark);
  background: var(--gold);
  border-bottom-color: var(--gold-deep);
}

/* Publications leaves the site (Google Scholar) — mark it so that's no surprise */
.nav a[target="_blank"]::after {
  content: "↗";
  font-size: .78em;
  margin-left: 6px;
  opacity: .75;
  vertical-align: baseline;
}

/* ---------------------------------------------------------------- hero -- */

.hero {
  color: #fff;
  padding: 72px 0 78px;
  border-bottom: 4px solid var(--gold);
}
/* Text left, lab mark right — fills the empty half of the banner.
   The logo's own letters are maroon, so it sits on a light plate rather
   than directly on the maroon ground where it would disappear. */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 56px;
  align-items: center;
}
.hero-mark {
  flex: none;
  background: var(--paper);
  border-radius: 8px;
  border-bottom: 5px solid var(--gold);
  padding: 30px 34px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .28);
}
.hero-mark img { width: 330px; height: auto; }

.hero h1 { color: #fff; max-width: 17ch; }
.hero .kicker {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 14px;
}
.hero .lede {
  font-size: 1.16rem;
  max-width: 62ch;
  color: rgba(255, 255, 255, .93);
  margin-bottom: 1.6em;
}

/* page header for interior pages */
.page-head {
  color: #fff;
  padding: 48px 0 52px;
  border-bottom: 4px solid var(--gold);
}
.page-head h1 { color: #fff; margin-bottom: .25em; }
.page-head p {
  max-width: 64ch;
  color: rgba(255, 255, 255, .9);
  margin: 0;
}

/* -------------------------------------------------------------- button -- */

.btn {
  display: inline-block;
  padding: 13px 26px;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .03em;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: transform .12s ease, background-color .12s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-gold {
  background: var(--gold);
  color: var(--maroon-dark);
  border-color: var(--gold);
}
.btn-gold:hover { background: var(--gold-deep); color: var(--maroon-dark); }

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

.btn-maroon {
  background: var(--maroon);
  color: #fff;
  border-color: var(--maroon);
}
.btn-maroon:hover { background: var(--maroon-light); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--maroon);
  border-color: var(--rule);
}
.btn-outline:hover { border-color: var(--maroon); background: var(--paper-warm); }

/* Project call-to-action row (live demo, partner announcement) */
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}
.project-links .btn { padding: 11px 20px; font-size: .9rem; }

/* ------------------------------------------------------------ sections -- */

section { padding: 62px 0; }
section.tight { padding: 44px 0; }
section.alt { background: var(--paper-warm); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

.section-head { margin-bottom: 34px; max-width: 68ch; }
.section-head h2 { margin-bottom: .3em; }
.section-head h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: var(--gold);
  margin-top: 14px;
}
.section-head p { color: var(--ink-soft); margin: 0; }

/* ---------------------------------------------------------- grid/cards -- */

.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--maroon);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .16s ease, transform .16s ease;
}
.card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.card .card-body { padding: 24px; flex: 1; }
.card h3 { margin-bottom: .45em; }
.card h3 a { text-decoration: none; color: inherit; }
.card:hover h3 a { color: var(--maroon-light); text-decoration: underline; }
.card p { color: var(--ink-soft); font-size: .96rem; margin-bottom: 0; }

/* Stat / focus tiles on the home page */
.tile {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 5px solid var(--gold);
  border-radius: var(--radius);
  padding: 24px;
}
.tile h3 { font-size: 1.05rem; margin-bottom: .4em; }
.tile p { font-size: .94rem; color: var(--ink-soft); margin: 0; }

/* -------------------------------------------------------- people cards -- */

.person {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow .16s ease, transform .16s ease;
}
.person:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }

.person .photo {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--paper-grey);
  overflow: hidden;
}
.person .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Faces sit above centre in most portraits — a centred crop lops off the
     top of people's heads. Override per person with "Photo Focus:" in their
     info.txt, which sets an inline object-position. */
  object-position: 50% 22%;
}
/* Shown when no photo file is present yet */
.person .photo .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
  background-color: var(--maroon);
  background-image:
    repeating-linear-gradient(135deg,
      rgba(255, 255, 255, .05) 0px,
      rgba(255, 255, 255, .05) 1px,
      transparent 1px,
      transparent 7px),
    linear-gradient(160deg, var(--maroon-mid) 0%, var(--maroon-dark) 100%);
}

.person .info { padding: 18px 20px 22px; }
.person .name { font-size: 1.06rem; font-weight: 700; color: var(--maroon-dark); margin: 0 0 3px; }
/* Degrees earned with the lab — maroon, so they read as the card's subject
   rather than muted metadata. Consecutive lines sit tight together. */
.person .role {
  font-size: .85rem;
  color: var(--maroon);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 3px;
}
.person .role:last-of-type { margin-bottom: 10px; }
/* A duty held alongside the degree — safety officer, lab admin, etc. */
.person .lab-role {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--maroon-dark);
  background: var(--gold-pale);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 3px 11px;
  margin: 0 0 10px;
}

.person .blurb { font-size: .92rem; color: var(--ink-soft); margin: 0 0 10px; }
.person .links {
  font-size: .88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.person .links a { text-decoration: none; font-weight: 600; }
.person .links a:hover { text-decoration: underline; }

/* Downloadable file (resume, portfolio PDF) — marked with a down arrow */
.person .links a.dl::before {
  content: "⤓";
  margin-right: 5px;
  font-weight: 700;
}

/* PI gets a wide, two-column treatment */
.person-lead {
  display: grid;
  grid-template-columns: 260px 1fr;
  border-top: 4px solid var(--maroon);
}
.person-lead .photo { aspect-ratio: auto; height: 100%; min-height: 260px; }
.person-lead .info { padding: 30px 32px; }
.person-lead .name { font-size: 1.5rem; }

/* Alumni: compact list, no photos */
.alumni-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 3;
  column-gap: 32px;
}
.alumni-list li {
  break-inside: avoid;
  padding: 7px 0 7px 14px;
  border-left: 3px solid var(--gold);
  margin-bottom: 8px;
  font-size: .95rem;
}
.alumni-list .yr { color: var(--ink-faint); font-size: .86rem; display: block; }

/* ------------------------------------------------------ project blocks -- */

.project-entry {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--maroon);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 34px 34px;
  margin-bottom: 34px;
}

.project-head { margin-bottom: 24px; }
.project-head h3 { font-size: 1.45rem; margin-bottom: 0; }
.project-head .tagline {
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--maroon);
  font-weight: 700;
  margin-bottom: 7px;
}

.badge {
  display: inline-block;
  vertical-align: middle;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  position: relative;
  top: -2px;
}
.badge-past {
  background: var(--paper-grey);
  /* --ink-faint here measured 3.93:1 against this background, under the
     4.5:1 WCAG AA minimum for text this size. --ink-soft gives ~6:1. */
  color: var(--ink-soft);
  border: 1px solid var(--rule);
}

.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.project-media-col { display: grid; gap: 16px; }
.project-text-col p { font-size: .97rem; }

.media-item { margin: 0; }
.media-item img,
.media-item video {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-grey);
}
/* Portrait clips (converted from the old site's tall GIFs) shouldn't tower
   over the text column. */
.media-item video { max-height: 420px; object-fit: contain; }

.media-item figcaption {
  font-size: .82rem;
  color: var(--ink-faint);
  padding-top: 7px;
  line-height: 1.45;
}

/* 16:9 responsive YouTube embed */
.media-embed {
  position: relative;
  padding-top: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--rule);
  background: #000;
}
.media-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.media-placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 220px;
  padding: 24px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, .85);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  background-color: var(--maroon);
  background-image:
    repeating-linear-gradient(135deg,
      rgba(255, 255, 255, .05) 0px,
      rgba(255, 255, 255, .05) 1px,
      transparent 1px,
      transparent 7px),
    linear-gradient(160deg, var(--maroon-mid) 0%, var(--maroon-dark) 100%);
}

.project-text-col .researchers {
  font-size: .88rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--rule);
  padding-top: 14px;
  margin: 18px 0 0;
}
.project-text-col .researchers strong { color: var(--ink-soft); }

/* Collapsible publication list */
.pubs { margin-top: 18px; }
.pubs summary {
  cursor: pointer;
  font-size: .86rem;
  font-weight: 700;
  color: var(--maroon);
  letter-spacing: .03em;
  padding: 7px 0;
  list-style: none;
}
.pubs summary::-webkit-details-marker { display: none; }
.pubs summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  transition: transform .15s ease;
}
.pubs[open] summary::before { transform: rotate(90deg); }
.pubs summary:hover { color: var(--maroon-light); text-decoration: underline; }
.pubs ul {
  margin: 6px 0 0;
  padding: 0 0 0 22px;
  font-size: .88rem;
  color: var(--ink-soft);
}
.pubs li { margin-bottom: 7px; line-height: 1.45; }

/* Empty-state note where active projects will go */
.empty-note {
  border: 1px dashed var(--rule);
  border-left: 5px solid var(--gold);
  border-radius: var(--radius);
  background: var(--paper-warm);
  padding: 24px 26px;
  color: var(--ink-soft);
  font-size: .95rem;
}
.empty-note p:last-child { margin-bottom: 0; }

/* -------------------------------------------------- collaborators strip -- */

.collab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
}

.collab {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  transition: box-shadow .16s ease, transform .16s ease;
}
.collab:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }

/* Logo plate — white so partner marks keep their own colours */
.collab .logo {
  position: relative;
  height: 145px;   /* matches .logo.photo so all cards line up */
  background: #fff;
  border-bottom: 1px solid var(--rule);
  display: grid;
  place-items: center;
  /* Tight padding so a wide logo still fills the plate rather than
     shrinking to a stamp in the middle of it. */
  padding: 16px 20px;
}
.collab .logo img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

/* Some collaborators publish no standalone logo, so the card uses a photo
   from their site instead — that fills the plate rather than sitting in it. */
.collab .logo.photo {
  padding: 0;
  background: var(--paper-grey);
}
.collab .logo.photo img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: 50% 45%;
}
/* Until a logo file is dropped in, show a clean wordmark instead of the
   maroon tile used elsewhere. */
.collab .logo .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
  background: var(--paper-warm);
  background-image: none;
  color: var(--maroon);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .01em;
  text-transform: none;
}

/* The card is an <a>, so its parts are spans — make them stack. */
.collab .logo,
.collab .body,
.collab .name,
.collab .where,
.collab .what { display: block; }

.collab .body { padding: 18px 20px 20px; flex: 1; }
.collab .name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--maroon-dark);
  margin: 0 0 5px;
}
.collab .where {
  font-size: .76rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 9px;
}
.collab .what { font-size: .9rem; color: var(--ink-soft); margin: 0; }

/* --------------------------------------------------------- contact bits - */

.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 34px;
  align-items: start;
}

.contact-cta {
  border-radius: var(--radius);
  padding: 40px;
  color: #fff;
  text-align: center;
}
.contact-cta h2 { color: #fff; }
.contact-cta p { color: rgba(255, 255, 255, .92); max-width: 46ch; margin-left: auto; margin-right: auto; }
.contact-cta .email {
  display: inline-block;
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  margin: 6px 0 22px;
  word-break: break-word;
}
.contact-cta .email:hover { text-decoration: underline; color: var(--gold-pale); }

.info-block {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--maroon);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 30px;
  margin-bottom: 24px;
}
.info-block h3 { margin-bottom: .6em; }

.detail-list { list-style: none; margin: 0; padding: 0; }
.detail-list li {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: .95rem;
}
.detail-list li:last-child { border-bottom: 0; }
.detail-list .label {
  font-weight: 700;
  color: var(--maroon-dark);
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding-top: 3px;
}
.detail-list address { font-style: normal; }

/* -------------------------------------------------------------- footer -- */

.site-footer {
  color: rgba(255, 255, 255, .82);
  padding: 32px 0 20px;
  border-top: 4px solid var(--gold);
  font-size: .9rem;
}
.site-footer h4 {
  color: var(--gold);
  font-size: .76rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .7em;
}
.site-footer a { color: rgba(255, 255, 255, .88); text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 5px; }
.site-footer p { margin-bottom: 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.3fr;
  gap: 32px;
  padding-bottom: 18px;
}

/* Official University wordmark, reversed for the maroon ground */
.footer-umn {
  padding-bottom: 18px;
}
.footer-umn img {
  width: 300px;
  max-width: 70%;
  height: auto;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .18);
  padding-top: 14px;
  font-size: .8rem;
  color: rgba(255, 255, 255, .62);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------- responsive --- */

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .project-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-grid { grid-template-columns: 1fr; }

  /* Hero stacks: the mark's column is wider than a narrow viewport allows. */
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-mark { justify-self: start; padding: 24px 28px; }
  .hero-mark img { width: 280px; }
  .alumni-list { columns: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .person-lead { grid-template-columns: 1fr; }
  .person-lead .photo { min-height: 300px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  h1 { font-size: 1.95rem; }
  h2 { font-size: 1.55rem; }

  .masthead .wrap { padding-top: 13px; padding-bottom: 13px; gap: 14px; }
  .brand .title { font-size: 1.05rem; }
  .brand .sub { gap: 7px; margin-top: 6px; flex-wrap: wrap; }
  .brand .sub img { height: 17px; }
  .brand .sub .dept {
    font-size: .6rem;
    letter-spacing: .07em;
    padding-left: 7px;
  }
  .brand-logo img { height: 50px; }

  .nav-toggle { display: block; }
  .nav {
    flex-basis: 100%;
    display: none;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding-bottom: 8px; }
  .nav a {
    border-bottom: 1px solid rgba(255, 255, 255, .14);
    border-left: 4px solid transparent;
    margin-bottom: 0;
    padding: 13px 10px;
  }
  .nav a[aria-current="page"] { border-left-color: var(--gold-deep); }

  .hero { padding: 44px 0 48px; }
  section { padding: 44px 0; }

  /* Stacked hero buttons read better matched than ragged */
  .hero-text .btn { display: block; text-align: center; }
  .hero-text .btn + .btn { margin-top: 10px; }

  /* Let the mark size to the card rather than a fixed 330px */
  .hero-mark {
    justify-self: stretch;
    padding: 20px 22px;
    border-bottom-width: 4px;
  }
  .hero-mark img { width: 100%; max-width: 280px; margin: 0 auto; }

  /* Shorter plates so a card isn't mostly logo on a small screen */
  .collab .logo { height: 118px; padding: 14px 16px; }

  .footer-umn { padding-bottom: 14px; }
  .footer-umn img { width: 240px; max-width: 78%; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .alumni-list { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .project-entry { padding: 24px 20px 26px; }
  .project-head h3 { font-size: 1.25rem; }
  .contact-cta { padding: 30px 22px; }
  .detail-list li { grid-template-columns: 1fr; gap: 2px; }
}

/* People grid sizing — auto-fit so rows stay even as the roster changes */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 26px;
}

@media print {
  .topbar, .nav, .nav-toggle { display: none; }
  body { font-size: 11pt; }
}

/* ------------------------------------------------- research at a glance -- */

/* These four labels were previously baked into one banner image. Keeping
   them as real text satisfies WCAG 1.4.5 and lets them scale and translate. */
.research-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.research-item {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--maroon);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.research-item .shot {
  display: block;
  height: 200px;
  padding: 14px;
  background: #fff;
}
/* object-fit:contain on a filled box letterboxes reliably; max-height alone
   did not resolve against the padded box and the tall panels clipped. */
.research-item .shot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.research-item figcaption {
  border-top: 1px solid var(--rule);
  background: var(--paper-warm);
  padding: 13px 16px;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--maroon);
  text-align: center;
}

@media (max-width: 760px) {
  .research-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .research-item .shot { height: 150px; padding: 12px; }
  .research-item figcaption { font-size: .78rem; padding: 11px 10px; }
}

/* ---------------------------------------------------- commercialization -- */

.venture-list { display: grid; gap: 30px; }

.venture {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--maroon);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* These logos are white-on-transparent, so each plate takes the company's
   own background colour, sampled from their site, rather than our maroon. */
.venture .logo {
  display: grid;
  place-items: center;
  padding: 30px 34px;
  min-height: 190px;
  background-color: var(--plate, var(--maroon-dark));
  background-image:
    repeating-linear-gradient(135deg,
      rgba(255, 255, 255, .035) 0px,
      rgba(255, 255, 255, .035) 1px,
      transparent 1px,
      transparent 7px),
    linear-gradient(160deg, rgba(255, 255, 255, .07) 0%, rgba(0, 0, 0, .18) 100%);
}
.venture .logo.csats     { --plate: #173440; }  /* csats.com */
.venture .logo.lightside { --plate: #081927; }  /* lightsidesurgical.com */
/* height:auto matters — without it the img's height attribute wins once
   max-width shrinks the element, and the logo distorts. */
.venture .logo img { max-width: 100%; max-height: 120px; width: auto; height: auto; }
.venture .logo:hover img { opacity: .85; }

.venture-body { padding: 28px 32px; }
.venture-body h2 { font-size: 1.4rem; margin-bottom: .25em; }
.venture-body .meta {
  font-size: .78rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
  margin-bottom: 1em;
}
.venture-body p { font-size: .97rem; }
.venture-links { margin: 18px 0 0; }

@media (max-width: 760px) {
  .venture { grid-template-columns: 1fr; }
  .venture .logo { min-height: 150px; padding: 24px 26px; }
  .venture .logo img { max-height: 92px; }
  .venture-body { padding: 22px 22px 24px; }
}
