:root {
  color-scheme: light;
  --paper: #fbfaf7;
  --ink: #111110;
  --accent: #ff8528;
  --muted: #66645f;
  --rule: rgba(17, 17, 16, 0.25);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: "Spectral", Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

.meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.masthead,
.colophon {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  width: calc(100% - 8vw);
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.25rem 0;
}

.masthead {
  border-bottom: 1px solid var(--ink);
}

.masthead span:nth-child(2),
.colophon span:last-child {
  text-align: right;
}

.masthead span:nth-child(2) {
  text-align: center;
}

.masthead span:last-child {
  text-align: right;
}

main {
  flex: 1;
  width: calc(100% - 8vw);
  max-width: 1200px;
  margin: 0 auto;
}

.introduction {
  max-width: 850px;
  padding: clamp(5rem, 13vh, 9rem) 0 clamp(4rem, 10vh, 7rem);
}

.kicker {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.kicker a {
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(3.4rem, 8vw, 6.5rem);
  font-weight: 300;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.standfirst {
  max-width: 660px;
  margin-bottom: 0;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 300;
  line-height: 1.45;
}

.catalogue {
  padding-bottom: clamp(5rem, 12vh, 9rem);
}

.catalogue-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.8rem;
}

.catalogue-heading h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.catalogue-heading p {
  margin: 0;
  color: var(--muted);
}

.empty-catalogue {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  border-bottom: 1px solid var(--rule);
  padding: 2.5rem 0 4rem;
}

.empty-catalogue p {
  max-width: 360px;
  margin: 0;
}

.empty-catalogue p:first-child::before {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.8rem;
  border-radius: 50%;
  background: var(--accent);
  content: "";
  vertical-align: 0.12em;
}

.empty-catalogue p:last-child {
  color: var(--muted);
  font-style: italic;
}

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

.paper-list li {
  border-bottom: 1px solid var(--rule);
}

.paper-entry {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(220px, 1.2fr) minmax(260px, 1.8fr) auto;
  gap: 2rem;
  align-items: start;
  padding: 2rem 0;
  text-decoration: none;
}

.paper-entry-meta {
  display: flex;
  flex-direction: column;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  line-height: 1.8;
  text-transform: uppercase;
}

.paper-title {
  font-size: 1.6rem;
  line-height: 1.25;
}

.paper-abstract {
  color: var(--muted);
  line-height: 1.55;
}

.read-paper {
  white-space: nowrap;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.paper-entry:hover .paper-title,
.paper-entry:hover .read-paper {
  color: var(--accent);
}

.paper-header {
  max-width: 880px;
  padding: clamp(4rem, 11vh, 8rem) 0 3rem;
}

.paper-header h1 {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 1.05;
}

.paper-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 2rem;
  color: var(--muted);
}

.paper-content {
  max-width: 700px;
  padding: 2rem 0 4rem;
  border-top: 1px solid var(--ink);
}

.paper-content h2 {
  margin: 3rem 0 1rem;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.3;
}

.paper-content h3 {
  margin: 2.5rem 0 1rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.paper-content p,
.paper-content li {
  font-variant-numeric: oldstyle-nums;
}

.paper-content blockquote {
  margin: 2rem 0;
  border-left: 1px solid var(--accent);
  padding-left: 1.5rem;
  font-style: italic;
}

.paper-content table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.paper-content th,
.paper-content td {
  border-bottom: 1px solid var(--rule);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.paper-content th {
  border-bottom-color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.paper-content code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85em;
}

.return-link {
  display: inline-block;
  margin-bottom: 5rem;
  text-decoration: none;
}

.colophon {
  border-top: 1px solid var(--ink);
}

.colophon span:first-child {
  grid-column: 1 / 3;
}

.reveal {
  animation: reveal 0.8s var(--ease) both;
}

.reveal:nth-child(2) {
  animation-delay: 0.12s;
}

.reveal:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 850px) {
  .paper-entry {
    grid-template-columns: 1fr 2fr;
  }

  .paper-entry-meta {
    grid-column: 1;
    grid-row: 1;
  }

  .paper-title {
    grid-column: 2;
  }

  .paper-abstract {
    grid-column: 2;
  }

  .read-paper {
    grid-column: 2;
  }
}

@media (max-width: 600px) {
  html {
    font-size: 17px;
  }

  .masthead,
  .colophon,
  main {
    width: calc(100% - 2.5rem);
  }

  .masthead,
  .colophon {
    grid-template-columns: 1fr auto;
    gap: 0.75rem 1rem;
  }

  .masthead span:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }

  .colophon span:first-child {
    grid-column: 1 / -1;
  }

  .colophon span:last-child {
    grid-column: 1 / -1;
    text-align: left;
  }

  .empty-catalogue,
  .paper-entry {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .paper-entry-meta,
  .paper-title,
  .paper-abstract,
  .read-paper {
    grid-column: 1;
  }

  .paper-entry-meta {
    flex-direction: row;
    gap: 1rem;
  }

  .paper-content {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
  }
}

@media print {
  .masthead,
  .colophon,
  .return-link {
    display: none;
  }

  main,
  .paper-content {
    width: 100%;
    max-width: none;
  }

  .paper-content {
    border: 0;
  }
}
