:root {
  --text: #1d1d1f;
  --muted: #5f6368;
  --rule: #e3e3e3;
  --link: #1f4e8c;
  --bg: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6e6e6;
    --muted: #a0a0a0;
    --rule: #333333;
    --link: #8ab4f8;
    --bg: #161616;
  }
}

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

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

body {
  margin: 0 auto;
  max-width: 44rem;
  padding: 0 1.25rem;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

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

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding: 2rem 0 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.site-title { color: var(--text); font-size: 1.25rem; font-weight: 600; }
.site-title:hover { text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-header nav a { color: var(--muted); }
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { color: var(--text); }

/* Typography */
h1, h2 { line-height: 1.3; font-weight: 600; }
h1 { font-size: 1.6rem; margin: 0 0 1rem; }
h2 { font-size: 1.2rem; margin: 2.5rem 0 0.75rem; }
p, ul, ol, dl { margin: 0 0 1rem; }
ul { padding-left: 1.25rem; }
li { margin-bottom: 0.35rem; }
.muted { color: var(--muted); }

/* Home */
.portrait {
  float: right;
  width: 150px;
  height: auto;
  margin: 0.3rem 0 1rem 1.5rem;
  border-radius: 4px;
}
.links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; clear: both; padding-top: 0.5rem; }

/* Publications */
.pubs { list-style: none; padding: 0; }
.pub { margin-bottom: 1.25rem; }
.pub > span { display: block; }
.pub-title { font-weight: 500; }
.pub-authors, .pub-venue { color: var(--muted); font-size: 0.94rem; }
.pub-authors strong { color: var(--text); font-weight: 600; }
.pub-links { font-size: 0.85rem; }
.pub-links a { margin-right: 0.75rem; }
.pub-links a::before { content: "["; color: var(--muted); }
.pub-links a::after { content: "]"; color: var(--muted); }
h2.year { color: var(--muted); font-size: 1rem; margin-top: 2rem; }

/* CV */
.cv { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.6rem 1rem; }
.cv dt { color: var(--muted); font-variant-numeric: tabular-nums; }
.cv dd { margin: 0; }

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .portrait { width: 110px; margin-left: 1rem; }
  .cv { grid-template-columns: 1fr; gap: 0; }
  .cv dd { margin-bottom: 0.75rem; }
}
