/* MiXIL theme styles. Generated by scripts/build-css.mjs from assets/css/src — edit those files. */
/* ---- 00-tokens.css ---- */
/* MiXIL design tokens — light theme: white, USC cardinal, USC gold. Checked by `npm run contrast`. */
:root {
  --mx-bg: #FFFFFF;
  --mx-surface: #FFFFFF;
  --mx-surface-2: #F7F5F2;
  --mx-white: #FFFFFF;
  --mx-text: #1A1A1A;
  --mx-text-muted: #5C5750;
  --mx-cardinal: #990000;
  --mx-cardinal-bright: #990000;
  --mx-cardinal-dark: #7A0000;
  --mx-gold: #FFCC00;
  --mx-signal: #990000;
  --mx-border: rgba(26, 26, 26, 0.12);
  --mx-border-strong: rgba(26, 26, 26, 0.28);
  --mx-shadow: 0 1px 2px rgba(26, 26, 26, 0.06), 0 8px 24px -12px rgba(26, 26, 26, 0.18);

  --mx-font-display: "Space Grotesk Variable", "Space Grotesk", system-ui, sans-serif;
  --mx-font-body: "Inter Variable", "Inter", system-ui, sans-serif;
  --mx-font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, monospace;

  --mx-step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.875rem);
  --mx-step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --mx-step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --mx-step-2: clamp(1.5rem, 1.25rem + 1.1vw, 2.25rem);
  --mx-step-3: clamp(1.9rem, 1.4rem + 2.2vw, 3.25rem);
  --mx-step-4: clamp(2.4rem, 1.5rem + 4vw, 5rem);

  --mx-radius: 12px;
  --mx-container: 1280px;
  --mx-gutter: clamp(16px, 4vw, 40px);
  --mx-header-h: 72px;
  --mx-admin-bar: var(--wp-admin--admin-bar--height, 0px);
  --mx-ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* GeneratePress global colors, pointed at our palette so GP's own rules match. */
  --contrast: var(--mx-text);
  --contrast-2: var(--mx-text-muted);
  --contrast-3: var(--mx-text-muted);
  --base: var(--mx-surface-2);
  --base-2: var(--mx-surface-2);
  --base-3: var(--mx-bg);
  --accent: var(--mx-cardinal); /* GP/GB buttons fill with --accent under white text */
}

/* ---- 10-fonts.css ---- */
@font-face {
  font-family: "Space Grotesk Variable";
  src: url("../fonts/space-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Variable";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono Variable";
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---- 20-base.css ---- */
/* Base: page canvas, typography, links, buttons, utilities. Everything is scoped under body.mx. */
html { scroll-behavior: smooth; overflow-x: clip; }
body.mx {
  background: var(--mx-bg);
  color: var(--mx-text);
  font-family: var(--mx-font-body);
  font-size: var(--mx-step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* GP containers become transparent so the dark canvas shows through. */
.mx .site,
.mx .site-content,
.mx.one-container .container,
.mx.separate-containers .inside-article,
.mx .inside-article,
.mx .page-header,
.mx .paging-navigation,
.mx .comments-area { background-color: transparent; color: inherit; }
.mx .grid-container { max-width: var(--mx-container); }
.mx .site-content { padding-top: clamp(32px, 5vw, 64px); padding-bottom: clamp(48px, 8vw, 96px); }

.mx h1, .mx h2, .mx h3, .mx h4, .mx h5, .mx h6 {
  font-family: var(--mx-font-display);
  color: var(--mx-text);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.12;
  overflow-wrap: break-word;
  text-wrap: balance;
}
.mx h1 { font-size: var(--mx-step-4); }
.mx .entry-content h2 { font-size: var(--mx-step-2); }
.mx .entry-content h3 { font-size: var(--mx-step-1); }
.mx p, .mx li { overflow-wrap: break-word; }

/* :where() keeps this at element specificity so GenerateBlocks buttons keep their own text colour. */
:where(.mx) a { color: var(--mx-text); text-underline-offset: 0.2em; transition: color 0.2s; }
:where(.mx) a:hover { color: var(--mx-cardinal); }
.mx .entry-content a:not([class]) {
  text-decoration: underline;
  text-decoration-color: var(--mx-cardinal-bright);
  text-decoration-thickness: 2px;
}
.mx :focus-visible { outline: 2px solid var(--mx-cardinal); outline-offset: 3px; border-radius: 4px; }
.mx ::selection { background: var(--mx-gold); color: var(--mx-text); }

.mx .entry-content img { border-radius: var(--mx-radius); }
.mx .entry-content blockquote {
  border-left: 3px solid var(--mx-cardinal-bright);
  padding-left: 1.25em;
  font-family: var(--mx-font-display);
  font-size: var(--mx-step-1);
  color: var(--mx-text);
}
.mx hr { border: 0; border-top: 1px solid var(--mx-border); }

/* Old content blocks were designed for a light site; only neutralise their section backgrounds. */
.mx .entry-content [class*="gb-element-"] { background-color: transparent; }
.mx .entry-content .has-background { background-color: var(--mx-surface) !important; }
.mx .entry-content .has-text-color { color: inherit !important; }

/* Buttons: core Button block and .mx-btn */
.mx a.wp-block-button__link,
.mx .mx-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.5em;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--mx-cardinal);
  color: #fff;
  font-family: var(--mx-font-display);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--mx-ease), box-shadow 0.2s, border-color 0.2s, color 0.2s;
}
.mx a.wp-block-button__link:hover,
.mx .mx-btn:hover { background: var(--mx-cardinal-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.45); }
.mx .is-style-outline a.wp-block-button__link,
.mx .mx-btn--ghost { background: transparent; border-color: var(--mx-cardinal); color: var(--mx-cardinal); }
.mx .is-style-outline a.wp-block-button__link:hover,
.mx .mx-btn--ghost:hover { background: var(--mx-cardinal); border-color: var(--mx-cardinal); color: #fff; box-shadow: none; }

/* Utilities */
.mx-container { max-width: var(--mx-container); margin-inline: auto; padding-inline: var(--mx-gutter); }
.mx-bleed { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.mx .mx-eyebrow {
  font-family: var(--mx-font-mono);
  font-size: var(--mx-step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mx-signal);
  margin: 0 0 0.75em;
}
.mx-accent { color: var(--mx-cardinal-bright); }
.mx-section { padding-block: clamp(44px, 5.5vw, 80px); }
.mx-section-head,
.mx-section-head > .wp-block-group__inner-container { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.mx .mx-section-title { font-size: var(--mx-step-3); margin: 0; }
.mx-section-head > .wp-block-group__inner-container { width: 100%; margin: 0; }
.mx-section-head p { margin: 0; }
/* Classic-theme groups wrap children in an inner container; let it span the section. */
.mx .entry-content .wp-block-group__inner-container { max-width: none; padding: 0; }
.mx .mx-chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--mx-font-mono);
  font-size: var(--mx-step--1);
  padding: 0.35em 0.9em;
  border: 1px solid var(--mx-border-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--mx-text);
  text-decoration: none;
  cursor: pointer;
}
.mx .mx-chip:hover { border-color: var(--mx-cardinal); color: var(--mx-cardinal); }
.mx-empty { color: var(--mx-text-muted); }
.error404 .entry-header { display: none; }

/* Scroll reveal: only hides content once JS has marked the page (html.mx-js). */
.mx-js .mx-reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s var(--mx-ease), transform 0.6s var(--mx-ease); }
.mx-js .mx-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .mx-js .mx-reveal { opacity: 1; transform: none; transition: none; }
  .mx *, .mx *::before, .mx *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Section rhythm: stack section children with explicit gaps instead of stacked block margins. */
.mx .mx-section > .wp-block-group__inner-container { display: flex; flex-direction: column; gap: 28px; }
.mx .mx-section > .wp-block-group__inner-container > * { margin-top: 0; margin-bottom: 0; }
.mx .mx-section > .wp-block-group__inner-container > .mx-eyebrow { margin-bottom: -16px; }
.mx .mx-section-head { margin-bottom: 0; }

/* One left edge everywhere: GP's content padding follows the same gutter as the page hero. */
.mx .site-content { padding-left: var(--mx-gutter); padding-right: var(--mx-gutter); }
/* Pages set to GP's "full width" layout (e.g. About) still sit in the container; the homepage
   is the exception, its sections bleed edge to edge on purpose. */
.mx.full-width-content:not(.home) .inside-article { max-width: var(--mx-container); margin-inline: auto; padding-inline: var(--mx-gutter); }

/* ---- 30-header.css ---- */
/* Header, two tiers: a white brand bar (logos in their original colours) and a full-width
   USC cardinal menu bar below it. The whole header is sticky; main.js measures its height
   into --mx-header-h and adds .mx-scrolled to <html> once the page scrolls. */
.mx .site-header {
  position: sticky;
  top: var(--mx-admin-bar);
  z-index: 100;
  background: var(--mx-white);
  transition: box-shadow 0.3s;
}
.mx-scrolled .mx .site-header { box-shadow: 0 6px 24px -12px rgba(26, 26, 26, 0.35); }
/* Below 600px WordPress makes the admin bar scroll away, so the header pins to 0. */
@media (max-width: 600px) { .mx .site-header { top: 0; } }

.mx .inside-header {
  min-height: 72px;
  padding-block: 12px 0;
  gap: 0 16px;
  flex-wrap: wrap;
  align-items: center;
}
.mx .mx-header-logo { order: 1; flex: none; }
.mx .site-branding { order: 2; flex: 0 1 auto; min-width: 0; margin-left: 20px; }
.mx .mx-header-usc { order: 3; flex: none; margin-left: auto; }
.mx .mobile-menu-control-wrapper { order: 3; }
.mx-header-logo:empty, .mx-header-usc:empty { display: none; }
.mx-header-logo :is(figure, p), .mx-header-usc :is(figure, p) { margin: 0; }
/* The old logo blocks carry fixed inline widths; let them hug the image. Colours stay original. */
.mx :is(.mx-header-logo, .mx-header-usc) :is(figure, div, a) { width: auto !important; max-width: none; }
.mx .mx-header-logo img { height: 34px; width: auto !important; }
.mx .mx-header-usc img { height: 30px; width: auto !important; }

.mx .site-branding .main-title,
.mx .mixil-header {
  font-family: var(--mx-font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  padding: 0;
}
.mx .main-title a { color: var(--mx-text); text-decoration: none; }
.mx .site-description {
  font-family: var(--mx-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mx-text-muted);
  margin: 2px 0 0;
}

/* Cardinal menu bar: the nav takes the full second row; a ::before layer paints the red edge to
   edge while the links stay inside the 1280px container. (Not clip-path: that would also clip
   the dropdowns hanging below the bar.) */
.mx #site-navigation:not(.slideout-navigation) {
  order: 4;
  flex: 1 0 100%;
  margin-top: 12px;
  position: relative;
  isolation: isolate;
  background: var(--mx-cardinal);
}
.mx #site-navigation:not(.slideout-navigation)::before {
  content: "";
  position: absolute;
  inset: 0 -100vmax;
  z-index: -1;
  background: var(--mx-cardinal);
}
.mx .main-navigation .main-nav > ul { justify-content: flex-start; }
.mx .main-navigation .main-nav ul li a {
  color: var(--mx-white);
  font-family: var(--mx-font-display);
  font-weight: 500;
  font-size: 0.98rem;
  line-height: 48px;
  padding-inline: 14px;
  text-transform: none;
  letter-spacing: 0;
}
.mx .main-navigation .main-nav > ul > li:first-child > a { padding-left: 0; }
.mx .main-navigation .main-nav > ul > li > a { position: relative; }
.mx .main-navigation .main-nav > ul > li > a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 3px;
  background: var(--mx-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--mx-ease);
}
.mx .main-navigation .main-nav > ul > li:first-child > a::after { left: 0; }
.mx .main-navigation .main-nav > ul > li:is(:hover, :focus-within, [class*="current-menu-"]) > a { color: var(--mx-white); }
.mx .main-navigation .main-nav > ul > li:is(:hover, [class*="current-menu-"]) > a::after { transform: scaleX(1); }
.mx .main-navigation .dropdown-menu-toggle { color: var(--mx-white); }
.mx #site-navigation :focus-visible { outline-color: var(--mx-gold); }

/* Dropdowns: white panel, dark text; Research lists every project in two columns,
   each name on one line (full name in the title tooltip, see inc/nav.php). */
.mx .main-navigation ul ul {
  background: var(--mx-white);
  border: 1px solid var(--mx-border);
  border-top: 3px solid var(--mx-gold);
  border-radius: 0 0 var(--mx-radius) var(--mx-radius);
  box-shadow: 0 24px 48px -16px rgba(26, 26, 26, 0.35);
  padding: 8px;
  width: 300px;
}
.mx .main-navigation .main-nav > ul > li > ul.sub-menu:has(> li:nth-child(8)) {
  width: min(640px, 90vw);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 8px;
}
.mx .main-navigation ul ul li { min-width: 0; }
.mx .main-navigation ul ul li a,
.mx .main-navigation .main-nav ul ul li a {
  display: block;
  line-height: 1.35;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  color: var(--mx-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mx .main-navigation ul ul li a:hover,
.mx .main-navigation ul ul li a:focus-visible { background: var(--mx-surface-2); color: var(--mx-cardinal); }
.mx .main-navigation ul ul li a::after { display: none; }
/* Keyboard users get the same dropdown as mouse users. */
.mx .main-navigation:not(.toggled) ul li:is(:focus-within, .sfHover) > ul {
  left: auto;
  height: auto;
  overflow: visible;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: none;
}

/* Mobile toggle and full-screen off-canvas menu (GP Premium slideout), in cardinal. */
.mx .menu-toggle,
.mx .mobile-bar-items a { color: var(--mx-cardinal); background: transparent; }
.mx .slideout-navigation.main-navigation,
.mx .slideout-navigation {
  background: var(--mx-cardinal);
  width: 100%;
  max-width: 100%;
}
.mx .slideout-navigation .main-nav ul li a {
  font-family: var(--mx-font-display);
  font-size: 1.5rem;
  line-height: 1.3;
  padding: 12px 24px;
  color: var(--mx-white);
}
.mx .slideout-navigation ul ul { background: transparent; border: 0; box-shadow: none; width: auto; display: block; }
.mx .slideout-navigation ul ul li a { font-size: 1rem; color: rgba(255, 255, 255, 0.85); padding-left: 40px; white-space: normal; }
.mx .slideout-navigation .slideout-exit { color: var(--mx-white); }
.mx .slideout-overlay { background: rgba(26, 26, 26, 0.5); }

/* Tagline only where it fits on one line next to the name. */
@media (max-width: 1100px) { .mx .site-description { display: none; } }

/* Phones (GP's 768px mobile-menu breakpoint): one white row — logo, name, menu button —
   with a cardinal rule underneath. The inline menu is empty there (the slide-out is used). */
@media (max-width: 768px) {
  .mx .site-header { border-bottom: 4px solid var(--mx-cardinal); }
  .mx .inside-header { flex-wrap: nowrap; min-height: 60px; padding-block: 8px; gap: 12px; }
  .mx.slideout-mobile #site-navigation:not(.slideout-navigation) { display: none; }
  .mx .mx-header-usc { display: none; }
  .mx .mx-header-logo img { height: 24px; }
  .mx .site-branding { margin-left: 4px; }
  .mx .site-branding .main-title { font-size: 1.25rem; }
  .mx .mobile-menu-control-wrapper { margin-left: auto; }
}

/* GP gives the mobile menu button a grey fill; keep it a clean icon on the white bar. */
.mx .menu-toggle,
.mx .menu-toggle:hover,
.mx .menu-toggle:focus { background: transparent; color: var(--mx-cardinal); }
.mx .mobile-menu-control-wrapper { background: transparent; }

/* ---- 40-page-hero.css ---- */
.mx-page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(64px, 10vw, 140px) 0 clamp(40px, 6vw, 80px);
  border-bottom: 1px solid var(--mx-border);
  background:
    radial-gradient(ellipse 80% 60% at 85% 0%, rgba(153, 0, 0, 0.08), transparent 60%),
    var(--mx-surface-2);
}
/* Faint blueprint grid */
.mx-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--mx-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--mx-border) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
  opacity: 0.6;
}
/* Radar range rings */
.mx-page-hero::after {
  content: "";
  position: absolute;
  right: -12vw;
  top: -20vw;
  width: 60vw;
  aspect-ratio: 1;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  background: repeating-radial-gradient(circle, transparent 0 46px, rgba(153, 0, 0, 0.09) 46px 47px);
}
.mx .mx-page-hero__title {
  font-size: var(--mx-step-4);
  max-width: 20ch;
  margin: 0;
  hyphens: auto;
}
.mx-page-hero__meta {
  margin: 1rem 0 0;
  max-width: 60ch;
  color: var(--mx-text-muted);
  font-size: var(--mx-step-1);
}
/* Project pages: the title beside the whole cover image. Covers are small (~600x400) and often
   diagrams, so they are shown at their own shape and never wider than the file itself. */
.mx-page-hero--project { padding-block: clamp(40px, 6vw, 80px); }
.mx-page-hero--project > .mx-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 600px);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}
.mx-page-hero__figure { margin: 0; }
.mx .mx-page-hero__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--mx-radius);
  background: #fff;
  box-shadow: var(--mx-shadow);
}
@media (max-width: 800px) {
  .mx-page-hero--project > .mx-container { grid-template-columns: minmax(0, 1fr); }
}
.mx-has-hero-image .featured-image.page-header-image-single { display: none; }

/* ---- 50-home.css ---- */
/* Homepage. The hero is full-bleed; other sections sit in the 1280px container. */
.mx.home .site-content { padding-top: 0; }
.mx.home .inside-article,
.mx.home .entry-content { margin-top: 0; padding-top: 0; }

/* Hero: full-bleed field-campaign video behind the headline (like innovation.usc.edu).
   The poster is the background, so it shows before the video plays, without JS and with
   reduced motion. Text sits on a dark gradient for contrast. */
.mx-hero-home {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(calc(100svh - var(--mx-header-h) - var(--mx-admin-bar)), 860px);
  display: flex;
  align-items: flex-end;
  padding-block: clamp(96px, 14vw, 180px) clamp(56px, 8vw, 104px);
  background: #1a1210 url("../video/hero-poster.webp") center / cover no-repeat;
  color: #fff;
}
/* Classic-theme groups wrap content in an inner container: keep it unpositioned so the video
   fills the whole hero, and lift the text above the video and overlay. */
.mx .mx-hero-home > .wp-block-group__inner-container {
  position: static;
  width: 100%;
  max-width: var(--mx-container);
  margin-inline: auto;
  padding-inline: var(--mx-gutter);
}
.mx .mx-hero-home > .wp-block-group__inner-container > :not(.mx-hero-video):not(.mx-hero-video__toggle) { position: relative; z-index: 2; }
.mx-hero-video { position: absolute; inset: 0; z-index: 0; }
.mx-hero-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mx-hero-home::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(18, 8, 6, 0.82) 0%, rgba(18, 8, 6, 0.55) 45%, rgba(18, 8, 6, 0.12) 80%),
    linear-gradient(to top, rgba(18, 8, 6, 0.65), rgba(18, 8, 6, 0) 45%);
}
.mx .mx-hero-home__title {
  font-size: clamp(2.8rem, 1.4rem + 5vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 13ch;
  margin: 0 0 0.35em;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}
.mx .mx-hero-home__title .mx-accent { color: var(--mx-gold); }
.mx .mx-hero-home__lede { max-width: 60ch; color: rgba(255, 255, 255, 0.9); font-size: 1.08rem; margin: 0; }
.mx .mx-hero-home .wp-block-buttons { gap: 12px; margin-top: 2rem; }
.mx .mx-hero-home .is-style-outline a.wp-block-button__link { border-color: #fff; color: #fff; }
.mx .mx-hero-home .is-style-outline a.wp-block-button__link:hover { background: #fff; border-color: #fff; color: var(--mx-cardinal); }
.mx .mx-hero-home :focus-visible { outline-color: var(--mx-gold); }

/* Pause / play (WCAG 2.2.2): a quiet round button in the corner. */
.mx .mx-hero-video__toggle {
  position: absolute;
  right: clamp(16px, 3vw, 40px);
  bottom: clamp(16px, 3vw, 40px);
  z-index: 3;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: rgba(18, 8, 6, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.mx .mx-hero-video__toggle:hover { background: var(--mx-cardinal); border-color: var(--mx-cardinal); }
.mx .mx-hero-video__toggle[hidden] { display: none; }
.mx-hero-video__icon { width: 12px; height: 14px; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.mx-hero-video__toggle.is-paused .mx-hero-video__icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent currentColor;
  margin-left: 3px;
}
@media (prefers-reduced-motion: reduce) { .mx-hero-video { display: none; } }
@media (max-width: 800px) {
  .mx-hero-home { min-height: 78svh; }
  .mx-hero-home::after { background: linear-gradient(to top, rgba(18, 8, 6, 0.88) 10%, rgba(18, 8, 6, 0.45) 70%, rgba(18, 8, 6, 0.25)); }
}

/* Stats strip */
.mx-home-stats { margin-top: 0; }
.mx .mx-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  background: var(--mx-gold);
  border-radius: var(--mx-radius);
}
.mx-stat {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.4rem;
  padding: clamp(24px, 4vw, 40px) clamp(16px, 2vw, 28px);
  border-left: 1px solid rgba(26, 26, 26, 0.15);
}
.mx-stat:first-child { border-left: 0; }
.mx .mx-stat__value {
  margin: 0;
  font-family: var(--mx-font-display);
  font-size: var(--mx-step-4);
  font-weight: 700;
  line-height: 1;
  color: var(--mx-text);
  font-variant-numeric: tabular-nums;
}
.mx .mx-stat__label {
  font-family: var(--mx-font-mono);
  font-size: var(--mx-step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mx-text);
  font-weight: 500;
}
@media (max-width: 800px) {
  .mx .mx-stats { grid-template-columns: 1fr 1fr; }
  .mx-stat:nth-child(3) { border-left: 0; }
  .mx-stat:nth-child(n + 3) { border-top: 1px solid rgba(26, 26, 26, 0.15); }
}

/* Research cards: every cover shown whole at its own 3:2 shape, text underneath. A short last
   row is centred. Hover lifts the card; the photo itself never changes size. */
.mx-bento {
  --mx-bento-gap: clamp(16px, 2vw, 24px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--mx-bento-gap);
}
.mx .mx-bento__card {
  flex: 0 0 calc((100% - 2 * var(--mx-bento-gap)) / 3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--mx-surface);
  border: 1px solid var(--mx-border);
  border-radius: var(--mx-radius);
  color: var(--mx-text);
  text-decoration: none;
  transition: transform 0.35s var(--mx-ease), box-shadow 0.35s var(--mx-ease), border-color 0.35s;
}
.mx .mx-bento__card:is(:hover, :focus-visible) {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 18px 40px -20px rgba(26, 26, 26, 0.45);
}
.mx-bento__media { display: block; background: #fff; border-bottom: 1px solid var(--mx-border); }
.mx .mx-bento__img { display: block; width: 100%; height: auto; border-radius: 0; }
.mx-bento__card--noimg .mx-bento__media { aspect-ratio: 3 / 2; background: var(--mx-surface-2); }
.mx-bento__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 20px; }
.mx-bento__index { font-family: var(--mx-font-mono); font-size: var(--mx-step--1); color: var(--mx-cardinal); letter-spacing: 0.04em; }
.mx .mx-bento__title { margin: 0; font-size: 1.15rem; line-height: 1.25; color: var(--mx-text); transition: color 0.3s; }
.mx .mx-bento__card:is(:hover, :focus-visible) .mx-bento__title { color: var(--mx-cardinal); }
.mx-bento__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.92rem;
  color: var(--mx-text-muted);
}
@media (max-width: 1000px) { .mx .mx-bento__card { flex-basis: calc((100% - var(--mx-bento-gap)) / 2); } }
@media (max-width: 600px) { .mx .mx-bento__card { flex-basis: 100%; } }

/* Field band */
.mx-band { position: relative; margin-top: 28px; }
.mx-band__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 1fr);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.mx-band__track::-webkit-scrollbar { display: none; }
.mx .mx-band__item {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--mx-border);
  border-radius: var(--mx-radius);
  scroll-snap-align: start;
}
.mx .mx-band__item img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.mx-band__item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 48px 16px 14px;
  background: linear-gradient(to top, rgba(7, 11, 20, 0.92), transparent);
  font-size: 0.85rem;
  color: #fff;
}
@media (max-width: 800px) { .mx-band__track { grid-auto-columns: 82%; } }
.mx-band__controls { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.mx-band:not(.is-scrollable) .mx-band__controls { display: none; }
.mx .mx-band__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--mx-border-strong);
  background: transparent;
  color: var(--mx-text);
  font-size: 1.1rem;
  cursor: pointer;
}
.mx .mx-band__btn:hover { border-color: var(--mx-cardinal); color: var(--mx-cardinal); }

/* Join CTA */
.mx-join {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 6vw, 72px);
  border-radius: calc(var(--mx-radius) * 2);
  background: radial-gradient(circle at 100% 0, rgba(255, 204, 0, 0.22), transparent 55%), var(--mx-cardinal);
  color: #fff;
}
.mx .mx-join h2 { font-size: var(--mx-step-3); max-width: 20ch; margin: 0 0 0.5em; color: #fff; }
.mx-join p { max-width: 60ch; color: rgba(255, 255, 255, 0.9); }
.mx .mx-join a.wp-block-button__link { background: #fff; color: var(--mx-cardinal); }
.mx .mx-join a.wp-block-button__link:hover { background: var(--mx-gold); color: var(--mx-text); }
.mx .mx-join .is-style-outline a.wp-block-button__link { background: transparent; border-color: #fff; color: #fff; }
.mx .mx-join .is-style-outline a.wp-block-button__link:hover { background: #fff; color: var(--mx-cardinal); }

/* Lab description above the stats band. */
.mx .mx-home-intro {
  max-width: 68ch;
  margin: 0 0 clamp(24px, 3vw, 36px);
  font-family: var(--mx-font-display);
  font-size: var(--mx-step-1);
  line-height: 1.5;
  color: var(--mx-text);
}
.mx-home-stats { padding-top: clamp(48px, 7vw, 88px); }

/* Homepage rhythm: the photo band leads straight into the lab intro and stats. */
.mx .mx-home-field { padding-bottom: clamp(24px, 3vw, 40px); }
.mx .mx-home-join { padding-top: clamp(32px, 5vw, 64px); }
/* Latest news: three cards fill the row. */
.mx-home-news .mx-news { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 800px) { .mx-home-news .mx-news { grid-template-columns: 1fr; } }

/* ---- 60-people.css ---- */
.mx-people { margin-bottom: clamp(48px, 7vw, 88px); }
.mx .mx-people .mx-section-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: var(--mx-step-2);
  padding-bottom: 14px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--mx-border);
}
.mx-people__count { font-family: var(--mx-font-mono); font-size: var(--mx-step--1); color: var(--mx-signal); font-weight: 400; }
.mx-people__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; }
.mx-people--feature .mx-people__grid { grid-template-columns: 1fr; }
.mx-people--compact .mx-people__grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 28px; }

/* Person cards: full-colour portraits; on hover the card lifts, the photo zooms a little,
   a cardinal line draws along the bottom and "View profile →" slides in. */
.mx-person {
  position: relative;
  overflow: hidden;
  background: var(--mx-surface);
  border: 1px solid var(--mx-border);
  border-radius: var(--mx-radius);
  transition: border-color 0.35s, transform 0.35s var(--mx-ease), box-shadow 0.35s var(--mx-ease);
}
.mx-person--card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--mx-cardinal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--mx-ease);
  pointer-events: none;
}
.mx .mx-person--card:is(:hover, :focus-within) {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 18px 40px -20px rgba(26, 26, 26, 0.45);
}
.mx-person--card:is(:hover, :focus-within)::after { transform: scaleX(1); }
.mx .mx-person--card:is(:hover, :focus-within) .mx-person__name a { color: var(--mx-cardinal); }
/* The name link stretches over the whole card, so anywhere on it opens the profile. */
.mx .mx-person--card .mx-person__name a::before { content: ""; position: absolute; inset: 0; z-index: 1; }
.mx .mx-person--card .mx-person__name a:focus-visible { outline: none; }
.mx .mx-person--card:has(.mx-person__name a:focus-visible) { outline: 2px solid var(--mx-cardinal); outline-offset: 3px; }
.mx-person__cta {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--mx-font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mx-cardinal);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s, transform 0.3s var(--mx-ease);
}
.mx-person--card:is(:hover, :focus-within) .mx-person__cta { opacity: 1; transform: none; }
/* Touch screens can't hover: show the link from the start. */
@media (hover: none) { .mx-person__cta { opacity: 1; transform: none; } }
.mx-person__media { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--mx-surface-2); }
.mx .mx-person__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.7s var(--mx-ease);
}
.mx .mx-person--card:is(:hover, :focus-within) .mx-person__img { transform: scale(1.05); }
.mx-person__initials {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-family: var(--mx-font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--mx-text-muted);
  background: radial-gradient(circle at 30% 20%, rgba(153, 0, 0, 0.35), transparent 60%), var(--mx-surface-2);
}
.mx-person__body { padding: 16px 18px 20px; }
.mx .mx-person__name { margin: 0 0 4px; font-size: 1.15rem; }
.mx .mx-person__name a,
.mx .entry-content .mx-person__name a { text-decoration: none; }
.mx .mx-person__role { margin: 0; font-family: var(--mx-font-mono); font-size: var(--mx-step--1); color: var(--mx-text-muted); }
.mx-person__bio { color: var(--mx-text-muted); margin: 16px 0 0; max-width: 65ch; }
.mx-member-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.mx-person--feature { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; }
.mx-person--feature .mx-person__body { align-self: center; padding: clamp(24px, 4vw, 48px); }
.mx .mx-person--feature .mx-person__name { font-size: var(--mx-step-3); }
@media (max-width: 700px) { .mx-person--feature { grid-template-columns: 1fr; } }

.mx .mx-person--compact {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--mx-border);
  border-radius: 0;
  font-family: var(--mx-font-display);
  color: var(--mx-text);
  text-decoration: none;
}
.mx .mx-person--compact::after { content: "→"; color: var(--mx-text-muted); transition: transform 0.2s; }
.mx .mx-person--compact:hover { color: var(--mx-cardinal); transform: none; }
.mx .mx-person--compact:hover::after { transform: translateX(4px); color: var(--mx-cardinal); }

/* Phones: two portrait cards per row instead of one very tall column. */
@media (max-width: 560px) {
  .mx-people--card .mx-people__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .mx-person__body { padding: 12px 12px 14px; }
  .mx .mx-person__name { font-size: 1rem; }
}

/* Equal-height cards with "View profile →" pinned to the bottom, so links line up across a row
   even when one name wraps onto two lines. */
.mx-person--card { display: flex; flex-direction: column; }
.mx-person--card .mx-person__body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.mx-person--card .mx-person__cta { margin-top: auto; padding-top: 8px; }

/* ---- 61-member.css ---- */
.mx-profile {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.mx-profile__aside { position: sticky; top: calc(var(--mx-header-h) + var(--mx-admin-bar) + 24px); }
.mx .mx-profile__back {
  display: inline-block;
  margin-bottom: 20px;
  font-family: var(--mx-font-mono);
  font-size: var(--mx-step--1);
  color: var(--mx-text-muted);
  text-decoration: none;
}
.mx-profile__photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--mx-border);
  border-radius: var(--mx-radius);
  background: var(--mx-surface-2);
}
.mx .mx-profile__img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.mx .mx-profile__name { font-size: var(--mx-step-3); margin: 24px 0 6px; }
.mx .mx-profile__role { margin: 0; font-family: var(--mx-font-mono); font-size: var(--mx-step--1); color: var(--mx-signal); text-transform: uppercase; letter-spacing: 0.08em; }
.mx .mx-profile__dates { margin: 6px 0 0; font-family: var(--mx-font-mono); font-size: var(--mx-step--1); color: var(--mx-text-muted); }
.mx-profile__section { padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--mx-border); }
.mx-profile__section:last-child { border-bottom: 0; }
.mx .mx-profile__heading,
.mx .entry-content .mx-profile__heading {
  margin: 0 0 14px;
  font-family: var(--mx-font-mono);
  font-size: var(--mx-step--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mx-signal);
}
.mx-profile__text { max-width: 72ch; }
.mx-profile__text > :last-child { margin-bottom: 0; }
@media (max-width: 800px) {
  .mx-profile { grid-template-columns: 1fr; }
  .mx-profile__aside { position: static; }
  .mx-profile__photo { max-width: 280px; }
}
/* The profile shows the portrait itself; hide GP's full-width featured image above it. */
.single-member .featured-image.page-header-image-single { display: none; }

/* ---- 62-research.css ---- */
/* Research page: the existing GenerateBlocks loop, restyled as numbered alternating rows,
   using the full container width. */
.mx.mx-page-research .inside-article,
.mx.mx-page-research .entry-content { padding-left: 0; padding-right: 0; max-width: none; }
.mx-page-research .entry-content [class*="gb-looper-"] {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.2vw, 32px);
  counter-reset: mx-project;
}
.mx-page-research .entry-content .gb-loop-item {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  counter-increment: mx-project;
}
/* Items hold three children (image link, title, summary): the image spans both rows beside the text. */
.mx-page-research .entry-content .gb-loop-item { grid-template-rows: auto auto; align-content: center; row-gap: 14px; }
.mx-page-research .entry-content .gb-loop-item > :first-child { grid-column: 1; grid-row: 1 / span 2; }
.mx-page-research .entry-content .gb-loop-item > :not(:first-child) { grid-column: 2; }
.mx-page-research .entry-content .gb-loop-item > :nth-child(2) { align-self: end; }
.mx-page-research .entry-content .gb-loop-item > :nth-child(3) { align-self: start; margin: 0; }
.mx-page-research .entry-content .gb-loop-item:nth-child(even) { grid-template-columns: 1fr 1.1fr; }
.mx-page-research .entry-content .gb-loop-item:nth-child(even) > :first-child { grid-column: 2; }
.mx-page-research .entry-content .gb-loop-item:nth-child(even) > :not(:first-child) { grid-column: 1; }
.mx-page-research .entry-content .gb-loop-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--mx-border);
  border-radius: var(--mx-radius);
}
.mx-page-research .entry-content .gb-loop-item :is(h2, h3) { font-size: var(--mx-step-2); margin: 0 0 0.4em; }
.mx-page-research .entry-content .gb-loop-item :is(h2, h3) a { text-decoration: none; }
.mx-page-research .entry-content .gb-loop-item :is(h2, h3)::before {
  content: counter(mx-project, decimal-leading-zero) " —";
  display: block;
  margin-bottom: 0.6em;
  font-family: var(--mx-font-mono);
  font-size: var(--mx-step--1);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--mx-signal);
}
.mx-page-research .entry-content .gb-loop-item p { color: var(--mx-text-muted); }
@media (max-width: 800px) {
  .mx-page-research .entry-content .gb-loop-item,
  .mx-page-research .entry-content .gb-loop-item:nth-child(even) { grid-template-columns: 1fr; gap: 16px; }
  .mx-page-research .entry-content .gb-loop-item > *,
  .mx-page-research .entry-content .gb-loop-item:nth-child(even) > * { grid-column: 1; grid-row: auto; }
}

/* Single project and other single posts: readable measure */
.mx:is(.single-project, .single-linkedin-news) .entry-content,
.mx.single-post .entry-content { max-width: 820px; margin-inline: 0; font-size: 1.06rem; }
.mx.single-project .entry-content .wp-block-buttons { margin-block: 1.5em; }

/* Generic cards (More research, archives) */
.mx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.mx-card {
  overflow: hidden;
  background: var(--mx-surface);
  border: 1px solid var(--mx-border);
  border-radius: var(--mx-radius);
  transition: border-color 0.3s, transform 0.3s var(--mx-ease);
}
.mx-card:hover { border-color: rgba(240, 75, 85, 0.5); transform: translateY(-3px); }
.mx-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.mx .mx-card__img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.mx-card__body { padding: 18px 20px 22px; }
.mx .mx-card__title,
.mx .entry-content .mx-card__title { margin: 0 0 8px; font-size: 1.15rem; }
.mx .mx-card__title a,
.mx .entry-content .mx-card__title a { text-decoration: none; }
.mx-card__excerpt { margin: 0; color: var(--mx-text-muted); font-size: 0.92rem; }
.mx-more {
  margin: clamp(56px, 8vw, 96px) 0 0;
  padding-top: 40px;
  border-top: 1px solid var(--mx-border);
}
.mx .mx-more .mx-section-title { font-size: var(--mx-step-2); margin-bottom: 24px; }

/* Previous / next project */
.mx-project-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.mx .mx-project-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 22px;
  background: var(--mx-surface);
  border: 1px solid var(--mx-border);
  border-radius: var(--mx-radius);
  font-family: var(--mx-font-display);
  font-weight: 600;
  text-decoration: none;
  color: var(--mx-text);
}
.mx .mx-project-nav a:hover { border-color: var(--mx-cardinal); color: var(--mx-cardinal); }
.mx .mx-project-nav .mx-eyebrow { margin: 0; }
.mx-project-nav__next { grid-column: 2; text-align: right; }
@media (max-width: 560px) {
  .mx-project-nav { grid-template-columns: 1fr; }
  .mx-project-nav__next { grid-column: auto; }
}

/* GP post navigation (Element 571, wrapped by inc/hook-wrappers.php) */
.mx-post-nav:empty { display: none; }

/* Phones: each project is image first (full width), then title and summary. */
@media (max-width: 800px) {
  .mx-page-research .entry-content .gb-loop-item > :first-child { order: -1; width: 100%; max-width: none; }
  .mx-page-research .entry-content .gb-loop-item img { width: 100%; height: auto; }
}
@media (max-width: 800px) {
  /* Same specificity as the desktop column rules, so nothing keeps grid-column: 2 on phones
     (that would create an implicit second column and squeeze the image). */
  .mx-page-research .entry-content .gb-loop-item > :is(:first-child, :not(:first-child)),
  .mx-page-research .entry-content .gb-loop-item:nth-child(even) > :is(:first-child, :not(:first-child)) { grid-column: 1; grid-row: auto; }
}

/* ---- 63-news.css ---- */
/* News cards: homepage (compact) and the News page (with LinkedIn embeds). */
.mx-news { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.mx-news-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: var(--mx-surface);
  border: 1px solid var(--mx-border);
  border-radius: var(--mx-radius);
  transition: border-color 0.3s, transform 0.3s var(--mx-ease);
}
.mx-news-card:hover { border-color: var(--mx-border-strong); transform: translateY(-2px); }
.mx .mx-news-card__date { margin: 0; font-family: var(--mx-font-mono); font-size: var(--mx-step--1); color: var(--mx-text-muted); }
.mx .mx-news-card__title { margin: 0; font-size: 1.1rem; font-weight: 600; line-height: 1.3; }
.mx-home-news .mx-news-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mx .mx-news-card__link { margin-top: auto; color: var(--mx-cardinal-bright); font-weight: 600; text-decoration: none; }
.mx .mx-news-card__link:hover { color: var(--mx-cardinal); }
.mx-news--embed { display: block; columns: 3 360px; column-gap: 16px; }
.mx-news--embed .mx-news-card { break-inside: avoid; margin-bottom: 16px; }
.mx-news-card__embed iframe {
  display: block;
  width: 100%;
  max-width: 504px;
  border: 0;
  border-radius: 8px;
  background: #fff;
}

/* ---- 64-gallery.css ---- */
/* Gallery index (page 1195): each album is an outer loop item holding its own inner loop of photos.
   Albums become panels; the inner loop becomes a 4-photo preview row. */
.mx-page-gallery .entry-content [class*="gb-looper-"]:not(.gb-loop-item [class*="gb-looper-"]) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr));
  gap: 24px;
}
.mx-page-gallery .entry-content [class*="gb-looper-"]:not(.gb-loop-item [class*="gb-looper-"]) > .gb-loop-item {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  background: var(--mx-surface);
  border: 1px solid var(--mx-border);
  border-radius: var(--mx-radius);
  transition: border-color 0.3s;
}
.mx-page-gallery .entry-content [class*="gb-looper-"]:not(.gb-loop-item [class*="gb-looper-"]) > .gb-loop-item:hover { border-color: var(--mx-border-strong); }
.mx-page-gallery .entry-content .gb-loop-item :is(h2, h3) { margin: 0; font-size: 1.2rem; line-height: 1.3; }
.mx-page-gallery .entry-content .gb-loop-item :is(h2, h3) a { text-decoration: none; }
.mx-page-gallery .entry-content .gb-loop-item [class*="gb-looper-"] {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.mx-page-gallery .entry-content .gb-loop-item [class*="gb-looper-"] > .gb-loop-item:nth-child(n + 5) { display: none; }
.mx-page-gallery .entry-content .gb-loop-item [class*="gb-looper-"] > .gb-loop-item {
  overflow: hidden;
  border-radius: 8px;
  background: var(--mx-surface-2);
}
.mx-page-gallery .entry-content .gb-loop-item [class*="gb-looper-"] img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.5s var(--mx-ease);
}
.mx-page-gallery .entry-content .gb-loop-item [class*="gb-looper-"] > .gb-loop-item:hover img { transform: scale(1.05); }
.mx-page-gallery .entry-content .gb-loop-item [class*="gb-looper-"] > .gb-loop-item > * { padding: 0; margin: 0; }
.mx-page-gallery .entry-content .gb-loop-item > a.gb-text {
  align-self: flex-start;
  padding: 0.45em 1em;
  border: 1px solid var(--mx-border-strong);
  border-radius: 999px;
  background: transparent;
  font-family: var(--mx-font-mono);
  font-size: var(--mx-step--1);
  color: var(--mx-text);
  text-decoration: none;
}
.mx-page-gallery .entry-content .gb-loop-item > a.gb-text:hover { border-color: var(--mx-cardinal); color: var(--mx-cardinal); }

/* Pagination: GenerateBlocks query page numbers and [mixil_news paginate] */
.mx .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  margin: 0 3px;
  padding: 0 10px;
  border: 1px solid var(--mx-border);
  border-radius: 8px;
  color: var(--mx-text);
  text-decoration: none;
  font-family: var(--mx-font-mono);
}
.mx .page-numbers.current { background: var(--mx-cardinal); border-color: var(--mx-cardinal); color: #fff; }
.mx a.page-numbers:hover { border-color: var(--mx-cardinal); color: var(--mx-cardinal); }
.mx-pagination { margin-top: 32px; text-align: center; }

/* Single gallery: masonry of every photo */
.mx.single-gallery .dynamic-content-template [class*="gb-looper-"] { display: block; columns: 3 260px; column-gap: 14px; }
.mx.single-gallery .dynamic-content-template .gb-loop-item { break-inside: avoid; margin-bottom: 14px; }
.mx.single-gallery .dynamic-content-template a { display: block; overflow: hidden; border-radius: 10px; cursor: zoom-in; }
.mx.single-gallery .dynamic-content-template img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  transition: transform 0.5s var(--mx-ease);
}
.mx.single-gallery .dynamic-content-template a:hover img { transform: scale(1.03); }

/* Lightbox (baguetteBox sets its overlay colour inline, so !important is needed here) */
#baguetteBox-overlay { background-color: rgba(7, 11, 20, 0.96) !important; }
#baguetteBox-overlay .full-image figcaption { background: rgba(7, 11, 20, 0.8); color: var(--mx-text); font-family: var(--mx-font-body); }
#baguetteBox-overlay .baguetteBox-button { background-color: rgba(14, 21, 36, 0.85); border-radius: 50%; }
#baguetteBox-overlay .baguetteBox-button:focus-visible { outline: 2px solid var(--mx-gold); }

/* GenerateBlocks query pagination (gallery index): Previous/Next links carry light old-theme fills. */
.mx .gb-query-loop-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 32px; }
.mx .gb-query-loop-pagination > a.gb-text {
  padding: 0.5em 1.1em;
  border: 1px solid var(--mx-border-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--mx-text);
  font-family: var(--mx-font-mono);
  font-size: var(--mx-step--1);
  text-decoration: none;
}
.mx .gb-query-loop-pagination > a.gb-text:hover { border-color: var(--mx-cardinal); color: var(--mx-cardinal); }

/* ---- 65-publications.css ---- */
.mx-page-publications .entry-content { max-width: 1000px; margin-inline: 0; }
/* One slim filter bar pinned under the header: search, type, year, count. */
.mx-pubs-toolbar {
  position: sticky;
  top: calc(var(--mx-header-h) + var(--mx-admin-bar));
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 24px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--mx-border);
  border-radius: var(--mx-radius);
  box-shadow: 0 8px 24px -16px rgba(26, 26, 26, 0.35);
}
.mx-pubs-search { flex: 1 1 220px; min-width: 0; }
.mx .mx-pubs-search input,
.mx .mx-pubs-year select {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  background: var(--mx-surface);
  border: 1px solid var(--mx-border-strong);
  border-radius: 999px;
  color: var(--mx-text);
  font: inherit;
  font-size: 0.92rem;
}
.mx .mx-pubs-search input::placeholder { color: var(--mx-text-muted); }
.mx-pubs-chips { display: flex; gap: 6px; flex: none; }
.mx .mx-pubs-chip { padding: 6px 12px; font-size: 0.72rem; }
.mx .mx-pubs-chip[aria-pressed="true"] { background: var(--mx-cardinal); border-color: var(--mx-cardinal); color: #fff; }
.mx-pubs-year { flex: none; }
.mx .mx-pubs-year select { width: auto; padding-right: 32px; cursor: pointer; }
/* Phones: search and year on one row, the type buttons on a second row that scrolls sideways. */
@media (max-width: 700px) {
  .mx-pubs-toolbar { padding: 8px; gap: 6px 8px; margin-inline: -4px; }
  .mx-pubs-search { flex-basis: 0; flex-grow: 1; }
  .mx-pubs-chips { order: 3; flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; }
  .mx .mx-pubs-search input, .mx .mx-pubs-year select { height: 36px; font-size: 0.88rem; }
  .mx-pubs-count { display: none; }
}
.mx .mx-pubs-count { flex: none; margin: 0 4px 0 auto; font-family: var(--mx-font-mono); font-size: var(--mx-step--1); color: var(--mx-text-muted); }
.mx-pubs-empty { padding: 32px; text-align: center; border: 1px dashed var(--mx-border-strong); border-radius: var(--mx-radius); }

.mx .mx-page-publications .entry-content h2,
.mx.mx-page-publications .entry-content h2 {
  margin: 48px 0 8px;
  padding-top: 32px;
  border-top: 1px solid var(--mx-border);
  font-size: var(--mx-step-3);
  scroll-margin-top: calc(var(--mx-header-h) + var(--mx-admin-bar) + var(--mx-pubs-bar-h, 64px) + 16px);
}
.mx.mx-page-publications .entry-content h3 {
  margin: 24px 0 12px;
  font-family: var(--mx-font-mono);
  font-size: var(--mx-step--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mx-signal);
}
/* minmax(0, 1fr): an auto track would grow to the longest unbreakable string and overflow phones. */
.mx-page-publications .entry-content ul { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.mx-page-publications .entry-content li {
  padding: 14px 18px;
  background: var(--mx-surface);
  border: 1px solid var(--mx-border);
  border-radius: 10px;
  font-size: 0.95rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.mx-page-publications .entry-content [hidden] { display: none !important; }
.mx .publication-link {
  display: inline-block;
  margin-left: 0.4em;
  padding: 0.05em 0.6em;
  border: 1px solid rgba(153, 0, 0, 0.35);
  border-radius: 999px;
  font-family: var(--mx-font-mono);
  font-size: 0.78rem;
  color: var(--mx-cardinal);
  text-decoration: none;
  white-space: nowrap;
}
.mx .publication-link:hover { background: var(--mx-cardinal); color: #fff; }

/* ---- 66-pages.css ---- */
/* About, Facilities, Data: same content, restyled. */
.mx:is(.mx-page-about, .mx-page-facilities, .mx-page-data) .entry-content { max-width: 1000px; margin-inline: 0; }

.mx.mx-page-about .entry-content p:first-of-type {
  padding-left: 1em;
  border-left: 3px solid var(--mx-cardinal-bright);
  font-family: var(--mx-font-display);
  font-size: var(--mx-step-1);
  line-height: 1.5;
  color: var(--mx-text);
}
.mx.mx-page-about .entry-content [class*="gb-element-"]:has(> img, > figure) { overflow: hidden; border-radius: var(--mx-radius); }

.mx.mx-page-facilities .entry-content :is(h2, h3) {
  margin-top: 2em;
  padding-top: 1.2em;
  border-top: 1px solid var(--mx-border);
  font-size: var(--mx-step-2);
}
.mx.mx-page-facilities .entry-content ul {
  display: grid;
  gap: 8px;
  margin: 1em 0 2em;
  padding: 20px 24px;
  list-style: none;
  background: var(--mx-surface);
  border: 1px solid var(--mx-border);
  border-radius: var(--mx-radius);
}
/* Facility entries are long paragraphs: body font for reading, mono only for the bold lead-in. */
.mx.mx-page-facilities .entry-content ul { list-style: disc; padding-left: 1.4em; }
.mx.mx-page-facilities .entry-content li strong { font-weight: 700; color: var(--mx-text); }

.mx.mx-page-data .entry-content ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin: 1em 0 2em;
  padding: 0;
  list-style: none;
}
.mx.mx-page-data .entry-content li {
  padding: 20px;
  background: var(--mx-surface);
  border: 1px solid var(--mx-border);
  border-radius: var(--mx-radius);
  overflow-wrap: anywhere;
}
.mx.mx-page-data .entry-content li a {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--mx-font-mono);
  font-size: var(--mx-step--1);
  color: var(--mx-cardinal);
  text-decoration: none;
}
.mx.mx-page-data .entry-content li a::after { content: " ↗"; }
.mx.mx-page-data .entry-content li a:hover { text-decoration: underline; }

/* About: the original two-column block has an empty second column; let the text use the width. */
.mx.mx-page-about .entry-content [class*="gb-element-"]:empty { display: none; }
.mx.mx-page-about .entry-content [class*="gb-element-"]:has(> p) { flex: 1 1 auto; width: auto; max-width: 760px; padding-left: 0; }
.mx.mx-page-about .entry-content section > [class*="gb-element-"] { padding-left: 0; padding-right: 0; }

/* Facilities: no divider or extra space above the first heading. */
.mx.mx-page-facilities .entry-content :is(h2, h3):first-of-type,
.mx.mx-page-facilities .entry-content > :first-child :is(h2, h3):first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.mx.mx-page-facilities .entry-content > :first-child { margin-top: 0; padding-top: 0; }
.mx.mx-page-facilities .entry-content > :first-child > [class*="gb-element-"]:first-child { padding-top: 0; }

/* Phones: the old content blocks add their own side padding; keep text on the page's left edge. */
@media (max-width: 768px) {
  .mx:is(.mx-page-about, .mx-page-facilities, .mx-page-data) .entry-content > [class*="gb-element-"],
  .mx:is(.mx-page-about, .mx-page-facilities, .mx-page-data) .entry-content > * > [class*="gb-element-"],
  .mx:is(.mx-page-about, .mx-page-facilities, .mx-page-data) .entry-content > * > * > [class*="gb-element-"] { padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0; }
}

/* "Show More" under long galleries (see initShowMore in main.js). */
.mx-more-wrap { display: flex; justify-content: center; margin: clamp(24px, 3vw, 40px) 0 0; }

/* ---- 70-footer.css ---- */
/* Footer: USC cardinal band, white text, gold headings. The Viterbi / Ming Hsieh logo keeps its
   original colours on a small white card. */
.mx .site-footer { position: relative; overflow: hidden; background: var(--mx-cardinal); color: rgba(255, 255, 255, 0.88); }
.mx-footer {
  position: relative;
  isolation: isolate;
  max-width: var(--mx-container);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) var(--mx-gutter) 32px;
}
.mx-footer::before {
  content: "";
  position: absolute;
  right: -200px;
  bottom: -260px;
  z-index: -1;
  width: 640px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 38px, rgba(255, 255, 255, 0.08) 38px 39px);
  pointer-events: none;
}
.mx-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 900px) { .mx-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .mx-footer__grid { grid-template-columns: 1fr; } }
.mx .mx-footer__name { margin: 0; font-family: var(--mx-font-display); font-size: 2rem; font-weight: 700; color: #fff; }
.mx .mx-footer__tag { margin: 4px 0 0; font-family: var(--mx-font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.85); }
.mx .mx-footer__logo {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 10px;
}
.mx .mx-footer__logo img { display: block; max-width: 240px; height: auto; border-radius: 0; }
.mx .mx-footer__heading {
  margin: 0 0 16px;
  font-family: var(--mx-font-mono);
  font-size: var(--mx-step--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mx-gold);
}
.mx-footer address { font-style: normal; line-height: 1.7; }
.mx .mx-footer a { color: #fff; text-decoration: none; }
.mx .mx-footer a:hover { color: var(--mx-gold); }
.mx .mx-footer :focus-visible { outline-color: var(--mx-gold); }
.mx-footer__links { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mx-footer__follow { min-height: 24px; margin-bottom: 12px; }
.mx-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.85rem;
}
.mx-footer__legal p { margin: 0; }
.mx-footer__legal ul { display: flex; flex-wrap: wrap; gap: 20px; margin: 0; padding: 0; list-style: none; }

/* Newsletter / CTA band (Element 438, wrapped by inc/hook-wrappers.php) */
.mx-cta-band:empty { display: none; }
.mx-cta-band {
  max-width: var(--mx-container);
  margin: 0 auto clamp(48px, 8vw, 96px);
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--mx-border);
  border-radius: 24px;
  background: var(--mx-surface-2);
}
.mx-cta-band [class*="gb-element-"] { background: transparent; padding: 0; }
