/* mochi: a soft white, dusted; sumi ink, never black */
:root {
  --paper: #fbfaf8;
  --ink: #3a3a38;
  --faint: #b5b3ae;
}

/* unbearably light: thin weight, characters and latin from one family (The Type: looser leading for mixed script) */
body {
  margin: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--ink);
  font: 300 14px/2 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  letter-spacing: 0.02em;
}

.container {
  display: flex;
  gap: 8em;
  width: 840px;
  max-width: calc(100vw - 32px);
  height: 640px;
  max-height: calc(100vh - 64px);
}

main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
}

nav a {
  display: block;
  white-space: nowrap;
  color: var(--faint);
  text-decoration: none;
  transition: color 0.2s;
}

nav a:hover,
nav a.active {
  color: var(--ink);
}

section:not(.active) {
  display: none;
}

/* each page comes into focus, softly and quickly, like an eye adjusting */
section.active {
  animation: focus-in 0.4s ease-out;
}

section p {
  margin: 1.5em 0 0;
}

section p:first-child {
  margin-top: 0;
}

/* home: the photograph takes all the height the nameplate does not; the nameplate below it, at the threshold */
section#home.active {
  height: 100%;
  display: flex;
  flex-direction: column;
}

section#home img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: contain;
  object-position: left bottom;
  margin-bottom: 2em;
}

section#home p {
  margin: 0;
}

@keyframes focus-in {
  from { opacity: 0.4; filter: blur(4px); }
}

/* phones: the nav becomes one row across the top, the text takes the full width below it;
   the box still fills the screen at a fixed height, so nothing moves between pages */
@media (max-width: 640px) {
  body {
    height: 100svh;
  }

  .container {
    flex-direction: column;
    gap: 2.5em;
    height: calc(100svh - 64px);
    max-height: none;
  }

  nav {
    display: flex;
    gap: 1.5em;
  }

  section#home img {
    object-fit: cover;
    object-position: center;
  }
}
