.diary-copy {
  position: sticky;
  top: calc(var(--nav-height) + 36px);
  max-width: 100%;
  padding-bottom: 24px;
}

.diary-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(280px, 0.7fr);
  gap: clamp(32px, 7vw, 86px);
  align-items: start;
}

:root {
  --paper: #ffffff;
  --ink: #000000;
  --muted: #000000;
  --line: #eeeeee;
  --edge: clamp(28px, 5vw, 58px);
  --nav-height: 112px;
  --heading: "Playfair Display", Georgia, serif;
  --mono: monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-kerning: normal;
  font-variant-ligatures: none;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.site-header {
  min-height: var(--nav-height);
}

.navigation {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  min-height: var(--nav-height);
  padding: 22px var(--edge);
  background: var(--paper);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--ink);
  font-size: 0.88rem;
  text-decoration: none;
  text-transform: lowercase;
  text-underline-offset: 5px;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.is-current {
  text-decoration: underline;
}

.brand {
  flex: 0 0 auto;
}

.logo {
  width: clamp(126px, 18vw, 196px);
}

.page-shell {
  width: 100%;
  margin: 0;
  padding: clamp(36px, 5vw, 72px) var(--edge) 96px;
}

h1 {
  margin: 0;
  font-family: var(--heading);
  font-size: clamp(3.1rem, 6.2vw, 5.3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.keep-together {
  white-space: nowrap;
}

p {
  margin: 0;
  max-width: 58ch;
  font-size: clamp(0.96rem, 1.5vw, 1.16rem);
  letter-spacing: 0.01em;
  line-height: 1.5;
  orphans: 3;
  text-wrap: pretty;
  widows: 3;
}

p + p {
  margin-top: 1.15rem;
}

.center-intro {
  max-width: min(900px, 100%);
  margin: 16px auto 64px;
  text-align: center;
}

.center-intro h1 {
  margin: 0 auto;
  text-align: center;
}

.gallery-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vw, 24px);
  max-width: 100%;
  font-size: clamp(2.4rem, 5.2vw, 5rem);
  white-space: nowrap;
}

.title-text {
  flex: 0 1 auto;
}

.title-decor {
  flex: 0 0 auto;
  min-width: 4.9ch;
  font-family: var(--mono);
  font-size: 0.43em;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

.title-decor:first-child {
  text-align: right;
}

.title-decor:last-child {
  text-align: left;
}

.welcome {
  margin-top: 18px;
  max-width: none;
  text-align: center;
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 7vw, 82px);
}

.gallery-item {
  margin: 0;
  width: 100%;
}

.gallery-item img,
.about-collage img {
  width: 100%;
  border: 0;
  box-shadow: none;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(320px, 1fr);
  gap: clamp(32px, 7vw, 92px);
  align-items: center;
  min-height: calc(100vh - var(--nav-height) - 80px);
}

.about-copy {
  max-width: 50ch;
}

.about-copy h1,
.diary-copy h1 {
  margin-bottom: 24px;
  letter-spacing: 0.005em;
}

.about-collage {
  margin: 0;
}

.about-collage img {
  width: min(100%, 620px);
  margin-left: auto;
  border: 0;
  box-shadow: none;
}

.diary-shell {
  width: 100%;
}

.diary-pages {
  margin: 0;
}

.diary-pages img {
  width: 100%;
  background: white;
}

@media (max-width: 820px) {
  :root {
    --nav-height: 96px;
    --edge: clamp(22px, 5.5vw, 36px);
  }

  .navigation {
    align-items: center;
    min-height: var(--nav-height);
    padding-block: 14px;
  }

  .nav-links {
    max-width: 260px;
    gap: 6px 18px;
  }

  .page-shell {
    padding-top: 28px;
  }

  .center-intro {
    margin-bottom: 40px;
  }

  .gallery {
    gap: 42px;
  }

  .about-layout,
  .diary-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .about-layout {
    min-height: 0;
  }

  .about-collage {
    order: -1;
  }

  .about-collage img {
    width: min(100%, 520px);
    margin: 0 auto;
  }

  .diary-copy {
    position: static;
    max-width: 100%;
  }

  .about-copy,
  .diary-copy {
    max-width: 62ch;
  }
}

@media (max-width: 520px) {
  :root {
    --nav-height: 86px;
    --edge: 18px;
  }

  .navigation {
    gap: clamp(10px, 3vw, 14px);
    padding: 12px var(--edge);
  }

  .nav-links {
    max-width: calc(100% - 118px);
    width: auto;
    justify-content: flex-start;
    gap: 4px 14px;
  }

  .brand {
    align-self: auto;
  }

  .logo {
    width: clamp(82px, 24vw, 104px);
  }

  h1 {
    font-size: clamp(2.45rem, 12vw, 3.7rem);
    letter-spacing: 0.003em;
  }

  .gallery-title {
    gap: clamp(5px, 2vw, 10px);
    font-size: clamp(1.55rem, 8.2vw, 2.45rem);
  }

  .title-decor {
    min-width: 4.4ch;
    font-size: 0.34em;
  }

  p {
    max-width: 40ch;
  }
}