/* ============================================================
   Academic website stylesheet
   Accent color: MSU green (#18453B).
   To change the whole site's color scheme, edit --accent below.
   ============================================================ */

:root {
  --accent: #18453B;        /* MSU green */
  --accent-soft: #eaf1ef;   /* pale green tint for the header band */
  --text: #1f2421;          /* near-black body text */
  --muted: #5c6660;         /* secondary gray-green text */
  --rule: #dde4e1;          /* hairline borders */
  --bg: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
}

/* ---------- Header band ---------- */

header {
  background: var(--accent-soft);
  border-bottom: 3px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 24px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
}

.site-name {
  margin: 0;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--accent);
}

.site-name a {
  color: inherit;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 22px;
  font-size: 16px;
}

nav a {
  color: var(--accent);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}

nav a:hover { border-bottom-color: var(--accent); }

nav a.active {
  font-weight: 600;
  border-bottom-color: var(--accent);
}

/* ---------- Main content ---------- */

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 24px;
}

.intro {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.portrait {
  width: 430px;
  flex-shrink: 0;
  border-radius: 6px;
  display: block;
}

.bio {
  font-size: 17px;
}

.bio p { margin: 0 0 1em; }

.bio p:last-child { margin-bottom: 0; }

.market {
  font-weight: 700;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover { color: #0d2a24; }

h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--accent);
  margin: 2em 0 0.75em;
}

main > h2:first-child { margin-top: 0; }

/* ---------- Research page ---------- */

/* Full-width alternating bands. main.banded drops the usual page width so
   each band can run edge to edge; .band-inner keeps the text column. */
main.banded {
  max-width: none;
  padding: 0;
}

.band {
  padding: 44px 0;
}

.band:last-child {
  padding-bottom: 24px;
}

.band-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.band-inner > h2:first-child { margin-top: 0; }
.band-inner > :last-child { margin-bottom: 0; }

.band-shaded {
  background: var(--accent-soft);
  border-top: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
}

/* Job market paper line under the title */
.paper-tag {
  margin: 4px 0 10px;
}

.jmp-label {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--accent);
}

/* Work-in-progress status, next to the coauthor line, set off by a thin rule */
.wip-label {
  display: inline-block;
  margin-left: 10px;
  padding-left: 12px;
  border-left: 1px solid #b9c7c2;
  line-height: 1.2;
  font-style: italic;
  font-weight: 600;
  font-size: 16px;
  color: var(--accent);
}

/* Short status note ("Draft coming soon!"), set off by a thin rule */
.paper-status {
  display: inline-block;
  margin-left: 10px;
  padding-left: 12px;
  border-left: 1px solid #b9c7c2;
  line-height: 1.2;
  color: var(--muted);
  font-size: 16px;
}

/* Funding callout: green bar + tint so it stands out from the abstract */
.supported {
  width: fit-content;
  max-width: 100%;
  margin: 16px 0 0;
  padding: 8px 18px 8px 14px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 4px 4px 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.supported strong {
  color: var(--accent);
  font-weight: 600;
}

/* White section with thin gray dividers above and below, matching the
   footer line. Swap "band-divided" for "band-shaded" in research.html
   to get the green-shaded look instead. */
.band-divided {
  padding: 0;
}

.band-divided > .band-inner {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding-top: 44px;
  padding-bottom: 44px;
}

/* Inside a shaded band, flip the callout to white so it still pops */
.band-shaded .supported { background: var(--bg); }

.mediacov {
  margin: -1em 0 1.25em;
  color: var(--muted);
  font-size: 16px;
}

.paper {
  margin: 0 0 1.75em;
}
.paper-title {
  font-weight: 600;
  margin: 0;
  font-size: 24px;
  line-height: 1.35;
}
.paper-meta {
  color: var(--muted);
  margin: 2px 0 6px;
  font-size: 16px;
}
.paper-abstract {
  margin: 6px 0 0;
  font-size: 17px;
}
.citation {
  margin: 0 0 1.25em;
  font-size: 17px;
}

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

/* When a divided section is the last one on the page, let the footer
   line serve as its bottom divider (avoids a double line) */
.band-divided:last-child > .band-inner {
  border-bottom: 0;
  padding-bottom: 0;
}

/* Teaching experience: institution, then role, then course rows */
.teach-inst {
  max-width: 780px;
  margin: 0 0 2.25em;
}

.inst-name {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.35;
}

.teach-role {
  margin: 14px 0 2px;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 19px;
  color: var(--accent);
}

.course-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.course-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 24px;
  padding: 3px 0;
  font-size: 17px;
}

.course-terms {
  color: var(--muted);
  font-size: 16px;
}

/* Student feedback */
.subhead {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.35;
}

.subhead-note {
  max-width: 780px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  max-width: 780px;
  margin: 0 0 2.75em;
}

.stat {
  border-left: 3px solid var(--accent);
  padding: 2px 0 2px 16px;
}

.stat p { margin: 0; }

.stat-num {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 40px;
  line-height: 1.1;
  color: var(--accent);
}

.stat-outof {
  margin-left: 6px;
  font-family: "Source Sans 3", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 17px;
  color: var(--muted);
}

.stat-label {
  margin-top: 6px !important;
  font-size: 16px;
  line-height: 1.4;
}

/* Click-through comments. All comments sit in the same spot so the box
   stays the height of the longest one and nothing jumps when you click. */
.quotes { max-width: 820px; }

.quote-slides {
  position: relative;
  display: grid;
  padding: 52px 44px 30px;
  background: var(--accent-soft);
  border-radius: 6px;
}

.quote-slides::before {
  content: "\201C";
  position: absolute;
  top: 14px;
  left: 40px;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 64px;
  line-height: 1;
  color: var(--accent);
}

.quote-slide {
  grid-area: 1 / 1;
  align-self: center;
  margin: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.quote-slide.is-active {
  visibility: visible;
  opacity: 1;
}

.quote-slide blockquote {
  margin: 0;
  font-size: 20px;
  line-height: 1.55;
}

.quote-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
}

.quote-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent);
  cursor: pointer;
}

.quote-btn:hover {
  background: var(--accent);
  color: #fff;
}

.quote-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.quote-count {
  min-width: 4.5em;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .quote-slide { transition: none; }
}

@media (max-width: 620px) {
  .stats { grid-template-columns: 1fr; gap: 18px; }
  .quote-slides { padding: 48px 22px 24px; }
  .quote-slides::before { left: 20px; }
  .quote-slide blockquote { font-size: 18px; }
}

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

footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 24px 48px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

footer a { color: var(--accent); }

/* ---------- Small screens ---------- */

@media (max-width: 620px) {
  .intro { flex-direction: column; }
  .portrait { width: 100%; max-width: 320px; }
  .header-inner { padding-top: 22px; }
  .site-name { font-size: 26px; }
}