html.cosmic-page {
  min-height: 100%;
  min-height: 100lvh;
  background: transparent;
}

body.cosmic-page {
  min-height: 100%;
  min-height: 100lvh;
}

@supports (-webkit-touch-callout: none) {
  html.cosmic-page {
    min-height: -webkit-fill-available;
  }

  body.cosmic-page {
    min-height: -webkit-fill-available;
  }
}

body:has(.posts-overview-page),
body:has(.post-reading-page) {
  position: relative;
  background-color: #07060d;
  background-image: radial-gradient(ellipse at center, transparent 25%, rgba(6, 4, 13, 0.22) 70%, rgba(6, 4, 13, 0.7) 100%), url("/assets/posts-overview/background.png");
  background-position: center top, center top;
  background-size: 100% 100lvh, auto 100lvh;
  background-repeat: repeat-y;
}

body:has(.posts-overview-page) > div.pointer-events-none.fixed,
body:has(.post-reading-page) > div.pointer-events-none.fixed {
  display: none;
}

body:has(.posts-overview-page) .site-header,
body:has(.post-reading-page) .site-header {
  border-color: rgba(216, 195, 255, 0.2);
  background: rgba(9, 7, 18, 0.78);
  box-shadow: 0 1px 18px rgba(2, 1, 8, 0.38);
  color: rgba(255, 255, 255, 0.92);
}

body:has(.posts-overview-page) .site-header nav,
body:has(.posts-overview-page) .site-header nav a,
body:has(.post-reading-page) .site-header nav,
body:has(.post-reading-page) .site-header nav a {
  color: rgba(239, 229, 255, 0.74);
}

body:has(.posts-overview-page) .site-header a:hover,
body:has(.post-reading-page) .site-header a:hover {
  color: #fff;
}

@supports (padding-top: env(safe-area-inset-top)) {
  body:has(.posts-overview-page) .site-header,
  body:has(.post-reading-page) .site-header {
    padding-top: env(safe-area-inset-top);
  }
}

body:has(.posts-overview-page)::before,
body:has(.post-reading-page)::before {
  position: fixed;
  z-index: 1;
  top: 0;
  right: 0;
  left: 0;
  height: 100vh;
  height: 100lvh;
  pointer-events: none;
  background-color: #07060d;
  background-image: radial-gradient(ellipse at center, transparent 25%, rgba(6, 4, 13, 0.22) 70%, rgba(6, 4, 13, 0.7) 100%), url("/assets/posts-overview/background.png");
  background-position: center top, center top;
  background-size: 100% 100lvh, auto 100lvh;
  background-repeat: repeat-y;
  content: "";
}

body:has(.posts-overview-page) .posts-footer {
  z-index: 8;
  background: transparent;
  padding: 2.5rem 0.75rem;
}

.post-reading-page {
  position: relative;
  isolation: isolate;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: calc(100vh - 57px);
  color: rgba(255, 255, 255, 0.9);
}

.post-scene-backdrop {
  display: none;
}

.post-smoke-canvas {
  position: fixed;
  z-index: 4;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  pointer-events: none;
  mix-blend-mode: screen;
}

.post-ground-fade {
  position: fixed;
  z-index: 3;
  top: 0;
  right: 0;
  left: 0;
  height: 100vh;
  height: 100lvh;
  pointer-events: none;
  overflow: visible;
}

.post-ground-overscan {
  display: none;
}

.post-sky-occluder {
  position: fixed;
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  height: calc(57px + clamp(1rem, 4vh, 3.5rem));
  pointer-events: none;
  opacity: 0;
  background-color: #07060d;
  background-image: radial-gradient(ellipse at center, transparent 25%, rgba(6, 4, 13, 0.22) 70%, rgba(6, 4, 13, 0.7) 100%), url("/assets/posts-overview/background.png");
  background-position: center top, center top;
  background-size: 100% 100lvh, auto 100lvh;
  background-repeat: repeat-y;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 80%, rgba(0, 0, 0, 0.55) 91%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 80%, rgba(0, 0, 0, 0.55) 91%, transparent 100%);
  transition: none;
}

.post-reading-surface {
  position: relative;
  z-index: 1;
  width: min(880px, calc(100vw - 2rem));
  margin: clamp(2rem, 7vh, 5.5rem) auto 0;
  padding: clamp(1.5rem, 5vw, 4.5rem);
  padding-bottom: clamp(17rem, 28vw, 22rem);
  background: linear-gradient(180deg, rgba(136, 116, 156, 0.66) 0%, rgba(116, 87, 134, 0.58) 46%, rgba(73, 53, 100, 0.46) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 237, 205, 0.2), 0 24px 70px rgba(8, 5, 15, 0.18);
}

.post-reading-surface .post-header h1 {
  color: #fff;
}

.post-reading-surface .post-header {
  width: min(100%, 30rem);
  margin-right: auto;
  margin-left: auto;
  text-align: left;
}

.post-reading-surface .post-header > a {
  justify-content: flex-start;
}

.post-reading-surface .post-header h2,
.post-reading-surface .post-header a {
  color: rgba(255, 255, 255, 0.76);
}

.post-reading-surface .post-header a:hover,
.post-reading-surface .post-header a:hover span {
  color: #fff;
}

.post-reading-surface .prose {
  width: min(100%, 30rem);
  margin-right: auto;
  margin-left: auto;
  --tw-prose-body: rgba(255, 255, 255, 0.9);
  --tw-prose-headings: #fff;
  --tw-prose-links: #fff;
  --tw-prose-bold: #fff;
  --tw-prose-counters: rgba(255, 255, 255, 0.78);
  --tw-prose-bullets: rgba(255, 255, 255, 0.58);
  --tw-prose-hr: rgba(255, 255, 255, 0.26);
  --tw-prose-quotes: rgba(255, 255, 255, 0.94);
  --tw-prose-quote-borders: rgba(255, 255, 255, 0.36);
  --tw-prose-captions: rgba(255, 255, 255, 0.68);
  --tw-prose-code: #fff;
  color: rgba(255, 255, 255, 0.9);
  text-align: left;
}

.post-reading-surface .prose :is(h1, h2, h3, h4, strong, blockquote) {
  color: #fff;
}

.post-reading-surface .prose a {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.55);
}

.post-reading-surface .prose code:not(pre code) {
  color: #fff;
}

.post-reading-surface .prose :is(img, video, figure, table) {
  margin-right: auto;
  margin-left: auto;
}

.post-reading-footer {
  padding: 3rem 0 2.5rem;
}

.cosmic-footer {
  position: fixed;
  z-index: 8;
  right: 0;
  bottom: 0;
  left: 0;
  transform: perspective(420px) rotateX(24deg);
  transform-origin: center bottom;
  color: rgba(255, 255, 255, 0.72);
  font-family: "Source Serif 4", ui-serif, Georgia, serif;
  font-size: 1.125rem;
  text-align: center;
}

.cosmic-footer a {
  color: rgba(255, 255, 255, 0.82);
}

.cosmic-footer a:hover {
  color: #fff;
}

.posts-overview-page {
  --progress: 0;
  position: relative;
  isolation: isolate;
  width: 100vw;
  height: 100%;
  min-height: 620px;
  overflow: hidden;
  background: transparent;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  flex: 1;
}

.posts-overview-page * {
  box-sizing: border-box;
}

.posts-overview-page .scroll-catcher {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  background: transparent;
}

.posts-overview-page .scroll-catcher::-webkit-scrollbar,
.posts-overview-page .scroll-area::-webkit-scrollbar {
  display: none;
}

.posts-overview-page .reading-vessel {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: min(720px, 92vw);
  height: 108%;
  overflow: visible;
  transform: translate(-50%, -50%);
}

.posts-overview-page .scroll-area {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.posts-overview-page .prose {
  position: relative;
  z-index: 2;
  width: min(540px, calc(100% - 80px));
  margin: 0 auto;
  padding: 170px 0 300px;
  color: #fff;
  user-select: text;
  -webkit-user-select: text;
}

.posts-overview-page .adaptive-word {
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
  filter: none;
}

.posts-overview-page .eyebrow {
  margin: 0 0 22px;
  color: #e4bdf4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  line-height: 1;
  text-transform: uppercase;
}

.posts-overview-page h1 {
  margin: 0 0 42px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.posts-overview-page .archive-intro {
  margin: 0 0 2.25rem;
  color: rgba(240, 230, 255, 0.68);
  font-size: clamp(1.08rem, 1.65vw, 1.28rem);
  font-weight: 400;
  line-height: 1.66;
}

.posts-overview-page .post-index {
  display: grid;
  gap: 0;
}

.posts-overview-page .archive-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(228, 189, 244, 0.22);
  color: #fff;
  text-decoration: none;
  transition: color 180ms ease, padding 180ms ease, border-color 180ms ease;
}

.posts-overview-page .archive-entry:hover,
.posts-overview-page .archive-entry:focus-visible {
  padding-inline: 0.7rem;
  border-color: rgba(228, 189, 244, 0.8);
  color: #f0cfff;
  outline: none;
}

.posts-overview-page .archive-title {
  font-size: clamp(1.08rem, 1.65vw, 1.28rem);
  line-height: 1.25;
}

.posts-overview-page .archive-entry time {
  color: rgba(240, 230, 255, 0.58);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.posts-overview-page .end-mark {
  margin: 80px 0 0;
  color: #e1b4ec;
  font-size: 1.05rem;
  font-style: italic;
  letter-spacing: 0.15em;
  text-align: center;
}

.posts-overview-page .smoke-canvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
  mix-blend-mode: screen;
}

@media (max-width: 600px) {
  body:has(.post-reading-page)::before {
    display: none;
  }

  .post-reading-page {
    padding-bottom: calc(100lvh - 7rem - env(safe-area-inset-top));
  }

  .post-scene-backdrop,
  .post-smoke-canvas,
  .post-ground-overscan,
  .post-ground-fade,
  .post-sky-occluder {
    position: fixed;
    transform: none;
  }

  .post-scene-backdrop {
    display: block;
    z-index: 0;
    top: -1px;
    right: 0;
    left: 0;
    height: calc(100lvh + 2px);
    pointer-events: none;
    background-color: transparent;
    background-image: radial-gradient(ellipse at center, transparent 25%, rgba(6, 4, 13, 0.22) 70%, rgba(6, 4, 13, 0.7) 100%), url("/assets/posts-overview/background.png");
    background-position: center top, center top;
    background-size: 100% 100lvh, auto 100lvh;
    background-repeat: repeat-y;
  }

  .post-sky-occluder {
    background-color: transparent;
  }

  .post-ground-overscan {
    position: fixed;
    z-index: 3;
    top: 0;
    right: 0;
    left: 0;
    display: block;
    height: calc(100lvh + 16rem);
    pointer-events: none;
    background-color: #07060d;
    background-image: radial-gradient(ellipse at center, transparent 25%, rgba(6, 4, 13, 0.22) 70%, rgba(6, 4, 13, 0.7) 100%), url("/assets/posts-overview/background.png");
    background-position: center top, center top;
    background-size: 100% 100lvh, auto 100lvh;
    background-repeat: repeat-y;
  }

  .post-reading-surface {
    width: calc(100vw - 2.5rem);
    margin-top: 1.25rem;
    padding: 1.25rem;
    padding-bottom: 17rem;
  }

  .post-reading-footer {
    padding: 1.5rem 0 0.75rem;
  }

  .post-reading-page .cosmic-footer {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    font-size: 0.9375rem;
    transform: perspective(360px) rotateX(20deg);
  }

  .posts-overview-page .cosmic-footer {
    position: absolute;
    top: auto;
    bottom: 0;
  }

  .posts-overview-page {
    height: calc(100vh - 150px);
    min-height: 600px;
  }

  .posts-overview-page .reading-vessel {
    width: 100vw;
    height: 108%;
  }

  .posts-overview-page .prose {
    width: calc(100% - 52px);
    padding-top: 150px;
  }

  .posts-overview-page .archive-entry {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }
}
