#grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 1rem;
  margin-inline: auto;
  inline-size: calc(5 * (50px + 1rem) - 1rem);
  block-size: calc(5 * (50px + 1rem) - 1rem);

  &.open {
    .item {
      grid-area: 3 / 3 / 5 / 5;
    }
  }
}

.item {
  inline-size: 50px;
  aspect-ratio: 1;

  a {
    display: block;
    block-size: 100%;
    background: #ba68c8;
    color: white;
    display: grid;
    place-items: center;
    border-radius: 3px;

    &:hover,
    &:focus {
      background: #9c27b0;
    }

    .open & {
      border-radius: 100%;
    }
  }

  &.middle {
    z-index: 1;
  }
}

body {
  height: 100vh;
  /* cool that this works without grid */
  align-content: center;
  margin: 0;
  font-family: system-ui;
  background: radial-gradient(white 20%, #999);
}

button {
  border: 0;
  background: none;
  font-weight: bold;
  font-size: 20px;
  block-size: 100%;
  aspect-ratio: 1;
  background: #e53935;
  color: white;
  display: grid;
  place-items: center;
  border-radius: 100%;
  &:hover,
  &:focus {
    background: #ff1744;
  }

  &::after {
    content: "✕";
  }

  .open & {
    scale: 1.25;
    &::after {
      content: "☰";
    }
  }
}
