:root {
  --ink: #494e52;
  --muted: #7a8288;
  --line: #f2f3f3;
  --accent: #52adc8;
  --accent-dark: #3e8296;
  --paper: #ffffff;
  --soft: #f8f9f9;
  --max-width: 1280px;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--paper);
  color-scheme: light;
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 3px;
  content: "";
  background: var(--accent);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .18s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
}

img { max-width: 100%; height: auto; }

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 200;
  padding: .65rem 1rem;
  color: #fff;
  background: var(--ink);
  border-radius: 3px;
}

.skip-link:focus { top: 1rem; }

.masthead {
  position: relative;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
}

.masthead__inner {
  display: flex;
  align-items: center;
  max-width: var(--max-width);
  min-height: 74px;
  margin: 0 auto;
  padding: .75rem 1.5rem;
}

.site-title {
  flex: 0 0 auto;
  margin-right: auto;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

.site-title:hover { color: var(--ink); text-decoration: none; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 38px;
  padding: 9px 8px;
  border: 0;
  background: var(--muted);
  border-radius: 3px;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 26px;
  height: 3px;
  background: #fff;
  content: "";
}

.nav-toggle span { position: relative; }
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: .15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  position: relative;
  display: block;
  margin: 0 .55rem;
  padding: .55rem .1rem;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  content: "";
  background: #bdc1c4;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .18s ease;
}

.site-nav a:hover { color: #5c6266; text-decoration: none; }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--ink); }

.site-shell {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  gap: 3rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.15rem 1.5rem 4rem;
}

.profile { min-width: 0; }

.profile__sticky {
  position: sticky;
  top: 2rem;
}

.profile__photo {
  width: 178px;
  height: 178px;
  object-fit: cover;
  object-position: 50% 41%;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
}

.profile__name {
  margin: 1.15rem 0 .3rem;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.25;
}

.profile__role {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: .88rem;
  line-height: 1.55;
}

.profile__address {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: .78rem;
  font-style: normal;
  line-height: 1.55;
}

.profile__links {
  margin: 0;
  padding: .9rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.profile__links li { margin: 0 0 .42rem; }

.profile__links a {
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  color: var(--ink);
  font-size: .79rem;
}

.profile__links a:hover { color: var(--accent-dark); }

.profile__icon {
  display: inline-grid;
  flex: 0 0 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.profile__icon svg {
  width: 1.05rem;
  height: 1.05rem;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.profile__icon--github svg { fill: #171516; stroke: none; }
.profile__icon--linkedin { color: #0077b5; }

.profile__icon--orcid {
  display: inline-grid;
  width: 1rem;
  height: 1rem;
  place-items: center;
  color: #fff;
  background: #a6ce39;
  border-radius: 50%;
  font-size: .6rem;
  font-weight: 800;
}

.page { min-width: 0; max-width: 920px; }

.page-header {
  margin-bottom: 1.5rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--line);
}

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

h1 { margin: 0; font-size: 1.58rem; }
h2 { margin: 2.25rem 0 .8rem; font-size: 1.25rem; }
h3 { margin: 1.6rem 0 .45rem; font-size: 1rem; }

p { margin: 0 0 1.25rem; }

.lede { font-size: 1.01rem; line-height: 1.72; }

.small-note,
.page-subtitle {
  color: var(--muted);
  font-size: .82rem;
}

.page-subtitle { margin: .4rem 0 0; }

.news-list,
.content-list,
.publication-list,
.cv-list {
  margin: 0;
  padding-left: 1.25rem;
}

.news-list li,
.content-list li,
.cv-list li {
  margin-bottom: .82rem;
  padding-left: .25rem;
}

.news-list time { font-weight: 700; }

.publication-list {
  list-style: decimal;
}

.publication-list li {
  margin-bottom: 1.15rem;
  padding-left: .3rem;
  line-height: 1.6;
}

.paper-links { white-space: nowrap; }
.paper-links a { margin-left: .12rem; font-size: .86rem; font-weight: 600; }

.cv-section { padding-bottom: .25rem; }

.talk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.3rem;
}

.talk-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.talk-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1.61 / 1;
  object-fit: cover;
  background: var(--soft);
}

.talk-card__body { padding: 1rem 1rem .9rem; }
.talk-card h2 { margin: 0 0 .5rem; font-size: 1rem; }
.talk-card p { margin: 0 0 .4rem; font-size: .83rem; }
.talk-card .award { color: #986b00; font-weight: 700; }

.research-media {
  overflow: hidden;
  margin: 1.2rem 0 1.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.research-media img { display: block; width: 100%; }

.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: #111;
  border-radius: 4px;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.visitor-counter {
  display: inline-block;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--soft);
}

.visitor-counter img { display: block; max-width: 100%; margin: 0 auto; }

.home-update {
  margin: 2.5rem 0 0;
  color: var(--muted);
  font-size: .75rem;
}

.footer {
  padding: 2rem 1.5rem;
  color: #fff;
  background: #7a8288;
  font-size: .74rem;
}

.footer__inner { max-width: var(--max-width); margin: 0 auto; }
.footer a { color: #fff; text-decoration: underline; }

@media (min-width: 48em) {
  html { font-size: 18px; }
}

@media (max-width: 980px) {
  .site-shell { grid-template-columns: 210px minmax(0, 1fr); gap: 2rem; }
  .profile__photo { width: 150px; height: 150px; }
  .site-nav a { margin: 0 .35rem; font-size: .83rem; }
}

@media (max-width: 780px) {
  .masthead__inner { flex-wrap: wrap; min-height: 64px; padding: .7rem 1rem; }
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; padding-top: .55rem; }
  .site-nav.is-open { display: block; }
  .site-nav ul { display: grid; grid-template-columns: repeat(2, 1fr); }
  .site-nav a { margin: 0; padding: .65rem .4rem; border-bottom: 1px solid var(--line); }
  .site-nav a::after { display: none; }
  .site-shell { display: block; padding: 1.5rem 1rem 3rem; }
  .profile__sticky { position: static; display: grid; grid-template-columns: 118px 1fr; gap: 1.25rem; margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
  .profile__photo { grid-row: 1 / span 5; width: 118px; height: 118px; }
  .profile__name { margin: .15rem 0 .25rem; }
  .profile__role { margin-bottom: .55rem; }
  .profile__address { margin-bottom: .5rem; }
  .profile__links { display: flex; flex-wrap: wrap; gap: .2rem 1rem; padding-top: .5rem; }
  .profile__links li { margin: 0; }
  .talk-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .profile__sticky { display: block; text-align: center; }
  .profile__photo { width: 130px; height: 130px; }
  .profile__links { justify-content: center; }
}

@media print {
  body::before,
  .masthead,
  .profile,
  .footer { display: none !important; }
  .site-shell { display: block; max-width: none; padding: 0; }
  .page { max-width: none; }
  a { color: inherit; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .72em; }
}
