/* Single-column, content-first layout. No frameworks, no web fonts, no JS. */

:root {
  --measure: 46rem;
  --fg: #1a1a1a;
  --fg-muted: #5c5c5c;
  --bg: #fdfdfc;
  --accent: #0b5b8a;
  --rule: #e2e0dc;
  --tag-bg: #eeece7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e6e4e0;
    --fg-muted: #a3a09a;
    --bg: #16171a;
    --accent: #74b6dd;
    --rule: #33353a;
    --tag-bg: #262830;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  max-width: var(--measure);
  font: 1rem/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-style: dotted; }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 600; }
h1 { font-size: 1.7rem; margin: 0 0 0.5rem; }
h2 {
  font-size: 1.2rem;
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--rule);
}
h3 { font-size: 1rem; margin: 1.75rem 0 0.4rem; }

/* Sub-positions inside one employer on the CV. */
h4 { font-size: 0.95rem; margin: 1.3rem 0 0.1rem; }
h4 + .meta { margin-bottom: 0.3rem; }

p { margin: 0 0 1rem; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

/* ---- header / nav / footer ---- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}

.site-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--fg);
  text-decoration: none;
}

.site-nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.site-nav a { color: var(--fg-muted); text-decoration: none; font-size: 0.95rem; }
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--fg); font-weight: 600; }

.site-footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--fg-muted);
}
.site-footer p { margin: 0 0 0.35rem; }
.footer-links a { color: var(--fg-muted); }

/* ---- home page ---- */

.intro { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.intro-text { flex: 1 1 20rem; }
.intro-text .lede { font-size: 1.1rem; margin-bottom: 0.75rem; }
/* The frame is the full desk scene, not a head-and-shoulders shot, so it needs
   more width than a portrait would: at anything narrower the face and the
   stickers both turn to mush. */
.intro .portrait {
  flex: 0 0 auto;
  width: 14rem;
  height: auto;
  border-radius: 4px;
}

.subtitle { color: var(--fg-muted); margin-top: -0.25rem; }

.meta { font-size: 0.9rem; color: var(--fg-muted); }

/* ---- bibliography & talk lists ---- */

.biblio { list-style: none; margin: 0; padding: 0; }
.biblio > li {
  margin-bottom: 1.1rem;
  padding-left: 3.2rem;
  text-indent: -3.2rem; /* hanging indent, the way a reference list should read */
}
.biblio .authors { }
.biblio .btitle { font-weight: 600; }
.biblio .venue { color: var(--fg-muted); }
.biblio .refs { white-space: nowrap; }
.biblio .refs a {
  font-size: 0.8rem;
  padding: 0.05rem 0.4rem;
  margin-left: 0.25rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--tag-bg);
  text-decoration: none;
}

.year-group { display: flex; gap: 1rem; align-items: baseline; }
.year-group .year {
  flex: 0 0 3rem;
  font-variant-numeric: tabular-nums;
  color: var(--fg-muted);
  font-weight: 600;
}

/* ---- project cards ---- */

.project { margin-bottom: 2rem; }
.project h3 { margin-top: 0; }
.project .status {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.05rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  background: var(--tag-bg);
  border-radius: 3px;
  vertical-align: 0.15em;
}

.note {
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--rule);
  color: var(--fg-muted);
  font-size: 0.92rem;
}

/* ---- print: /cv should come out as a clean document ---- */

@media print {
  :root { --fg: #000; --fg-muted: #333; --bg: #fff; --accent: #000; --rule: #bbb; --tag-bg: #fff; }
  body { max-width: none; padding: 0; font-size: 10.5pt; }
  .site-nav, .site-footer, .biblio .refs { display: none; }
  a { text-decoration: none; }
  h2 { margin-top: 1.2rem; page-break-after: avoid; }
  .biblio > li { page-break-inside: avoid; margin-bottom: 0.5rem; }
}
