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

html,
body {
  height: 100%;
}

body {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  background: #f7f5f2;
  color: #000;
  -webkit-font-smoothing: antialiased;
}

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

:root {
  --title-size: clamp(2.5rem, 8vw, 5.5rem);
  --nav-size: calc(var(--title-size) * 0.5);
  --active-color: rgb(201, 7, 7);
  --header-top: 2.5rem;
  --header-side: 2rem;
  --logo-size: clamp(1.25rem, 3vw, 1.75rem);
}

@font-face {
  font-family: "Helvetica Rounded LT Std";
  src: local("Helvetica Rounded LT Std Bold"),
       local("HelveticaRoundedLTStd-Bd"),
       local("Helvetica Rounded Bold"),
       local("Arial Rounded MT Bold");
  font-weight: 700;
  font-style: normal;
}

/* Site header */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--header-top) + var(--logo-size) + 1rem);
  z-index: 100;
  pointer-events: none;
}

.site-header > .logo,
.site-header > .menu-toggle,
.site-header > .site-menu {
  pointer-events: auto;
}

.logo {
  position: absolute;
  top: var(--header-top);
  left: 50%;
  transform: translateX(-50%);
  font-family: "Helvetica Rounded LT Std", "Helvetica Rounded", "Arial Rounded MT Bold", sans-serif;
  font-size: var(--logo-size);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  color: #000;
}

.menu-toggle {
  position: absolute;
  top: var(--header-top);
  left: var(--header-side);
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #000;
  cursor: pointer;
}

.site-menu {
  position: absolute;
  top: calc(var(--header-top) + var(--menu-size, var(--logo-size)) + 0.75rem);
  left: var(--header-side);
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  font-size: var(--logo-size);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.site-menu[hidden] {
  display: none;
}

.site-menu a:hover {
  opacity: 0.6;
}

/* Decorations */

.decoration-circles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.decoration-circle {
  position: absolute;
  border-radius: 50%;
  background: #000;
}

.home,
.page {
  position: relative;
  z-index: 1;
}

.site-header {
  z-index: 2;
}

/* Home */

.home {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}

.home-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  font-size: var(--title-size);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-align: center;
}

.word-link {
  text-decoration: underline;
  text-underline-offset: 0.12em;
  text-decoration-thickness: 1px;
}

.word-link:hover {
  opacity: 0.6;
}

/* Sub pages */

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

.page-header {
  padding: calc(var(--header-top) + var(--logo-size) + 2rem) 2rem 0;
}

.nav-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25em;
  font-size: var(--nav-size);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.nav-sep {
  user-select: none;
}

.word-link.is-active {
  color: var(--active-color);
  text-decoration: underline;
  text-underline-offset: 0.12em;
  text-decoration-thickness: 1px;
}

.nav-title .word-link:not(.is-active) {
  text-decoration: none;
}

.sub-list {
  list-style: none;
  margin-top: 0.75rem;
  padding-left: 0;
  font-size: var(--nav-size);
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.sub-list a {
  text-decoration: none;
}

.sub-list a:hover {
  opacity: 0.6;
}

.page-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.illustration {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 0;
}

.illustration svg {
  width: min(280px, 60vw);
  height: auto;
}
