@import url("https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@400;500;600;700&family=Ubuntu+Mono&display=swap");

:root {
  color-scheme: light dark;
  --background: #fff;
  --text: #595959;
  --strong: #242424;
  --heading: #043361;
  --link: #258ec8;
  --paper-title: #2c91c3;
  --line: #e5e5e5;
  --muted: #777;
  --placeholder: #f3f6f8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 16px/1.5 "Crimson Pro", Georgia, serif;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--heading); text-decoration: underline; }
img { max-width: 100%; }
strong { color: var(--strong); font-weight: 600; }
.skip-link {
  position: absolute;
  z-index: 10;
  top: -3rem;
  left: 1rem;
  padding: .4rem .7rem;
  background: var(--background);
}
.skip-link:focus { top: .5rem; }

.home-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--background);
}
.home-topbar__inner {
  display: flex;
  align-items: center;
  gap: .25rem;
  width: min(1160px, calc(100% - 24px));
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: thin;
  white-space: nowrap;
}
.home-topbar a {
  flex: 0 0 auto;
  padding: .85rem .55rem;
  color: var(--heading);
  font-size: .88rem;
  font-weight: 600;
}
.home-topbar a:hover,
.home-topbar a:focus-visible {
  color: var(--link);
  text-decoration: none;
}

.home-wrapper {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 232px minmax(0, 650px);
  column-gap: 78px;
}
.home-sidebar {
  position: sticky;
  top: 3.5rem;
  align-self: start;
  padding-top: 2rem;
  text-align: center;
}
.profile-avatar {
  display: inline-block;
  width: 124px;
  height: 124px;
  margin-bottom: 1.15rem;
  border-radius: 50%;
  overflow: hidden;
}
.profile-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}
.home-sidebar h1 {
  margin: 0 0 1.15rem;
  color: var(--heading);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.12;
}
.home-sidebar h1 span { white-space: nowrap; }
.profile-position, .profile-affiliation { margin: 0; }
.profile-position { font-size: 1.1rem; }
.profile-affiliation { margin-top: .2rem; }
.profile-email {
  display: inline-block;
  margin-top: .25rem;
  color: var(--text);
  font: 12px/1.4 "Ubuntu Mono", ui-monospace, monospace;
  overflow-wrap: anywhere;
}
.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .65rem;
  margin-top: 1.7rem;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--heading);
  font-size: 1.15rem;
  transition: transform .15s ease;
}
.social-links a:hover { transform: translateY(-2px); text-decoration: none; }
.cv-icon { font: 700 .82rem/1 Georgia, serif; }

.home-content {
  min-width: 0;
  padding: 2rem 0 3rem;
}
.home-content section { margin-bottom: 1.6rem; scroll-margin-top: 4.5rem; }
.home-content h2 {
  margin: 0 0 .85rem;
  color: var(--heading);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.15;
}
.home-content h3 {
  margin: 1.05rem 0 .35rem;
  color: var(--heading);
  font-size: 1.05rem;
  font-weight: 600;
}
.home-content p, .home-content ul, .home-content ol { margin: 0 0 1rem; }
.home-content ul { padding-left: 1.25rem; }
.home-content li { margin-bottom: .28rem; }
.home-content section:target h2 { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .25rem; }
.inline-list { list-style: none; padding: 0 !important; }
.inline-list li { margin-bottom: .6rem; }
.experience-item { margin-bottom: 1rem; }
.experience-item p { margin: 0; }
.experience-item strong { display: block; }
.note { color: var(--muted); font-size: .9rem; }
.news-list { list-style: none; padding: 0 !important; }
.news-list li { margin-bottom: .4rem; }
.news-frame {
  height: 150px;
  min-height: 100px;
  max-height: 420px;
  overflow-y: auto;
  resize: vertical;
  padding: .7rem .9rem;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.news-frame .news-list { margin: 0; }

.publication-year-tabs {
  display: inline-flex;
  gap: .3rem;
  padding: .2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: .65rem;
}
.publication-year-tab {
  min-width: 4.5rem;
  padding: .35rem .75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--heading);
  font: 600 .94rem/1.3 "Crimson Pro", Georgia, serif;
  cursor: pointer;
}
.publication-year-tab[aria-selected="true"] {
  background: var(--heading);
  color: var(--background);
}
.publication-year-tab:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.publication-year-panel[hidden] { display: none; }
.publication-groups { margin-top: .35rem; }
.publication-group-heading {
  margin: 1.35rem 0 .85rem !important;
  padding-bottom: .25rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted) !important;
  font-size: .95rem !important;
  font-weight: 600;
}
.publication-list { list-style: none; padding: 0 !important; }
.publication-item {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
  margin: 0 0 1.2rem !important;
}
.publication-image,
.publication-placeholder {
  display: block;
  width: 145px;
  height: 96px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.publication-placeholder {
  display: grid;
  place-content: center;
  padding: .5rem;
  background: var(--placeholder);
  color: var(--heading);
  text-align: center;
  font-size: .8rem;
  line-height: 1.25;
}
.publication-placeholder span { display: block; }
.publication-title {
  margin: 0 0 .15rem !important;
  color: var(--paper-title);
  font-weight: 700;
  line-height: 1.3;
}
.publication-authors { margin: 0 0 .15rem !important; font-size: .95rem; line-height: 1.35; }
.publication-authors .author-me { color: var(--strong); font-weight: 700; }
.publication-venue { margin: 0 0 .18rem !important; font-size: .93rem; font-style: italic; }
.publication-links { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.publication-links a {
  padding: 0 .35rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text);
  font-size: .82rem;
  line-height: 1.35;
}
.publication-links a:hover { color: var(--link); border-color: var(--link); text-decoration: none; }
.publication-status { color: var(--muted); font-size: .86rem; }
.publication-links a + .publication-status::before { content: "· "; }

.home-footer {
  margin-top: 2rem;
  padding-top: .8rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 960px) {
  .home-wrapper { display: block; width: min(700px, calc(100% - 30px)); }
  .home-sidebar { position: static; padding: 2rem 0 1.5rem; }
  .home-content { border-top: 1px solid var(--line); padding-top: 1.6rem; }
}
@media (max-width: 520px) {
  .profile-avatar { width: 112px; height: 112px; }
  .home-sidebar h1 { font-size: 26px; }
  .publication-item { grid-template-columns: 106px minmax(0, 1fr); gap: .75rem; }
  .publication-image, .publication-placeholder { width: 106px; height: 82px; }
  .publication-title { font-size: .96rem; }
}
@media (max-width: 390px) {
  .publication-item { grid-template-columns: 1fr; }
  .publication-image, .publication-placeholder { width: 145px; height: 96px; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #20212b;
    --text: #dadbdf;
    --strong: #f0f1f3;
    --heading: #61c7f4;
    --link: #54b9e8;
    --paper-title: #64c5ef;
    --line: #414552;
    --muted: #b0b5bf;
    --placeholder: #2b303b;
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .social-links a { transition: none; }
}
