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

:root {
  --description-color: #565656;
}

body {
  background-color: rgb(217, 210, 210);
  display: flex;
  justify-content: center;
  /* min-width: 300px; */
}

.social-media-container,
.project-icons-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 15px;

  a {
    background: none;
    padding: 0;
    margin: 0;
    border: none;
    cursor: pointer;

    &:active {
      scale: 0.7;
    }
  }
}

h1,
h2 {
  font-family: "Playfair Display", sans-serif;
}

h1 {
  font-size: 36px;
  margin-bottom: 0.5em;
}

.info,
.project-info {
  font-family: Roboto, sans-serif;
  color: var(--description-color);
}

.page {
  max-width: 1200px;
  background-color: white;
}

header,
main {
  padding: 35px;
}

header,
main {
  background-color: white;
}

header {
  background-image: url("../img/design/header-bg-mob.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-color: white;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  position: relative;

  .name {
    position: absolute;
    top: 360px;
    max-width: 4em;
    left: calc(50% - 5em / 4);
    text-wrap: wrap;
    font-size: 64px;
    color: white;
  }

  .about-me {
    display: flex;
    flex-direction: column;
    align-items: center;

    .info {
      font-size: 20px;
      text-wrap: pretty;
      text-indent: 1em;

      &:last-of-type {
        margin-bottom: 20px;
      }
    }
  }
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;

  .work-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;

    width: 100%;

    .work-card {
      box-shadow: 3px 3px 20px 3px gray;

      .work-banner {
        width: 100%;
        object-fit: cover;
      }

      .work-description {
        padding: 1rem 1.5rem;

        .work-heading {
          display: flex;
          justify-content: space-between;

          .project-name {
            font-weight: 500;
            margin: 0 auto 0 0.75em;
          }
          margin-bottom: 1.25rem;
        }

        .project-info {
          font-size: 20px;
          overflow-wrap: break-word;
        }
      }
    }
  }
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  background-color: #0891b2;
  color: white;
  max-width: 100%;

  .contact-container {
    display: flex;
    flex-direction: column;
    padding: 35px;

    h1 {
      text-align: center;
    }

    .icon-contact-container {
      display: flex;
      align-items: center;
    }

    p {
      font-family: Roboto, sans-serif;
      font-size: 20px;

      .service-icon {
        display: none;
        margin-right: 0.5em;
      }

      &:not(:nth-last-of-type(2)) {
        margin-bottom: 18px;
      }

      &.message {
        font-size: 24px;
      }
    }

    .social-media-container {
      align-self: center;
    }
  }

  .footer-photo img {
    width: 100%;
    object-fit: contain;
  }
}

/* Tablet layout */
@media only screen and (min-width: 631px) and (max-width: 960px) {
  header,
  main {
    padding: 60px;
  }

  header {
    display: block;
    background-image: url("../img/design/header-background-tablet.png");
    padding-top: 200px;

    .about-me {
      display: block;

      background-color: #ffffff;
      box-shadow: 3px 3px 20px 3px gray;
      padding: 1.25em;

      .banner {
        float: left;
        position: relative;
        top: -110px;
        left: -40px;
        margin-right: -25px;
        margin-bottom: -95px;
        box-shadow: 3px 3px 20px 3px gray;

        .name {
          top: 0px;
          left: 70%;
          max-width: none;
          text-wrap: nowrap;
        }
      }

      h1 {
        text-align: center;
      }
    }
  }

  main {
    .heading {
      align-self: flex-start;
    }
  }

  footer {
    padding: 35px;
    flex-wrap: nowrap;
    gap: 20px;

    .contact-container {
      padding: 0;

      p .service-icon {
        display: inline;
      }

      .social-media-container {
        align-self: flex-start;
      }
    }
  }
} /* Tablet layout */

@media only screen and (min-width: 961px) {
  header,
  main {
    padding: 60px;
  }

  header {
    display: block;
    background-image: url("../img/design/header-background-desktop.png");
    background-size: cover;
    padding-top: 100px;

    .about-me {
      display: block;
      position: relative;

      background-color: #ffffff;
      box-shadow: 3px 3px 20px 3px gray;
      padding: 1.25em;

      margin-left: 370px; /* Image width */

      .banner {
        box-shadow: 3px 3px 20px 3px gray;
        position: absolute;
        left: -370px; /* Image width */
        top: 0px;
        scale: 1.2;

        .name {
          bottom: 0px;
          left: 10px;
          max-width: none;
          text-wrap: nowrap;
        }
      }

      .heading {
        text-align: left;
      }

      .info,
      .heading {
        margin-left: 35px;
      }

      .social-media-container {
        justify-content: flex-end;
      }
    }
  } /* header */

  main {
    .heading {
      align-self: flex-start;
    }
  }

  footer {
    padding: 60px;
    flex-wrap: nowrap;
    gap: 20px;

    .contact-container {
      padding: 0;

      .heading {
        margin-bottom: 44px;
      }

      p {
        .service-icon {
          display: inline;
        }

        &:not(:nth-last-of-type(2)) {
          margin-bottom: 34px;
        }
      }

      .social-media-container {
        align-self: flex-start;
      }
    }
  }
} /* desktop styles */
