:root {
  --background-color: #f5f4f1;
  --foreground-color: #262523;
  --muted-color: color-mix(in srgb, var(--foreground-color) 64%, transparent);
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-inter: "Inter", system-ui, sans-serif;
  --underline: color-mix(in srgb, var(--foreground-color) 35%, transparent);
}
.dark {
  --background-color: #1a1917;
  --foreground-color: #fff7f0;
  --muted-color: color-mix(in srgb, var(--foreground-color) 50%, transparent);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  margin: 0;
  background: var(--background-color);
  color: var(--foreground-color);
  font-family: var(--font-mono);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
h1,
p,
blockquote {
  margin: 0;
  font: inherit;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
}
a {
  color: inherit;
  text-decoration: none;
}

#mainPage {
  position: relative;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  background: var(--background-color);
  transition: background-color 0.3s;
}
#pond {
  pointer-events: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---------- nav ---------- */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding-top: 2rem;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: lowercase;
  width: max-content;
  margin: 0 auto;
}
.nav-item {
  opacity: 0.5;
  outline: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.nav-item:hover,
.nav-item:focus-visible,
.nav-item[aria-current="page"] {
  opacity: 1;
}
.theme-wrap {
  display: flex;
  margin: -1rem;
  padding: 1rem;
}
.theme-toggle svg {
  display: block;
}
.dark .icon-moon,
html:not(.dark) .icon-sun {
  display: none;
}

/* ---------- hero ---------- */
main {
  position: relative;
  z-index: 20;
  display: flex;
  height: 100%;
  flex-direction: column;
}
.hero {
  margin: 0 auto;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  color: var(--foreground-color);
  font-family: var(--font-mono);
}
.motto {
  text-transform: lowercase;
  line-height: 1.625;
  letter-spacing: 0.02em;
  opacity: 0;
  animation: fade-to-60 0.4s forwards;
}
.prose {
  opacity: 0;
  animation: fade-in 0.3s 0.2s forwards;
}
.cursor {
  display: inline-block;
  margin-left: 0.25rem;
  height: 1em;
  width: 0.55em;
  transform: translateY(0.15em);
  background: var(--foreground-color);
  animation: blink 1.1s step-end infinite;
}
@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  to {
    opacity: 0;
  }
}
@keyframes fade-to-60 {
  to {
    opacity: 0.6;
  }
}
@keyframes fade-in {
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }
}

.u {
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  outline: none;
  transition:
    opacity 0.15s,
    text-decoration-color 0.15s;
}
.u:hover,
.u:focus-visible {
  text-decoration-color: var(--foreground-color);
}
.socials .u {
  opacity: 0.6;
}
.socials .u:hover,
.socials .u:focus-visible {
  opacity: 1;
}
.sep {
  opacity: 0.4;
}

/* desktop hero */
.hero-desktop {
  position: relative;
  gap: 2.5rem;
  padding-top: 8rem;
  padding-bottom: 8rem;
}
.hero-desktop .motto {
  font-size: 14px;
}
.hero-desktop .prose {
  max-width: 54rem;
  font-size: 15px;
  line-height: max(22px, 3vh);
}
.hero-desktop .socials {
  margin-top: 1.5vh;
}
@media (max-height: 720px) {
  .hero-desktop {
    gap: 1.5rem;
    padding-top: 5rem;
    padding-bottom: 3rem;
  }
}
.stats {
  position: absolute;
  right: 1.5rem;
  top: 2rem;
  font-size: 11px;
  line-height: 1.625;
  font-variant-numeric: tabular-nums;
}
.stats .dim {
  opacity: 0.32;
}
.stats .pellets {
  animation: pellet-flash 0.6s ease-out forwards;
}
@keyframes pellet-flash {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.32;
  }
}

/* cited prose: hovering a citation dims the rest of the paragraph */
.cited-prose {
  transition: color 0.18s;
}
.cited-prose:has(button:hover),
.cited-prose:has(button:focus-visible),
.cited-prose:has([data-cited-open="true"]) {
  color: color-mix(in srgb, var(--foreground-color) 32%, transparent);
}
.cite {
  position: relative;
  display: inline-block;
}
.cite > button {
  cursor: pointer;
  display: inline;
  vertical-align: baseline;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: var(--underline);
  outline: none;
  transition: text-decoration-color 0.15s;
}
.cite > button:hover,
.cite > button:focus-visible,
.cite[data-cited-open="true"] > button {
  text-decoration-color: var(--foreground-color);
  color: var(--foreground-color);
}
.cite > button:focus-visible {
  text-decoration-thickness: 2px;
}

.card {
  position: absolute;
  bottom: 100%;
  left: 0;
  z-index: 50;
  margin-bottom: 10px;
  width: 340px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  color: var(--foreground-color);
  font-family: var(--font-mono);
  line-height: normal;
  transform-origin: bottom left;
  background: color-mix(in srgb, var(--background-color) 93%, var(--foreground-color));
  border: 1px solid color-mix(in srgb, var(--foreground-color) 9%, transparent);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--foreground-color) 6%, transparent),
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 16px 40px -12px rgba(0, 0, 0, 0.6);
  animation: card-in 0.12s ease-out;
}
html:not(.dark) .card {
  background: color-mix(in srgb, var(--background-color) 45%, #ffffff);
  border-color: color-mix(in srgb, var(--foreground-color) 11%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 1px 2px rgba(38, 37, 35, 0.06),
    0 12px 32px -12px rgba(38, 37, 35, 0.18);
}
@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.98);
  }
}
.card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
}
.card-group {
  display: flex;
  flex-direction: column;
  padding: 6px;
}
.card-group > [role="button"] {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-radius: 6px;
  padding: 8px;
  transition: background-color 0.1s;
}
.card-group > [role="button"]:hover {
  background: color-mix(in srgb, var(--foreground-color) 6%, transparent);
}
.card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1;
}
.card-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  overflow: hidden;
  background: color-mix(in srgb, var(--foreground-color) 12%, transparent);
}
.card-icon.has-img {
  background: none;
  overflow: visible;
}
.card-icon span {
  opacity: 0.6;
  font-size: 10px;
  line-height: 1;
}
.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.card-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0.6;
}
.card-dates {
  margin-left: auto;
  flex-shrink: 0;
  padding-left: 0.5rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.4;
}
.card-role {
  margin-top: 4px;
  font-size: 13px;
  line-height: 18px;
}
.card-summary {
  font-size: 12px;
  line-height: 18px;
  opacity: 0.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 11px;
  line-height: 1;
  opacity: 0.4;
  border-top: 1px solid color-mix(in srgb, var(--foreground-color) 7%, transparent);
}
html:not(.dark) .card-foot {
  border-top-color: color-mix(in srgb, var(--foreground-color) 8%, transparent);
}

/* mobile hero */
.hero-mobile {
  gap: 2rem;
  padding-top: 7rem;
  padding-bottom: 3rem;
}
.hero-mobile .motto {
  font-size: 13px;
}
.hero-mobile .prose {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 14px;
  line-height: 1.6;
}
.hero-mobile .socials {
  margin-top: 0.5rem;
}
@media (max-height: 640px) {
  .hero-mobile {
    gap: 1.25rem;
    padding-bottom: 2rem;
  }
}

/* mobile pill menu */
.mobile-menu {
  position: fixed;
  top: 3vw;
  left: 3vw;
  right: 3vw;
  z-index: 50;
}
.mobile-pill {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3.5vw 5vw;
  border-radius: 9999px;
  cursor: pointer;
  background: color-mix(in srgb, var(--foreground-color) 6%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.mobile-name {
  font-family: var(--font-inter);
  font-weight: 400;
}
.mobile-pill svg {
  width: 4vw;
  height: 4vw;
  fill: color-mix(in srgb, var(--foreground-color) 50%, transparent);
  transition: transform 0.2s;
}
.mobile-pill[aria-expanded="true"] svg {
  transform: rotate(45deg);
}
.mobile-links {
  margin-top: 2vw;
  display: flex;
  flex-direction: column;
  gap: 4vw;
  padding: 5vw;
  border-radius: 6vw;
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: lowercase;
  background: color-mix(in srgb, var(--foreground-color) 6%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.mobile-links[hidden] {
  display: none;
}

/* breakpoint: lg = 1024px */
@media (min-width: 1024px) {
  .mobile-menu,
  .hero-mobile {
    display: none;
  }
  .hero {
    padding-left: 20vw;
    padding-right: 20vw;
  }
  .stats {
    right: 20vw;
  }
}
@media (max-width: 1023.98px) {
  .site-nav,
  .hero-desktop {
    display: none;
  }
}
