/* ============================================================
   Crowd Intelligence Lab at Virginia Tech
   Palette (VT Brand Center):
     Chicago Maroon  #861F41   (primary)
     Burnt Orange    #E5751F   (primary; large graphics only)
     Impact Orange   #C95B0C   (replaces burnt orange for text)
     Hokie Stone     #75787B   (neutral)
     Land-Grant Grey #D7D2CB   (neutral; tints permitted)
     Yardline White  #FFFFFF
   Note: per VT guidelines, maroon/orange may be shaded (darkened)
   but never tinted (lightened).
   ============================================================ */

:root {
  --maroon: #861F41;
  --maroon-shade: #6C1A35;      /* darkened maroon (permitted) */
  --maroon-deep: #4E1226;       /* deep shade for footer */
  --burnt-orange: #E5751F;      /* graphics, rules, large elements */
  --impact-orange: #C95B0C;     /* orange for digital text (accessible) */
  --stone: #75787B;
  --stone-dark: #54575A;
  --grey: #D7D2CB;              /* Land-Grant Grey */
  --grey-tint: #F0EEE9;         /* tint of Land-Grant Grey (permitted) */
  --white: #FFFFFF;
  --ink: #262123;

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;

  --max: 1080px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}

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

a { color: var(--maroon); text-decoration-color: var(--grey); text-underline-offset: 3px; transition: color .15s ease; }
a:hover { color: var(--impact-orange); text-decoration-color: var(--impact-orange); }
a:focus-visible,
button:focus-visible { outline: 3px solid var(--impact-orange); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--maroon); color: var(--white);
  padding: .6rem 1rem; z-index: 100; font-family: var(--font-display);
}
.skip-link:focus { left: 0; }

/* ---------- Header / nav ---------- */

.site-header {
  background: var(--maroon);
  border-bottom: 4px solid var(--burnt-orange);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.25rem;
}
.wordmark {
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.4rem; line-height: 1.1; text-decoration: none;
  color: var(--white); padding: .5rem 0;
}
.wordmark:hover { color: var(--white); }
.wordmark .lab-name { font-weight: 800; }
.wordmark .lab-inst { font-weight: 600; font-size: .92em; }

.site-nav ul { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; }
.site-nav a {
  font-family: var(--font-display); font-weight: 600; font-size: .9rem;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--white); text-decoration: none;
  padding: .55rem .85rem; border-radius: 3px; display: block;
}
.site-nav a:hover { background: var(--maroon-shade); color: var(--white); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--burnt-orange); }

.nav-toggle {
  display: none; background: none; border: 2px solid var(--grey);
  color: var(--white); font-family: var(--font-display); font-weight: 600;
  font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  padding: .45rem .8rem; border-radius: 3px; cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .wordmark { font-size: 1.2rem; line-height: 1.15; }
  .wordmark .lab-name,
  .wordmark .lab-inst { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--maroon-shade); border-bottom: 4px solid var(--burnt-orange); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: .5rem var(--pad) 1rem; }
}

/* ---------- Intro (tagline + lab overview) ---------- */

.eyebrow {
  font-family: var(--font-display); font-weight: 700; font-size: .78rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--impact-orange);
  margin: 0 0 1rem;
}

/* ---------- Sections ---------- */

.section { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.section + .section { border-top: 1px solid var(--grey); }
.section.tinted { background: var(--grey-tint); border-top: 1px solid var(--grey); }

.section-head { margin-bottom: 1.75rem; }
.section-head h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.01em;
  color: var(--maroon); margin: .25rem 0 0;
  display: flex; align-items: center; gap: .75rem;
}
.section-lede { color: var(--stone-dark); max-width: 46em; }

.prose { max-width: 46em; }
.prose p { margin: 0 0 1.1rem; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- News ---------- */

.news-list { list-style: none; margin: 0; padding: 0; max-width: 52em; }
.news-list li {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.25rem;
  padding: .85rem 0; border-bottom: 1px solid var(--grey);
}
.news-list li:first-child { border-top: 1px solid var(--grey); }
.news-date {
  font-family: var(--font-display); font-weight: 700; font-size: .8rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--maroon);
  padding-top: .3rem; white-space: nowrap;
}
.news-list li.hidden-item { display: none; }
.news-list.expanded li.hidden-item { display: grid; }
@media (max-width: 560px) {
  .news-list li { grid-template-columns: 1fr; gap: .15rem; }
}

.btn-more {
  margin-top: 1.25rem;
  font-family: var(--font-display); font-weight: 700; font-size: .85rem;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--maroon); background: var(--white);
  border: 2px solid var(--maroon); border-radius: 3px;
  padding: .6rem 1.1rem; cursor: pointer;
}
.btn-more:hover { background: var(--maroon); color: var(--white); }

/* ---------- People ---------- */

.subhead {
  font-family: var(--font-display); font-weight: 700; font-size: .85rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--impact-orange);
  margin: 2.25rem 0 1rem;
}
.section-head + .subhead, .director-card + .subhead { margin-top: 2.25rem; }

.director-card {
  display: grid; grid-template-columns: 200px 1fr; gap: 1.75rem;
  background: var(--white); border: 1px solid var(--grey);
  border-left: 4px solid var(--maroon); padding: 1.5rem;
  max-width: 46rem;
}
.director-card .headshot { width: 200px; height: 200px; }
.director-card h3 { font-family: var(--font-display); font-size: 1.35rem; margin: .1rem 0 .2rem; }
.director-card h3 a { text-decoration: none; }
.director-card h3 a:hover { text-decoration: underline; }
.director-card .role { font-family: var(--font-display); font-weight: 600; font-size: .92rem; color: var(--stone-dark); margin: 0 0 .75rem; }
.director-card .blurb { font-size: .98rem; color: var(--ink); margin: 0; }
@media (max-width: 620px) {
  .director-card { grid-template-columns: 1fr; }
  .director-card .headshot { width: 160px; height: 160px; }
}

.people-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.75rem 1.5rem; list-style: none; margin: 0; padding: 0;
}
.person { text-align: left; }
.headshot {
  position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden;
  background: var(--grey-tint); border: 1px solid var(--grey);
}
.headshot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.headshot .initials {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 2.2rem;
  color: var(--stone); background: var(--grey-tint);
}
.person h3, .person .p-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  margin: .7rem 0 .1rem; line-height: 1.25;
}
.person .p-name a { text-decoration: none; }
.person .p-name a:hover { text-decoration: underline; }
.person .p-role { font-family: var(--font-display); font-size: .83rem; font-weight: 500; color: var(--stone-dark); margin: 0; line-height: 1.4; }

/* ---------- About figure ---------- */

.about-grid {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(1.75rem, 4vw, 3rem); align-items: start;
}
.about-figure { margin: 0; }
.about-figure > a { display: block; border: 1px solid var(--grey); }
.about-figure img { width: 100%; height: auto; display: block; }
.about-figure figcaption {
  font-family: var(--font-display); font-size: .85rem; font-weight: 500;
  color: var(--stone-dark); line-height: 1.55;
  border-left: 3px solid var(--grey); padding-left: .75rem; margin-top: .75rem;
}
.about-figure figcaption a { color: var(--maroon); font-weight: 600; }
.about-figure figcaption a:hover { color: var(--impact-orange); }
@media (max-width: 780px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-figure { max-width: 480px; }
}

/* ---------- Alumni (compact, two columns) ---------- */

.alumni-cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem 3rem; max-width: 56rem;
}
.alumni-degree {
  font-family: var(--font-display); font-weight: 700; font-size: .82rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--stone-dark);
  border-bottom: 3px solid var(--grey); padding-bottom: .4rem; margin: 0 0 .25rem;
}
.alumni-list + .alumni-degree { margin-top: 1.5rem; }
.alumni-list { list-style: none; margin: 0; padding: 0; }
.alumni-list li { padding: .5rem 0; border-bottom: 1px solid var(--grey); font-size: .95rem; }
.alumni-list .a-name { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
/* Name may be a plain span (no site) or an <a> (has site). Both look identical at
   rest; the link affordance only appears on hover/focus, so unlinked names give
   nothing away. */
a.a-name { text-decoration: none; cursor: pointer; }
a.a-name:hover, a.a-name:focus-visible { color: var(--maroon); text-decoration: underline; text-underline-offset: 2px; }
.alumni-list .a-meta { font-family: var(--font-display); font-size: .82rem; font-weight: 500; color: var(--stone-dark); }
.alumni-list .a-thesis-link { font-family: var(--font-display); font-size: .82rem; font-weight: 600; white-space: nowrap; }

/* ---------- Research / publication items ---------- */

.pub-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; max-width: 52em; }
.pub-cards li {
  background: var(--white); border: 1px solid var(--grey);
  padding: 1rem 1.25rem;
}
.pub-cards .pc-title { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; line-height: 1.35; }
.pub-cards .pc-title a { text-decoration: none; }
.pub-cards .pc-title a:hover { text-decoration: underline; }
.pub-cards .pc-meta { font-size: .9rem; color: var(--stone-dark); margin-top: .25rem; }
.pub-cards .pc-venue { font-family: var(--font-display); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--impact-orange); }

.link-forward {
  display: inline-block; margin-top: 1.4rem;
  font-family: var(--font-display); font-weight: 700; font-size: .9rem;
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  color: var(--maroon); border-bottom: 2px solid var(--maroon);
  padding-bottom: .15rem;
}
.link-forward:hover { color: var(--impact-orange); }

.pub-year.no-rule::after { display: none; }

/* ---------- Teaching ---------- */

.teaching-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; max-width: 52em; }
.course-list { list-style: none; margin: 0; padding: 0; }
.course-list li { padding: .55rem 0; border-bottom: 1px solid var(--grey); }
.course-code { font-family: var(--font-display); font-weight: 600; color: var(--stone-dark); margin-right: .5rem; }

/* ---------- Publications page ---------- */

.page-title-band { background: var(--maroon-deep); color: var(--white); padding: clamp(2rem, 5vw, 3.25rem) 0; }
.page-title-band h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0; letter-spacing: -0.01em;
}
.page-title-band .eyebrow { color: var(--grey); margin-bottom: .5rem; }
.page-title-band p { color: var(--grey-tint); max-width: 48em; margin: .75rem 0 0; }
.page-title-band a { color: var(--white); }

.pub-year { margin: 2.75rem 0 1rem; display: flex; align-items: baseline; gap: 1rem; }
.pub-year h2 {
  font-family: var(--font-display); font-weight: 800; font-size: 1.7rem;
  color: var(--maroon); margin: 0; scroll-margin-top: 6rem;
}
.pub-year::after { content: ""; flex: 1; height: 1px; background: var(--grey); }

.ref-list { list-style: none; margin: 0; padding: 0; max-width: 52em; }
.ref-list li { padding: .55rem 0 .55rem 2.25rem; text-indent: -2.25rem; font-size: 1rem; }
.ref-list li a { font-weight: 600; }

ol.ref-numbered { counter-reset: ref; }
ol.ref-numbered li { counter-increment: ref; position: relative; padding-left: 2.6rem; text-indent: 0; }
ol.ref-numbered li::before {
  content: counter(ref) ".";
  position: absolute; left: 0; top: .55rem;
  font-family: var(--font-display); font-weight: 700; font-size: .85rem;
  color: var(--stone); width: 2rem; text-align: right; padding-right: .6rem;
}
.award-badge {
  display: inline-block; text-indent: 0;
  font-family: var(--font-display); font-size: .72rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--white); background: var(--impact-orange);
  padding: .12rem .5rem; border-radius: 2px; margin-left: .4rem;
  vertical-align: 1px;
}

/* ---------- Media list ---------- */

.media-list { list-style: none; margin: 0; padding: 0; max-width: 54em; }
.media-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--grey);
}
.media-list li:first-child { border-top: 2px solid var(--grey); }

.m-main { min-width: 0; }

.m-title {
  font-size: 1.08rem; line-height: 1.4; font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: color .15s ease;
}
.m-title:hover, .m-title:focus-visible {
  color: var(--maroon);
  text-decoration: underline;
  text-decoration-color: var(--grey);
  text-underline-offset: 3px;
}

.m-meta {
  margin: .3rem 0 0;
  font-family: var(--font-display); font-size: .84rem; line-height: 1.45;
  color: var(--stone-dark);
}
.m-outlet { font-weight: 600; color: var(--maroon); }
.m-meta .sep { color: var(--grey); margin: 0 .5rem; }
.m-extra { font-style: italic; }

.m-date {
  flex: 0 0 auto;
  font-family: var(--font-display); font-weight: 600; font-size: .8rem;
  letter-spacing: .03em; color: var(--stone);
  white-space: nowrap; text-align: right;
  padding-top: .1rem;
}
.m-undated { font-style: italic; }

@media (max-width: 600px) {
  .media-list li { flex-direction: column; gap: .35rem; }
  .m-date { text-align: left; padding-top: 0; }
}

/* ---------- Bio page ---------- */

.bio-layout {
  display: grid; grid-template-columns: 300px 1fr; gap: clamp(2rem, 5vw, 3.5rem);
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}
.bio-rail .headshot { border: none; aspect-ratio: auto; }
.bio-rail .headshot img { position: static; width: 100%; height: auto; }
.bio-rail .headshot .initials { display: none; }
.bio-rail .headshot .initials:only-child { display: flex; position: static; aspect-ratio: 1 / 1; }
.bio-card {
  border: 1px solid var(--grey);
  padding: 1.25rem; margin-top: 1.25rem; background: var(--grey-tint);
}
.bio-card h2 {
  font-family: var(--font-display); font-size: .8rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--impact-orange);
  margin: 0 0 .75rem;
}
.bio-card ul { list-style: none; margin: 0; padding: 0; }
.bio-card li { padding: .3rem 0; font-size: .95rem; }
.bio-card .label { font-family: var(--font-display); font-weight: 700; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--stone-dark); display: block; }

.bio-main h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.7rem); color: var(--maroon);
  margin: 0 0 .5rem; letter-spacing: -0.01em;
}
.bio-main .titles { font-family: var(--font-display); font-weight: 600; color: var(--stone-dark); font-size: 1.02rem; margin: 0 0 1.75rem; line-height: 1.5; }
.bio-main .prose hr { border: 0; border-top: 1px solid var(--grey); margin: 1.5rem 0; }

@media (max-width: 780px) {
  .bio-layout { grid-template-columns: 1fr; }
  .bio-rail { max-width: 320px; }
}

/* ---------- Footer ---------- */

.site-footer { background: var(--maroon-deep); color: var(--grey); margin-top: 3rem; }
.site-footer .wrap { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.site-footer .footer-lead {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
  letter-spacing: .02em; text-transform: none; color: var(--white);
  margin: 0 0 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--maroon-shade);
}
.site-footer .affil-cols h3 {
  font-family: var(--font-display); font-size: .78rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--burnt-orange);
  margin: 0 0 .75rem;
}
.affil-cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem 2.5rem; margin-bottom: 2rem;
}
.affil-list { list-style: none; margin: 0; padding: 0; }
.affil-list a { color: var(--grey); text-decoration: none; font-family: var(--font-display); font-size: .92rem; font-weight: 500; line-height: 1.9; }
.affil-list a:hover { color: var(--white); text-decoration: underline; text-decoration-color: var(--burnt-orange); }
.footer-base { border-top: 1px solid var(--maroon-shade); padding-top: 1.25rem;
  font-family: var(--font-display); font-size: .82rem; color: var(--stone);
  display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; }
.footer-base span { color: var(--grey); }
