:root {
  color-scheme: light dark;

  --FONT-UI: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --PAPER: #f6f6f4;
  --PAPER-RAISED: #ffffff;
  --INK: #131316;
  --INK-SOFT: #5e6068;
  --LINE: rgb(19 19 22 / 0.12);
  --LINE-STRONG: rgb(19 19 22 / 0.22);
  --WASH: rgb(19 19 22 / 0.04);
  --SHADOW: 0 14px 32px -18px rgb(19 19 22 / 0.22);

  --ACCENT: #4c34d8;

  --TEXT-SIZE: 1.05rem;

  --GUTTER: clamp(16px, 4vw, 40px);
  
  --HEADER-INSET: calc(var(--GUTTER) + 2rem);
  --CORNERS-SM: 8px;
  --CORNERS: 14px;
  --CORNERS-PILL: 999px;

  --EASE: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --PAPER: #0d0d0f;
    --PAPER-RAISED: #161619;
    --INK: #ececee;
    --INK-SOFT: #9d9ea6;
    --LINE: rgb(236 236 238 / 0.12);
    --LINE-STRONG: rgb(236 236 238 / 0.24);
    --WASH: rgb(236 236 238 / 0.05);
    --SHADOW: 0 14px 36px -18px rgb(0 0 0 / 0.8);

    --ACCENT: #a393ff;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: clamp(12.2px, 0.19vw + 11.2px, 13.6px);
}

@media (max-width: 860px) {
  html {
    font-size: 13.2px;
  }
}

@media (max-width: 600px) {
  :root {
    --HEADER-INSET: calc(var(--GUTTER) + 0.5rem);
  }
}

body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--PAPER);
  color: var(--INK);
  font-family: var(--FONT-UI);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.9;
  letter-spacing: 0.035em;
  
  font-variant-numeric: lining-nums;
  
  -webkit-user-select: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*,
*::before,
*::after {
  transition:
    color 0.22s ease,
    background-color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    opacity 0.22s ease;
}

.dotfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul {
  list-style: none;
}

p {
  letter-spacing: 0.035em;
}

.icon {
  display: block;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible {
  outline: 2px solid var(--ACCENT);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

strong {
  font-weight: 500;
}

.link {
  font-weight: 500;
  color: var(--INK);
  text-decoration: underline;
  text-decoration-color: var(--LINE-STRONG);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.link:hover {
  opacity: 0.45;
}

.nowrap {
  white-space: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  height: 1.7rem;
  padding: 0 0.75rem;
  border-radius: var(--CORNERS-PILL);
  box-shadow: inset 0 0 0 1px var(--LINE);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.chip-dot::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--ACCENT);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--ACCENT) 18%, transparent);
}

.header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--HEADER-INSET);
}

.mark {
  height: 5rem;
  aspect-ratio: 230 / 337;
  background: var(--INK);
  -webkit-mask: url("Assets/Logo.png") center / contain no-repeat;
  mask: url("Assets/Logo.png") center / contain no-repeat;
}

.nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  color: var(--INK-SOFT);
}

.nav-link:hover,
.nav-link[aria-expanded="true"] {
  color: var(--INK);
}

.nav-link .icon {
  width: 0.8rem;
  height: 0.8rem;
  transition: transform 0.2s var(--EASE);
}

.nav-link[aria-expanded="true"] .icon {
  transform: rotate(180deg);
}

.options {
  position: relative;
}

.options-menu {
  position: absolute;
  top: 50%;
  right: calc(100% + 1rem);
  display: flex;
  align-items: center;
  gap: 1.1rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%);
  clip-path: inset(0 0 0 100%);
  transition:
    clip-path 0.34s var(--EASE),
    opacity 0.2s ease,
    visibility 0s linear 0.34s;
}

[aria-expanded="true"] + .options-menu {
  opacity: 1;
  visibility: visible;
  clip-path: inset(0 0 0 0);
  transition-delay: 0s;
}

.options-menu a {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  color: var(--INK-SOFT);
}

.options-menu a:hover {
  color: var(--INK);
}

.options-menu li {
  display: flex;
  align-items: center;
}

.options-menu li + li::before {
  content: "";
  flex: none;
  width: 0.26rem;
  height: 0.26rem;
  margin-right: 1.1rem;
  border-radius: 50%;
  background: var(--INK-SOFT);
}

.options-menu .split {
  padding-left: 1.1rem;
  border-left: 1px solid var(--LINE);
}

.options-menu .split::before {
  content: none;
}

@media (max-width: 860px) {
  .options {
    position: static;
  }

  .options-menu {
    left: var(--HEADER-INSET);
    right: var(--HEADER-INSET);
    gap: 1rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    background: var(--PAPER);
  }

  .options-menu::-webkit-scrollbar {
    display: none;
  }

  .options-menu::after {
    content: "";
    flex: none;
    width: 7rem;
  }

  .options > .nav-link {
    position: relative;
    z-index: 1;
    padding-left: 0.6rem;
    background: var(--PAPER);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.footer {
  padding: 0 var(--GUTTER) 1.6rem;
  font-size: 0.85rem;
  letter-spacing: 0.07em;
  color: var(--INK-SOFT);
  text-align: center;
}

.typing .mark,
.typing .nav-link,
.typing .statement,
.typing .core-stem,
.typing .chip,
.typing .core-text,
.typing .footer {
  visibility: hidden;
}

.arriving .letter {
  animation: letter-in 1ms linear both;
}

@keyframes letter-in {
  from {
    opacity: 0;
  }
}

@keyframes raise {
  from {
    opacity: 0;
  }
}
