:root {
  --text: #1d1d1b;
  --muted: #66645e;
  --rule: #d9d6ce;
  --bg: #fcfbf8;
  --link: #8a2a1c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6e3dc;
    --muted: #a09c93;
    --rule: #3a3936;
    --bg: #1b1a18;
    --link: #e0917f;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.55;
}

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

.site-header,
main,
.site-footer {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .25rem 1.5rem;
  padding-top: 2rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--rule);
}

.site-name { color: var(--text); font-weight: 600; }

nav a { margin-left: 1.25rem; color: var(--muted); }
nav a:first-child { margin-left: 0; }
nav a[aria-current] { color: var(--text); }

main { padding-top: 2rem; padding-bottom: 3rem; }

h1 { font-size: 1.75rem; font-weight: 600; line-height: 1.2; margin: 0 0 1rem; }

h2 {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2.25rem 0 .75rem;
}

p { margin: 0 0 1rem; }

ul { list-style: none; padding: 0; margin: 0 0 1rem; }
li { margin: 0 0 .45rem; }

/* Dated entries: the date is written first and floats to the right margin. */
li { overflow: hidden; }
li > .date {
  float: right;
  margin-left: 1.5rem;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.intro {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  margin-bottom: 2rem;
}
.portrait {
  width: 140px;
  height: auto;
  display: block;
  filter: grayscale(15%);
}
.contact { color: var(--muted); margin: 0; }

.cv-meta { color: var(--muted); margin-top: -.5rem; }

.paper { margin-bottom: 1.1rem; }
.paper-title { font-weight: 600; }

.site-footer {
  padding-top: 1rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .85rem;
}

@media (max-width: 600px) {
  body { font-size: 17px; }
  .site-header { padding-top: 1.25rem; }
  nav a { margin-left: 0; margin-right: 1rem; }
  .intro { flex-direction: column; align-items: flex-start; }
  .portrait { width: 120px; }
  li > .date { float: none; display: block; margin-left: 0; font-size: .9em; }
}

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header nav, .site-footer { display: none; }
  a { color: #000; }
}
