:root {
  --color: #0891b2;
  --width: min(100vw, 42rem);

  --angle: -11deg;
  --abs-angle: max(var(--angle), var(--angle) * -1);
  --tan-alpha: tan(var(--abs-angle));
  --skew-padding: calc(var(--width) * var(--tan-alpha) / 2);
}
body {
  margin: 0;
  position: relative;
}
h1,
h2,
h3 {
  font-family: "Tagesschrift", sans-serif;
  font-weight: lighter;
}
p,
a {
  font-family: "Lexend", sans-serif;
}
a {
  width: fit-content;
  display: inline-block;
  text-decoration: none;
  transition: transform 0.2s ease-in-out;
  &:hover {
    transform: scale(1.1);
  }
}
.slanted-background {
  position: absolute;
  padding: var(--skew-padding) 0;
  height: 60vh;
  width: 100%;
  pointer-events: none;

  &:before {
    content: "";
    position: absolute;
    top: calc(-5 * var(--skew-padding));
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color);
    transform: skewY(var(--angle));
    z-index: -1;
  }
}
.main-container {
  display: flex;
  justify-content: center;
  align-items: center;
}
.about {
  background: #fff;
  box-shadow: 1px 1px 8px grey;
  padding: 1.5rem 2rem 1.5rem 1.5rem;
}
.about > p {
  padding-left: 0;
  font-size: 1.3rem;
  flex: 1 1 300px;
  color: #6c6967;
}
.about > h2 {
  font-size: 2.2rem;
}
.profile {
  position: relative;
}
.profile > h1 {
  position: absolute;
  right: 0;
  bottom: 0;
  color: white;
  font-size: 3.5rem;
  margin: 0;
  text-shadow: 1px 1px 8px grey;
  z-index: 1;
}
.profile > img {
  object-fit: cover;
  box-shadow: 0.1px 0.1px 8px grey;
}
.social-icons {
  display: flex;
  gap: 1rem;
  justify-content: end;
}
.main-container,
.work,
footer {
  padding: 4rem 5rem;
}

.work h2 {
  font-size: 2.5rem;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}
.project {
  box-shadow: 1px 1px 8px grey;
  display: flex;
  flex-direction: column;
}
.project > p {
  color: #6c6967;
  font-size: 1.2rem;
  hyphens: auto;
}

.project > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.project > div > div {
  display: flex;
  gap: 1.5rem;
}

.project > div,
p {
  padding: 0 1em;
}
.project > img {
  width: 100%;
  height: 300px;
}
.project div h3 {
  font-size: 30px;
}

footer {
  background: var(--color);
  color: white;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}
footer .person {
  width: 100%;
  object-fit: cover;
}
footer .contact p {
  max-width: 100%;
}

.contact h2 {
  font-size: 40px;
}
.contact p {
  padding-left: 0;
  font-size: 1.5rem;
}
.phone-email {
  display: flex;
  gap: 1rem;
}
.phone-email > a {
  display: flex;
  align-items: center;
  color: white;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}
.footer-social-icons {
  display: flex;
  gap: 1rem;
}

@media (max-width: 888px) {
  .main-container {
    display: block;
    padding: 2rem;
    gap: 1rem;
  }
  .about {
    margin-left: 10%;
    margin-top: 10%;
  }
  .about > p {
    font-size: 1.2rem;
    flex: 1 1 100%;
  }
  .about > h2 {
    font-size: 1.8rem;
  }
  .profile {
    max-width: 400px;
    float: left;
  }
  .profile > h1 {
    left: 50%;
    top: 0;
    font-size: 2.5rem;
    text-wrap-mode: nowrap;
  }
  .profile > img {
    width: 95%;
  }
  .social-icons {
    gap: 1.5rem;
    justify-content: start;
  }
  .work,
  footer {
    padding: 2rem;
  }
  .projects {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

@media (max-width: 480px) {
  .main-container {
    display: flex;
    padding: 2rem;
    flex-direction: column;
    gap: 1rem;
  }
  .about {
    margin-left: 0;
    padding: 1rem;
    gap: 1rem;
    box-shadow: none;
  }
  .about > p {
    font-size: 1.2rem;
    flex: 1 1 100%;
  }
  .about > h2 {
    font-size: 1.8rem;
  }
  .profile > h1 {
    left: 10%;
    top: 70%;
    font-size: 2.5rem;
    text-wrap-mode: wrap;
  }
  .profile > img {
    width: 100%;
  }
  .work,
  footer {
    padding: 2rem;
  }
  .projects {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  .project > div {
    flex-direction: column;
    gap: 0.5rem;
  }
  footer .person {
    width: calc(100% + 4rem);
    margin: 0 -2rem -2rem;
  }
}
