/* ---------- Design tokens ---------- */
:root {
  --bg: #ffffff;
  --text: #111111;
  --text-muted: #6b6b6b;
  --text-faint: #9a9a9a;
  --border: #d8d8d4;
  --link: #4b9cd3; /* UNC Carolina Blue */
  --navy: #13294b; /* UNC Navy */
  --max-width: 880px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Base size lives on the root element only. Every other size below is
   expressed in rem, so it scales proportionally off this one value. */
html {
  scroll-behavior: smooth;
  font-size: 19px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

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

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid transparent;
  z-index: 10;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.brand {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--navy);
}

.brand:hover { text-decoration: none; opacity: 0.75; }

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  /* only override top/bottom padding here -- left/right must stay
     inherited from .container, or the hero text loses its 24px side
     padding and drifts out of alignment with every section below it */
  padding-top: 56px;
  padding-bottom: 8px;
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 28px;
}

.hero img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.hero-heading { min-width: 0; }

.hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.hero .role {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0;
}

.hero .role a { color: var(--text-muted); text-decoration: underline; text-decoration-color: var(--border); }

.hero p {
  margin: 0 0 16px;
  color: var(--text);
  max-width: 62ch;
}

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 6px;
  margin: 22px 0 4px;
  font-size: 0.92rem;
}

.links-row a {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
}

.links-row a:hover {
  border-color: var(--link);
  color: var(--link);
  text-decoration: none;
}

/* ---------- Divider ---------- */
hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 52px 0;
}

/* ---------- Section ---------- */
.section { padding-bottom: 4px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--navy);
}

.section-head .count {
  color: var(--text-faint);
  font-size: 0.85rem;
}

/* ---------- Research agenda ---------- */
.research-agenda {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
  max-width: 66ch;
  margin: 0 0 32px;
}

/* ---------- Job Market Paper callout ---------- */
.jmp-card {
  border-left: 3px solid var(--link);
  background: rgba(75, 156, 211, 0.08);
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
  margin-bottom: 32px;
}

.jmp-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--link);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 10px;
}

.jmp-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
  color: var(--navy);
}

/* ---------- Paper list ---------- */
.paper {
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.paper:first-child { border-top: none; padding-top: 0; }

.paper-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.4;
}

/* click-to-expand paper title: text flush-left, chevron trails so
   the title text lines up with headings and body copy above it. */
button.paper-title {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  background: none;
  border: none;
  padding: 0;
  margin: 0 0 4px;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

button.paper-title .chevron {
  display: inline-block;
  color: var(--text-faint);
  font-weight: 400;
  transition: transform 0.15s ease;
  flex: 0 0 auto;
}

button.paper-title[aria-expanded="true"] .chevron {
  transform: rotate(90deg);
}

button.paper-title:hover { color: var(--link); }

.paper-title-static { cursor: default; }

.status-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
  flex: 0 0 auto;
}

.paper-meta {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0 0 10px;
}

.paper-plain .paper-meta,
.paper-plain .paper-title { margin-bottom: 0; }

.paper-presented {
  color: var(--link);
  font-size: 0.84rem;
  font-weight: 500;
  margin: 0 0 10px;
}

.paper-abstract {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 10px 0 0;
  max-width: 62ch;
}

.paper-abstract[hidden] { display: none; }

.ssrn-link { white-space: nowrap; }

/* ---------- Interesting Reads ---------- */
.read-item {
  padding: 4px 0;
}

.read-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  margin: 0 0 4px;
}

.read-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.read-title a { color: var(--navy); }
.read-title a:hover { color: var(--link); }

/* ---------- Simple lists (Teaching) ---------- */
.plain-item {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.plain-item:first-child { border-top: none; padding-top: 0; }

.plain-item .title { font-weight: 600; font-size: 0.98rem; margin: 0 0 3px; color: var(--navy); }
.plain-item .meta { color: var(--text-muted); font-size: 0.88rem; margin: 0; }

.empty-state {
  color: var(--text-muted);
  font-size: 0.94rem;
}

@media (max-width: 480px) {
  .nav-links { gap: 14px; }
  .hero-top { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ---------- Scroll-in reveal ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 48px;
  padding: 24px 0 56px;
  color: var(--text-faint);
  font-size: 0.82rem;
}

.site-footer p { margin: 0 0 4px; }
.site-footer p:last-child { margin-bottom: 0; }
.site-footer .last-updated { font-size: 0.78rem; }
