:root {
  color-scheme: light;
  --paper: #f7f3ee;
  --ink: #2e2a25;
  --heading: #1a1714;
  --muted: #75695f;
  --rule: #d9d0c5;
  --chip: #ede8e1;
  --link: #0645ad;
  --button: #2e2a25;
  --button-text: #f7f3ee;
}

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

html {
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.75;
}

a {
  color: var(--link);
  text-underline-offset: 0.16em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  border-radius: 2px;
  outline: 3px solid #c17b32;
  outline-offset: 4px;
}

.page-shell {
  width: min(100% - 56px, 760px);
  margin: 0 auto;
  padding: 48px 0 80px;
}

.back-link {
  display: inline-block;
  margin-bottom: 48px;
  color: var(--muted);
  font-size: 14px;
}

.publication-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 2.4px;
  line-height: 1.4;
  text-transform: uppercase;
}

h1 {
  max-width: 730px;
  margin: 0;
  color: var(--heading);
  font-size: clamp(34px, 5.2vw, 52px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 28px 0 0;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-size: 14px;
}

.metadata span:not(:last-child)::after {
  margin-left: 22px;
  color: var(--rule);
  content: "/";
}

.metadata a {
  color: inherit;
}

.abstract {
  margin-top: 52px;
}

h2 {
  margin: 0 0 16px;
  color: var(--heading);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 2.2px;
  text-transform: uppercase;
}

.abstract p {
  margin: 0;
  color: #3e3832;
  font-size: 18px;
}

.keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.keywords li {
  padding: 3px 9px;
  border-radius: 2px;
  background: var(--chip);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 17px;
  border: 1px solid var(--button);
  border-radius: 2px;
  background: var(--button);
  color: var(--button-text);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: var(--button);
}

.paper-preview {
  margin: 64px 0 0;
}

.paper-preview img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  background: #fff;
}

.paper-preview figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

footer {
  margin-top: 64px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 12px;
}

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

  .page-shell {
    width: min(100% - 36px, 760px);
    padding: 28px 0 56px;
  }

  .back-link {
    margin-bottom: 34px;
  }

  h1 {
    font-size: clamp(29px, 9.2vw, 40px);
  }

  .metadata {
    display: grid;
    gap: 5px;
    margin-top: 22px;
  }

  .metadata span:not(:last-child)::after {
    content: none;
  }

  .abstract {
    margin-top: 40px;
  }

  .abstract p {
    font-size: 16px;
  }

  .actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .paper-preview {
    margin-top: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
