:root {
  --bg: #ffffff;
  --fg: #1b1b1b;
  --muted: #5f6368;
  --rule: #111111;
  --accent: #3d6fb4;
  --line: #e4e4e4;
  --card: #f6f7f9;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --fg: #e8e8e8;
    --muted: #a0a4aa;
    --rule: #e8e8e8;
    --accent: #7ea6e0;
    --line: #2c2f34;
    --card: #1d2024;
  }
}

* { box-sizing: border-box; }

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

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

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

.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px;
}
.brand { color: var(--fg); font-size: 22px; letter-spacing: 0.01em; }
.brand .light { font-weight: 300; }
.brand:hover { text-decoration: none; }
nav { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
nav a { color: var(--fg); font-size: 16px; }
nav a.active { border-bottom: 2px solid var(--rule); }
nav a:hover { text-decoration: none; color: var(--accent); }
.lang { font-size: 14px; color: var(--muted); margin-left: 6px; }
.lang a { color: var(--muted); }
.lang strong { color: var(--fg); font-weight: 600; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1fr 220px; gap: 40px;
  align-items: center; padding: 56px 0 24px;
}
.hero h1 { font-size: 52px; font-weight: 300; margin: 0; line-height: 1.1; }
.hero h1 b { font-weight: 500; }
.hero .subtitle { font-style: italic; font-size: 21px; margin: 10px 0 18px; color: var(--muted); }
.hero img { width: 220px; height: 220px; object-fit: cover; border-radius: 4px; display: block; }
.contact { font-size: 16px; color: var(--muted); line-height: 1.9; }
.contact a { color: var(--muted); border-bottom: 1px dotted var(--muted); }
.contact a:hover { color: var(--accent); text-decoration: none; }

/* Sections, in the style of the CV: thick rule before the heading */
main { padding-bottom: 48px; }
h2.section {
  display: flex; align-items: center; gap: 16px;
  font-size: 24px; font-weight: 400; margin: 44px 0 16px;
}
h2.section::before {
  content: ""; flex: 0 0 90px; height: 4px; background: var(--rule);
}
h1.page-title { font-size: 40px; font-weight: 300; margin: 48px 0 8px; }
.lead { color: var(--muted); margin-top: 0; }

ul.bullets { list-style: none; padding-left: 0; }
ul.bullets li { position: relative; padding-left: 22px; margin: 6px 0; }
ul.bullets li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 7px; height: 7px; border: 1.5px solid var(--accent); border-radius: 50%;
}

/* Publications */
.pub { padding: 18px 0; border-bottom: 1px solid var(--line); }
.pub:last-child { border-bottom: none; }
.pub .title { font-size: 19px; font-weight: 600; margin: 0 0 2px; }
.pub .authors { margin: 0; }
.pub .venue { margin: 0; font-style: italic; color: var(--muted); }
.pub .links { margin: 6px 0 0; font-size: 15px; display: flex; gap: 14px; flex-wrap: wrap; }
.pub .links a {
  border: 1px solid var(--line); padding: 1px 10px; border-radius: 3px;
}
.pub .links a:hover { border-color: var(--accent); text-decoration: none; }
details.abstract { margin-top: 8px; font-size: 16px; }
details.abstract summary { cursor: pointer; color: var(--muted); font-size: 15px; }
details.abstract p { margin: 8px 0 0; text-align: justify; }
.tag {
  display: inline-block; font-size: 13px; font-family: system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted);
  background: var(--card); padding: 1px 8px; border-radius: 3px; margin-bottom: 6px;
}

/* CV */
.cv-row { display: grid; grid-template-columns: 120px 1fr; gap: 18px; margin: 14px 0; }
.cv-row .when { text-align: right; color: var(--muted); white-space: nowrap; }
.cv-row .what p { margin: 0; }
.cv-row .org { font-weight: 600; }
.cv-row .place { font-style: italic; }
.cv-row ul.bullets { margin: 4px 0 0; }
.cv-row ul.bullets li { margin: 3px 0; }
.download { margin: 8px 0 0; }
.download a {
  display: inline-block; border: 1px solid var(--rule); color: var(--fg);
  padding: 6px 14px; border-radius: 3px; margin: 0 10px 10px 0; font-size: 16px;
}
.download a:hover { background: var(--fg); color: var(--bg); text-decoration: none; }

/* Footer */
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .wrap { padding-top: 20px; padding-bottom: 28px; }

@media (max-width: 680px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 36px; }
  .hero img { width: 160px; height: 160px; order: -1; }
  .hero h1 { font-size: 40px; }
  h2.section::before { flex-basis: 40px; }
  .cv-row { grid-template-columns: 1fr; gap: 2px; }
  .cv-row .when { text-align: left; }
  nav { gap: 16px; }
}
