* {
  margin: 0;
  padding: 0;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
  font-size: 62.5%;
}

body {
  font-family: "Nunito Sans", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: #615551;
  background-image: linear-gradient(to right bottom, #fbdb89, #f48982);
  background-size: cover;
  background-repeat: no-repeat;
  min-height: calc(100vh - 8vw);
}

.container {
  max-width: 120rem;
  min-height: 117rem;
  margin: 4vw auto;
  background-color: #fff;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 2rem 6rem 0.5rem rgba(97, 85, 81, 0.2);
  display: grid;
  grid-template-rows: 10rem minmax(100rem, auto);
  grid-template-columns: 1fr 2fr;
  grid-template-areas: "head head" "list recipe";
}

.btn--small,
.btn--small:link,
.btn--small:visited,
.btn {
  background-image: linear-gradient(to right bottom, #fbdb89, #f48982);
  border-radius: 10rem;
  border: none;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.2s;
}

.btn--small:hover,
.btn:hover {
  transform: scale(1.05);
}

.btn--small:focus,
.btn:focus {
  outline: none;
}

.btn--small>*:first-child,
.btn>*:first-child {
  margin-right: 1rem;
}

.btn {
  padding: 1.5rem 4rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.btn svg {
  height: 2.25rem;
  width: 2.25rem;
  fill: currentColor;
}

.btn--small,
.btn--small:link,
.btn--small:visited {
  font-size: 1.4rem;
  font-weight: 600;
  padding: 1.25rem 2.25rem;
  text-decoration: none;
}

.btn--small svg,
.btn--small:link svg,
.btn--small:visited svg {
  height: 1.75rem;
  width: 1.75rem;
  fill: currentColor;
}

.btn--inline {
  color: #f38e82;
  font-size: 1.3rem;
  font-weight: 600;
  border: none;
  background-color: #f9f5f3;
  padding: 0.8rem 1.2rem;
  border-radius: 10rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.2s;
}

.btn--inline svg {
  height: 1.6rem;
  width: 1.6rem;
  fill: currentColor;
  margin: 0 0.2rem;
}

.btn--inline span {
  margin: 0 0.4rem;
}

.btn--inline:hover {
  color: #f48982;
  background-color: #f2efee;
}

.btn--inline:focus {
  outline: none;
}

.btn--round {
  background-image: linear-gradient(to right bottom, #fbdb89, #f48982);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  height: 4.5rem;
  width: 4.5rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn--round:hover {
  transform: scale(1.07);
}

.btn--round:focus {
  outline: none;
}

.btn--round svg {
  height: 2.5rem;
  width: 2.5rem;
  fill: #fff;
}

.btn--tiny {
  height: 2rem;
  width: 2rem;
  border: none;
  background: none;
  cursor: pointer;
}

.btn--tiny svg {
  height: 100%;
  width: 100%;
  fill: #f38e82;
  transition: all 0.3s;
}

.btn--tiny:focus {
  outline: none;
}

.btn--tiny:hover svg {
  fill: #f48982;
  transform: translateY(-1px);
}

.btn--tiny:active svg {
  fill: #f48982;
  transform: translateY(0);
}

.btn--tiny:not(:last-child) {
  margin-right: 0.3rem;
}

.heading--2 {
  font-size: 2rem;
  font-weight: 700;
  color: #f38e82;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  text-align: center;
}

.link:link,
.link:visited {
  color: #918581;
}

.spinner {
  margin: 5rem auto;
  text-align: center;
}

.spinner svg {
  height: 6rem;
  width: 6rem;
  fill: #f38e82;
  animation: rotate 2s infinite linear;
}

@keyframes rotate {
  0% {
    transform: rotate(0);
  }

  100% {
    transform: rotate(360deg);
  }
}

.message,
.error {
  max-width: 40rem;
  margin: 0 auto;
  padding: 5rem 4rem;
  display: flex;
}

.message svg,
.error svg {
  height: 3rem;
  width: 3rem;
  fill: #f38e82;
  transform: translateY(-0.3rem);
}

.message p,
.error p {
  margin-left: 1.5rem;
  font-size: 1.8rem;
  line-height: 1.5;
  font-weight: 600;
}

.header {
  grid-area: head;
  background-color: #f9f5f3;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  margin-left: 4rem;
  height: 4.6rem;
  display: block;
}

.search {
  background-color: #fff;
  border-radius: 10rem;
  display: flex;
  align-items: center;
  padding-left: 3rem;
  transition: all 0.3s;
}

.search:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 0.7rem 3rem rgba(97, 85, 81, 0.08);
}

.search__field {
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
  font-size: 1.7rem;
  width: 30rem;
}

.search__field:focus {
  outline: none;
}

.search__field::placeholder {
  color: #d3c7c3;
}

.search__btn {
  font-weight: 600;
  font-family: inherit;
}

.nav {
  align-self: stretch;
  margin-right: 2.5rem;
}

.nav__list {
  list-style: none;
  display: flex;
  height: 100%;
}

.nav__item {
  position: relative;
}

.nav__btn {
  height: 100%;
  font-family: inherit;
  color: inherit;
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 1.5rem;
  transition: all 0.3s;
  display: flex;
  align-items: center;
}

.nav__btn svg {
  height: 2.4rem;
  width: 2.4rem;
  fill: #f38e82;
  margin-right: 0.7rem;
  transform: translateY(-1px);
}

.nav__btn:focus {
  outline: none;
}

.nav__btn:hover {
  background-color: #f2efee;
}

.bookmarks {
  padding: 1rem 0;
  position: absolute;
  right: -2.5rem;
  z-index: 10;
  width: 40rem;
  background-color: #fff;
  box-shadow: 0 0.8rem 5rem 2rem rgba(97, 85, 81, 0.1);
  visibility: hidden;
  opacity: 0;
  transition: all 0.5s 0.2s;
}

.bookmarks__list {
  list-style: none;
}

.bookmarks__field {
  cursor: pointer;
  padding: 0 4rem;
  display: flex;
  align-items: center;
  height: 100%;
  transition: all 0.3s;
}

.bookmarks__field:hover {
  background-color: #f2efee;
}

.bookmarks:hover,
.nav__btn--bookmarks:hover+.bookmarks {
  visibility: visible;
  opacity: 1;
}

.preview__link:link,
.preview__link:visited {
  display: flex;
  align-items: center;
  padding: 1.5rem 3.25rem;
  transition: all 0.3s;
  border-right: 1px solid #fff;
  text-decoration: none;
}

.preview__link:hover {
  background-color: #f9f5f3;
  transform: translateY(-2px);
}

.preview__link--active {
  background-color: #f9f5f3;
}

.preview__fig {
  flex: 0 0 5.8rem;
  border-radius: 50%;
  overflow: hidden;
  height: 5.8rem;
  margin-right: 2rem;
  position: relative;
  backface-visibility: hidden;
}

.preview__fig::before {
  content: "";
  display: block;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-image: linear-gradient(to right bottom, #fbdb89, #f48982);
  opacity: 0.4;
}

.preview__fig img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s;
}

.preview__data {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 2rem;
  row-gap: 0.1rem;
  align-items: center;
}

.preview__title {
  grid-column: 1/-1;
  font-size: 1.45rem;
  color: #f38e82;
  text-transform: uppercase;
  font-weight: 600;
  text-overflow: ellipsis;
  max-width: 25rem;
  white-space: nowrap;
  overflow: hidden;
}

.preview__publisher {
  font-size: 1.15rem;
  color: #918581;
  text-transform: uppercase;
  font-weight: 600;
}

.preview__user-generated {
  background-color: rgb(237.58, 233.56, 232.22);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  width: 2rem;
  border-radius: 10rem;
  margin-left: auto;
  margin-right: 1.75rem;
}

.preview__user-generated svg {
  height: 1.2rem;
  width: 1.2rem;
  fill: #f38e82;
}

.search-results {
  padding: 3rem 0;
  display: flex;
  flex-direction: column;
}

.results {
  list-style: none;
  margin-bottom: 2rem;
}

.pagination {
  margin-top: auto;
  padding: 0 3.5rem;
}

.pagination::after {
  content: "";
  display: table;
  clear: both;
}

.pagination__btn--prev {
  float: left;
}

.pagination__btn--next {
  float: right;
}

.copyright {
  color: #918581;
  font-size: 1.2rem;
  padding: 0 3.5rem;
  margin-top: 4rem;
}

.copyright .twitter-link:link,
.copyright .twitter-link:visited {
  color: #918581;
}

.recipe {
  background-color: #f9f5f3;
}

.recipe__fig {
  height: 32rem;
  position: relative;
  transform-origin: top;
}

.recipe__fig::before {
  content: "";
  display: block;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-image: linear-gradient(to right bottom, #fbdb89, #f48982);
  opacity: 0.6;
}

.recipe__img {
  width: 100%;
  display: block;
  height: 100%;
  object-fit: cover;
}

.recipe__title {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 20%) skewY(-6deg);
  color: #fff;
  font-weight: 700;
  font-size: 3.25rem;
  text-transform: uppercase;
  width: 50%;
  line-height: 1.95;
  text-align: center;
}

.recipe__title span {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 1.3rem 2rem;
  background-image: linear-gradient(to right bottom, #fbdb89, #f48982);
}

.recipe__details {
  display: flex;
  align-items: center;
  padding: 7.5rem 8rem 3.5rem 8rem;
}

.recipe__info {
  font-size: 1.65rem;
  text-transform: uppercase;
  display: flex;
  align-items: center;
}

.recipe__info:not(:last-child) {
  margin-right: 4.5rem;
}

.recipe__info-icon {
  height: 2.35rem;
  width: 2.35rem;
  fill: #f38e82;
  margin-right: 1.15rem;
}

.recipe__info-data {
  margin-right: 0.5rem;
  font-weight: 700;
}

.recipe__info-buttons {
  display: flex;
  margin-left: 1.6rem;
  transform: translateY(-1px);
}

.recipe__user-generated {
  background-color: rgb(237.58, 233.56, 232.22);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 4rem;
  width: 4rem;
  border-radius: 10rem;
  margin-left: auto;
  margin-right: 1.75rem;
}

.recipe__user-generated svg {
  height: 2.25rem;
  width: 2.25rem;
  fill: #f38e82;
}

.recipe__ingredients {
  padding: 5rem 8rem;
  font-size: 1.6rem;
  line-height: 1.4;
  background-color: #f2efee;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.recipe__ingredient-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
  list-style: none;
}

.recipe__ingredient {
  display: flex;
}

.recipe__icon {
  height: 2rem;
  width: 2rem;
  fill: #f38e82;
  margin-right: 1.1rem;
  flex: 0 0 auto;
  margin-top: 0.1rem;
}

.recipe__quantity {
  margin-right: 0.5rem;
  flex: 0 0 auto;
}

.recipe__directions {
  padding: 5rem 10rem;
  padding-bottom: 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.recipe__directions-text {
  font-size: 1.7rem;
  text-align: center;
  margin-bottom: 3.5rem;
  color: #918581;
}

.recipe__publisher {
  font-weight: 700;
}

.add-recipe-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100rem;
  background-color: white;
  border-radius: 9px;
  padding: 5rem 6rem;
  box-shadow: 0 4rem 6rem rgba(0, 0, 0, 0.25);
  z-index: 1000;
  transition: all 0.5s;
}

.add-recipe-window .btn--close-modal {
  font-family: inherit;
  color: inherit;
  position: absolute;
  top: 0.5rem;
  right: 1.6rem;
  font-size: 3.5rem;
  cursor: pointer;
  border: none;
  background: none;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 100;
  transition: all 0.5s;
}

.hidden {
  visibility: hidden;
  opacity: 0;
}

.upload {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem 6rem;
}

.upload__column {
  display: grid;
  grid-template-columns: 1fr 2.8fr;
  align-items: center;
  gap: 1.5rem;
}

.upload__column label {
  font-size: 1.5rem;
  font-weight: 600;
  color: inherit;
}

.upload__column input {
  font-size: 1.5rem;
  padding: 0.8rem 1rem;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.upload__column input::placeholder {
  color: #d3c7c3;
}

.upload__column input:focus {
  outline: none;
  border: 1px solid #f38e82;
  background-color: #f9f5f3;
}

.upload__column button {
  grid-column: 1/span 2;
  justify-self: center;
  margin-top: 1rem;
}

.upload__heading {
  font-size: 2.25rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
  grid-column: 1/-1;
}

.upload__btn {
  grid-column: 1/-1;
  justify-self: center;
}

/* =================
   RESPONSIVE MEDIA QUERIES
   ================= */

/* Large tablets/laptops: 992px to 1199px */
@media only screen and (max-width: 1199px) {
  html {
    font-size: 55%;
  }

  .container {
    max-width: 100%;
    margin: 2vw auto;
    min-height: auto;
  }

  .header__logo {
    margin-left: 3rem;
  }

  .search__field {
    width: 25rem;
  }

  .recipe__details {
    padding: 6rem 6rem 3rem 6rem;
  }

  .recipe__ingredients {
    padding: 4rem 6rem;
  }

  .recipe__directions {
    padding: 4rem 8rem;
  }

  .add-recipe-window {
    width: 85rem;
    padding: 4rem 5rem;
  }
}

/* Small tablets: 768px to 991px */
@media only screen and (max-width: 991px) {
  html {
    font-size: 50%;
  }

  .container {
    margin: 0;
    border-radius: 0;
    min-height: 100vh;
    max-height: 100vh;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "head"
      "list"
      "recipe";
    gap: 1rem 0;
  }

  .header {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    height: auto;
  }

  .header__logo {
    margin-left: 0;
    height: 3.5rem;
  }

  .search__field {
    width: 20rem;
  }

  .nav {
    margin-right: 0;
  }

  .nav__btn {
    padding: 0 1rem;
    font-size: 1.2rem;
  }

  .nav__btn span {
    display: none;
  }

  .bookmarks {
    width: 30rem;
    right: 0;
  }

  .search-results {
    max-height: 45vh;
    overflow-y: auto;
    min-height: 300px;
    border-bottom: 1px solid #f2efee;
  }

  .recipe {
    min-height: 45vh;
    max-height: 45vh;
    overflow-y: auto;
  }

  .recipe__fig {
    height: 25rem;
  }

  .recipe__title {
    width: 70%;
    font-size: 2.5rem;
  }

  .recipe__details {
    padding: 4rem 4rem 2rem 4rem;
    flex-wrap: wrap;
    gap: 2rem;
  }

  .recipe__info:not(:last-child) {
    margin-right: 2rem;
  }

  .recipe__ingredients {
    padding: 3rem 4rem;
  }

  .recipe__ingredient-list {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .recipe__directions {
    padding: 3rem 4rem;
  }

  .add-recipe-window {
    width: 75rem;
    padding: 3rem 4rem;
  }

  .upload {
    gap: 2rem 4rem;
  }
}

/* Extra small devices: 481px to 767px */
@media only screen and (max-width: 767px) {
  html {
    font-size: 45%;
  }

  .container {
    min-height: 100vh;
    max-height: 100vh;
    grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.8rem 0;
  }

  .header {
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .header__logo {
    height: 3rem;
  }

  .search {
    width: 100%;
    max-width: 35rem;
  }

  .search__field {
    width: 100%;
    font-size: 1.5rem;
  }

  .search__btn {
    padding: 1rem 2rem;
  }

  .search__btn span {
    display: none;
  }

  .nav__btn {
    padding: 0 0.8rem;
  }

  .nav__btn svg {
    height: 2rem;
    width: 2rem;
  }

  .bookmarks {
    width: 28rem;
  }

  .search-results {
    max-height: 40vh;
    min-height: 250px;
    border-bottom: 1px solid #f2efee;
  }

  .recipe {
    max-height: 50vh;
    overflow-y: auto;
  }

  .preview__link:link,
  .preview__link:visited {
    padding: 1.2rem 2rem;
  }

  .preview__fig {
    flex: 0 0 4.5rem;
    height: 4.5rem;
    margin-right: 1.5rem;
  }

  .preview__title {
    font-size: 1.3rem;
    max-width: 20rem;
  }

  .recipe__fig {
    height: 20rem;
  }

  .recipe__title {
    width: 80%;
    font-size: 2.2rem;
  }

  .recipe__details {
    padding: 3rem 2rem 1.5rem 2rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .recipe__info {
    font-size: 1.4rem;
  }

  .recipe__info:not(:last-child) {
    margin-right: 0;
  }

  .recipe__ingredients {
    padding: 2.5rem 2rem;
  }

  .recipe__directions {
    padding: 2.5rem 2rem;
  }

  .add-recipe-window {
    width: 90%;
    padding: 2.5rem 2rem;
  }

  .upload {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .upload__column {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .upload__column label {
    font-size: 1.3rem;
  }

  .upload__column input {
    font-size: 1.3rem;
    padding: 0.6rem 0.8rem;
  }

  .message,
  .error {
    padding: 3rem 2rem;
  }

  .message p,
  .error p {
    font-size: 1.6rem;
  }

  .pagination {
    padding: 0 2rem;
  }

  .copyright {
    padding: 0 2rem;
    font-size: 1.1rem;
  }
}

/* Mobile: Up to 480px */
@media only screen and (max-width: 480px) {
  html {
    font-size: 40%;
  }

  body {
    min-height: 100vh;
  }

  .container {
    margin: 0;
    min-height: 100vh;
    max-height: 100vh;
    grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.5rem 0;
  }

  .header {
    padding: 1rem;
    gap: 1rem;
  }

  .header__logo {
    height: 2.5rem;
  }

  .search {
    padding-left: 2rem;
  }

  .search__field {
    font-size: 1.4rem;
  }

  .search__btn {
    padding: 0.8rem 1.5rem;
  }

  .nav__btn {
    padding: 0 0.5rem;
  }

  .nav__btn svg {
    height: 1.8rem;
    width: 1.8rem;
    margin-right: 0.3rem;
  }

  .bookmarks {
    width: 25rem;
  }

  .search-results {
    max-height: 35vh;
    min-height: 200px;
    border-bottom: 2px solid #f2efee;
  }

  .recipe {
    max-height: 55vh;
    overflow-y: auto;
  }

  .preview__link:link,
  .preview__link:visited {
    padding: 1rem 1.5rem;
  }

  .preview__fig {
    flex: 0 0 4rem;
    height: 4rem;
    margin-right: 1rem;
  }

  .preview__title {
    font-size: 1.2rem;
    max-width: 15rem;
  }

  .preview__publisher {
    font-size: 1rem;
  }

  .recipe__fig {
    height: 15rem;
  }

  .recipe__title {
    width: 90%;
    font-size: 1.8rem;
  }

  .recipe__details {
    padding: 2rem 1.5rem 1rem 1.5rem;
  }

  .recipe__info {
    font-size: 1.3rem;
  }

  .recipe__info-icon {
    height: 2rem;
    width: 2rem;
  }

  .recipe__user-generated {
    height: 3rem;
    width: 3rem;
  }

  .recipe__ingredients {
    padding: 2rem 1.5rem;
  }

  .recipe__directions {
    padding: 2rem 1.5rem;
  }

  .recipe__directions-text {
    font-size: 1.5rem;
  }

  .btn--round {
    height: 3.5rem;
    width: 3.5rem;
  }

  .btn--round svg {
    height: 2rem;
    width: 2rem;
  }

  .btn {
    padding: 1.2rem 3rem;
    font-size: 1.3rem;
  }

  .btn svg {
    height: 1.8rem;
    width: 1.8rem;
  }

  .btn--small,
  .btn--small:link,
  .btn--small:visited {
    padding: 1rem 1.8rem;
    font-size: 1.2rem;
  }

  .btn--small svg,
  .btn--small:link svg,
  .btn--small:visited svg {
    height: 1.5rem;
    width: 1.5rem;
  }

  .add-recipe-window {
    width: 95%;
    padding: 2rem 1.5rem;
  }

  .upload__heading {
    font-size: 1.8rem;
  }

  .upload__column label {
    font-size: 1.2rem;
  }

  .upload__column input {
    font-size: 1.2rem;
    padding: 0.5rem 0.7rem;
  }

  .heading--2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }

  .message,
  .error {
    padding: 2rem 1.5rem;
    max-width: 30rem;
  }

  .message p,
  .error p {
    font-size: 1.4rem;
    margin-left: 1rem;
  }

  .message svg,
  .error svg {
    height: 2.5rem;
    width: 2.5rem;
  }

  .pagination {
    padding: 0 1.5rem;
  }

  .pagination .btn--inline {
    font-size: 1.1rem;
    padding: 0.6rem 1rem;
  }

  .copyright {
    padding: 0 1.5rem;
    font-size: 1rem;
    margin-top: 3rem;
  }

  .spinner svg {
    height: 4rem;
    width: 4rem;
  }
}

/* Additional responsive utilities */
@media only screen and (max-width: 480px) {

  /* Hide text on very small screens for nav buttons */
  .nav__btn span {
    display: none;
  }

  /* Make search button smaller */
  .search__btn svg {
    height: 1.8rem;
    width: 1.8rem;
  }

  /* Adjust bookmark dropdown for mobile */
  .bookmarks {
    right: -1rem;
    width: calc(100vw - 2rem);
    max-width: 30rem;
  }

  /* Make ingredient list single column on mobile */
  .recipe__ingredient-list {
    gap: 1rem;
  }

  /* Adjust recipe ingredient spacing */
  .recipe__ingredient {
    align-items: flex-start;
  }

  .recipe__icon {
    margin-top: 0.3rem;
  }
}

/* Landscape orientation adjustments for mobile */
@media only screen and (max-width: 767px) and (orientation: landscape) {
  .container {
    grid-template-rows: auto 1fr;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "head head"
      "list recipe";
  }

  .search-results {
    max-height: calc(100vh - 12rem);
  }

  .recipe {
    min-height: calc(100vh - 12rem);
  }

  .header {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Ultra-wide screens */
@media only screen and (min-width: 1400px) {
  html {
    font-size: 70%;
  }

  .container {
    max-width: 130rem;
  }
}

/* High DPI / Retina displays */
@media only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (min-resolution: 192dpi),
only screen and (min-resolution: 2dppx) {

  /* Optimize for high DPI screens */
  .recipe__img,
  .preview__fig img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}