:root {
  color-scheme: light;
  --ink: #19212c;
  --blue: #234dab;
  --accent: var(--blue);
  --accent-light: #e6eeff;
  --fg: var(--ink);
  --subtext: #525c65;
  --mono-font: "JetBrains Mono", monospace;
  --rule: #ccd0d3;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: #faf9f6;
  font: 1rem/1.5 var(--sans);
}
.sheet {
  --sheet-width: 76rem;
  --page-padding: clamp(1.25rem, 6vw, 5rem);
  --back-size: 46px;
  --back-right: max(clamp(1.75rem, 6vw, 5rem), env(safe-area-inset-right));
  --outer-margin: max(0px, (100% - var(--sheet-width)) / 2);
  max-width: var(--sheet-width);
  margin: auto;
  padding: 0 var(--page-padding) 4rem;
  /* Keep the reading column and its links clear of the fixed control. */
  padding-right: max(var(--page-padding), calc(var(--back-right) + var(--back-size) + .625rem - var(--outer-margin)));
}
.sheet--author-gas {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}
.sheet--author-gas main {
  position: relative;
  isolation: isolate;
  flex: 1;
}
.author-gas {
  position: absolute;
  inset: .75rem 3rem;
  z-index: -1;
  pointer-events: none;
  user-select: none;
}
.author-gas span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  white-space: nowrap;
  color: var(--ink);
  color: oklch(.48 .09 var(--hue));
  opacity: .3;
  font: 600 .8125rem/1 var(--sans);
}
.author-gas-note { color: var(--subtext); font-family: var(--serif); font-style: italic; }
.author-gas-credits {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 4.5rem;
  border-bottom: 1px solid var(--ink);
}
.masthead a { display: inline-flex; align-items: center; gap: .6rem; padding-block: .5rem; text-decoration: none; }
.signature { font: 600 1.18rem var(--serif); letter-spacing: -.035em; }
.signature i {
  width: .72rem;
  height: 1rem;
  border: 1px solid var(--blue);
  background: #faf9f6;
  transform: skewY(-12deg);
  box-shadow: -3px 2px #faf9f6, -4px 3px var(--blue);
}
.back { font-size: .86rem; }
.back span, .imprint, .abstract h2 { color: var(--blue); }
.paper-back {
  position: fixed;
  z-index: 2;
  right: var(--back-right);
  /* Reserve the dock even when the player is closed. */
  bottom: calc(max(12px, env(safe-area-inset-bottom)) + 7.75rem);
  display: grid;
  place-items: center;
  width: var(--back-size);
  height: var(--back-size);
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: #faf9f6;
  box-shadow: 0 2px 8px #19212c12;
  font: 1.35rem/1 var(--sans);
  text-decoration: none;
}
.paper-back:hover { border-color: var(--blue); text-decoration: none; }
@media (max-width: 620px) {
  .paper-back {
    bottom: calc(max(8px, env(safe-area-inset-bottom)) + 6.75rem);
  }
}
.paper-header { padding: clamp(1.45rem, 4vw, 3.3rem) 0 clamp(1.3rem, 3vw, 2.25rem); }
p, h1, h2, figure { margin: 0; }
.imprint, aside h2 {
  font: 600 .72rem/1.5 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.imprint span { margin-inline: .35em; }
h1 {
  width: fit-content;
  max-width: 32ch;
  margin: .55rem 0 .8rem;
  font: 500 clamp(2.05rem, 4.4vw, 3.65rem)/1.04 var(--serif);
  letter-spacing: -.043em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.authors { max-width: 78ch; font-size: clamp(.98rem, 1.55vw, 1.14rem); }
.columns {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, .32fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding-top: 1.55rem;
  border-top: 1px solid var(--rule);
}
.columns::before {
  content: "";
  position: absolute;
  top: -1px;
  width: 3rem;
  height: 2px;
  background: var(--blue);
  transform-origin: left;
}
.abstract h2 { margin-bottom: .45rem; font: italic 1.45rem/1.3 var(--serif); }
.abstract p { max-width: 69ch; font: 1.18rem/1.65 var(--serif); }
.abstract figure { margin-top: 1.8rem; padding: clamp(.6rem, 2vw, 1.5rem); background: white; border: 1px solid var(--rule); }
.abstract img { display: block; width: 100%; height: auto; }
aside { align-self: start; border-left: 1px solid var(--rule); padding-left: 1.5rem; }
aside h2 { margin-bottom: .65rem; color: #535c66; }
.venue { font: 1.16rem/1.32 var(--serif); }
.citation { margin-top: .45rem; color: #525c65; font-size: .84rem; }
.resources { display: grid; margin-top: 1.25rem; }
.resources a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--rule);
  padding-block: .62rem;
  text-decoration: none;
  color: var(--blue);
  font: 500 .88rem/1.5 var(--sans);
}
.resources a::after { content: "↗" / ""; }
.resources a:hover, .back:hover { text-decoration: underline; text-underline-offset: .22em; }
@media (max-width: 46rem) {
  .masthead { min-height: 3.5rem; }
  .columns { grid-template-columns: 1fr; gap: 1.8rem; padding-top: 1rem; }
  .abstract p { font-size: 1.1rem; line-height: 1.57; }
  aside { padding: 1.1rem 0 0; border-left: none; border-top: 1px solid var(--rule); }
}
@media (prefers-reduced-motion: no-preference) {
  .author-gas span {
    animation: paper-author-drift 16s ease-in-out var(--drift-delay) infinite alternate;
  }
  @keyframes paper-author-drift {
    33% { transform: translate(-50%, -50%) translate(var(--drift-x), var(--drift-y)); }
    66% { transform: translate(-50%, -50%) translate(calc(var(--drift-x) * -.7), calc(var(--drift-y) * .85)); }
    100% { transform: translate(-50%, -50%) translate(calc(var(--drift-x) * .35), calc(var(--drift-y) * -.55)); }
  }
  .sheet > main { animation: paper-content-enter 220ms cubic-bezier(.22, 1, .36, 1) both; }
  @keyframes paper-content-enter {
    from { opacity: .72; transform: translateY(5px); }
  }
  .columns::before { animation: draw-rule 400ms ease-out both; }
  .back span, .resources a::after { transition: transform 180ms ease; }
  .back:hover span { transform: translateX(-3px); }
  .resources a:hover::after { transform: translate(2px, -2px); }
  @keyframes draw-rule { from { transform: scaleX(0); } }
}
