/* Lato, self-hosted so the site never falls back to a different face. Same
   font Jon Barron's site uses. Files from Google Fonts (Lato v25). */
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/lato-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/lato-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/lato-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/lato-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #5a5a5a;
  --faint: #767676;
  --rule: #e6e6e6;
  --box: #fafafa;
  --link: #1772d0;
  --badge-bg: #eef2f9;
  --badge-fg: #1772d0;
  --me: #111111;
}

/* Dark palette applies when the OS prefers dark and the visitor has not forced
   light, or when the visitor explicitly forces dark with the toggle. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171a;
    --fg: #e8e8e8;
    --muted: #a7abb2;
    --faint: #8b9098;
    --rule: #2a2e33;
    --box: #1b1e22;
    --link: #7aa7f0;
    --badge-bg: #20262e;
    --badge-fg: #7aa7f0;
    --me: #ffffff;
  }
}

:root[data-theme="dark"] {
  --bg: #15171a;
  --fg: #e8e8e8;
  --muted: #a7abb2;
  --faint: #8b9098;
  --rule: #2a2e33;
  --box: #1b1e22;
  --link: #7aa7f0;
  --badge-bg: #20262e;
  --badge-fg: #7aa7f0;
  --me: #ffffff;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Lato", Verdana, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 4rem;
}

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

a:hover {
  color: #f09228;
}

p {
  margin: 0 0 0.85rem;
}

h1 {
  font-size: 2rem;
  font-weight: 400;
  margin: 0 0 0.6rem;
  line-height: 1.2;
  text-align: center;
}

h2 {
  font-size: 1.375rem;
  font-weight: 400;
  margin: 2.4rem 0 0.8rem;
}

h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
}

/* Header: bio on the left, photo and links on the right (Jon Barron layout). */
.intro {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.intro-text {
  flex: 1 1 auto;
  min-width: 0;
}

.intro-side {
  flex: 0 0 34%;
  max-width: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.avatar {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
}

.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.1rem;
  font-size: 0.95rem;
}

.intro-side .links {
  justify-content: center;
  gap: 0.3rem 0.9rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  cursor: pointer;
  line-height: 0;
}

.theme-toggle:hover {
  opacity: 0.75;
}

#about {
  margin-top: 1.75rem;
}

/* News */
.news {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.news li {
  display: flex;
  gap: 0.85rem;
  margin: 0.4rem 0;
}

.date {
  flex: 0 0 5rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.news-item {
  flex: 1;
  min-width: 0;
}

/* Publications */
.pub {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin: 0 0 1.75rem;
}

.pub-thumb {
  width: 240px;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--rule);
  flex-shrink: 0;
}

.pub-body {
  min-width: 0;
}

.authors {
  margin: 0 0 0.3rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.me {
  color: var(--me);
  font-weight: 600;
}

.venue {
  margin: 0 0 0.45rem;
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.12rem 0.5rem;
  border-radius: 0.3rem;
  background: var(--badge-bg);
  color: var(--badge-fg);
  text-decoration: none;
}

.badge:hover {
  text-decoration: none;
  filter: brightness(0.97);
}

.summary {
  margin: 0 0 0.45rem;
  font-size: 0.97rem;
}

.pub-links a {
  margin-right: 1rem;
  font-size: 0.95rem;
}

/* Entry lists (experience, teaching, talks, projects) */
.entries {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entry {
  margin: 0 0 1rem;
}

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.role {
  font-weight: 600;
}

.when {
  color: var(--faint);
  font-size: 0.9rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.entry-desc {
  margin: 0.1rem 0 0;
  color: var(--muted);
}

.more {
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

/* Footer */
footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--faint);
  font-size: 0.88rem;
}

footer p {
  margin: 0 0 0.2rem;
}

@media (max-width: 560px) {
  main {
    padding-top: 2.25rem;
  }

  .intro {
    flex-direction: column;
    gap: 1.5rem;
  }

  .intro-side {
    max-width: 200px;
    align-self: center;
  }

  .links {
    justify-content: center;
  }

  .date {
    flex-basis: 4.5rem;
  }

  .pub {
    flex-direction: column;
  }

  .pub-thumb {
    width: 100%;
  }

  .entry-head {
    flex-direction: column;
    gap: 0;
  }
}
