@import url('./reset.css');

@font-face {
  font-family: 'Roboto';
  font-weight: 100 900;
  font-style: normal;
  src: url('../fonts/Roboto-VariableFont_wdth\,wght.ttf');
}

@font-face {
  font-family: 'Playfair Display';
  font-weight: 100 900;
  font-style: normal;
  src: url('../fonts/PlayfairDisplay-VariableFont_wght.ttf');
}

:root {
  --bg-color-primary: #0092b8;
}

body {
  font-family: 'Roboto', sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3rem;
}

h1,
h2,
h3 {
  font-family: 'Playfair Display';
  font-weight: 300;
}

h2 {
  font-size: 2.5rem;
  text-align: center;
}

header {
  position: relative;
  overflow: hidden;
}

header .bg {
  position: absolute;
  width: 100%;
  height: 45%;
  background-color: var(--bg-color-primary);
  transform: skewY(-25deg);
  transform-origin: top left;
  z-index: 1;
}

.content {
  position: relative;
  z-index: 2;
  margin-block: 475px 2rem;
  margin-inline: 2rem;
}

.about {
  padding-block: 2rem;
  position: relative;
}

.about-image {
  position: absolute;
  top: -450px;
  left: 0;
  width: 100%;
  height: 450px;
  padding-inline: 0.35rem;
}

.about-image picture,
.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.profile-name {
  position: absolute;
  bottom: 0;
  left: 1rem;
  color: white;
  font-size: 3.5rem;
  letter-spacing: 1.5px;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-content p {
  color: gray;
  font-size: 1.15rem;
}

.social-links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.icon {
  width: 2rem;
}

.icon .small {
  width: 1rem;
}

.icon .big {
  width: 2.5rem;
}

main {
  margin-inline: 2rem;
}

#my-work {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.card {
  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.25);
  height: 400px;
}

.project-header {
  width: 100%;
  max-height: 250px;
  overflow: hidden;
}

.project-image {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.project-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 2rem;
}

.project-title {
  font-size: 1.5rem;
}

.project-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.project-content {
  padding: 0.5rem 1.5rem;
  color: gray;
}

.project-content p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  line-clamp: 3;
}

footer {
  max-height: 800px;
  overflow: hidden;
  background-color: var(--bg-color-primary);
  color: white;
}

.footer-wrapper {
  width: 100%;
}

.contact {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.5rem;
  gap: 1rem;
}

.contact-intro {
  font-size: 1.25rem;
}

.contact .social-links {
  margin-block-end: 2rem;
}

.footer-image {
  height: 400px;
  overflow: hidden;
}

.footer-image picture,
.footer-image img {
  width: 100%;
  height: 100%;
  display: block;
}

.footer-image img {
  object-fit: cover;
  object-position: center;
}

.contact-item .icon {
  display: none;
}

@media screen and (min-width: 768px) {
  header .bg {
    height: 75%;
  }

  .profile-name {
    font-size: 3rem;
    top: 1rem;
    left: 17.5rem;
  }

  .content {
    margin-block: 2rem;
  }

  .about {
    padding: 2rem;
  }

  .about-image {
    position: static;
    float: left;
    width: 350px;
    height: 350px;
    margin: -25px 0 0 -25px;
    padding: 1rem;
  }

  .about-content {
    background-color: white;
    display: block;
    width: 80%;
    margin-block-start: 4rem;
    margin-inline: auto;
    padding: 2rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  }

  .about-content h2 {
    font-size: 2rem;
  }

  .about-content p {
    margin-block: 1rem;
  }

  .about::after {
    content: '';
    display: block;
    clear: both;
  }

  .social-links {
    justify-content: flex-end;
  }

  .footer-wrapper {
    display: flex;
    align-items: center;
  }

  .contact {
    width: 50%;
  }

  .contact h2 {
    font-size: 2rem;
    text-align: left;
  }

  .footer-image {
    padding: 2rem;
    width: 50%;
    height: 500px;
  }

  footer .social-links {
    justify-content: flex-start;
  }

  .contact-item {
    display: flex;
    gap: 1rem;
    align-items: center;
  }

  .contact-item .icon {
    display: inline-block;
    width: 1.25rem;
    color: white;
  }

  .footer-image img {
    object-position: right;
  }
}

@media screen and (min-width: 1024px) {
  header .bg {
    height: 100%;
    transform: skewY(-15deg);
  }

  main,
  .footer-wrapper {
    max-width: 1024px;
    margin-inline: auto;
  }

  #my-work h2 {
    text-align: left;
  }

  .about {
    display: flex;
    align-items: center;
    max-width: 1024px;
    margin-inline: auto;
  }

  .about-image {
    width: 40%;
    height: 400px;
    margin: 0;
    padding: 0;
  }

  .profile-name {
    top: auto;
    bottom: 1.75rem;
    left: 2.5rem;
    font-size: 2.75rem;
    letter-spacing: 1.5px;
  }

  .about-content {
    width: 60%;
    margin-block-start: 0;
    padding: 1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  }

  .about-content h2 {
    text-align: left;
  }
}
