:root {
  --paper: #fffaf0;
  --paper-deep: #f5ead7;
  --ink: #1e1b19;
  --ink-soft: #5f554e;
  --coral: #ff756d;
  --coral-deep: #d94746;
  --gold: #f1bd45;
  --mint: #78c7a4;
  --blue: #78a9df;
  --line: rgba(45, 34, 28, .16);
  --white: rgba(255, 255, 255, .76);
  --shadow: 0 24px 70px rgba(98, 58, 38, .14);
  --shadow-small: 0 12px 30px rgba(98, 58, 38, .11);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --round: "Avenir Next Rounded", "SF Pro Rounded", "Avenir Next", "Trebuchet MS", sans-serif;
  --body: "Avenir Next", Avenir, "Gill Sans", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --measure: 76rem;
  --gutter: clamp(1rem, 4vw, 3rem);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: clip;
  scroll-behavior: smooth;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 5%, rgba(255, 117, 109, .19), transparent 29rem),
    radial-gradient(circle at 92% 25%, rgba(241, 189, 69, .2), transparent 30rem),
    linear-gradient(180deg, #fffaf0 0%, #fffdf8 50%, #f9efdf 100%);
}

.paper-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .34;
  background-image:
    linear-gradient(rgba(77, 52, 40, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 52, 40, .025) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration-thickness: .09em;
  text-underline-offset: .18em;
}

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

button,
input {
  font: inherit;
}

img {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: .7rem;
  left: .7rem;
  z-index: 100;
  padding: .65rem .9rem;
  border-radius: .7rem;
  background: var(--ink);
  color: white;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-header,
.site-footer,
main {
  width: min(100%, var(--measure));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--round);
  font-size: .94rem;
  font-weight: 850;
  letter-spacing: -.02em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 1.35rem;
  height: 1.35rem;
  border: 2px solid var(--ink);
  border-radius: 42% 58% 55% 45%;
  background: var(--coral);
  transform: rotate(8deg);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  top: .38rem;
  width: .18rem;
  height: .18rem;
  border-radius: 50%;
  background: var(--ink);
  content: "";
}

.brand-mark::before {
  left: .3rem;
}

.brand-mark::after {
  right: .3rem;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(.8rem, 3vw, 1.7rem);
}

.site-header nav a {
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .78rem;
  font-weight: 760;
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--ink);
}

main {
  min-height: calc(100vh - 12rem);
  padding: 0 var(--gutter) clamp(5rem, 9vw, 9rem);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .75rem;
  font-weight: 700;
}

.site-footer p {
  margin: 0;
}

.site-footer p:first-child {
  color: var(--ink);
  font-size: .9rem;
}

.site-footer p:last-child {
  display: flex;
  gap: .55rem;
}

.eyebrow {
  margin: 0 0 .7rem;
  color: var(--coral-deep);
  font-family: var(--round);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: .72rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--round);
  font-size: .75rem;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

.button-dark {
  background: var(--ink);
  color: white;
}

.button-dark:hover {
  background: var(--coral-deep);
  border-color: var(--coral-deep);
}

.button-plain {
  background: rgba(255, 255, 255, .4);
}

.button-plain:hover {
  background: white;
}

/* Home */

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(16rem, .8fr);
  align-items: center;
  gap: clamp(2rem, 8vw, 8rem);
  min-height: min(780px, calc(100vh - 5rem));
  padding: clamp(3rem, 8vw, 7rem) 0;
}

.hero-copy {
  animation: rise .7s both cubic-bezier(.2, .8, .2, 1);
}

.hero-copy h1 {
  max-width: 12ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 8.2vw, 7.4rem);
  font-weight: 700;
  letter-spacing: -.065em;
  line-height: .88;
}

.hero-lede {
  max-width: 38rem;
  margin: 1.8rem 0 0;
  color: #4f4540;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.52;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 2rem;
}

.hero-creature {
  position: relative;
  width: min(100%, 25rem);
  justify-self: center;
  animation: rise .7s .14s both cubic-bezier(.2, .8, .2, 1);
}

.hero-creature::before {
  position: absolute;
  inset: 9% -9% 1%;
  z-index: -1;
  border-radius: 50%;
  background: rgba(255, 117, 109, .22);
  content: "";
  filter: blur(36px);
}

.hero-creature img {
  display: block;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 42% 58% 48% 52% / 45% 45% 55% 55%;
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
  animation: float 6s 1s infinite ease-in-out;
}

.hero-creature p {
  width: fit-content;
  margin: 1rem auto 0;
  padding: .55rem .75rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: rgba(255, 255, 255, .62);
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .69rem;
  font-weight: 760;
  transform: rotate(-2deg);
}

.orbit {
  position: absolute;
  z-index: -1;
  border: 1px dashed rgba(30, 27, 25, .2);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-one {
  inset: -7% -14% 4%;
  transform: rotate(22deg);
}

.orbit-two {
  inset: 8% -25% -11%;
  transform: rotate(-19deg);
}

.featured-section,
.latest-section {
  padding-top: clamp(4rem, 8vw, 8rem);
}

.section-heading {
  max-width: 48rem;
  margin-bottom: 1.5rem;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5.2vw, 5rem);
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: .95;
}

.section-heading-inline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  max-width: none;
  gap: 1rem;
}

.section-heading-inline > a {
  flex: 0 0 auto;
  margin-bottom: .45rem;
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .73rem;
  font-weight: 820;
}

.post-grid,
.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.post-card {
  --accent: var(--coral);
  position: relative;
  display: flex;
  min-height: 22rem;
  flex-direction: column;
  padding: clamp(1.25rem, 3vw, 2rem);
  overflow: hidden;
  border: 1px solid rgba(45, 34, 28, .14);
  border-radius: 1.65rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 252, 244, .58));
  box-shadow: var(--shadow-small);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.post-card::before {
  position: absolute;
  top: -5rem;
  right: -4rem;
  width: 12rem;
  height: 12rem;
  border-radius: 42% 58% 53% 47%;
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  content: "";
  transform: rotate(18deg);
}

.post-card:hover {
  box-shadow: 0 25px 54px rgba(98, 58, 38, .16);
  transform: translateY(-3px);
}

.post-card:focus-within {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, var(--ink));
  outline-offset: 4px;
}

.post-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.post-card-meta {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem;
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .64rem;
  font-weight: 720;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  padding: .28rem .58rem;
  border: 1px solid rgba(30, 27, 25, .15);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 28%, white);
  color: var(--ink);
  font-family: var(--round);
  font-size: .63rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.post-card h2 {
  position: relative;
  z-index: 2;
  max-width: 15ch;
  margin: 1.2rem 0 .85rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: .98;
}

.post-card > p {
  position: relative;
  z-index: 2;
  max-width: 40rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: .95rem;
  line-height: 1.58;
}

.post-card-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 2rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.tag-row span {
  padding: .24rem .5rem;
  border-radius: .45rem;
  background: rgba(30, 27, 25, .055);
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .61rem;
  font-weight: 700;
}

.read-arrow {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 1rem;
}

.post-card-large {
  min-height: 32rem;
  padding: clamp(1.5rem, 4vw, 3.3rem);
  background:
    radial-gradient(circle at 89% 14%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 17rem),
    linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(255, 249, 235, .72));
}

.post-card-large::after {
  position: absolute;
  right: 8%;
  bottom: 12%;
  width: min(22vw, 17rem);
  aspect-ratio: 1;
  border: 1px dashed rgba(30, 27, 25, .18);
  border-radius: 50%;
  content: "";
  box-shadow:
    inset 0 0 0 2.5rem rgba(255, 255, 255, .17),
    inset 0 0 0 5rem rgba(255, 255, 255, .13);
}

.post-card-large h2 {
  max-width: 13ch;
  font-size: clamp(3.2rem, 6.2vw, 6.2rem);
}

.post-card-large > p {
  max-width: 42rem;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 1.7vw, 1.3rem);
}

.editorial-note {
  display: grid;
  grid-template-columns: minmax(8rem, .25fr) minmax(0, 1fr);
  gap: 1rem;
  margin-top: clamp(5rem, 10vw, 10rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.editorial-note p {
  margin: 0;
}

.editorial-note > p:last-child {
  max-width: 36ch;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.5vw, 3.3rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.05;
}

/* Posts */

.post {
  --accent: var(--coral);
}

.accent-coral {
  --accent: var(--coral);
}

.accent-gold {
  --accent: var(--gold);
}

.accent-mint {
  --accent: var(--mint);
}

.accent-blue {
  --accent: var(--blue);
}

.post-header {
  position: relative;
  max-width: 62rem;
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 8rem) 0 clamp(3rem, 7vw, 6rem);
  text-align: center;
}

.post-header::before {
  position: absolute;
  top: 14%;
  left: 50%;
  z-index: -1;
  width: clamp(15rem, 40vw, 32rem);
  height: clamp(15rem, 40vw, 32rem);
  border-radius: 47% 53% 43% 57%;
  background: color-mix(in srgb, var(--accent) 23%, transparent);
  content: "";
  filter: blur(1px);
  transform: translateX(-50%) rotate(12deg);
}

.back-link {
  position: absolute;
  top: 1.2rem;
  left: 0;
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .72rem;
  font-weight: 780;
}

.post-header h1 {
  max-width: 14ch;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: clamp(3.4rem, 8vw, 7.3rem);
  font-weight: 700;
  letter-spacing: -.065em;
  line-height: .9;
}

.post-summary {
  max-width: 42rem;
  margin: 1.8rem auto 0;
  color: #514741;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.48rem);
  line-height: 1.55;
}

.post-byline {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1.7rem;
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .67rem;
  font-weight: 720;
}

.post-tags {
  justify-content: center;
  margin-top: .8rem;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(5rem, 9rem) minmax(0, 48rem);
  justify-content: center;
  gap: clamp(1rem, 4vw, 4rem);
}

.article-rail {
  position: sticky;
  top: 2rem;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.15rem .75rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, .58);
  text-align: center;
}

.article-rail span {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 700;
}

.article-rail small {
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .55rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.article-body {
  min-width: 0;
  color: #282321;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 1.6vw, 1.22rem);
  line-height: 1.78;
}

.article-body > p:first-child {
  font-size: 1.18em;
}

.article-body h2 {
  margin: 4rem 0 1.25rem;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.5vw, 3.7rem);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1;
}

.article-body h3 {
  margin: 3rem 0 1rem;
  font-family: var(--round);
  font-size: 1.25rem;
  letter-spacing: -.02em;
}

.heading-anchor {
  margin-left: .35rem;
  color: color-mix(in srgb, var(--accent) 74%, var(--ink));
  font-family: var(--round);
  font-size: .45em;
  text-decoration: none;
  vertical-align: middle;
  opacity: 0;
}

.article-body h2:hover .heading-anchor,
.article-body h3:hover .heading-anchor,
.heading-anchor:focus {
  opacity: 1;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote,
.article-body pre,
.article-body table {
  margin: 1.25rem 0;
}

.article-body strong {
  font-weight: 750;
}

.article-body ul,
.article-body ol {
  padding-left: 1.35rem;
}

.article-body li {
  margin: .5rem 0;
  padding-left: .25rem;
}

.article-body blockquote {
  margin-inline: 0;
  padding: .4rem 0 .4rem 1.25rem;
  border-left: .3rem solid var(--accent);
  color: #443b36;
  font-size: 1.12em;
  font-style: italic;
}

.article-body code,
.run-command code {
  font-family: var(--mono);
}

.article-body :not(pre) > code {
  padding: .08rem .27rem;
  border-radius: .3rem;
  background: rgba(30, 27, 25, .075);
  font-size: .83em;
}

.article-body pre {
  max-width: 100%;
  overflow: auto;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(30, 27, 25, .12);
  border-radius: .9rem;
  background: #25211f;
  color: #fff9ee;
  font: .76rem/1.6 var(--mono);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--body);
  font-size: .82rem;
}

.article-body th,
.article-body td {
  padding: .7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article-body th {
  font-family: var(--round);
  font-size: .7rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.katex-display {
  max-width: 100%;
  margin: 1.8rem 0 !important;
  overflow-x: auto;
  overflow-y: hidden;
  padding: .25rem 0 .45rem;
}

.katex-display > .katex {
  min-width: max-content;
}

.canon-line {
  margin-top: 4rem !important;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .68rem;
}

.attachments {
  max-width: 63rem;
  margin: clamp(5rem, 10vw, 10rem) auto 0;
  padding-top: clamp(2rem, 5vw, 4rem);
  border-top: 1px solid var(--ink);
}

.attachments > h2 {
  max-width: 12ch;
  margin: 0 0 1.5rem;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  letter-spacing: -.05em;
  line-height: .96;
}

.attachment-list {
  display: grid;
  gap: 1rem;
}

.attachment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, .8fr);
  min-width: 0;
  gap: 1.5rem;
  overflow: hidden;
  padding: clamp(1.3rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background:
    radial-gradient(circle at 92% 15%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 13rem),
    rgba(255, 255, 255, .64);
  box-shadow: var(--shadow-small);
}

.attachment-card > * {
  min-width: 0;
}

.attachment-kind {
  margin: 0 0 .3rem;
  color: var(--coral-deep);
  font-family: var(--round);
  font-size: .61rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.attachment-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.8rem;
  letter-spacing: -.035em;
  line-height: 1;
}

.attachment-card > div:first-child > p:last-child {
  margin: .75rem 0 0;
  color: var(--ink-soft);
  font-size: .85rem;
}

.run-command {
  position: relative;
  align-self: center;
  width: 100%;
  min-width: 0;
  padding: 1rem;
  border-radius: .9rem;
  background: var(--ink);
  color: #fff9ee;
}

.run-command > span {
  display: block;
  margin-bottom: .35rem;
  color: #f5ba71;
  font-family: var(--round);
  font-size: .58rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.run-command code {
  display: block;
  overflow-x: auto;
  padding-right: 3rem;
  font-size: .67rem;
  white-space: nowrap;
}

.run-command button {
  position: absolute;
  top: .65rem;
  right: .65rem;
  padding: .32rem .48rem;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: .45rem;
  background: rgba(255, 255, 255, .1);
  color: white;
  font-family: var(--round);
  font-size: .56rem;
  font-weight: 800;
  cursor: pointer;
}

.attachment-foot {
  display: flex;
  grid-column: 1 / -1;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .25rem;
}

.attachment-foot .button {
  min-width: 0;
  max-width: min(100%, 36rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-foot > span {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: .58rem;
}

.post-end {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 63rem;
  margin: clamp(5rem, 10vw, 10rem) auto 0;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 1.5rem;
  background: var(--ink);
  color: white;
}

.post-end p {
  max-width: 28ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.8vw, 2.2rem);
  line-height: 1.1;
}

.post-end .button {
  flex: 0 0 auto;
  border-color: white;
  background: white;
  color: var(--ink);
}

/* Archive */

.archive-head {
  max-width: 58rem;
  padding: clamp(5rem, 10vw, 9rem) 0 clamp(3rem, 6vw, 5rem);
}

.archive-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 9vw, 8rem);
  font-weight: 700;
  letter-spacing: -.07em;
  line-height: .86;
}

.archive-head > p:last-child {
  max-width: 44rem;
  margin: 1.7rem 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.4rem);
}

.archive-controls {
  position: sticky;
  top: .7rem;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(15rem, .8fr) auto;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
  padding: .75rem;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 1.15rem;
  background: rgba(255, 250, 240, .88);
  box-shadow: var(--shadow-small);
  backdrop-filter: blur(18px);
}

.filter-tabs {
  display: flex;
  gap: .35rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tabs button,
.empty-state button {
  flex: 0 0 auto;
  padding: .55rem .72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .64rem;
  font-weight: 830;
  cursor: pointer;
}

.filter-tabs button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.search-box input {
  width: 100%;
  min-height: 2.4rem;
  padding: .55rem .72rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
  outline: none;
  background: rgba(255, 255, 255, .7);
  color: var(--ink);
  font-size: .72rem;
}

.search-box input:focus {
  border-color: var(--coral-deep);
  box-shadow: 0 0 0 3px rgba(217, 71, 70, .12);
}

.filter-status {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .6rem;
  font-weight: 760;
  white-space: nowrap;
}

.archive-grid .post-card[hidden] {
  display: none;
}

.empty-state {
  padding: 4rem 1rem;
  text-align: center;
}

.empty-state p {
  font-family: var(--serif);
  font-size: 1.6rem;
}

/* Papers */

.papers-head {
  max-width: 66rem;
  padding: clamp(5rem, 10vw, 9rem) 0 clamp(3rem, 7vw, 6rem);
}

.papers-head h1 {
  max-width: 11ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 9vw, 8rem);
  font-weight: 700;
  letter-spacing: -.07em;
  line-height: .86;
}

.papers-head > p:last-child {
  max-width: 44rem;
  margin: 1.8rem 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: clamp(1.08rem, 2vw, 1.45rem);
}

.paper-shelf {
  display: grid;
  gap: 1rem;
}

.manuscript-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, .42fr);
  gap: 1.2rem 2rem;
  overflow: hidden;
  padding: clamp(1.4rem, 4vw, 2.8rem);
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  background:
    radial-gradient(circle at 94% 10%, rgba(120, 169, 223, .2), transparent 15rem),
    linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(255, 249, 236, .7));
  box-shadow: var(--shadow-small);
}

.manuscript-card:nth-child(3n + 2) {
  background:
    radial-gradient(circle at 94% 10%, rgba(120, 199, 164, .22), transparent 15rem),
    linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(255, 249, 236, .7));
}

.manuscript-card:nth-child(3n + 3) {
  background:
    radial-gradient(circle at 94% 10%, rgba(241, 189, 69, .22), transparent 15rem),
    linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(255, 249, 236, .7));
}

.manuscript-meta {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: .45rem;
  color: var(--ink-soft);
  font-family: var(--round);
  font-size: .62rem;
  font-weight: 760;
}

.manuscript-meta span,
.manuscript-meta time {
  padding: .28rem .52rem;
  border: 1px solid rgba(30, 27, 25, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
}

.manuscript-card h2 {
  max-width: 18ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: .98;
}

.manuscript-summary {
  grid-column: 1;
  max-width: 52rem;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  line-height: 1.55;
}

.manuscript-note {
  grid-column: 1;
  max-width: 52rem;
  margin: 0;
  padding-top: .8rem;
  border-top: 1px dashed var(--line);
  color: var(--ink-soft);
  font-size: .77rem;
}

.manuscript-actions {
  display: flex;
  grid-column: 2;
  grid-row: 2 / span 3;
  align-content: start;
  align-self: center;
  flex-wrap: wrap;
  gap: .55rem;
}

.manuscript-actions .button {
  background: rgba(255, 255, 255, .72);
}

.manuscript-actions .button:hover {
  background: white;
}

.download-size {
  margin-left: .38rem;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: .72em;
  font-weight: 500;
}

.manuscript-related {
  display: flex;
  grid-column: 1;
  flex-wrap: wrap;
  gap: .75rem;
  font-family: var(--round);
  font-size: .7rem;
  font-weight: 820;
}

.manuscript-hash {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: .57rem;
}

.not-found {
  display: grid;
  min-height: 70vh;
  place-content: center;
  text-align: center;
}

.not-found h1 {
  max-width: 9ch;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: clamp(4rem, 10vw, 8rem);
  letter-spacing: -.07em;
  line-height: .85;
}

.not-found > p:not(.eyebrow) {
  font-family: var(--serif);
  font-size: 1.2rem;
}

.not-found .button {
  justify-self: center;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(1.5deg);
  }
  50% {
    transform: translateY(-.55rem) rotate(-.5deg);
  }
}

@media (max-width: 860px) {
  .home-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 5rem;
  }

  .hero-copy h1 {
    max-width: 10ch;
  }

  .hero-creature {
    width: min(75vw, 23rem);
  }

  .post-grid,
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .article-shell {
    grid-template-columns: 1fr;
  }

  .article-rail {
    position: static;
    width: fit-content;
    flex-direction: row;
    gap: .45rem;
    padding: .5rem .7rem;
  }

  .article-rail span {
    font-size: 1rem;
  }

  .attachment-card {
    grid-template-columns: 1fr;
  }

  .attachment-foot {
    grid-column: auto;
  }

  .archive-controls {
    grid-template-columns: 1fr;
  }

  .manuscript-card {
    grid-template-columns: 1fr;
  }

  .manuscript-actions {
    grid-column: 1;
    grid-row: auto;
    align-self: start;
  }

  .filter-status {
    display: none;
  }
}

@media (max-width: 600px) {
  .site-header {
    padding-top: .9rem;
  }

  .site-header nav {
    gap: .75rem;
  }

  .site-header nav a {
    font-size: .68rem;
  }

  .site-header nav a:nth-child(4) {
    display: none;
  }

  .home-hero {
    padding-top: 3.5rem;
  }

  .hero-copy h1 {
    font-size: clamp(3.6rem, 18vw, 5.5rem);
  }

  .section-heading-inline {
    align-items: start;
    flex-direction: column;
  }

  .post-card,
  .post-card-large {
    min-height: 25rem;
    border-radius: 1.25rem;
  }

  .post-card-large h2 {
    font-size: 3.1rem;
  }

  .editorial-note {
    grid-template-columns: 1fr;
  }

  .post-header {
    padding-top: 6rem;
    text-align: left;
  }

  .post-header h1,
  .post-summary {
    margin-left: 0;
  }

  .post-header h1 {
    font-size: clamp(3.3rem, 16vw, 5rem);
  }

  .post-byline,
  .post-tags {
    justify-content: flex-start;
  }

  .article-body {
    font-size: 1.05rem;
    line-height: 1.72;
  }

  .article-body h2 {
    margin-top: 3.3rem;
  }

  .attachment-foot,
  .post-end,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .attachment-foot .button {
    display: block;
    width: 100%;
  }

  .post-end .button {
    width: 100%;
  }

  .archive-head h1 {
    font-size: clamp(4rem, 20vw, 6.3rem);
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
