:root {
  --ink: #202a34;
  --muted: #535e69;
  --link: #235279;
  --rule: #dce1e5;
  --strong-rule: #aeb8c1;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font: 1.0625rem/1.6 Cambria, Georgia, "Times New Roman", serif;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--ink);
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.page {
  max-width: 56rem;
  margin-inline: auto;
  padding: clamp(2rem, 6.5vw, 5rem) clamp(1.25rem, 5vw, 2rem) 3.5rem;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1.5rem;
  margin-bottom: clamp(1.85rem, 4.5vw, 3.25rem);
}

.site-header h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5.25vw, 3.5rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.affiliation {
  grid-column: 1;
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font: 0.875rem/1.55 var(--sans);
}

.identity-links {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
}

.site-bio {
  grid-column: 1 / -1;
  max-width: 65ch;
  margin: 0.85rem 0 0;
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid var(--muted);
  padding-bottom: 0.5rem;
}

.section-heading-row h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.2;
}

.section-heading-row > a,
.paper-date,
.paper-pdf {
  font: 0.875rem/1.5 var(--sans);
}

.paper-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.paper-entry {
  display: grid;
  grid-template-columns: 6.75rem minmax(0, 1fr) auto;
  grid-template-areas: "date title pdf"
                       ". summary .";
  align-items: baseline;
  gap: 0.2rem 1.25rem;
  border-bottom: 1px solid var(--rule);
  padding: 0.82rem 0;
}

.paper-title {
  grid-area: title;
  margin: 0;
  font-size: 1.16rem;
  font-weight: 400;
  line-height: 1.35;
}

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

.paper-title a:hover,
.paper-title a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

.paper-summary {
  grid-area: summary;
  max-width: 63ch;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.42;
}

.paper-date {
  grid-area: date;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.paper-pdf {
  grid-area: pdf;
  justify-self: end;
}

.paper-page {
  max-width: 47rem;
  padding-top: clamp(1.5rem, 5vw, 3.5rem);
}

.back-nav,
.article-facts,
.site-footer {
  color: var(--muted);
  font: 0.875rem/1.55 var(--sans);
}

.back-nav {
  margin-bottom: 2rem;
}

.article-header {
  border-bottom: 1px solid var(--strong-rule);
  padding-bottom: 1.35rem;
  margin-bottom: 1.85rem;
}

.article-header h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4.6vw, 2.9rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.article-byline {
  margin: 0.75rem 0 0.3rem;
}

.article-facts {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.article-links {
  margin-top: 0.85rem;
  overflow-wrap: anywhere;
}

.article-section {
  margin-bottom: 1.85rem;
}

.article-section h2 {
  margin: 0 0 0.45rem;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
}

.article-section p {
  margin: 0 0 0.7rem;
}

.article-section p:last-child {
  margin-bottom: 0;
}

.theorem-block + .theorem-block {
  margin-top: 0.9rem;
}

.theorem-block h3 {
  margin: 0 0 0.15rem;
  font-size: 1em;
  font-weight: 600;
}

sup,
sub {
  font-size: 0.75em;
  line-height: 0;
}

.display-math {
  margin: 0.5rem 0;
  padding: 0 0.8rem 0.25rem;
}

.display-math,
.table-wrap,
.bibtex {
  max-width: 100%;
  overflow-x: auto;
}

.math-table {
  margin: 0.6rem 0 0.35rem;
  border-collapse: collapse;
  border-block: 1px solid var(--strong-rule);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.math-table th,
.math-table td {
  padding: 0.35rem 0.85rem 0.35rem 0.25rem;
  text-align: left;
  vertical-align: top;
}

.math-table th {
  border-bottom: 1px solid var(--rule);
}

.bibtex {
  margin: 0;
  padding: 0.7rem 0;
  border-block: 1px solid var(--rule);
  font: 0.84rem/1.6 Consolas, "Liberation Mono", monospace;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}

@media (max-width: 36rem) {
  .site-header {
    display: block;
  }

  .identity-links {
    margin-top: 0.65rem;
  }

  .paper-entry {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title pdf"
                         "summary summary"
                         "date date";
    column-gap: 0.85rem;
  }

  .paper-title {
    font-size: 1.1rem;
  }

  .paper-date {
    margin-top: 0.2rem;
  }

  .back-nav {
    margin-bottom: 1.5rem;
  }
}

@media print {
  body {
    color: #000;
    font-size: 11pt;
  }

  .page {
    max-width: none;
    padding: 0;
  }

  a {
    color: #000;
  }

  .paper-entry,
  .theorem-block {
    break-inside: avoid;
  }
}
