/* Home page only (loaded when index.md sets person_schema). Plain on purpose:
   a readable line length, one bigger opening sentence, and lists that breathe.
   Colours come from theme.css tokens, so light, dark and reading all work. */

.home {
  max-width: 44rem;                 /* phones and tablets: one column */
  font-size: 0.875rem;              /* 14px: a touch above the 13px site body */
  line-height: 1.75;
}

.home .lede {
  font-size: 1.5rem;
  line-height: 1.35;
  font-weight: 700;
  margin: 0.5rem 0 1rem;
  text-wrap: balance;
}

.home h2 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted) !important;
  margin: 2.25rem 0 0.75rem;
}

.home ul {
  padding-left: 1.1rem;
}

.home li {
  margin-bottom: 0.6rem;
}

.home .ask {
  border-left: 3px solid var(--link);
  padding: 0.15rem 0 0.15rem 0.75rem;
  margin: 1.25rem 0 0.5rem;
}

/* Contribution snake, drawn daily by .github/workflows/snake.yml. Light and
   dark files; the site's own mode switch picks one. Hidden if not built yet. */
.home .snake {
  display: block;
  margin: 1.5rem 0 0.5rem;
}

#content-container .home .snake img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
}

/* Same id weight as the img rule above, or that rule's display wins and
   both pictures show. */
#content-container .home .snake .snake-dark,
html[data-mode="dark"] #content-container .home .snake .snake-light {
  display: none;
}

html[data-mode="dark"] #content-container .home .snake .snake-dark {
  display: block;
}

.home .snake[hidden],
#content-container .home .snake img[hidden] {
  display: none;
}

.home .links a {
  white-space: nowrap;
}

/* The theme's home layout shows the RSS icon under the content; on this page
   it sits under the closing line instead of floating mid-page. */
.home + #content {
  margin-top: 0;
}

/* Laptops and up (and a phone in "desktop site" mode, which is about 980px
   wide): one column left a wide blank strip on the right of the
   72rem container. Two columns instead: who you are on the left (it stays in
   view as you scroll), the ask and the work on the right. Order in the
   Markdown is unchanged, so phones still read top to bottom. */
@media (min-width: 900px) {
  .home {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 24rem) minmax(0, 1fr);
    column-gap: 3rem;
    align-items: start;
    font-size: 0.9375rem;           /* 15px */
  }

  .home-intro {
    position: sticky;
    top: 1.5rem;
  }

  .home .lede {
    font-size: 2rem;
    margin-top: 0;
  }

  .home-more > .ask:first-child {
    margin-top: 0.5rem;
  }

  .home-more h2 {
    margin-top: 2rem;
  }
}

@media (max-width: 767px) {
  .home {
    font-size: 0.9375rem;           /* 15px on phones */
  }

  .home .lede {
    font-size: 1.3rem;
  }

  .home ul {
    padding-left: 1rem;
  }
}
