:root {
  --bg: #08090a;
  --surface: #0f1011;
  --raise: #141516;
  --line: #23252a;
  --hair: rgb(255 255 255 / 0.08);
  --text: #f7f8f8;
  --dim: #8a8f98;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: InterVariable, Inter, system-ui, -apple-system, sans-serif;
  font-feature-settings: "cv01", "ss03";
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid #5e6ad2;
  outline-offset: 2px;
  border-radius: 6px;
}

h1,
h2,
p {
  margin: 0;
}

::selection {
  background: #4b55a8;
  color: #fff;
}

/* Gutters: 16px, 24px from 640px, 32px from 1024px. */
.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}
@media (min-width: 640px) {
  .wrap {
    padding-left: 24px;
    padding-right: 24px;
  }
}
@media (min-width: 1024px) {
  .wrap {
    padding-left: 32px;
    padding-right: 32px;
  }
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 32px;
  background: #5e6ad2;
  color: #fff;
  font-size: 14px;
  font-weight: 510;
}

/* Header: a glass bar, 56px tall, 64px from 640px. */
.header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--hair);
  background: rgb(8 9 10 / 0.8);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
@media (prefers-reduced-transparency: reduce) {
  .header {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
.header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
@media (min-width: 640px) {
  .header-in {
    height: 64px;
  }
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  font-size: 15px;
  font-weight: 590;
  letter-spacing: -0.01em;
}
.mark {
  width: 24px;
  height: 24px;
}
.navs {
  display: flex;
  gap: 4px;
  margin-right: -12px;
}
.nav {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 9999px;
  color: var(--dim);
  font-size: 13px;
  font-weight: 510;
  transition:
    color 120ms var(--ease),
    background-color 120ms var(--ease);
}
.nav:active {
  background: var(--hair);
  color: var(--text);
}
@media (hover: hover) and (pointer: fine) {
  .nav:hover {
    background: var(--hair);
    color: var(--text);
  }
}
@media (max-width: 639.98px) {
  .nav-out {
    display: none;
  }
}

/* Hero */
main {
  flex: 1;
}
.hero {
  padding-top: 64px;
  padding-bottom: 40px;
}
@media (min-width: 1024px) {
  .hero {
    padding-top: 112px;
    padding-bottom: 56px;
  }
}
h1 {
  max-width: 16ch;
  font-size: clamp(36px, 6vw + 8px, 64px);
  font-weight: 510;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.lede {
  max-width: 44ch;
  margin-top: 16px;
  color: var(--dim);
  font-size: 17px;
  line-height: 1.55;
  text-wrap: pretty;
}
@media (min-width: 640px) {
  .lede {
    font-size: 19px;
  }
}
.meta {
  margin-top: 24px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* Grid: 1 column, 2 from 640px, 3 from 1024px. */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 0 0 96px;
  list-style: none;
}
@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition:
    border-color 150ms var(--ease),
    background-color 150ms var(--ease),
    transform 150ms var(--ease);
}
.card:has(.card-link:active) {
  transform: scale(0.99);
}
@media (hover: hover) and (pointer: fine) {
  .card:has(.card-link:hover) {
    border-color: #34343a;
    background: var(--raise);
  }
}
@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
  .card:has(.card-link:active) {
    transform: none;
  }
}
.card:has(.card-link:focus-visible) {
  outline: 2px solid #5e6ad2;
  outline-offset: 2px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.kind {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  color: var(--dim);
  font-size: 12px;
  font-weight: 510;
}
h2 {
  font-size: 19px;
  font-weight: 590;
  letter-spacing: -0.015em;
  line-height: 1.3;
}
/* The name stretches over the card, so the whole tile opens the site.
   Docs and GitHub sit above it. */
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
}
.card-link:focus-visible {
  outline: none;
}
.desc {
  margin-top: 8px;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.55;
  text-wrap: pretty;
}
.stack {
  margin: 16px 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 12px;
}
.links {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 4px;
  margin: auto -10px -6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.links a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  border-radius: 9999px;
  color: var(--dim);
  font-size: 13px;
  font-weight: 510;
  transition:
    color 120ms var(--ease),
    background-color 120ms var(--ease);
}
.links a:active {
  background: var(--hair);
  color: var(--text);
}
@media (hover: hover) and (pointer: fine) {
  .links a:hover {
    background: var(--hair);
    color: var(--text);
  }
}

/* Footer */
.footer-bar {
  border-top: 1px solid var(--line);
}
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  padding-top: 40px;
  padding-bottom: 40px;
  color: var(--dim);
  font-size: 13px;
}
.domain {
  font-family: var(--mono);
}
.footer a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition:
    color 120ms var(--ease),
    text-decoration-color 120ms var(--ease);
}
.footer .credit {
  color: var(--text);
}
@media (hover: hover) and (pointer: fine) {
  .footer a:hover {
    color: var(--text);
    text-decoration-color: currentColor;
  }
}
