:root {
  --lake-ease-out: cubic-bezier(.23, 1, .32, 1);
  --lake-ease-move: cubic-bezier(.77, 0, .175, 1);
}

html { background: #050403; }

body.lake-entering {
  animation: lake-page-reveal 500ms var(--lake-ease-out) both;
}

body.lake-surfacing {
  pointer-events: none;
  animation: lake-page-close 300ms var(--lake-ease-move) both;
}

@keyframes lake-page-reveal {
  from { clip-path: circle(0 at var(--lake-origin-x, 50%) var(--lake-origin-y, 58%)); }
  to { clip-path: circle(150vmax at var(--lake-origin-x, 50%) var(--lake-origin-y, 58%)); }
}

@keyframes lake-page-close {
  from { clip-path: circle(150vmax at 50% 50%); }
  to { clip-path: circle(0 at 50% 50%); }
}

@media (prefers-reduced-motion: reduce) {
  body.lake-entering,
  body.lake-surfacing { animation: none; }
}

.nav-dir {
  display: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: #efe9de;
  cursor: pointer;
}
.site-directory { display: none; }

@media (max-width: 900px) {
  .topnav,
  .hub-nav,
  .essay-nav,
  .nav-scrolled .topnav,
  .nav-scrolled .hub-nav {
    width: 0;
    height: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    pointer-events: none;
  }
  .topnav > a,
  .hub-nav > a,
  .essay-nav > a { display: none !important; }
  .nav-dir {
    display: block;
    position: fixed;
    top: 16px;
    right: 10px;
    z-index: 92;
    min-width: 44px;
    min-height: 44px;
    padding: 12px 10px 8px;
    border-bottom: 1px solid rgba(215, 198, 178, .55);
    font: 20px/1 "Kaiti SC", STKaiti, "Songti SC", STSong, "Noto Serif CJK SC", serif;
    letter-spacing: .08em;
    color: #efe9de;
    touch-action: manipulation;
  }
  .nav-dir:focus-visible {
    outline: 1px solid #d09a58;
    outline-offset: 4px;
  }
  .site-directory:not([hidden]) {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 91;
    padding: 96px 28px 40px;
    background: rgba(7, 6, 5, .96);
    gap: 0;
    overflow: auto;
  }
  .site-directory a {
    display: block !important;
    padding: 20px 0;
    border-bottom: 1px solid rgba(235, 228, 215, .12);
    font: 400 26px/1.15 "Songti SC", STSong, "Noto Serif CJK SC", serif;
    color: #efe9de;
    letter-spacing: -.02em;
  }
  .site-directory a[aria-current="page"] { color: #d09a58; }
  .site-directory a.dir-break { margin-top: 8px; padding-top: 28px; }
  .site-directory .rain-full { display: inline; }
  .site-directory .rain-short { display: none; }
  body.dir-open { overflow: hidden; }
}
