body {
  margin: 0;
  --main-color: #1677F7;
  --lateral-margin: 1rem;
  --title-font-size: 2rem;
  --title-font-size-tablet: 1.3rem;
  --title-font-size-mobile: 2.5rem;
  --regular-font-size-tablet: 0.6rem;
  --regular-font-size-mobile: 1rem;
  --title-font-weight: 600;
  --homepage-top-aspect-ratio: calc(588 / 703);
  font-family: "Lexend Mega", sans-serif;
}

body > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1000px;
  margin: auto;
}

div.about {
  margin: 2rem var(--lateral-margin) 0;
  display: flex;
  align-items: center;
  position: relative;
}

div.about > img {
  background-image: url("./assets/images/homepage_top.JPG");
  width: 30rem;
  height: auto;
  z-index: 2;
  box-shadow: 0px 0px 13px 0px var(--main-color);
  /* align-self: flex-end; */
}

div.about > div:nth-child(3) {
  font-size: 2.5rem;
  font-weight: 600;
  color: white;
  position: absolute;
  width: 30rem;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: grid;
  place-items: center;
}



div.about > div.about-card {
  /* display: flex;
  flex-direction: column;
  gap: 1rem; */
  max-width: 40rem;
  padding: 1rem;
  box-shadow: 0px 0px 13px 0px var(--main-color);
}

div.about > div.about-card div:not(:first-child) {
  padding: 0.5rem 0;
}

div.about > div.about-card > div:nth-child(2) {
  font-size: var(--title-font-size);
  font-weight: var(--title-font-weight);
}

div.about > div.about-card > div.clickable-icons {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding: 0 1rem;
}

div.about > div.about-card > div.clickable-icons svg {
  height: 1.5rem;
}

@media (max-width: 1000px) {
  body > div {
    max-width: 600px;
    position: relative;
    left: 5rem;
  }

  div.about {
    margin: 0 var(--lateral-margin) 0;
  }

  div.about > img {
    width: 15rem;
  }

  div.about > div:nth-child(3) {
    font-size: 1.6rem;
    font-weight: 500;
    width: 20rem;
    color: black;
    top: 2rem;
    left: 7rem;
    place-items: start;
    height: min-content;
  }

  div.about > div.about-card {
    max-width: 20rem;
    position: relative;
    top: 5rem;
    right: 10rem;
  }
  
  div.about > div.about-card > div:nth-child(1) {
    width: 9rem; /*div.about-card RIGHT value - div.about-card padding*/
    height: calc(calc(15rem / var(--homepage-top-aspect-ratio)) - 5rem); /*check that div.text-wrapper aligns with wrapping region*/
    float: left;
    margin: 0 0.5rem 0.2rem 0;
  }

  div.about > div.about-card > div:nth-child(2) {
    font-size: var(--title-font-size-tablet)
  }

  div.about > div.about-card > div:nth-child(3) {
    font-size: var(--regular-font-size-tablet);
  }

  div.about > div.about-card > div.clickable-icons svg {
    height: 1rem;
  }
}

@media (max-width: 650px) {
  body > div {
    max-width: 100vw;
    position: relative;
    left: 0;
  }

  div.about {
    margin: 0 var(--lateral-margin) 0;
    display: block;
  }

  div.about > img {
    width: min(30rem, 100vw);
  }

  div.about > div:nth-child(3) {
    font-size: 3.5rem;
    font-weight: 500;
    max-width: 450px;
    color: white;
    top: calc(calc(min(30rem, 100vw) / var(--homepage-top-aspect-ratio)) - 10rem);
    left: 0;
    /* place-items: start; */
    height: min-content;
  }

  div.about > div.about-card {
    box-sizing: border-box;
    max-width: 30rem;
    position: relative;
    top: 0;
    right: 0;
    box-shadow: none;
  }
  
  div.about > div.about-card > div:nth-child(1) {
    width: 0;
    height: 0;
  }

  div.about > div.about-card > div:nth-child(2) {
    font-size: var(--title-font-size-mobile);
    text-align: center;
  }

  div.about > div.about-card > div:nth-child(3) {
    font-size: 1.5rem;
  }

   div.about > div.about-card > div.clickable-icons {
    margin-top: 2rem;
    justify-content: center;
  }

  div.about > div.about-card > div.clickable-icons svg {
    height: 2.5rem;
  }
}

a {
  text-decoration: none;
}

a:hover {
  opacity: 0.5;
}

div.projects {
  align-self: flex-start;
  margin: 4rem 0 0;
  width: 100%;
}

div.projects > div:first-child {
  font-size: var(--title-font-size);
  font-weight: var(--title-font-weight);
  margin: 0 var(--lateral-margin) 1rem;
}

div.projects > div.card-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5rem;
  margin: 0 var(--lateral-margin);
}

div.projects > div.card-container > div.card {
  display: grid;
  height: 30rem;
  grid-template-rows: 6fr 1fr 2fr;
  box-shadow: 0px 0px 13px 0px var(--main-color);
}

div.projects > div.card-container > div.card > div:first-child {
  display: grid;
  place-items: center;
  font-size: var(--title-font-size);
  text-align: center;
  color: white;
}

div.projects > div.card-container > div.card > div:not(:first-child) {
  margin: 0 1rem;
}

div.project-description {
  color: gray;
  font-size: 0.8rem;
}

div.card > div:nth-child(2) {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

div.card > div:nth-child(2) > div:nth-child(2) svg {
  height: 1.5rem;
}

@media (max-width: 1000px) {
  div.projects {
    margin: 8rem 0 0;
    width: calc(600px - 10rem);
  }

  div.projects > div:first-child {
    font-size: var(--title-font-size-tablet);
  }

  div.projects > div.card-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  div.projects > div.card-container > div.card  {
    height: 18rem;
  }

  div.projects > div.card-container > div.card > div:first-child{
    font-size: var(--title-font-size-tablet);
  }

  div.projects > div.card-container > div.card > div:nth-child(2) {
    font-size: var(--regular-font-size-tablet);
  }

  div.project-description {
    font-size: 0.5rem;
  }

  div.card > div:nth-child(2) > div:nth-child(2) svg {
    height: 1rem;
  }
}

@media (max-width: 650px) {
  body {
    max-width: 100%;
  }

  div.projects {
    margin: 8rem 0 0;
    max-width: 90vw;
    align-self: center;
  }

  div.projects > div:first-child {
    font-size: var(--title-font-size-mobile);
    text-align: center;
  }

  div.projects > div.card-container {
    grid-template-columns: 1fr;
    gap: 0;
    row-gap: 2rem;
  }

  div.projects > div.card-container > div.card  {
    height: 35rem;
  }

  div.projects > div.card-container > div.card > div:first-child{
    font-size: var(--title-font-size-mobile);
  }

  div.projects > div.card-container > div.card > div:nth-child(2) {
    font-size: var(--regular-font-size-mobile);
  }

  div.project-description {
    font-size: 1rem;
  }

  div.card > div:nth-child(2) > div:nth-child(2) svg {
    height: 2rem;
  }
}

div.projects > div.card-container > div.card:nth-child(1) > div:first-child {
  background-color: crimson;
}

div.projects > div.card-container > div.card:nth-child(2) > div:first-child {
  background-color: mediumpurple;
}

div.projects > div.card-container > div.card:nth-child(3) > div:first-child {
  background-color: mediumseagreen;
}

div.projects > div.card-container > div.card:nth-child(4) > div:first-child {
  background-color: orchid;
}

div.projects > div.card-container > div.card:nth-child(5) > div:first-child {
  background-color: sandybrown;
}

div.projects > div.card-container > div.card:nth-child(6) > div:first-child {
  background-color: cornflowerblue;
}

div.contact {
  display: flex;
  margin: 5rem var(--lateral-margin) 0rem;
  padding: 3rem 0;
  justify-content: flex-end;
  background-color: var(--main-color);
  box-shadow: 0 0 0 100vmax var(--main-color);
  clip-path: inset(0 -100vmax); 
  align-self: flex-start;
  /* z-index: -1; */
}

div.contact > img {
  width: 30rem;
}

div.contact > div {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  color: white;
}

div.contact > div > div:first-child {
  font-size: var(--title-font-size);
}


div.contact div.clickable-icons {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
}

div.contact svg {
  height: 2rem;
}

@media (max-width: 1000px) {
  div.contact {
    max-width: calc(600px - 12rem);
    /* margin: 0; */
  }

  div.contact > img {
    content: url("./assets/images/homepage_bottom_tablet.JPG");
    width: 10rem;
  }

  div.contact > div {
    gap: 1rem;
  }

  div.contact > div > div:first-child {
    font-size: var(--title-font-size-tablet);
  }
  
  div.contact > div > div:not(:first-child) {
    font-size: var(--regular-font-size-tablet);
  }

  div.contact svg {
    height: 1.3rem;
  }
}

@media (max-width: 650px) {
  div.contact {
    max-width: 100vw;
    display: block;
    margin-left: 0;
    margin-right: 0;
    padding-bottom: 0;
  }

  div.contact > img {
    content: url("./assets/images/homepage_bottom_tablet.JPG");
    width: 100vw;
    max-width: 100%;
  }

  div.contact > div {
    gap: 1rem;
    padding: 0 var(--lateral-margin);
  }

  div.contact > div > div:first-child {
    font-size: var(--title-font-size-mobile);
  }
  
  div.contact > div > div:not(:first-child) {
    font-size: var(--regular-font-size-mobile);
  }

  div.contact svg {
    height: 2rem;
  }

  div.contact div.clickable-icons svg {
    height: 5rem;
  }

  div.contact > div > div {
    padding-bottom: 0.5rem;
  }

  div.contact > div > div a {
    padding-bottom: 0.5rem;
    overflow-wrap: break-word;
    max-width: 80%;
  }

  div.contact > div > div:nth-child(1) {
    align-self: center;
  }

  div.contact > div > div:last-child {
    align-self: center;
    padding: 3rem 0 10rem;
  }
}

div.contact > div > div:nth-child(4),
div.contact > div > div:nth-child(5) {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
}

div.contact > div > div:nth-child(4) svg,
div.contact > div > div:nth-child(5) svg {
  fill: white;
}

div.contact > div > div:nth-child(5) a {
  color: white;
}