* {
  margin: 0;
  box-sizing: border-box;
}

:root {
  --background-main: #ffffff;
  --background-secondary: #c4c4c4;
  --color-three: #2a2a2a;
  --color-attention: #ff484c;
  --overlay-bg: color-mix(in srgb, var(--background-main) 80%, transparent);
  --menu-text: #2a2a2a;
  --font: "Geist Variable", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --header-footer-height: 60px;
  --card-gap: 36px;
  --cards-per-view: 3;
  --mobile: 640px;
  --side-margins: 24px;
  --card-pad: 16px;
  --card-content-gap: 16px;
  --card-thumb-radius: 16px;
  --card-square-aspect: 2 / 3;
  --page-gutter: var(--side-margins);
  --content-max-width: min(calc(100dvw - (var(--page-gutter) * 2)));
}

@font-face {
  font-family: "Geist Variable";
  src: url("/fonts/geist/geist-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

html,
body {
  height: 100%;
  font-family: var(--font);
  font-weight: 200;
  color: var(--color-three);
  background: var(--background-main);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
  padding-bottom: calc(var(--header-footer-height) + env(safe-area-inset-bottom, 0px));
}

body.essays-page main {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 8px var(--page-gutter) 8px;
  height: var(--header-footer-height);
  border-bottom: 1px solid rgba(42, 42, 42, 0.08);
  background: none;
}

.logo-group {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

h3 {
  font-weight: 200;
  font-family: var(--font);
  margin: 0;
}

h3d{
  font-weight: 200;
  font-family: var(--font);
  margin: 0;
  padding: 0 0 0 0px;
}

h4 {
  font-weight: 200;
  text-align: left;
  font-family: var(--font);
  font-size: clamp(12px, 2vh, 16px);
}

h5{
  font-weight: 100;
  text-align: left;
  font-family: var(--font);
  color: #2a2a2a80;
}
.logo {
  margin: 0;
}

.logo a {
  text-decoration: none;
  color: inherit;
  font-weight: 200;
  text-transform: uppercase;
}

.menu-btn {
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0.5rem;
  margin: 0;
  cursor: pointer;
  line-height: 0;
  position: relative;
  z-index: 1001;
}

.burger path {
  fill: none;
  stroke: var(--color-three);
  stroke-width: 1;
  stroke-linecap: round;
  transition: transform 0.4s var(--ease, cubic-bezier(0.22, 0.61, 0.36, 1)),
    opacity 0.2s var(--ease, cubic-bezier(0.22, 0.61, 0.36, 1)),
    stroke 0.28s var(--ease, cubic-bezier(0.22, 0.61, 0.36, 1));
  transform-origin: 12px 12px;
}

.menu-btn:not([aria-expanded="true"]):hover .l1 {
  transform: translateY(-4px);
}

.menu-btn:not([aria-expanded="true"]):hover .l2 {
  transform: translateY(4px);
}

.menu-btn[aria-expanded="true"] .l1 {
  transform: translateY(2px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] .l2 {
  transform: translateY(-2px) rotate(-45deg);
}

.menu-btn[aria-expanded="true"] .burger path {
  stroke: var(--color-attention);
}

.site-links {
  display: none;
}

.site-links__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
  align-items: flex-end;
}

.site-links__link {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--color-three);
  font: inherit;
  font-size: .85rem;
  font-weight: 500;
  text-decoration: none;
  padding: 4px 0;
  position: relative;
  cursor: pointer;
}

.site-links__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 400ms cubic-bezier(.2,.51,.56,.44);
}

.site-links__link:hover::after,
.site-links__link:focus-visible::after {
  transform: scaleX(1);
}

.site-links__link:active {
  transform: translateY(1px);
}

.site-links__link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.site-links__link--contact {
  color: var(--color-three);
}

@media (prefers-reduced-motion: reduce) {
  .burger path {
    transition: none;
  }
}

.menu {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: var(--overlay-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
  transition: transform 1s var(--ease, cubic-bezier(0.22, 0.61, 0.36, 1)),
    opacity 0.25s var(--ease, cubic-bezier(0.22, 0.61, 0.36, 1));
  z-index: 1000;
  color: var(--menu-text);
}

.menu[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

.menu a {
  display: inline-block;
  font-family: var(--font);
  font-weight: 400;
  font-size: clamp(1.5rem, 5vw, 1.75rem);
  color: var(--menu-text);
  text-decoration: none;
  padding: 0.4em 0;
}

.menu button {
  display: inline-block;
  font-family: var(--font);
  font-weight: 400;
  font-size: clamp(1.5rem, 5vw, 1.75rem);
  background: transparent;
  border: none;
  color: var(--menu-text);
  padding: 0.4em 0;
  cursor: pointer;
}

.menu [data-contact-toggle] {
  color: var(--color-three);
}

.menu a:hover,
.menu a:focus-visible,
.menu button:hover,
.menu button:focus-visible {
  text-decoration: underline;
}

html.menu-open,
body.menu-open {
  overflow: hidden;
}

@media (min-width: 640px) {
  .site-links {
    display: block;
    min-width: 0;
  }

  .menu-btn {
    display: none;
  }

  .menu {
    display: none !important;
  }
}

h4 {
  font-weight: 200;
  text-align: left;
  font-family: var(--font);
  font-size: clamp(12px, 2vh, 16px);
  letter-spacing: 0.04em;
}

.aboutDesktop {
  display: flex;
  align-items: center;
  justify-content: left;
  gap: clamp(2rem, 6vw, 4rem);
  max-width: 100dvw;
  margin: 0;
  padding: clamp(2rem, 6vw, 3.5rem) var(--page-gutter);
  min-height: calc(100dvh - (var(--header-footer-height) * 2));
}

.aboutDesktop-image {
  width: min(40%, 1000px);
  height: --var(width);
  box-shadow:
    8px 8px 24px color-mix(in srgb, var(--color-three) 18%, transparent),
    -8px -8px 24px rgba(255, 255, 255, 0.9);
  align-items: top;
}

.aboutDesktop-text {
  flex: 1;
  font-weight: 200;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.65;
  color: var(--color-three);
  text-align: left;
}

.about {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content:top;
  gap: 1.25rem;
  padding: 16px;
  text-align: center;
  min-height: calc(100dvh - (var(--header-footer-height) * 2));
}

.about-image-wrap {
  position: relative;
  width: min(60vw, 360px);
  border-radius: 25%;
  overflow: hidden;
}

.about-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 25%;
  box-shadow:
    inset -8px 8px 20px color-mix(in srgb, var(--color-three) 32%, transparent),
    inset 8px -8px 20px rgba(255, 255, 255, 0.5);
}

.about-image {
  display: flex;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.about-text {
  display: flex;
  max-width: 40ch;
  font-weight: 200;
  font-size: .8rem;
  line-height: 1.65;
  text-align: left;
  margin: 0 auto;
  justify-content: center;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 3.5rem) var(--page-gutter) clamp(5rem, 10vw, 6rem);
}

.project {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: color-mix(in srgb, var(--background-main) 85%, #ffffff);
  border-radius: 24px;
  border: 1px solid rgba(42, 42, 42, 0.08);
  box-shadow:
    4px 4px 12px color-mix(in srgb, var(--color-three) 18%, transparent),
    -4px -4px 12px rgba(255, 255, 255, 0.75);
  text-align: center;
}

.project .thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(42, 42, 42, 0.08), rgba(255, 255, 255, 0.9));
}

.essay-archive {
  --essay-archive-padding-block: clamp(0.75rem, 3vh, 2rem);
  --essay-archive-padding-inline: var(--page-gutter);
  --essay-safe-area-offset: calc(
    env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px)
  );
  --essay-wrapper-height: max(
    0px,
    calc(
      100dvh - (var(--header-footer-height) * 2)
      - var(--essay-safe-area-offset)
      - (var(--essay-archive-padding-block) * 2)
    )
  );
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3vw, 2rem);
  width: 100%;
  height: max(
    0px,
    calc(
      100dvh - (var(--header-footer-height) * 2)
      - var(--essay-safe-area-offset)
      - (var(--essay-archive-padding-block) * 2)
    )
  );
  min-height: 0;
  margin: 0;
  padding-block: var(--essay-archive-padding-block);
  padding-inline: var(--essay-archive-padding-inline);
  justify-content: center;
}

.essay-wrapper {
  --essay-row-count: 2;
  --essay-card-gap: clamp(18px, 3vh, 32px);
  --essay-card-max: clamp(220px, 26vh, 260px);
  --essay-wrapper-padding-block: clamp(0.75rem, 2.5vh, 1.35rem);
  --essay-wrapper-padding-inline: var(--page-gutter);
  --essay-wrapper-usable-height: calc(
    var(--essay-wrapper-height)
    - (var(--essay-wrapper-padding-block) * 2)
    - ((var(--essay-row-count) - 1) * var(--essay-card-gap))
  );
  --essay-card-size-raw: calc(var(--essay-wrapper-usable-height) / var(--essay-row-count));
  --essay-card-size: min(
    var(--essay-card-max),
    max(var(--essay-card-size-raw), 0px)
  );
  width: min(1120px, 100%);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, var(--essay-card-size));
  grid-template-rows: repeat(var(--essay-row-count), minmax(0, var(--essay-card-size)));
  grid-auto-rows: minmax(0, var(--essay-card-size));
  gap: var(--essay-card-gap);
  justify-content: flex-start;
  align-content: stretch;
  align-items: stretch;
  padding-block: var(--essay-wrapper-padding-block);
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--essay-wrapper-padding-inline);
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-height: 0;
}

.essay-wrapper::-webkit-scrollbar {
  display: none;
}

.essay-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  color: inherit;
  text-decoration: none;
  background: #ffffff;
  border-radius: 20px;
  overflow: visible;
  box-shadow: 4px 4px 8px #2a2a2a50;
  transition: transform 150ms ease-in-out, box-shadow 150ms ease-in-out;
  will-change: transform;
  transform-origin: center;
  border: none;
  cursor: pointer;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  appearance: none;
  scroll-snap-align: start;
}

.essay-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0.5px 0.5px 0 1px #ffffff85,
    inset 4px 4px 8px #ffffff,
    inset -8px -8px 12px rgba(42, 42, 42, 0.12);
  pointer-events: none;
  transition: transform 150ms ease-in-out, box-shadow 150ms ease-in-out;
  z-index: 0;
}

.essay-card:hover,
.essay-card:focus-visible {
  box-shadow: 2px 2px 2px #2a2a2a70;
  transform: scale(0.99);
}

.essay-card:active {
  transform: scale(0.98);
  box-shadow: inset 8px 8px 12px rgba(42, 42, 42, 0.12), inset -8px -8px 12px rgba(42, 42, 42, 0.25),
    inset 0 0 4px 0 #2a2a2a80;
}

.essay-card:active::after {
  box-shadow: none;
}

.essay-card:focus-visible {
  outline: 2px solid #2a2a2a;
  outline-offset: 4px;
}

.essay-card__content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 1;
  width: 100%;
}

.essay-card__heading {
  display: flex;
  flex-direction: column;
  gap: clamp(0.35rem, 1.4vw, 0.6rem);
  position: relative;
  z-index: 1;
  width: 100%;
}

.essay-card__title {
  margin: 0;
  font-family: --var(--font);
  font-size: 1.3rem;
  font-weight: 200;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  font-style: italic;
  -webkit-line-clamp: 2;

}

.essay-card__summary {
  margin: 0;
  font-family: --var(--font);
  font-size: .9rem;
  line-height: 1.4;
  color: rgba(42, 42, 42, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 1;
  width: 100%;
}

.essay-card__mobile {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
  z-index: 1;
  width: 100%;
}

.essay-card__micro-title {
  font-family: var(--font);
  font-size: 1.3rem;
  font-weight: 200;
  text-align: center;
  font-style: italic;
}

.essay-card__label {
  font-size: clamp(0.75rem, 3.4vw, 0.95rem);
  line-height: 1.35;
  color: rgba(42, 42, 42, 0.78);
}

.essay-list__empty,
.essay-list__noscript {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(42, 42, 42, 0.6);
}

.essay-list__empty {
  max-width: 32ch;
  text-align: center;
  margin-inline: auto;
}

.essay-list__noscript {
  padding-top: 0.5rem;
  font-style: italic;
}

@media (max-width: 1024px) {

  .essay-wrapper {
    width: min(960px, 100%);
    --essay-row-count: 2;
    --essay-card-gap: clamp(16px, 3vh, 28px);
    --essay-card-max: clamp(200px, 32vh, 240px);
  }
}

@media (max-width: 768px) {
  .essay-archive {
    --essay-archive-padding-block: clamp(0.5rem, 4vh, 1.35rem);
  }

  .essay-wrapper {
    width: min(640px, 100%);
    --essay-row-count: 3;
    --essay-card-gap: clamp(12px, 4vw, 20px);
    --essay-wrapper-padding-block: clamp(0.5rem, 3vh, 1rem);
    --essay-wrapper-padding-inline: clamp(0.5rem, 5vw, 1.25rem);
    --essay-card-max: clamp(180px, 36vh, 220px);
    scroll-snap-type: x mandatory;
  }

  .essay-card {
    padding: clamp(0.85rem, 3.5vw, 1.25rem);
  }

  .essay-card__content {
    display: none;
  }

  .essay-card__mobile {
    display: flex;
  }
.essay-card__label {
  display: none;
}
}

@media (max-width: 480px) {

  .essay-wrapper {
    width: min(400px, 100%);
    --essay-card-gap: clamp(10px, 6vw, 18px);
    --essay-wrapper-padding-inline: clamp(0.5rem, 6vw, 1rem);
    --essay-card-max: clamp(160px, 42vh, 200px);
    scroll-padding-inline: clamp(0.75rem, 6vw, 1.25rem);
  }

  .essay-card {
    border-radius: 16px;
  }
}

footer {
  text-align: center;
  padding: 0 var(--page-gutter) calc(24px + env(safe-area-inset-bottom, 0px));
  font-weight: 200;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--background-main);
}

.site-footer {
  display: block;
  height: var(--header-footer-height);
  padding: 0 var(--page-gutter) calc(env(safe-area-inset-bottom, 0px));
  background: var(--background-main);
  border-top: 1px solid rgba(42, 42, 42, 0.08);
  z-index: 40;
  text-align: initial;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--header-footer-height);
  gap: 12px;
}

.site-footer__indicators {
  min-width: 0;
}

.contact-pill {
  grid-area: contact;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-items: center;
  gap: 8px;
  padding: 0 16px;
  min-height: 40px;
  border-radius: 999px;
  border: none;
  background: #f0f0f0;
  color: #ffffff;
  font: inherit;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 120ms cubic-bezier(.2, .7, .2, 1), background-color 150ms ease, box-shadow 150ms ease-in-out;
  box-shadow: 2px 2px 4px #2a2a2a50;
  position: relative;
}

.contact-pill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset .5px .5px 0px 1px #ffffff85,
    inset 2px 2px 4px #ffffff,
    inset -1px -1px 2px rgba(42, 42, 42, 0.12);
  pointer-events: none;
  transition: transform 150ms ease-in-out, scale 150ms ease-in-out, box-shadow 150ms ease-in-out;
}

.contact-pill:hover {
  transform: scale(0.975);
  box-shadow: 1px 1px 2px #2a2a2a75;
  transition: transform 150ms ease-in-out, scale 150ms ease-in-out, box-shadow 150ms ease-in-out;
}

.contact-pill:active::after {
  box-shadow: none;
}

.contact-pill:focus-visible,
.contact-pill:active {
  transform: scale(0.95);
  box-shadow: inset 0 0 2px 0px #000000;
}

.contact-pill:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-pill__label {
  line-height: 1;
  color: #2a2a2a;
}

.site-footer__spacer {
  grid-area: spacer;
}

.catalog-indicators {
  position: relative;
  width: 20dvw;
  max-width: 100%;
  height: 8px;
  border-radius: 9999px;
  background: #ffffff;
  box-shadow: inset 2px 2px #2a2a2a35;
  overflow: hidden;
  min-width: 0;
  margin: 0 auto;
}

.catalog-indicator__fill {
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--color-attention);
  box-shadow: inset -1px -1px #cf2a2c50, inset .5px .5px #ffffff50;
  border-radius: 50%;
  transform: translateX(0) translateY(-50%);
  transition: transform 180ms ease;
}

.contact-dialog {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 240ms cubic-bezier(.2, .7, .2, 1);
  z-index: 100;
}

.contact-dialog.is-visible {
  visibility: visible;
  opacity: 1;
}

.contact-dialog__overlay {
  position: absolute;
  inset: 0;
  background: rgba(42, 42, 42, 0.2);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 500ms cubic-bezier(.2, .7, .2, 1);
  cursor: pointer;
}

.contact-dialog.is-visible .contact-dialog__overlay {
  opacity: 1;
}

.contact-dialog__sheet {
  position: relative;
  background: var(--background-main);
  color: inherit;
  width: min(540px, 100%);
  border-radius: 24px 24px 0 0;
  padding: 32px 24px calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -1px 0 rgba(42, 42, 42, 0.08);
  transform: translateY(20vh);
  transition: transform 240ms cubic-bezier(.2, .7, .2, 1);
}

.contact-dialog.is-visible .contact-dialog__sheet {
  transform: translateY(0);
}

.contact-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.contact-dialog__title {
  font-size: 1.25rem;
  font-weight: 400;
}

.contact-dialog__close {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.875rem;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 150ms ease, transform 120ms cubic-bezier(.2, .7, .2, 1);
}

.contact-dialog__close:hover,
.contact-dialog__close:focus-visible,
.contact-dialog__close:active {
  background: rgba(42, 42, 42, 0.08);
  transform: scale(0.98);
}

.contact-dialog__close:focus-visible {
  outline: 2px solid #2a2a2a;
  outline-offset: 2px;
}

.contact-dialog__list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.contact-dialog__link {
  display: block;
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(42, 42, 42, 0.06);
  color: inherit;
  text-decoration: none;
  font-weight: 300;
  transition: background-color 150ms ease, transform 120ms cubic-bezier(.2, .7, .2, 1);
}

.contact-dialog__link:hover,
.contact-dialog__link:focus-visible,
.contact-dialog__link:active {
  background: rgba(42, 42, 42, 0.12);
  transform: scale(0.98);
}

.contact-dialog__link:focus-visible {
  outline: 2px solid #2a2a2a;
  outline-offset: 2px;
}

body.is-modal-open {
  overflow: hidden;
}

@media (max-width: 960px) {
  .aboutDesktop {
    padding-inline: var(--page-gutter);
  }

  .aboutDesktop-image {
    width: min(45%, 280px);
  }
}

@media (max-width: 640px) {
  header {
    position: relative;
    justify-content: space-between;
    padding: 8px var(--page-gutter);
  }

  .logo {
    margin:0;
  }

  main {
    padding-bottom: calc(var(--header-footer-height) + env(safe-area-inset-bottom, 0px) + 1.5rem);
  }

  .aboutDesktop {
    display: none;
  }

  .about {
    display: flex;
 ;
  }

  .site-footer__inner {
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (prefers-color-scheme: dark) {
  .site-footer {
    border-top-color: color-mix(in srgb, var(--background-secondary, #c4c4c4) 40%, transparent);
  }

  .project {
    background: color-mix(in srgb, var(--background-main) 65%, rgba(255, 255, 255, 0.08));
    box-shadow:
      4px 4px 12px color-mix(in srgb, var(--color-three) 36%, transparent),
      -4px -4px 12px rgba(255, 255, 255, 0.18);
  }
}

.essay-overlay {
  position: fixed;
  height: calc(100dvh - (var(--header-footer-height) * 2));
  align-self: center;
  inset: 0;
  display: grid;
  place-items: center;
  background: #2a2a2a;
  color: #fff;
  z-index: 1100;
  transform: translateX(-110%);
  transition: transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
  padding: 24px;
}

.essay-overlay.is-active {
  transform: translateX(0);
}

.essay-overlay__panel {
  width: calc(100dvw - 48px);
  height:  calc(100dvh - (var(--header-footer-height) * 4));
  overflow-y: hidden;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #2a2a2a50;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3vw, 1.75rem);
}

.essay-overlay__close {
  position: sticky;
  top: 0;
  align-self: flex-end;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  font-family: var(--font);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}

.essay-overlay__close:hover,
.essay-overlay__close:focus-visible {
  background: rgba(255, 255, 255, 0.2);
}

.essay-overlay__header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.essay-overlay__title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  text-align: left;
}

.essay-overlay__body {
  column-width: clamp(18rem, 32vw, 22rem);
  column-gap: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.65;
  font-size: clamp(0.95rem, 2.4vw, 1.05rem);
}

.essay-overlay__body p {
  margin-bottom: 1rem;
  break-inside: avoid;
}

.essay-overlay__body p:last-child {
  margin-bottom: 0;
}

body.essay-overlay-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .essay-overlay {
    padding: clamp(1rem, 4vw, 1.5rem);
  }

  .essay-overlay__panel {
    width: min(100dvw - 2rem, 640px);
    max-height: min(92dvh, 720px);
  }

  .essay-overlay__body {
    column-width: auto;
    column-count: 1;
  }
}
