/* Home: a large polaroid beside the introduction, the latest note as a post-it under it, then the topics. */

.home {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0 64px;
  align-items: start;
  margin-top: 30px;
}

.home h1 { margin: 0; font-size: 3.4rem; line-height: 1.1; }

.home__bio { margin: .7em 0 0; color: var(--paper-muted); font-size: 1.2rem; line-height: 1.6; }

/* The signature is a mask filled with the ink colour, so it follows the theme. */
.home__signature {
  width: min(260px, 100%);
  aspect-ratio: 520 / 69;
  margin-left: auto;
  margin-top: 1em;
  background: var(--paper-ink);
  mask: url("/assets/signature-37998bbc.png") center / contain no-repeat;
}


.home__latest { grid-column: 2; max-width: 380px; margin-top: 30px; }

.polaroid {
  position: relative;
  margin: 8px 0 0;
  grid-row: span 2;
  padding: 14px 14px 56px;
  rotate: -3deg;
  background: var(--polaroid);
  box-shadow: 0 10px 19px var(--shadow);
}
/* A portrait print, like an Instax: the illustration is framed from the top (face, then the cup). */
.polaroid img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }

/* The latest note, stuck on with a strip of tape. */
.note-card {
  position: relative;
  padding: 19px 21px 21px;
  rotate: 2.2deg;
  background: var(--postit);
  color: var(--postit-ink);
  box-shadow: 0 17px 19px -11px rgba(0, 0, 0, .4);
}
.note-card::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 35%;
  width: 95px;
  height: 27px;
  rotate: -4deg;
  background: rgba(255, 255, 255, .45);
}
.note-card .label,
.note-card .note-card__meta { color: var(--postit-ink); opacity: .8; }
.note-card h2 { margin: .2em 0 .3em; font-size: 1.3em; line-height: 1.15; }
.note-card h2 a { text-decoration: none; }
.note-card h2 a:hover { text-decoration: underline; }
.note-card .note-card__description { margin: 0; font-size: .88em; line-height: 1.5; }
.note-card .note-card__meta { margin: .8em 0 0; font-family: var(--f-ui); font-size: .72rem; }

/* The topics as index cards, each topped with its tag colour. */
.home-topics { margin-top: 48px; padding-top: 22px; border-top: 1px dashed var(--dot); }
.home-topics ul { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; margin: 18px 0 0; padding: 0; list-style: none; }
.home-topics li { padding: 14px 16px 16px; border-top: 6px solid var(--tag); background: var(--paper-2); box-shadow: 0 6px 10px -6px var(--shadow); }
.home-topics li:nth-child(odd) { rotate: -1deg; }
.home-topics li:nth-child(even) { rotate: 1.2deg; }
.home-topics a { font: 700 1rem var(--f-ui); text-decoration: none; }
.home-topics a:hover { text-decoration: underline; }
.home-topics p { margin: .4em 0 0; color: var(--paper-muted); font-size: .85rem; line-height: 1.45; }

@media (max-width: 1200px) {
  .home { grid-template-columns: 220px minmax(0, 1fr); gap: 0 44px; }
  .home h1 { font-size: 2.8rem; }
  .home-topics ul { gap: 16px; }
  .home-topics li { padding-inline: 12px; }
}

@media (max-width: 900px) {
  .home { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .home__latest { grid-column: auto; margin-top: 0; }
  .polaroid { width: 200px; grid-row: auto; }
  .home h1 { font-size: 2.1rem; }
  .home__bio { font-size: 1.05rem; }
  .home-topics { margin-top: 40px; }
  .home-topics ul { grid-template-columns: 1fr 1fr; gap: 16px; }
}
