@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Nunito Sans", sans-serif;
}

html {
  background-color: #E5E1D8;
}

body {
  display: grid;
  grid-template-areas:
    "header header"
    "aside main"
    "footer footer";
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 1fr 4fr;
  gap: 2rem;
  padding: 2rem;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
}

header {
  grid-area: header;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #31312F;
}

aside {
  grid-area: aside;
  padding: 1rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  position: sticky;
  top: 2rem;
  max-height: calc(100vh - 9.5rem);
  border-radius: 10px;
  background-color: #31312F;
}

aside label {
  color: black;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: .5rem;
  width: 100%;
}

aside label h2 {
  font-size: 1.5rem;
  color: white;
}

aside label input {
  padding: .5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  text-align: center;
  width: 100%;
  font-size: 1.5rem;
}

main {
  grid-area: main;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  border-radius: 10px;
  background-color: #C5C5B9;
}

aside, main {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

footer {
  grid-area: footer;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #31312F;
  flex-wrap: wrap;
}

.person {
  display: grid;
  grid-template-areas: "number avatar content";
  grid-template-columns: 96px 96px 1fr;
  column-gap: 2rem;
  row-gap: .3rem;
  align-content: center;
  opacity: .3;
  transform: translateY(-10%);
  animation: fade-in .5s forwards;
  animation-delay: var(--animation-delay);
}

.person span {
  grid-area: number;
  width: 96px;
  height: 96px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  border: 2px solid #A09F8D;
  background-color: #E2E3DD;
  color: black;
  font-weight: bold;
  font-size: 3rem;
  box-shadow: 0 0 10px 1px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.person img {
  grid-area: avatar;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.person div {
  grid-area: content;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.person h3 {
  grid-area: name;
  font-size: 1.5rem;
}

.person p:first-of-type {
  grid-area: email;
}

.person p:last-of-type {
  grid-area: job;
  color: #666;
}

.empty {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  color: #666;
}

@keyframes fade-in {
  from {
    opacity: .5;
    transform: translateY(-10%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 780px) {
  body {
    grid-template-areas:
      "header"
      "aside"
      "main"
      "footer";
    grid-template-rows: auto auto 1fr auto;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  aside {
    max-height: none;
    z-index: 10;
  }

  main {
    padding: 1rem;
    overflow: hidden;
  }

  .person {
    display: flex;
    gap: 1rem;
    overflow: hidden;
  }

  .person div {
    overflow: hidden;
  }

  .person img {
    display: none;
  }

  .person span {
    width: 64px;
    height: 64px;
    font-size: 2rem;
  }

  .person div p {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}