/* sort.land. Colours match gunnaringe.sort.land's original paper look; the
   handwriting font is used for the name only. */

@font-face {
  font-family: "gi";
  src: url("gi.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #f6f3ec;
  --card: #fffdf8;
  --ink: #1f2227;
  --muted: #5d636e;
  --accent: #2c55c9;
  --line: color-mix(in oklab, var(--ink) 18%, transparent);
  --dot: color-mix(in oklab, var(--ink) 14%, transparent);
  --shadow: 0 1px 2px rgb(30 25 15 / 0.06), 0 10px 30px -12px rgb(30 25 15 / 0.22);
  --hand: "gi", "Segoe Print", "Bradley Hand", cursive;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16181d;
    --card: #1f2229;
    --ink: #ebe7de;
    --muted: #a3a8b3;
    --accent: #93b0ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -12px rgb(0 0 0 / 0.6);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background: var(--paper) radial-gradient(var(--dot) 1.2px, transparent 1.6px) 0 0 / 26px 26px;
  color: var(--ink);
  font: 400 1.0625rem/1.5 var(--sans);
}

main {
  display: grid;
  justify-items: center;
  gap: 2rem;
  width: min(100%, 30rem);
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 2rem + 3vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.people {
  display: grid;
  gap: 1rem;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.person {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.1rem 1.4rem;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transform: rotate(-1.5deg);
  transition: transform 0.2s, border-color 0.2s;
}

.person:hover {
  border-color: var(--accent);
  transform: rotate(0deg) scale(1.02);
}

.person:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* The portrait as drawn: dark line art on the light card. In dark mode it
   sits on a light badge rather than being inverted. */
.portrait {
  flex: none;
  width: 4.2rem;
  aspect-ratio: 480 / 710.7;
  background: #1f2227;
  -webkit-mask: url("portrait.svg") center / contain no-repeat;
  mask: url("portrait.svg") center / contain no-repeat;
}

@media (prefers-color-scheme: dark) {
  .portrait {
    width: 5rem;
    padding: 0.5rem 0.6rem 0;
    background: #ebe7de;
    border-radius: 50% 50% 10px 10px / 40% 40% 10px 10px;
    -webkit-mask: none;
    mask: none;
  }

  .portrait::before {
    content: "";
    display: block;
    height: 100%;
    background: #1f2227;
    -webkit-mask: url("portrait.svg") center bottom / contain no-repeat;
    mask: url("portrait.svg") center bottom / contain no-repeat;
  }
}

/* The name is sized from the width of its column (cqi) so it always stays
   on one line; it is about 8.5 em wide in this font. */
.person-text {
  display: grid;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
  container-type: inline-size;
}

.name {
  font-family: var(--hand);
  font-size: min(1.9rem, 100cqi / 8.6);
  line-height: 1.15;
  white-space: nowrap;
}

.url {
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .person {
    transition: none;
  }
}
