:root {
  --navy: #1a2a4a;
  --navy-light: #29456f;
  --link: #1a5fa8;
  --link-hover: #a52a22;
  --text: #2c2c2c;
  --muted: #596273;
  --border: #e4e9ef;
  --surface: #f7f9fb;
  --white: #ffffff;
  --umbc-gold: #fdb515;
  --umbc-gold-dark: #c98d00;
  --content-width: 1200px;

  /* Type scale. Every font-size below refers to one of these, so the page
     has six sizes rather than fifteen. Ratio is roughly 1.11 between steps,
     which is enough separation to read as intentional. */
  --fs-xs: 0.86rem;    /* captions, footer, dates */
  --fs-sm: 0.94rem;    /* nav, roles, secondary text */
  --fs-body: 1rem;     /* body copy */
  --fs-card: 1.08rem;  /* card titles, h3 */
  --fs-lead: 1.12rem;  /* page and home intros */
  --fs-h2: 1.25rem;    /* section headings */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible { outline: 3px solid #f5c542; outline-offset: 3px; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 1000;
  padding: 0.65rem 0.9rem;
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* Hidden from view but available to screen readers and search engines,
   so pages keep an <h1> without showing a redundant on-page title. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  background-color: #000000;
  background-image: url("../images/band_band.jpg");
  background-position: center;
  background-size: cover;
  border-bottom: 4px solid var(--umbc-gold);
  color: var(--white);
}
/* Keep the white header text legible over the bright filaments now that
   the darkening overlay is light. */
.lab-name,
.lab-sub,
.primary-nav a { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85); }
.header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1.4rem 2rem 0;
}
.lab-name {
  display: inline-block;
  color: var(--white);
  text-decoration: none;
  font-size: clamp(1.45rem, 2.5vw, 1.8rem);
  font-weight: 750;
  letter-spacing: 0.01em;
}
.lab-name:hover { color: var(--white); }
.lab-sub { margin: 0.15rem 0 0; color: var(--white); font-size: var(--fs-sm); }
.primary-nav { margin-top: 1rem; }
.primary-nav ul { display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; list-style: none; }
.primary-nav a {
  display: block;
  color: var(--white);
  text-decoration: none;
  padding: 0.62rem 0.95rem;
  font-size: var(--fs-sm);
  border-bottom: 3px solid transparent;
}
.primary-nav a:hover,
.primary-nav a.active {
  border-bottom-color: var(--umbc-gold);
  background: rgba(0, 0, 0, 0.45);
  color: var(--white);
}

.site-main {
  width: 100%;
  max-width: var(--content-width);
  flex: 1;
  margin: 1rem auto 3rem;
  padding: 0 2rem 3rem;
}
h1 {
  margin: 0 0 1.6rem;
  padding-bottom: 0.65rem;
  color: var(--navy);
  border-bottom: 3px solid var(--umbc-gold);
  font-size: clamp(1.75rem, 3vw, 2.1rem);
  line-height: 1.25;
}
h2 {
  margin: 2.2rem 0 0.65rem;
  color: var(--navy);
  font-size: var(--fs-h2);
  line-height: 1.35;
  letter-spacing: 0.01em;
}
h3 { margin: 0 0 0.3rem; color: var(--navy); font-size: var(--fs-card); line-height: 1.4; }
p { margin: 0 0 1rem; }
sub { line-height: 0; }
.home-intro { margin-bottom: 2.4rem; font-size: var(--fs-body); line-height: 1.7; }
.page-lead { max-width: 820px; margin-bottom: 2rem; font-size: var(--fs-body); color: var(--muted); }

.research-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.45fr);
  gap: 2rem;
  align-items: start;
  margin: 2rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}
.research-row + .research-row { margin-top: 0; }
.research-text,
.research-fig { align-self: start; }
.section-heading {
  margin: 0 0 0.65rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--fs-h2);
}
.research-fig { margin: 0; text-align: center; }
.research-fig img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--border);
  background: var(--white);
}
.research-fig-bic {
  width: 100%;
  max-width: 580px;
  justify-self: center;
}
.figure-zoom {
  display: block;
  width: 100%;
}
.research-fig-tpv { width: 100%; }
.tpv-image-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}
.tpv-panel {
  display: block;
  min-width: 0;
  width: 100%;
}
.tpv-spectra-vector { width: 100%; }
.tpv-schematic-crop {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.15 / 1;
  border: 1px solid var(--border);
  background: var(--white);
}
.research-fig .tpv-schematic-crop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: right center;
  border: 0;
}
.research-fig figcaption { margin-top: 0.55rem; color: var(--muted); font-size: var(--fs-xs); font-style: italic; line-height: 1.45; }

.interest-list { margin: 1rem 0 1rem 1.4rem; padding: 0; line-height: 1.9; }
.section-label { margin-top: 2.6rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--umbc-gold); letter-spacing: 0; }
.person {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 1.35rem;
  align-items: start;
  margin: 1.25rem 0 2rem;
}
.person img { width: 120px; height: auto; border: 1px solid #d4d9df; border-radius: 0.2rem; background: var(--surface); }
.person-info .name { margin-top: 0; }
.person-info .role { margin: 0.1rem 0 0.4rem; color: var(--muted); font-size: var(--fs-sm); }
.person-info p { margin: 0.35rem 0 0; font-size: var(--fs-sm); }
.member-since { color: var(--muted); font-size: var(--fs-xs); font-weight: 400; }
.open-position { font-style: italic; font-weight: 500; }
.alumni-list { padding-left: 1.25rem; }

.pub-list p, .news-list p { margin-bottom: 0.9rem; padding-bottom: 0.9rem; border-bottom: 1px solid #edf0f3; }
.pub-list a { overflow-wrap: anywhere; }
.page-note { color: var(--muted); font-size: var(--fs-sm); }
.research-themes,
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.research-card,
.project {
  padding: 1.35rem 1.4rem;
  border: 1px solid var(--border);
  border-top: 4px solid var(--umbc-gold);
  border-radius: 0.3rem;
  background: var(--surface);
}
.research-card h2,
.project h2 { margin: 0 0 0.55rem; font-size: var(--fs-card); letter-spacing: 0; }
.research-card p:last-child,
.project p:last-child { margin-bottom: 0; }
.project { margin: 0; }
.join-note { margin-top: 2rem; padding: 1rem 1.1rem; background: var(--surface); border-left: 4px solid var(--navy-light); }

.error-page { max-width: 620px; margin: 3rem auto; text-align: center; }
.error-page h1 { border: 0; }
.error-code { margin: 0; color: var(--navy); font-size: clamp(4rem, 15vw, 7rem); font-weight: 800; line-height: 1; opacity: 0.14; }
.button-link { display: inline-block; padding: 0.65rem 1rem; border-radius: 0.25rem; background: var(--umbc-gold); color: #111111; text-decoration: none; font-weight: 700; }
.button-link:hover { color: #000000; background: var(--umbc-gold-dark); }

.site-footer {
  margin-top: auto;
  background-color: #000000;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.42)),
    url("../images/umbc-maryland-pattern.jpg");
  background-position: center;
  background-size: cover;
  color: #e3e3e3;
  text-align: center;
}
.footer-inner { max-width: var(--content-width); margin: 0 auto; padding: 1.4rem 2rem; }
.site-footer p { margin: 0.2rem 0; font-size: var(--fs-xs); }
.site-footer a { color: var(--white); }
.footer-address { color: #d0d0d0; }

@media (max-width: 760px) {
  .header-inner { padding: 1.2rem 1rem 0; }
  .lab-sub span { display: none; }
  .lab-sub span::after { content: ""; }
  .primary-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .primary-nav a { height: 100%; padding: 0.7rem 0.65rem; border-radius: 0; text-align: center; }
  .site-main { margin: 0.6rem auto 1.8rem; padding: 0 1rem 2.5rem; }
  .research-row { grid-template-columns: 1fr; gap: 1rem; }
  .research-fig { max-width: none; }
  .research-fig-bic { max-width: 580px; }
  .tpv-image-pair {
    grid-template-columns: 1fr;
    max-width: 650px;
    margin: 0 auto;
  }
  .research-themes, .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  /* Scale the root, not body: every size above is in rem, so shrinking
     body alone left headings and captions at their desktop size. */
  html { font-size: 94%; }
  .person { grid-template-columns: 84px minmax(0, 1fr); gap: 1rem; }
  .person img { width: 84px; height: auto; }
  .member-since { display: block; margin-top: 0.1rem; }
  .footer-inner { padding: 1.2rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ============================================================
   Append to assets/css/style.css
   Adds: spec table used on facilities.html, and a lists-inside-
   cards fix so .interest-list works inside .join-note.
   Bump the ?v= query string in _layouts/default.html when you
   deploy, or the old stylesheet will stay cached.
   ============================================================ */

.spec-table {
  width: 100%;
  max-width: 820px;
  margin: 1.25rem 0 2rem;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.spec-table caption {
  margin-bottom: 0.6rem;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-style: italic;
  text-align: left;
}
.spec-table th,
.spec-table td {
  padding: 0.62rem 0.9rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.spec-table th[scope="row"] {
  width: 38%;
  color: var(--navy);
  font-weight: 600;
}
.spec-table tbody tr:nth-child(odd) { background: var(--surface); }

.join-note .interest-list { margin: 0.6rem 0 1rem 1.4rem; line-height: 1.7; }
.join-note p:last-child { margin-bottom: 0; }
.project .interest-list { margin-left: 1.2rem; }

@media (max-width: 560px) {
  .spec-table,
  .spec-table tbody,
  .spec-table tr,
  .spec-table th,
  .spec-table td { display: block; width: 100%; }
  .spec-table th[scope="row"] { padding-bottom: 0.1rem; border-bottom: 0; }
  .spec-table td { padding-top: 0.1rem; }
}
