/* ------------------------------------------------------------------
   David Bryant — shared site stylesheet
   Edit colours / type here once; every page picks up the change.
------------------------------------------------------------------ */
:root {
  --ink:      #1a1a17;
  --muted:    #5c5a52;
  --faint:    #8a8780;
  --rule:     #ddd9cf;
  --paper:    #f7f5ef;
  --card:     #ffffff;
  --accent:   #7a2a1d;   /* deep brick, used sparingly */
  --measure:  44rem;     /* readable line length */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  font-size: 19px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 6rem;
}

/* ---- Navigation ---- */
nav {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  margin-bottom: 3rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
}
nav a {
  color: var(--muted);
  text-decoration: none;
  margin-right: 1.4rem;
  white-space: nowrap;
}
nav a:hover { color: var(--accent); }
nav a.here { color: var(--ink); font-weight: 700; }

/* ---- Masthead ---- */
header.page { margin-bottom: 2.5rem; }

h1 {
  font-size: 2.4rem;
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}

.role {
  font-size: 1.02rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
.role .pos  { color: var(--ink); font-weight: 600; }
.role .inst { font-style: italic; }
.role .creds { display: block; font-size: 0.92rem; margin-bottom: 0.35rem; }

/* ---- Section headings ---- */
h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
section { margin-top: 3rem; }
p { margin: 0 0 1.1rem; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration: none; }

/* ---- CV / positions list ---- */
ul.cv { list-style: none; margin: 0; padding: 0; }
ul.cv li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
  display: flex; flex-wrap: wrap;
  gap: 0.2rem 1rem;
  justify-content: space-between; align-items: baseline;
}
ul.cv li:last-child { border-bottom: 0; }
ul.cv .what  { flex: 1 1 22rem; }
ul.cv .where { color: var(--muted); font-size: 0.95rem; }
ul.cv .year  {
  color: var(--faint); font-size: 0.9rem;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ---- Callout ---- */
.callout {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 1.4rem 1.6rem; border-radius: 2px;
}
.callout h3 { margin: 0 0 0.8rem; font-size: 1.15rem; font-weight: 600; }
.callout p:last-child { margin-bottom: 0; }

/* ---- Publication list ---- */
ol.pubs { list-style: none; margin: 0; padding: 0; counter-reset: none; }
ol.pubs li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.97rem;
  line-height: 1.5;
}
ol.pubs li:last-child { border-bottom: 0; }
ol.pubs .yr { color: var(--faint); font-variant-numeric: tabular-nums; }
ol.pubs .venue { font-style: italic; color: var(--muted); }
.subhead {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em;
  font-weight: 700; color: var(--faint); margin: 2rem 0 0.4rem;
}

/* ---- Software / group cards ---- */
.item { padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.item:last-child { border-bottom: 0; }
.item h3 { margin: 0 0 0.35rem; font-size: 1.1rem; font-weight: 600; }
.item p  { margin: 0 0 0.4rem; font-size: 0.97rem; }
.item .links a { font-size: 0.9rem; margin-right: 1rem; }
.person { margin-bottom: 0.6rem; }
.person .name { font-weight: 600; }
.person .detail { color: var(--muted); font-size: 0.95rem; }

footer {
  margin-top: 4rem; padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  color: var(--faint); font-size: 0.85rem;
}

@media (max-width: 480px) {
  body { font-size: 18px; }
  h1 { font-size: 2rem; }
  nav a { margin-right: 1rem; }
}

/* journal / arXiv links on publication entries */
ol.pubs .lnk { font-size: 0.82rem; white-space: nowrap; }
ol.pubs .lnk a { color: var(--accent); }


.masthead {
  display: flex;
  align-items: center;   /* vertically centres the photo against the text */
  gap: 1.5rem;
}

.portrait {
  width: 120px;
  height: 120px;
  object-fit: cover;     /* crops a non-square photo neatly */
  border-radius: 50%;    /* circle; delete this line for a plain square */
  flex-shrink: 0;        /* keeps the photo from squashing */
}

