/* ### CSS RESET ### */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

#root,
#__next {
  isolation: isolate;
}

/* ### UTILITY CLASSES ### */

.flow > * + * {
  margin-block-start: var(--spacer, 1rem);
}

/* ### GENERAL ### */

body {
  font-family: "Roboto", sans-serif;
  /* display: flow-root; */
}

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

/* ### ABOUT ME SECTION ### */

.bg-triangle {
  position: absolute;
  max-width: 100vw;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: -1;
}

.bg-triangle::before {
  content: "";
  width: 350px;
  height: 400px;
  background-color: #0891b2;
  display: block;
  aspect-ratio: 1;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

header {
  margin-block-start: 2rem;
  margin-inline: 2rem;
}

.about-me-image img {
  box-shadow: 5px 5px 12px #48484893;
}

.about-me-image {
  position: relative;
}

h1 {
  position: absolute;
  /* z-index: 2; */
  bottom: 0;
  left: 1.5rem;
  font-size: 3.4rem;
  /* font-size: clamp(3.4rem, 3.28rem + 0.6vw, 4rem); */
  font-weight: 500;
  color: white;
  line-height: 1.2;
  text-shadow: -2px 4px #3c3c3cb1;
}

h2 {
  text-align: center;
  font-weight: 500;
  font-size: 2.8rem;
}

header p {
  font-size: 1.235rem;
  color: #21262b;
}

.about-me-social-icons-container {
  width: fit-content;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.social-icon-container a {
  text-decoration: none;
  color: inherit;
}

.social-icon-container svg {
  width: 30px;
  height: 30px;
}

/* ### PROJECTS SECTION ### */

main {
  margin-block-start: 5rem;
}

main h2 {
  margin-block-end: 1.5rem;
}

.projects-grid {
  display: grid;
  gap: 3rem;
  margin-inline: 1rem;
}

.project {
  padding: 0.4rem;
  box-shadow: 5px 5px 12px #565555a7;
}

.project-img-container {
  width: 100%;
  height: 250px;
  padding: 1.5rem;
  background-color: brown;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.5rem;
  font-family: "Playfair Display", serif;
  text-align: center;
}

.project-content {
  padding: 0.5rem 0.5rem 3rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.325rem;
}

.project .title-section {
  display: flex;
  flex-wrap: wrap;
}

.project h3 {
  font-size: 1.3rem;
  margin-inline-end: auto;
}

.project .icons-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.project svg {
  width: 25px;
  height: 25px;
}

/* ### CONTACT ME SECTION ### */

footer {
  margin-block-start: 5rem;

  background-color: #0891b2;
  color: white;
}

.footer-content {
  padding: 2rem 1rem 6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

footer p {
  font-size: 1.235rem;
  max-width: 45ch;
}

footer .icons-container {
  align-self: center;
  display: flex;
  gap: 1rem;
}

footer svg {
  width: 40px;
  height: 40px;
}

footer address {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

footer address svg {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
}

/* ### MEDIA QUEIRES ### */

@media (min-width: 650px) {
  /* ## HEADER ## */
  header {
    position: relative;
  }

  header::before {
    content: "";
    display: block;
    height: 26vw;
    float: left;
    width: 47vw;
    max-width: 401px;
    max-height: 228px;
  }

  .about-me-image {
    width: 55vw;
    max-width: 455px;
    position: absolute;
    top: -60px;
    left: -50px;
  }

  header {
    margin-block-start: 8rem;
    background-color: white;
    box-shadow: 5px 5px 12px #5655556d;
    margin-inline: 4rem;
    padding: 4rem 1.5rem 1.5rem;
    max-width: 850px;
    width: 90%;
    margin-inline: auto;
  }

  h1 {
    font-size: 3rem;
    top: 0;
    bottom: unset;
    left: unset;
    right: -61%;
  }

  .bg-triangle::before {
    width: 150vw;
  }

  .about-me-social-icons-container {
    margin-inline: auto 0;
  }

  /* ### PROJECTS GRID ### */

  main h2 {
    text-align: start;
    margin-inline: 4rem;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4.5rem 2rem;
    margin-inline: 4rem;
  }

  /* ### FOOTER ### */

  footer {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding: 2rem 1.5rem;
  }

  footer h2 {
    text-align: start;
  }

  footer .icons-container {
    align-self: flex-start;
  }

  footer img {
    max-width: calc(50vw - 3rem);
  }
}

@media (min-width: 1200px) {
  /* ## HEADER ## */

  .bg-triangle::before {
    height: 645px;
  }

  header {
    max-width: 1600px;
    margin-inline: auto;
    background-color: unset;
    box-shadow: unset;
    display: flex;
    align-items: center;
  }

  header::before {
    display: none;
  }

  .about-me-image {
    position: relative;
    top: 0;
    left: 0;
    max-width: 35vw;
    flex-shrink: 0;
  }

  h1 {
    right: unset;
    top: unset;
    bottom: 0;
    left: 1.5rem;
  }

  .about-me-content {
    background-color: white;
    box-shadow: 5px 5px 12px #5655556d;
    padding: 3rem 2rem 2rem 1rem;
  }

  /* ## PROJECTS GRID ## */

  main h2 {
    width: 90%;
    margin-inline: auto;
    max-width: 1400px;
  }

  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
    width: 90%;
    max-width: 1400px;
    margin-inline: auto;
  }

  /* ## FOOTER ## */

  footer {
    justify-content: center;
    padding-block: 4rem;
  }
}
