/* Site stylesheet (replaces the old Minimal Mistakes theme for all pages using layout: page) */
:root {
  --text: #222;
  --muted: #6b6b6b;
  --accent: #bc360a;     /* same rust as the CV */
  --rule: #e6e2dd;
  --bg: #ffffff;
  --serif: "Crimson Pro", Georgia, serif;   /* web cousin of the CV's Cochineal */
  --sans: "Source Sans 3", -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--sans); }
.wrap { max-width: 840px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
sup { line-height: 0; }
img { max-width: 100%; height: auto; }

/* header with page tabs */
header { border-bottom: 1px solid var(--rule); }
header .wrap { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding-top: 22px; }
.site-name { font: 500 28px/1.1 var(--serif); color: var(--text); letter-spacing: 0.2px; padding-bottom: 14px; }
.site-name:hover { text-decoration: none; }
nav { display: flex; gap: 22px; }
nav a { color: var(--text); font-size: 16px; padding: 0 0 12px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
nav a:hover { color: var(--accent); text-decoration: none; }
nav a.current { color: var(--accent); border-bottom-color: var(--accent); }

/* headings and body text */
main { padding-bottom: 10px; }
h1 { font: 500 32px/1.2 var(--serif); margin: 34px 0 10px; }
.lede { color: var(--muted); margin: 0 0 8px; max-width: 700px; }
h2 { font: 500 27px/1.2 var(--serif); margin: 38px 0 16px; }
h3 { font: 600 21px/1.25 var(--serif); margin: 0 0 8px; }
main p { margin: 0 0 12px; }
main ul, main ol { padding-left: 1.3em; }
main li { margin: 0 0 6px; }

/* about */
.intro { display: grid; grid-template-columns: 190px 1fr; gap: 28px; align-items: start; margin-top: 34px; }
.intro img { width: 190px; height: 190px; object-fit: cover; border-radius: 6px; }
.intro .who { font: 500 21px/1.3 var(--serif); margin: 2px 0 2px; }
.intro .who span { color: var(--muted); font-size: 17px; }
.intro .role { color: var(--muted); margin: 0 0 12px; }
.links { font-size: 15.5px; margin: 0 0 14px; }
.links a { white-space: nowrap; }
.links span { color: #bbb; margin: 0 7px; }

/* dated lists (news, teaching): date column, like the CV */
ul.dated { list-style: none; margin: 0; padding: 0; }
.dated li { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 5px 0; margin: 0; }
.dated .d { color: var(--muted); font-variant-numeric: tabular-nums; }
.dated .note { display: block; color: var(--muted); font-size: 15.5px; }

/* research rows: figure + text, papers underneath */
.theme { display: grid; grid-template-columns: 38% 1fr; gap: 28px; padding: 26px 0; border-top: 1px solid var(--rule); }
.theme:first-of-type { border-top: 0; }
.theme.nofig { grid-template-columns: 1fr; }
.theme figure { margin: 0; }
.theme figure img { display: block; width: 100%; border-radius: 4px; }
.theme figure img + img { margin-top: 14px; }
.theme figcaption { color: var(--muted); font-size: 13px; line-height: 1.4; margin-top: 6px; }
.label { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 14px 0 4px; }
ul.key { font-size: 15.5px; margin: 6px 0 0; padding: 0; list-style: none; }
.key li { margin: 0 0 6px; }
.key .t { color: var(--text); font-weight: 600; }
.key .t:hover { color: var(--accent); text-decoration: none; }
.key .v { color: var(--muted); font-style: italic; }

/* publications */
h2.year { font: 500 21px/1.2 var(--serif); color: var(--muted); margin: 28px 0 8px; }
.pub { margin: 0 0 14px; }
.pub .t { display: block; color: var(--text); font-weight: 600; line-height: 1.4; }
.pub .t:hover { color: var(--accent); text-decoration: none; }
.pub .a { color: var(--muted); font-size: 15.5px; }
.pub .a b { color: var(--text); font-weight: 600; }
.pub .v { font-style: italic; }
.tags { font-size: 14.5px; }
.tags a { margin-right: 10px; }

/* teaching */
.photo { margin: 14px 0 4px; }
.photo img { width: 100%; border-radius: 4px; }
.photo figcaption { color: var(--muted); font-size: 14.5px; font-style: italic; margin-top: 4px; }

footer { border-top: 1px solid var(--rule); margin-top: 40px; padding: 18px 0 30px; color: var(--muted); font-size: 14px; }

@media (max-width: 700px) {
  .intro { grid-template-columns: 1fr; }
  .intro img { width: 150px; height: 150px; }
  .theme { grid-template-columns: 1fr; gap: 14px; }
  .theme figure { order: 2; }   /* on phones, heading and text come before the figures */
  .dated li { grid-template-columns: 84px 1fr; }
  nav { gap: 16px; }
}
