@import url('https://fonts.googleapis.com/css?family=IBM+Plex+Mono:400,700&display=swap');

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  min-height: 100vh;
  color: hsl(240, 25%, 95%);
  background: hsl(240, 25%, 20%);
  font-family: 'IBM Plex Mono', monospace;
  padding: 3rem;
}
/* absolute position the icon in the top left corner of the heading */
h1 {
  position: relative;
  font-size: 2.25rem;
  padding: 0.25rem;
  font-weight: 400;
}
.icon {
  position: absolute;
  top: 0%;
  right: 100%;
  transform: translateY(-50%);
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: hsla(240, 25%, 50%, 0.3);
}
.icon svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 3px hsla(240, 25%, 0%, 0.5));
}

/* display the items as squares in a grid */
main {
  margin-top: 2rem;
  display: grid;
  justify-content: center;
  grid-template-columns: repeat(auto-fill, 150px);
  grid-auto-rows: 150px;
  grid-gap: 2rem;
  width: 100%;
  max-width: 1000px;
}
/* display the text elements in a column */
article {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  background: hsla(240, 25%, 50%, 0.1);
  border: 5px solid currentColor;
  border-radius: 25px;
}
article h2 {
  font-weight: 400;
  font-size: 1.25rem;
}
article p {
  font-size: 2.25rem;
  font-weight: 700;
}
/* absolute position the button in the top right corner */
article button {
  position: absolute;
  top: 0%;
  right: 0%;
  transform: translate(50%, -50%);
  background: none;
  border: none;
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  color: inherit;
  background: currentColor;
  /* use the same hue as the background to fake a clip on the border underneath */
  box-shadow: 0 0 0 0.5rem hsl(240, 25%, 20%);
}
article button svg {
  display: block;
  width: 100%;
  height: 100%;
  color: hsl(240, 25%, 20%);
}
