:root {
  --bg: #ffffff;
  --fg: #4a4a4a;
  --heading: #222222;
  --muted: #7a7a7a;
  --primary: #00a388;
  --secondary: #dc3522;
  --link: #4285f4;
  --rule: #e4e4e8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #222222;
    --fg: #ffffff;
    --heading: #efefef;
    --muted: #a8a8a8;
    --link: #dc3522;
    --rule: #3a3a3a;
  }
}

@font-face {
  font-family: "Montserrat";
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/Montserrat-Light.woff") format("woff");
}
@font-face {
  font-family: "Montserrat";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/Montserrat-Medium.woff") format("woff");
}
/* Ubuntu: add fonts/Ubuntu-Medium.ttf (see README). Until then, a system sans-serif is used. */
@font-face {
  font-family: "Ubuntu";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: local("Ubuntu Medium"), local("Ubuntu-Medium"), url("/fonts/Ubuntu-Medium.ttf") format("truetype");
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 300 16px/1.7 "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

h1, h2, h3, .site-title {
  font-family: "Ubuntu", "Trebuchet MS", "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 500;
}

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

/* Content */
main { padding-top: 2.5rem; padding-bottom: 3rem; }

h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 0.25rem; color: var(--heading); }
h2 { font-size: 1.45rem; margin: 2.5rem 0 0.5rem; color: var(--heading); }
h2::after { content: ""; display: block; width: 2.5rem; height: 3px; margin-top: 0.3rem; background: var(--primary); }
h3 { font-size: 1rem; margin: 1.75rem 0 0.4rem; color: var(--primary); }
h1 + .subtitle { margin: 0 0 1.5rem; color: var(--muted); font-size: 1.15rem; }

ul { padding-left: 1.2rem; margin: 0.4rem 0 0; }
li { margin: 0.35rem 0; }

/* Home intro */
.intro {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  align-items: flex-start;
}
.intro .text { flex: 1 1 20rem; }
.intro .photo { flex: 0 0 11rem; margin: 0; }
.intro .photo img { width: 100%; height: auto; border-radius: 6px; display: block; }
.intro p { margin: 0 0 0.9rem; }

/* Side images on the CV and Talks pages */
.side-photo { float: right; width: 11rem; margin: 0 0 1rem 1.5rem; }
.side-photo img { width: 100%; height: auto; border-radius: 6px; display: block; }
.side-photo.large { width: 17rem; }
@media (max-width: 34rem) {
  .side-photo { float: none; margin: 0 0 1.25rem; width: 9rem; }
  .side-photo.large { width: 14rem; }
}

/* Publications and talks */
ul.plain { list-style: none; padding-left: 0; }
ul.plain li { margin: 0.9rem 0; }
.num { color: var(--muted); white-space: nowrap; }
.note { color: var(--muted); font-size: 0.92rem; }

/* CV */
.cv-link { display: inline-block; margin-top: 0.25rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .wrap { padding-top: 1rem; padding-bottom: 2rem; }
.site-footer p { margin: 0.2rem 0; }
