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

html {
  height: 100%;
}

body {
  min-height: 100%;
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  line-height: 1.6;
  color: #000;
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

a:hover {
  border-bottom-color: currentColor;
}

.site-header,
.ideas,
.idea-page {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

body.ideas {
  padding: 64px 0 120px;
}

body.idea {
  padding: 48px 0 120px;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 64px;
}

.site-title {
  font-size: 20px;
  font-weight: 600;
}

.site-header nav a {
  font-size: 16px;
  border-bottom-color: currentColor;
}

.site-header nav a:hover {
  border-bottom-color: transparent;
}

.ideas-head {
  margin-bottom: 72px;
}

.ideas .idea + .idea {
  margin-top: 96px;
}

.ideas-head h1,
.idea-head h1 {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1.05;
}

.idea-head {
  margin-bottom: 40px;
}

.idea-head h2 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.idea-meta {
  margin-top: 12px;
  font-size: 14px;
  color: #777;
}

.idea-body {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 58%);
  column-gap: 64px;
  align-items: start;
}

.idea-images {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 32px;
}

.idea-images img {
  display: block;
  width: 100%;
  height: auto;
}

.idea-text {
  font-size: 18px;
  line-height: 1.7;
  max-width: 34em;
}

.idea-text ul {
  list-style: none;
}

.idea-text li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.idea-text li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #999;
}

.idea-text a {
  border-bottom-color: currentColor;
}

.idea-text a:hover {
  border-bottom-color: transparent;
}

.idea-foot {
  margin-top: 80px;
}

.idea-related {
  margin-bottom: 48px;
}

.idea-related h3 {
  font-size: 13px;
  font-weight: 400;
  color: #777;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.idea-related ul {
  list-style: none;
}

.idea-related li {
  margin-bottom: 8px;
}

.idea-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: 16px 24px;
  margin-top: 24px;
}

.pager-link {
  justify-self: start;
}

.pager-next {
  justify-self: end;
  text-align: right;
}

.pager-all {
  justify-self: center;
  font-size: 16px;
}

.pager-label {
  display: block;
  font-size: 13px;
  color: #777;
  margin-bottom: 4px;
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  body.ideas {
    padding: 40px 0 80px;
  }

  body.idea {
    padding: 32px 0 80px;
  }

  .site-header {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 40px;
  }

  .ideas-head {
    margin-bottom: 48px;
  }

  .ideas .idea + .idea {
    margin-top: 64px;
  }

  .idea-head {
    margin-bottom: 24px;
  }

  .idea-body {
    grid-template-columns: 1fr;
    row-gap: 24px;
  }

  .idea-images {
    position: static;
    gap: 16px;
  }

  .idea-text {
    max-width: none;
  }

  .idea-foot {
    margin-top: 56px;
  }

  .idea-pager {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 16px;
  }

  .pager-link,
  .pager-next,
  .pager-all {
    justify-self: start;
  }

  .pager-next {
    text-align: left;
  }
}
