/*Set the font size to 62.5% (equal to 10px) in order to calculate rems easily.*/
* {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 62.5%;
  box-sizing: border-box;
  --bodyFontColor: #3b3229;
  --headerFontColor: #82939a;
  --headerBackgroundColor: #242f1f;
  color: var(--bodyFontColor);
  background-color: #d6cfc2;
}

body {
  display: flex;
  flex-direction: column;
}

/*Use the justify-content property to space items on opposite sides of the page.*/
header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  background-color: var(--headerBackgroundColor);
}

/*Give any h1 element that is a child of the header element the following properties. */
header > h1 {
  font-size: 3.5rem;
  padding-left: 2%;
  color: var(--headerFontColor);
  background-color: var(--headerBackgroundColor);
}

.navbar {
  display: flex;
  justify-content: space-between;
}

.navlinks {
  display: flex;
  justify-content: space-between;
}

/*Give any anchor element that is a descendent of .navlinks the following properties.*/
.navlinks a {
  text-decoration: none;
  color: var(--headerFontColor);
  background-color: var(--headerBackgroundColor);
  font-size: 1.5rem;
  padding: 0 10px;
}

/*Use the justify-content property to align the flex items along the main axis.*/
.avatar-background {
  height: 200px;
  display: flex;
  justify-content: right;
  background-color: var(--headerBackgroundColor);
  border-top: 3px solid var(--headerFontColor);
  border-bottom: 3px solid var(--bodyFontColor);
  margin-bottom: 20px;
}

/*Round out corners of photo to create an avatar.*/
.avatar {
  position: relative;
  height: 200px;
  width: 200px;
  margin-right: 375px;
  margin-top: 30px;
  border-radius: 50%;
  box-shadow: 5px 5px 5px var(--bodyFontColor);
  overflow: hidden;
}

/*Create a class for the main section. Use a flexbox to manipulate content within.*/
.main-section {
  display: flex;
  justify-content: space-between;
  width: 90vw;
  margin: 0 auto;
}

/*Give all h2 elements that are descendents of .mainsection the following properties.*/
.main-section h2 {
  font-size: 2rem;
  width: 25%;
  text-align: right;
  border-right: 2px solid var(--bodyFontColor);
  padding: 20px;
  margin: 10px;
}

/*Create a class to format content in a uniform manner.*/
.section-right {
  width: 70%;
  padding: 20px;
  margin: 10px;
}
.section-right p {
  font-size: 1rem;
  line-height: 130%;
}

.projects {
  display: flex;
  flex-direction: column;
}

/*Blur the image using the blur filter.*/
.large-project {
  height: 400px;
  width: 100%;
  filter: blur(2px);
}

/*In order to give an element a position of absolute, its container must have a position of relative.*/
.title-holder {
  position: relative;
}

/*Project titles can now be in an absolute position because their containers have a position of relative.*/
.project-title {
  color: var(--navLinksColor);
  font-size: 1.5rem;
  position: absolute;
  bottom: 20px;
  left: 20px;
}

.smaller-projects {
  display: flex;
  justify-content: center;
}

.smaller-projects a {
  width: 50%;
}

/*Blur the images using the blur filter.*/
.smaller-projects a img {
  width: 100%;
  height: 200px;
  filter: blur(2px);
}

.placeholder {
  display: flex;
}

/*Set the blur filter to 0 to remove the blur when the user hovers over the element.*/
.large-project:hover,
.smaller-projects img:hover {
  filter: blur(0);
}

/*You can use inline display to show the list items horizontally.*/
.contact-items {
  font-size: 1.5rem;
  display: inline;
  text-decoration: none;
  margin: 0 10px;
}

.contact-list a {
  text-decoration: none;
  color: var(--bodyFontColor);
}

/*Use media queries to provide a responsive layout that adapts to my viewport on various screens and devices.
When the screen has a width of 711px and below, the navigation bar items will change to a flex direction of column.
When the screen has a width of 950px and below, the contact items will change to a block display. */
@media screen and (max-width: 711px) {
  .navlinks {
    flex-direction: column;
  }
}

@media screen and (max-width: 950px) {
  .contact-items {
    display: block;
  }
}
