@font-face {
  font-family: "Press Start 2P";
  src: url("../fonts/Press_Start_2P/PressStart2P-Regular.ttf");
}

* {
  box-sizing: border-box;
}

html {
  background: #021b20;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background: #021b20;
  color: #fffcf5;
  font-family: "Press Start 2P", monospace;
}

main {
  width: min(450px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 2rem 0 0;
}

.home-link,
.site-link {
  text-decoration: none;
}

.home-link {
  display: inline-block;
  margin-bottom: 3.5rem;
  color: #c3ccaf;
  font-size: 0.7rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-link:hover {
  color: #ffffff;
}

.page-header {
  margin-bottom: 3rem;
}

h1 {
  margin: 0 0 1rem;
  color: #ffffff;
  font-size: clamp(1.75rem, 8vw, 3.4rem);
  font-weight: normal;
  letter-spacing: 0;
  line-height: 1.18;
}

.intro {
  max-width: 34rem;
  margin: 0;
  color: #c3ccaf;
  font-size: clamp(0.62rem, 2vw, 0.78rem);
  line-height: 1.85;
}

.collection-title {
  margin: 0 0 1rem;
  color: #e37fd3;
  font-size: 0.7rem;
  font-weight: normal;
  letter-spacing: 0;
  text-transform: uppercase;
}

.link-section + .link-section {
  margin-top: 3rem;
}

.card-stack {
  padding-bottom: 2rem;
}

.link-section:last-of-type .card-stack {
  padding-bottom: 45vh;
}

.site-card {
  position: sticky;
  top: 1rem;
  width: 100%;
  min-height: 150px;
  margin-bottom: 1rem;
  padding: 1.5rem 2rem;
  border: 1px solid #021b20;
  background: #fffcf5;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  color: #4a3f35;
  transition:
    box-shadow 180ms ease,
    transform 180ms ease;
}

.site-card:hover,
.site-card:focus-within {
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
  transform: translateY(-4px);
}

.site-card:nth-of-type(6n + 1) {
  rotate: -0.5deg;
  background: #fffcf5;
}

.site-card:nth-of-type(6n + 2) {
  rotate: 0.8deg;
  background: #fef9f0;
}

.site-card:nth-of-type(6n + 3) {
  rotate: -1deg;
  background: #fcf5e8;
}

.site-card:nth-of-type(6n + 4) {
  rotate: 1.2deg;
  background: #fef7ec;
}

.site-card:nth-of-type(6n + 5) {
  rotate: -0.7deg;
  background: #fbf3e4;
}

.site-card:nth-of-type(6n) {
  rotate: 0.5deg;
  background: #fef5e7;
}

.site-card h3 {
  margin: 0 0 0.5rem;
  color: #ff0000;
  font-size: 1rem;
  font-weight: normal;
  letter-spacing: 0;
  line-height: 1.45;
}

.site-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.site-heading h3 {
  margin-bottom: 0;
}

.site-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid #e6d7bf;
  border-radius: 9px;
  background: #fffaf0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.75),
    0 1px 2px rgba(74, 63, 53, 0.14);
  object-fit: contain;
  padding: 5px;
}

.site-link {
  display: inline-block;
  border-bottom: 1px solid rgba(139, 111, 80, 0.35);
  color: #5c4d40;
  font-size: 0.68rem;
  line-height: 1.65;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.site-link:hover {
  border-color: #8b6f50;
  color: #322920;
  transform: translateX(3px);
}

.home-link:focus-visible,
.site-link:focus-visible {
  border-radius: 2px;
  outline: 3px solid #e37fd3;
  outline-offset: 5px;
}

footer {
  padding: 0.35rem 0 0.5rem;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

footer a {
  text-decoration: none;
}

footer .brand-label img {
  height: 48px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

footer .github-footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(195, 204, 175, 0.45);
  border-radius: 6px;
  background: rgba(255, 252, 245, 0.08);
}

footer .github-footer-link:visited {
  color: #fffcf5;
}

footer .github-footer-link:hover {
  border-color: #fffcf5;
  color: #ffffff;
}

footer .github-footer-link img {
  display: block;
  width: 86px;
  height: auto;
}

footer .cc-link {
  color: inherit;
}

footer .cc-icon {
  max-width: 1em;
  max-height: 1em;
  margin-left: 0.2em;
  vertical-align: middle;
}

footer p {
  margin: 0;
}

@media (max-width: 520px) {
  main {
    width: min(100% - 2rem, 450px);
    padding-top: 1.25rem;
  }

  .home-link {
    margin-bottom: 2.75rem;
  }

  .page-header {
    margin-bottom: 2.5rem;
  }

  .site-card {
    min-height: 136px;
    padding: 1.3rem 1.4rem;
  }

  .site-card h3 {
    font-size: 0.82rem;
  }

  .site-icon {
    width: 32px;
    height: 32px;
  }

  .site-link {
    font-size: 0.56rem;
    overflow-wrap: anywhere;
  }
}
