@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,650&family=Manrope:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg-base: #f4f4ef;
  --ink: #111111;
  --ink-soft: #111111;
  --panel: rgba(255, 255, 255, 0.86);
  --line: #d6d7ce;
  --brand: #0b4e8a;
  --brand-soft: #0a3d6a;
  --accent: #cf8f2e;
  --shadow: 0 18px 36px rgba(32, 42, 59, 0.12);
}

body {
  background: #fafaf8;
  color: var(--ink-soft);
  font: 16px/1.7 "Manrope", sans-serif;
}

body::before {
  display: none;
}

.wrapper {
  width: min(940px, calc(100vw - 40px));
  margin: 0 auto;
  padding-top: calc(var(--top-menu-offset, 86px) + env(safe-area-inset-top));
  display: block;
}

header {
  position: static;
  float: none;
  width: auto;
  padding: 2px 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  animation: card-in 520ms ease-out;
  margin-bottom: 18px;
  text-align: left;
}

.image.avatar {
  float: left;
  margin: 0 14px 8px 0;
}

section {
  float: none;
  width: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: card-in 600ms ease-out;
}

footer {
  position: static;
  float: none;
  width: auto;
  color: #6d7280;
  margin-top: 20px;
  text-align: left;
}

h1, h2, h3 {
  color: var(--ink);
}

h1 {
  font-family: "Fraunces", serif;
  font-size: 34px;
  font-weight: 650;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}

h2 {
  margin-top: 30px;
  font-family: "Fraunces", serif;
  font-weight: 650;
  font-size: 26px;
  border-bottom: 1px solid #e3e4db;
  padding-bottom: 8px;
}

p, li {
  color: var(--ink-soft);
}

section p {
  margin-bottom: 6px;
  line-height: 1.45;
}

section p:last-of-type {
  margin-bottom: 0;
}

strong, autocolor {
  color: var(--ink);
  font-weight: 700;
}

a {
  color: var(--brand);
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--brand-soft);
}

email,
code,
pre {
  font-family: "IBM Plex Mono", monospace;
}

.image.avatar img {
  width: 130px;
  padding: 8px;
  border: 1px solid #e3e4dc;
  box-shadow: none;
}

header h1 {
  margin: 2px 0 6px;
}

header position,
header email {
  display: inline-block;
  margin-right: 10px;
  vertical-align: middle;
}

.social-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-top: 0;
  vertical-align: middle;
}

.social-icons a {
  border: 1px solid #d6d7ce;
  background: #fff;
  color: var(--brand) !important;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.social-icons a:hover {
  background: #fff;
  color: var(--brand) !important;
  box-shadow: 0 10px 18px rgba(31, 78, 105, 0.18);
  transform: translateY(-2px) scale(1.06);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media print, screen and (max-width: 960px) {
  .wrapper {
    width: auto;
    padding-top: calc(var(--top-menu-offset, 86px) + env(safe-area-inset-top));
  }

  header,
  section,
  footer {
    width: auto;
    position: static;
    float: none;
  }

  header,
  section {
    border-radius: 18px;
  }

  header {
    margin-bottom: 8px;
    padding: 0;
    text-align: center;
  }

  .image.avatar {
    float: none;
    margin: 0 0 8px 0;
  }

  header position,
  header email {
    display: block;
    margin-right: 0;
  }

  .social-icons {
    display: flex;
    justify-content: center;
    margin-top: 8px;
  }

  section {
    margin-top: 0;
    padding: 0;
  }
}

@media print, screen and (max-width: 480px) {
  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 23px;
  }

  .image.avatar img {
    width: 120px;
    padding: 10px;
  }

  .wrapper {
    width: auto;
    margin: 0;
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media print, screen and (max-width: 760px) {
  .pub-row {
    display: block;
  }

  .publications ol.bibliography li .teaser {
    width: 100%;
    height: auto;
    margin-left: 0;
    max-width: 320px;
  }

  .publications ol.bibliography li .abbr {
    height: auto;
  }
}
