/* matthewnour.com mock-up. One narrow column, serif headings, one accent colour. */

:root {
  --text: #1f2328;
  --muted: #5d6670;
  --rule: #e3e6ea;
  --bg: #ffffff;
  --accent: #1d4f91;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e4e7eb;
    --muted: #9aa3ad;
    --rule: #30363d;
    --bg: #14171a;
    --accent: #8ab4f0;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--sans);
}

.wrap { max-width: 740px; margin: 0 auto; padding: 0 24px; }

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

/* Header */

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 28px 0 18px;
  border-bottom: 1px solid var(--rule);
}

.site-title { font: 600 1.15rem var(--serif); color: var(--text); }
.site-title:hover { text-decoration: none; }

.site-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.93rem; }
.site-nav a { color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

/* Introduction */

.intro { display: flex; gap: 40px; align-items: flex-start; padding: 48px 0 8px; }
.intro-text { flex: 1; min-width: 0; }

h1 { font: 600 2.3rem/1.15 var(--serif); margin: 0 0 8px; letter-spacing: -0.01em; }
.role { color: var(--muted); margin: 0 0 22px; font-size: 1.05rem; }
.intro .credentials { font-size: 0.65em; white-space: nowrap; }

.portrait { width: 190px; height: auto; flex: none; border-radius: 6px; display: block; }

.links { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 20px 0 0 -9px; list-style: none; }
.links a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 6px; color: var(--muted); }
.links a:hover { color: var(--accent); background: var(--rule); }
.links svg { width: 21px; height: 21px; }

/* Sections */

section { padding-top: 44px; }

h2 {
  font: 600 1.45rem/1.25 var(--serif);
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

h3 { font: 600 1.08rem/1.35 var(--sans); margin: 30px 0 6px; }

p { margin: 0 0 16px; }

.papers { color: var(--muted); font-size: 0.93rem; }

/* Research tabs */

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 28px 0 0; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.tabs button {
  font: inherit; font-size: 0.92rem; color: var(--muted); background: none; cursor: pointer;
  border: 1px solid var(--rule); border-radius: 999px; padding: 6px 14px;
}
.tabs button:hover { color: var(--text); border-color: var(--muted); }
.tabs button[aria-selected="true"] { color: var(--bg); background: var(--text); border-color: var(--text); }
.tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.panel { padding-top: 30px; }
.panel[hidden] { display: none; }
.panel h2 { border-bottom: 0; padding-bottom: 0; margin-bottom: 12px; }
.panel h3 { margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--rule); }

/* CV entries */

.jump { font-size: 0.95rem; }

.entry { padding: 18px 0 16px; border-bottom: 1px solid var(--rule); }
.entry:last-child { border-bottom: 0; }
.entry header { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.entry h3 { margin: 0; font-size: 1.06rem; }
.entry .when { flex: none; color: var(--muted); font-size: 0.93rem; font-variant-numeric: tabular-nums; }
.entry .org { color: var(--muted); margin: 2px 0 10px; }
.entry .block { display: flex; gap: 18px; margin-top: 8px; }
.entry h4 { flex: 0 0 7.2em; margin: 0; padding-top: 2px; font: 600 0.78rem var(--sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.entry ul { flex: 1; margin: 0; padding-left: 1.1em; font-size: 0.96rem; }
.entry li { margin-bottom: 4px; }

/* Dated rows: positions */

.rows { list-style: none; padding: 0; margin: 0; }
.rows li { display: flex; gap: 18px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.rows li:last-child { border-bottom: 0; }
.rows .when { flex: 0 0 5.2em; color: var(--muted); font-size: 0.93rem; padding-top: 1px; font-variant-numeric: tabular-nums; }
.rows .what { flex: 1; }
.rows .where { color: var(--muted); }

/* Figures */

figure { margin: 18px 0 8px; }
figure > a { display: block; }
figure img { display: block; max-width: 100%; height: auto; background: #fff; border: 1px solid var(--rule); border-radius: 4px; padding: 10px; }
figure.narrow img { width: 340px; max-width: 100%; }
figure.tall img { width: 100%; }
figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 8px; }

/* Research: study lists and collaborator logos */

.logos { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 30px; margin: 18px 0 0; }
.logos img { display: block; width: auto; }
.logos a:hover { text-decoration: none; opacity: 0.8; }
.logos .wordmark { font: 700 0.86rem/1.2 var(--sans); color: #1f2328; letter-spacing: 0.01em; }

.supporters h2 { font: 600 0.78rem var(--sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); border: 0; padding: 0; margin: 26px 0 0; }
.supporters h2:first-child { margin-top: 0; }
.supporters { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--rule); }

@media (prefers-color-scheme: dark) {
  .logos { background: #fff; padding: 14px 18px; border-radius: 6px; width: fit-content; }
}

/* Publication lists */

.pubs { list-style: none; padding: 0; margin: 0; }
.pubs li { padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 0.96rem; line-height: 1.55; }
.pubs li:last-child { border-bottom: 0; }
.pubs .title { display: block; font-weight: 600; color: var(--text); }
.pubs .authors { display: block; color: var(--muted); }
.pubs .venue { display: block; color: var(--muted); }

h2.year { font: 600 1.1rem var(--sans); border: 0; margin: 34px 0 2px; padding: 0; color: var(--muted); }

.more { margin-top: 14px; font-size: 0.95rem; }

/* Footer */

.site-footer { margin-top: 64px; padding: 22px 0 40px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.88rem; }

@media (max-width: 620px) {
  body { font-size: 16px; }
  .intro { flex-direction: column-reverse; gap: 24px; padding-top: 32px; }
  .portrait { width: 140px; }
  h1 { font-size: 1.9rem; }
  .rows li { flex-direction: column; gap: 0; }
  .rows .when { flex: none; }
  .entry header { flex-direction: column; gap: 0; }
  .entry .block { flex-direction: column; gap: 4px; }
  .entry h4 { flex: none; }
}
