:root {
  color-scheme: dark;

  --bg: #0b0d10;
  --surface: #12161b;
  --border: #252b33;
  --text: #f2f4f7;
  --muted: #8d96a3;
  --accent: #79a7ff;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;

  background: var(--bg);
  color: var(--text);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  display: flex;
  flex-direction: column;
}

main {
  width: min(900px, calc(100% - 40px));
  margin: auto;
  padding: 80px 0;
}

.tag {
  margin-bottom: 18px;

  color: var(--accent);

  font-family: monospace;
  font-size: 14px;
}

h1 {
  margin: 0 0 28px;

  font-size: clamp(48px, 10vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.intro {
  max-width: 620px;
  margin: 0;

  color: var(--muted);

  font-size: 20px;
  line-height: 1.6;
}

.grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(min(280px, 100%), 280px)
  );

  gap: 14px;
  margin-top: 55px;
  justify-content: center;
}

/* Four 280px columns overflow the 900px main column, so from the fourth
   card on the tracks flex down to keep the row full instead of wrapping. */
.grid:has(> .card:nth-child(4)) {
  grid-template-columns: repeat(
    auto-fit,
    minmax(min(210px, 100%), 1fr)
  );
}

.card {
  display: block;
  min-width: 0;

  padding: 24px;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;

  color: inherit;
  text-decoration: none;

  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.card:hover {
  border-color: #3b4654;
  transform: translateY(-2px);
}

.card h2 {
  margin: 0 0 9px;
  font-size: 18px;
}

.card p {
  margin: 0;

  color: var(--muted);

  font-size: 14px;
  line-height: 1.5;
}

footer {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: 25px 0;

  border-top: 1px solid var(--border);

  color: var(--muted);

  font-family: monospace;
  font-size: 13px;
}

@media (max-width: 600px) {
  main {
    padding: 50px 0;
  }

  .intro {
    font-size: 17px;
  }
}