body {
  height: 100%;
  padding: 5px;
  margin: 0;
  background-color: rgb(44, 43, 43);
  color: white;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

header {
  flex-wrap: wrap;
  padding: 1rem;
  display: flex;
  flex-direction: row;
  background-color: rgb(33, 30, 30);
  color: wheat;
}
header h1 {
  font-size: xx-large;
}
nav {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  text-align: center;
  align-items: center;
  width: 100%;
  padding: 0 1rem;
}
nav a {
  white-space: nowrap;
  flex: 1;
  font-size: xx-large;
  color: white;
  padding: 1rem;
  transition: 0.5s;
  text-decoration: none;
}
nav a:hover,
nav a:focus {
  color: rgb(241, 195, 110);
  font-weight: bold;
}

.intro {
  padding: 5px;
  font-size: 20px;
  text-align: justify;
}
.intro h1 {
  text-align: center;
  font-size: 50px;
}
.cards {
  width: 100%;
  height: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 15px;
  row-gap: 15px;
  justify-content: center;
  perspective: 1000px;
  min-height: 100vh;
  overflow: visible;
}

.card {
  padding: 5px 0px;
  height: 400px;
  width: 100%;

  display: flex;
  flex-direction: column;
  border-radius: 20px;
  position: relative;
  box-sizing: border-box;
  background: linear-gradient(135deg, #1e1e2f, #3a3a52);
  transform-style: preserve-3d;
  transition: transform 1s;
  box-shadow: 5px 5px 5px rgba(169, 164, 164, 0.5);
}
.card-inner {
  width: 100%;
  height: 100%;
  position: absolute;
  transform-style: preserve-3d;
}
.card-front {
  padding: 5px;
  position: absolute;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  text-align: center;
  font-size: 40px;
}

.card-front p {
  line-height: 0.7;
  font-size: 25px;
}
.card-front span {
  font-size: 15px;
}
.card-front b {
  text-align: center;
}
.card-front .data {
  padding: 10px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.card-front img {
  margin: 5px;
  align-self: flex-end;
  border-radius: 50px;
  width: 60%;
  max-height: 300px;
  box-shadow: 10px 10px 15px rgba(169, 164, 164, 0.5);
}
.card-back {
  padding: 10px;
  width: 100%;
  height: 100%;
  border-radius: 15px;
  position: absolute;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
  overflow-wrap: break-word;
  box-sizing: border-box;
  overflow: hidden;
  color: white;
  transform: rotateY(180deg);
}
.card-back .data {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  word-break: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
  font-size: 16px;
}
.card:hover {
  transform: rotateY(180deg);
}
@media screen and (max-width: 768px) {
  header {
    padding: 0.2rem;
  }
  header h1 {
    font-size: 16px;
  }
  nav {
    width: 100%;
    padding: 0 0.2rem;
  }
  nav a {
    font-size: small;
    padding: 0.2rem;
  }
  .intro {
    padding: 5px;
    font-size: 10px;
    text-align: justify;
  }
  .intro h1 {
    font-size: 20px;
    text-align: center;
  }
  .cards {
    width: 100%;
    height: auto;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    row-gap: 15px;
    justify-content: center;
    perspective: 1000px;
    min-height: 100vh;
    overflow: visible;
  }

  .card {
    padding: 5px 0px;
    width: 100%;
    height: 250px;

    display: flex;
    flex-direction: column;
    border-radius: 20px;

    position: relative;

    background: linear-gradient(135deg, #1e1e2f, #3a3a52);
    transform-style: preserve-3d;
    transition: transform 1s;
  }
  .card-inner {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
  }
  .card-front {
    padding: 5px;
    position: absolute;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    text-align: center;
    font-size: 20px;
  }

  .card-front p {
    line-height: 0.7;
    font-size: 25px;
  }
  .card-front span {
    font-size: 15px;
  }
  .card-front b {
    text-align: center;
  }
  .card-front .data {
    padding: 10px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .card-front .info {
    display: flex;
    flex-direction: column;
  }
  .card-front img {
    align-self: flex-end;
    border-radius: 50px;
    width: 50%;
    max-height: 200px;
  }
  .card-back {
    padding: 10px;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    position: absolute;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
    overflow-wrap: break-word;
    box-sizing: border-box;
    overflow: hidden;
    color: white;
    transform: rotateY(180deg);
  }
  .card-back .data {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
    font-size: 12px;
  }

  .card:hover {
    transform: rotateY(180deg);
  }
}

@media screen and (min-width: 769px) and (max-width: 1025px) {
  header {
    padding: 0.5rem;
  }
  header h1 {
    font-size: 30px;
  }
  nav {
    width: 100%;
    padding: 0 0.2rem;
  }
  nav a {
    font-size: 24px;
    padding: 0.2rem;
  }
  .intro {
    padding: 10px;
    font-size: 15px;
    text-align: justify;
  }
  .intro h1 {
    font-size: 30px;
    text-align: center;
  }
  .cards {
    width: 100%;
    height: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 15px;
    justify-content: center;
    perspective: 1000px;
    min-height: 100vh;
    overflow: visible;
  }

  .card {
    padding: 5px 0px;
    width: 100%;
    height: 280px;

    display: flex;
    flex-direction: column;
    border-radius: 20px;

    position: relative;

    background: linear-gradient(135deg, #1e1e2f, #3a3a52);
    transform-style: preserve-3d;
    transition: transform 1s;
  }
  .card-inner {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
  }
  .card-front {
    padding: 5px;
    position: absolute;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    text-align: center;
    font-size: 20px;
  }

  .card-front p {
    line-height: 0.7;
    font-size: 25px;
  }
  .card-front span {
    font-size: 15px;
  }
  .card-front b {
    text-align: center;
  }
  .card-front .data {
    padding: 10px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .card-front .info {
    display: flex;
    flex-direction: column;
  }
  .card-front img {
    align-self: flex-end;
    border-radius: 50px;
    width: 50%;
    max-height: 200px;
  }
  .card-back {
    padding: 10px;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    position: absolute;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
    overflow-wrap: break-word;
    box-sizing: border-box;
    overflow: hidden;
    color: white;
    transform: rotateY(180deg);
  }
  .card-back .data {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
    font-size: 12px;
  }
  .card:hover {
    transform: rotateY(180deg);
  }
}
