:root {
  --ink: #111;
  --paper: #fff;
  --muted: #6b6b6b;
  --faint: #c9c9c9;
  --radius: 16px;
  --font: "Atkinson Hyperlegible", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
}

a { color: inherit; }

/* Masthead */

.masthead {
  text-align: center;
  padding: 48px 16px 36px;
}

.home { display: inline-block; }

.logo {
  display: block;
  width: min(260px, 64vw);
  height: auto;
  margin: 0 auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Project grid */

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px 64px;
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  aspect-ratio: 8 / 3;
  padding: 12px 20px;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  text-decoration: none;
  text-align: center;
  overflow: hidden;
}

a.card:hover,
a.card:focus-visible {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--ink);
  outline: none;
}

a.card:active {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0 var(--ink);
}

.card.has-image { padding: 0; }

.card.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-title {
  font-size: clamp(1.6rem, 4.4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.1;
}

.card-by { color: var(--muted); }

.card.soon {
  border: 2.5px dashed var(--faint);
}

/* 404 */

.lost {
  text-align: center;
  padding: 18vh 16px;
}

.lost h1 { font-size: 2rem; margin: 18px 0 6px; }
.lost a { font-weight: 700; }
