@property --blob-a {
  syntax: "<color>";
  inherits: true;
  initial-value: rgb(255 86 183);
}

@font-face {
  font-family: "New Title";
  src: url("../fonts/NewTitle-Variable.woff2?v=2") format("woff2");
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
}

@property --blob-b {
  syntax: "<color>";
  inherits: true;
  initial-value: rgb(255 220 82);
}

@property --blob-c {
  syntax: "<color>";
  inherits: true;
  initial-value: rgb(75 230 217);
}

@property --blob-d {
  syntax: "<color>";
  inherits: true;
  initial-value: rgb(124 116 255);
}

:root {
  --ink: #5b2a70;
  --ink-soft: color-mix(in oklab, var(--ink) 88%, #8b608e);
  --accent: #c638f5;
  --accent-hot: #ed3f9a;
  --paper: #f5f2f1;
  --paper-warm: #faeee9;
  --blob-a: rgb(255 86 183);
  --blob-b: rgb(255 220 82);
  --blob-c: rgb(75 230 217);
  --blob-d: rgb(124 116 255);
  --line: color-mix(in oklab, var(--ink) 18%, transparent);
  --pad: clamp(1rem, 3.6vw, 4.25rem);
  --display: "New Title", "New Title Trial", "Helvetica Neue Condensed Black", "HelveticaNeue-CondensedBlack", "Arial Narrow", "Aptos Narrow", sans-serif;
  --text: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--text);
  color: var(--ink);
  background: var(--paper);
  font-synthesis-weight: none;
  transition:
    --blob-a 900ms cubic-bezier(.16, 1, .3, 1),
    --blob-b 900ms cubic-bezier(.16, 1, .3, 1),
    --blob-c 900ms cubic-bezier(.16, 1, .3, 1),
    --blob-d 900ms cubic-bezier(.16, 1, .3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: -8vmax;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 64% 58% at 13% 24%, color-mix(in oklab, var(--blob-a) 88%, transparent) 0%, color-mix(in oklab, var(--blob-a) 42%, transparent) 46%, transparent 76%),
    radial-gradient(ellipse 58% 64% at 42% 72%, color-mix(in oklab, var(--blob-b) 92%, transparent) 0%, color-mix(in oklab, var(--blob-b) 36%, transparent) 48%, transparent 78%),
    radial-gradient(ellipse 66% 62% at 72% 38%, color-mix(in oklab, var(--blob-c) 90%, transparent) 0%, color-mix(in oklab, var(--blob-c) 38%, transparent) 48%, transparent 78%),
    radial-gradient(ellipse 62% 68% at 92% 76%, color-mix(in oklab, var(--blob-d) 86%, transparent) 0%, color-mix(in oklab, var(--blob-d) 36%, transparent) 48%, transparent 78%),
    linear-gradient(145deg, var(--paper) 0%, var(--paper-warm) 48%, #f1f2f6 100%);
}

button,
a {
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: clamp(.85rem, 2vw, 1.35rem) var(--pad);
  mix-blend-mode: multiply;
}

.site-title {
  max-width: 13rem;
  color: var(--ink);
  font-size: clamp(.82rem, 1.05vw, 1rem);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.01em;
  text-transform: uppercase;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: clamp(.8rem, 2vw, 1.35rem);
}

.site-header button,
.site-header nav > a,
.reader-close,
.reader-nav button,
.index-shell button {
  border: 0;
  background: none;
  color: var(--accent);
  padding: 0;
  text-transform: uppercase;
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .08em;
  line-height: 1;
  cursor: pointer;
}

.site-header nav > a {
  text-decoration: none;
}

.site-header button:hover,
.site-header nav > a:hover,
.reader-close:hover,
.reader-nav button:hover,
.index-shell button:hover,
.entry-link:hover {
  color: var(--accent-hot);
}

#collection {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: clamp(4rem, 8vh, 7rem) 0 clamp(8rem, 18vh, 15rem);
}

#collection > article {
  --title-size: clamp(5.7rem, 16vw, 16.5rem);
  --title-width: 9.1ch;
  --measure: 34rem;
  position: relative;
  display: grid;
  align-items: end;
  min-height: clamp(34rem, 88vh, 58rem);
  margin: clamp(-4rem, -6vh, -2rem) 0 0;
  padding: clamp(8rem, 13vh, 14rem) var(--pad) clamp(5rem, 13vh, 12rem);
}

#collection > article:first-child {
  margin-top: 0;
}

article > header {
  width: min(100%, 100rem);
}

.entry-type {
  margin: 0 0 clamp(.45rem, 1vw, .8rem);
  color: var(--accent);
  font-size: clamp(.62rem, .9vw, .78rem);
  font-weight: 850;
  letter-spacing: .1em;
  line-height: 1;
  text-transform: uppercase;
}

h2 {
  max-width: min(100%, max(var(--title-width), 3em));
  margin: 0;
  font-family: var(--display);
  font-size: var(--title-size);
  font-stretch: condensed;
  font-weight: 900;
  line-height: .86;
  letter-spacing: -.03em;
  text-transform: uppercase;
  text-wrap: balance;
}

.entry-definition {
  max-width: var(--measure);
  margin: clamp(1.2rem, 2.3vw, 2.25rem) 0 clamp(1rem, 1.8vw, 1.5rem);
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.45vw, 1.42rem);
  font-weight: 520;
  line-height: 1.18;
  text-wrap: pretty;
}

.entry-link {
  display: inline-block;
  color: var(--accent);
  text-transform: uppercase;
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .08em;
  line-height: 1;
  text-decoration: none;
}

.entry-detail {
  max-width: 44rem;
  margin-top: 2rem;
}

.entry-detail h3 {
  margin: 1.6rem 0 .35rem;
  color: var(--accent);
  text-transform: uppercase;
  font-size: .7rem;
  letter-spacing: .1em;
}

.entry-detail p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}

.entry-detail a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: .08em;
  text-underline-offset: .16em;
}

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

body.enhanced #collection .entry-detail {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#collection > article:nth-of-type(6n + 1) {
  --title-size: clamp(6.8rem, 18vw, 18.75rem);
  --title-width: 8.4ch;
  --measure: 30rem;
  min-height: clamp(38rem, 94vh, 64rem);
}

#collection > article:nth-of-type(6n + 2) {
  --title-size: clamp(5.2rem, 13.6vw, 14.5rem);
  --title-width: 7.4ch;
  --measure: 28rem;
  align-items: center;
  min-height: clamp(32rem, 72vh, 48rem);
}

#collection > article:nth-of-type(6n + 2) header {
  margin-left: auto;
  width: min(100%, 76rem);
  text-align: right;
}

#collection > article:nth-of-type(6n + 2) h2,
#collection > article:nth-of-type(6n + 2) .entry-definition {
  margin-left: auto;
}

#collection > article:nth-of-type(6n + 3) {
  --title-size: clamp(5.9rem, 15.2vw, 16.4rem);
  --title-width: 10.1ch;
  --measure: 38rem;
  align-items: start;
  min-height: clamp(42rem, 98vh, 68rem);
}

#collection > article:nth-of-type(6n + 3) header {
  padding-top: clamp(3rem, 7vh, 7rem);
  margin-inline: auto;
  text-align: center;
}

#collection > article:nth-of-type(6n + 3) h2,
#collection > article:nth-of-type(6n + 3) .entry-definition {
  margin-left: auto;
  margin-right: auto;
}

#collection > article:nth-of-type(6n + 4) {
  --title-size: clamp(6.2rem, 17vw, 17.25rem);
  --title-width: 8.2ch;
  --measure: 31rem;
  align-items: center;
  min-height: clamp(36rem, 82vh, 58rem);
}

#collection > article:nth-of-type(6n + 4) header {
  margin-left: clamp(0rem, 10vw, 10rem);
}

#collection > article:nth-of-type(6n + 5) {
  --title-size: clamp(5rem, 12.4vw, 13.2rem);
  --title-width: 11.6ch;
  --measure: 42rem;
  min-height: clamp(30rem, 66vh, 46rem);
}

#collection > article:nth-of-type(6n + 5) header {
  margin-left: auto;
  width: min(100%, 88rem);
  text-align: right;
}

#collection > article:nth-of-type(6n + 5) h2,
#collection > article:nth-of-type(6n + 5) .entry-definition {
  margin-left: auto;
}

#collection > article:nth-of-type(6n) {
  --title-size: clamp(6.8rem, 18.5vw, 19rem);
  --title-width: 9.7ch;
  --measure: 34rem;
  align-items: end;
  min-height: clamp(42rem, 96vh, 70rem);
}

#collection > article:nth-of-type(6n) header {
  width: min(100%, 94rem);
}

dialog {
  border: 0;
  padding: 0;
  max-width: none;
  max-height: none;
  color: var(--ink);
  background: var(--paper);
}

dialog::backdrop {
  background: color-mix(in oklab, var(--ink) 36%, transparent);
  backdrop-filter: blur(10px);
}

#reader[open],
#index[open] {
  width: 100vw;
  height: 100dvh;
}

.reader-shell {
  min-height: 100%;
  position: relative;
  padding: clamp(5rem, 10vh, 8rem) var(--pad) 2rem;
  overflow: auto;
  background:
    radial-gradient(ellipse at 86% 4%, color-mix(in oklab, var(--blob-d) 58%, transparent), transparent 48%),
    radial-gradient(ellipse at 4% 88%, color-mix(in oklab, var(--blob-a) 60%, transparent), transparent 50%),
    radial-gradient(ellipse at 52% 54%, color-mix(in oklab, var(--blob-c) 34%, transparent), transparent 56%),
    linear-gradient(150deg, var(--paper) 0%, var(--paper-warm) 55%, #f1eef6 100%);
}

.reader-close {
  position: absolute;
  right: var(--pad);
  top: 1.25rem;
}

.reader-content article {
  max-width: 94rem;
  margin: auto;
}

.reader-content h2 {
  --title-size: clamp(4.4rem, 13.4vw, 13.5rem);
  max-width: 10.4ch;
}

.reader-content .entry-definition {
  max-width: 49rem;
  font-size: clamp(1.35rem, 2.3vw, 2.35rem);
  line-height: 1.12;
}

.reader-content .entry-link {
  display: none;
}

.reader-content .entry-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(2rem, 4vw, 4rem);
  max-width: 62rem;
  margin-top: clamp(2.4rem, 5vw, 4rem);
}

.reader-content .entry-detail h3 {
  margin-top: 1.3rem;
}

.reader-content .entry-detail p {
  color: color-mix(in oklab, var(--ink) 86%, #6f315f);
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.42;
}

.reader-nav {
  display: flex;
  justify-content: space-between;
  max-width: 94rem;
  margin: 4rem auto 0;
}

.index-shell {
  min-height: 100%;
  overflow: auto;
  padding: clamp(4rem, 8vh, 7rem) var(--pad);
  background: color-mix(in oklab, var(--paper) 88%, white);
}

.index-shell > header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

.index-shell > header h2 {
  --title-size: clamp(4.8rem, 11vw, 10.5rem);
}

[data-index-list] {
  max-width: 74rem;
  margin-top: 2rem;
}

.index-group {
  display: grid;
  grid-template-columns: 4rem 1fr;
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}

.index-group h3 {
  margin: 0;
  color: var(--accent);
  font-family: var(--display);
  font-size: 2.4rem;
  line-height: .8;
}

.index-group div {
  display: grid;
}

.index-group a {
  color: var(--ink);
  font-size: clamp(1.25rem, 2.5vw, 2.35rem);
  font-weight: 650;
  line-height: 1.02;
  text-decoration: none;
  padding: .25rem 0;
}

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

.noscript {
  padding: 1rem var(--pad);
}

@media (max-width: 760px) {
  .site-title {
    max-width: 5.8rem;
    font-size: .72rem;
  }

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

  .site-header button,
  .site-header nav > a {
    font-size: .56rem;
  }

  #collection {
    padding-top: 5.5rem;
  }

  #collection > article {
    --title-size: clamp(4.6rem, 24vw, 8rem);
    min-height: clamp(31rem, 76vh, 42rem);
    margin-top: -2.5rem;
    padding-top: clamp(6rem, 12vh, 8rem);
    padding-bottom: clamp(4.5rem, 11vh, 7rem);
  }

  #collection > article:nth-of-type(n) {
    --title-width: 7.8ch;
    --measure: 26rem;
  }

  #collection > article:nth-of-type(6n + 3) header {
    padding-top: 1.25rem;
  }

  #collection > article:nth-of-type(6n + 4) header {
    margin-left: 0;
  }

  .entry-definition {
    font-size: clamp(1rem, 4.4vw, 1.2rem);
  }

  .reader-content .entry-detail {
    grid-template-columns: 1fr;
  }

  .reader-shell {
    padding-top: 5rem;
  }

  .index-group {
    grid-template-columns: 2.5rem 1fr;
  }

  .index-group h3 {
    font-size: 1.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    transition: none;
  }
}
