:root {
  color-scheme: light;
  color: #182236;
  background: #f7f8fa;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
}

main {
  width: min(100%, 38rem);
  margin-block-end: min(10vh, 5rem);
}

h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  line-height: 1.35;
  letter-spacing: -0.04em;
}

nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.875rem;
}

a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 11.25rem;
  padding: 1.25rem 0.75rem;
  border: 1px solid #dce1e7;
  border-radius: 1.25rem;
  background: white;
  color: inherit;
  text-decoration: none;
  transition: border-color 140ms, box-shadow 140ms;
}

a:hover, a:focus-visible {
  border-color: #94a4b7;
  box-shadow: 0 4px 16px rgb(25 42 63 / 9%);
}

a:focus-visible { outline: 3px solid #2164b2; outline-offset: 3px; }
a:active { background: #f3f6fa; }
img { display: block; object-fit: contain; }
.name { margin-top: 1rem; font-size: 1rem; font-weight: 650; }
.domain { margin-top: 0.25rem; font-size: 0.8125rem; color: #586679; }

@media (max-width: 34rem) {
  main { max-width: 25rem; margin-block-end: 0; }
  nav { grid-template-columns: 1fr; gap: 0.625rem; }
  a {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    align-content: center;
    justify-items: start;
    column-gap: 1rem;
    min-height: 5.5rem;
    padding: 1rem 1.25rem;
  }
  img { grid-row: span 2; align-self: center; width: 2.875rem; height: 2.875rem; }
  .name { margin: 0; align-self: end; }
  .domain { align-self: start; }
}

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