:root {
  --text: #494e52;
  --heading: #2f3437;
  --muted: #7a8288;
  --border: #f2f3f3;
  --link: #52adc8;
  --link-hover: #2b7f97;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1.5em;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

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

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

.masthead {
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1em 1.5em;
}

.site-title {
  color: var(--heading);
  font-size: 17px;
  font-weight: 700;
}

.site-title:hover,
.site-title:focus-visible {
  color: var(--heading);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.8em;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.site-nav a {
  color: var(--muted);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #000;
  text-decoration: none;
}

.site-nav .is-active {
  color: #000;
}

.page {
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  gap: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.5em 1.5em 4em;
}

.publications-page {
  grid-template-columns: 220px minmax(0, 760px) 72px;
  gap: 48px;
}

.sidebar {
  min-width: 0;
}

.author-profile {
  position: sticky;
  top: 2em;
  text-align: center;
}

.author-avatar {
  display: block;
  width: 150px;
  height: 150px;
  margin: 0 auto 1.4em;
  border-radius: 50%;
  object-fit: cover;
}

.author-profile h1 {
  margin: 0;
  color: var(--heading);
  font-size: 21px;
  line-height: 1.2;
}

.author-bio {
  margin: 0.45em 0 0;
  color: var(--muted);
  font-size: 13px;
}

.author-note {
  margin: 1em auto 0;
  max-width: 200px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.author-links {
  margin: 1.4em 0 0;
  padding: 1.2em 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
  text-align: left;
}

.author-links li,
.author-links a {
  display: flex;
  align-items: center;
  gap: 0.55em;
}

.author-links a {
  color: var(--muted);
}

.author-links a:hover,
.author-links a:focus-visible {
  color: var(--link-hover);
}

.visitor-map {
  display: flex;
  justify-content: center;
  margin-top: 1.2em;
  opacity: 0.72;
}

.visitor-map:hover,
.visitor-map:focus-within {
  opacity: 1;
}

.visitor-map[hidden] {
  display: none;
}

.visitor-map img,
.visitor-map canvas,
.visitor-map iframe {
  max-width: 110px;
  height: auto;
}

.link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.6em;
  width: 1.6em;
  height: 1.6em;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.archive {
  min-width: 0;
}

.year-sidebar {
  order: 3;
  min-width: 0;
}

.year-nav {
  position: sticky;
  top: 2em;
  display: flex;
  flex-direction: column;
  gap: 0.25em;
  padding-left: 1em;
  border-left: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
}

.year-nav a {
  display: block;
  padding: 0.25em 0;
  color: var(--muted);
}

.year-nav a:hover,
.year-nav a:focus-visible {
  color: var(--link-hover);
  text-decoration: none;
}

.page-section {
  margin-bottom: 3em;
  padding-bottom: 2em;
  border-bottom: 1px solid var(--border);
}

.page-section:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

.page-title {
  margin: 0 0 0.75em;
  color: var(--heading);
  font-size: 30px;
  line-height: 1.15;
}

h2 {
  margin: 0 0 1em;
  color: var(--heading);
  font-size: 20px;
  line-height: 1.25;
}

h3 {
  margin: 0;
  color: var(--heading);
  font-size: 15px;
  line-height: 1.35;
}

p {
  margin: 0 0 1em;
}

.compact-list {
  margin: 0;
  padding-left: 1.2em;
}

.compact-list li + li {
  margin-top: 0.3em;
}

.archive-item {
  margin-bottom: 1.6em;
}

.archive-item p {
  margin: 0.35em 0 0;
}

.archive-date,
.pub-year {
  margin: 0 0 0.3em;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pub-item {
  position: relative;
  scroll-margin-top: 1.5em;
  padding: 1.05em 0 1.05em;
  border-bottom: 1px solid var(--border);
}

.pub-item:last-child {
  border-bottom: 0;
}

.pub-item h3 {
  margin-bottom: 0.35em;
}

.pub-authors,
.pub-venue {
  margin: 0.25em 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.pub-authors strong {
  color: var(--heading);
  font-weight: 700;
}

.pub-venue span {
  white-space: nowrap;
}

.page-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5em 2em;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 860px) {
  .page {
    grid-template-columns: 1fr;
    gap: 2.5em;
    padding-top: 2em;
  }

  .publications-page {
    grid-template-columns: minmax(0, 1fr) 56px;
    gap: 2.5em 1.5em;
    padding-top: 2em;
  }

  .publications-page .sidebar {
    grid-column: 1 / -1;
  }

  .publications-page .archive {
    grid-column: 1;
    grid-row: 2;
  }

  .year-sidebar {
    grid-column: 2;
    grid-row: 2;
    order: 0;
  }

  .publications-page .year-nav {
    position: sticky;
    top: 1.2em;
    flex-direction: column;
    gap: 0.25em;
    padding: 0 0 0 0.8em;
    border-bottom: 0;
    border-left: 1px solid var(--border);
  }

  .publications-page .year-nav a {
    padding: 0.2em 0;
    border: 0;
    border-radius: 0;
  }

  .author-profile {
    position: static;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 1em 1.25em;
    text-align: left;
  }

  .author-avatar {
    width: 96px;
    height: 96px;
    margin: 0;
  }

  .author-note {
    max-width: none;
    margin-left: 0;
  }

  .author-links {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em 1.4em;
    margin-top: 0.3em;
  }

  .visitor-map {
    grid-column: 1 / -1;
    justify-content: flex-start;
    margin-top: 0.2em;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 13.5px;
  }

  .masthead-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.7em;
    padding: 0.9em 1.1em;
  }

  .site-nav {
    gap: 1.2em;
  }

  .page {
    padding: 1.7em 1.1em 3em;
  }

  .publications-page {
    grid-template-columns: 1fr;
    gap: 1.4em;
  }

  .publications-page .archive {
    grid-column: 1;
    grid-row: auto;
    order: 3;
  }

  .publications-page .year-sidebar {
    grid-column: 1;
    grid-row: auto;
    order: 2;
  }

  .publications-page .year-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.45em;
    padding: 0 0 1em;
    border-left: 0;
    border-bottom: 1px solid var(--border);
  }

  .publications-page .year-nav a {
    padding: 0.25em 0.65em;
    border: 1px solid var(--border);
    border-radius: 999px;
  }

  .page-title {
    font-size: 25px;
  }

  h2 {
    font-size: 18px;
  }
}
