@font-face {
  font-family: "Cheltenham Classic";
  src: url("fonts/CheltenhamClassic.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cheltenham Classic";
  src: url("fonts/CheltenhamClassicItalic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  size-adjust: 97%;
}

@font-face {
  font-family: "Cheltenham Classic";
  src: url("fonts/CheltenhamClassicMedium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cheltenham Classic";
  src: url("fonts/CheltenhamClassicMediumltalic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Cheltenham Classic";
  src: url("fonts/CheltenhamClassicBold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cheltenham Classic";
  src: url("fonts/CheltenhamClassicBoldltalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #fcfbfe;
  --ink: #26233f;
  --muted: #716d92;
  --indigo: #4a5bd0;
  --purple: #6f47d8;
  --lavender: #e9e5f8;
  --chip-bg: #f3f0fb;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --serif: "Cheltenham Classic", "Cheltenham", Georgia, serif;
}

* {
  box-sizing: border-box;
}

::selection {
  background: #ded5f8;
}

body {
  margin: 0 auto;
  max-width: 58rem;
  padding: 4rem 1.25rem 5rem;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* Layout: vertical sidebar nav on the left, content on the right */

.layout {
  display: grid;
  grid-template-columns: 8rem minmax(0, 42rem);
  gap: 4rem;
  align-items: start;
}

.side {
  position: sticky;
  top: 4rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  padding-top: 0.5rem;
  font-family: var(--sans);
  font-size: 0.875rem;
}

.navlink {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.navlink:hover {
  color: var(--ink);
}

.navlink.active {
  color: var(--purple);
  font-weight: 500;
}

.social {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--lavender);
}

.social a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.social a:hover {
  color: var(--purple);
}

main > :first-child {
  margin-top: 0;
}

/* Text */

h1 {
  margin: 0 0 1.5rem;
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--indigo);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: #c3b9ec;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--purple);
  text-decoration-color: var(--purple);
}

li {
  margin-bottom: 0.5rem;
}

/* Publications */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin: 1.75rem 0 0.5rem;
}

.filter {
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 0.15s ease;
}

.filter:hover {
  color: var(--ink);
}

.filter.active {
  color: var(--purple);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.bib-dl {
  margin-left: 0.45rem;
  color: var(--muted);
}

.bib-dl:hover {
  color: var(--purple);
}

.page-publications h2 {
  margin-top: 3rem;
}

.page-publications main ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-publications main li {
  margin-bottom: 1.25rem;
  font-size: 1.0625rem;
}

.tag {
  display: inline-block;
  margin-right: 0.3rem;
  padding: 0.15em 0.45em;
  border-radius: 3px;
  background: var(--chip-bg);
  color: var(--purple);
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.4;
  vertical-align: 0.15em;
}

@media (max-width: 950px) {
  .social .label {
    display: none;
  }

  .social {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.7rem;
  }
}

@media (max-width: 700px) {
  body {
    padding-top: 2rem;
  }

  .layout {
    display: block;
  }

  .side {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.1rem;
    margin-bottom: 2.5rem;
    padding-top: 0;
  }

  .social {
    gap: 0.9rem;
    margin: 0;
    padding: 0 0 0 1.1rem;
    border-top: none;
    border-left: 1px solid var(--lavender);
  }
}
