* {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    "Helvetica Neue",
    sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.main-sections {
  display: flex;
  flex: 1; /*flex container use all remaining space*/
}

/*aside and main are flex (main-sections) childrens*/

aside {
  flex: 0 0 10%; /* aside gets a 20% flex-basis and won't grow or shrink */
  display: flex;
  flex-direction: column;
  border: thick double black; /*created a border around aside*/
  border-radius: 20px;
  margin: 10px; /*space between aside container and other items*/
}

main {
  flex: 1; /*all remaining space consumed by main*/
  margin: 40px;
  max-width: none;
  line-height: 30px;
  word-spacing: 2px;
  align-self: center;
  text-align: justify;
}

h1 {
  padding: 10px;
  font-size: 50px;
  text-align: center;
  line-height: 60px;
}

h3 {
  margin: 0;
}

nav {
  display: flex;
  gap: 60px;
  font-size: large;
  border-bottom: thick double black;
  padding: 20px;
  justify-content: center;
}

p {
  margin: 0;
}

a {
  color: darkred;
  text-decoration: none;
}

a.active {
  color: darkblue;
}

footer {
  text-align: center;
  border-top: thick double black;
  margin: 0;
}

img {
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0;
  border-radius: 20px;
}

figure {
  margin: 0; /*Overrides figure element default margin values, which caused images to look narrower on mobile*/
}

figcaption {
  font-size: small;
  text-align: center;
}

.sidebar-post {
  margin: 5px;
}

.home {
  align-self: normal;
}

.about {
  align-self: normal;
}

.input-box {
  border: 2px solid black;
  border-radius: 20px;
  margin: 10px;
  padding: 10px;
}

.recent-posts {
  border: 2px solid black;
  border-radius: 20px;
  margin: 10px;
  padding: 10px;
}

.tags {
  border: 2px solid black;
  border-radius: 20px;
  margin: 10px;
  padding: 10px;
}

.back-to-home {
  display: inline-block;
  align-self: flex-start;
  color: white;
  background-color: brown;
  border-radius: 8%;
  margin: 10px;
  padding: 5px;
}

.profile {
  text-align: center;
}

.profile-picture {
  width: 200px;
  height: 200px;
  margin: 30px;
}

.post-overview {
  display: grid;
  grid-template-columns: 2fr 2fr 2fr 2fr 2fr 2fr;
  gap: 40px;
  max-width: 80%;
}

.post-preview {
  border: 2px solid black;
  padding: 5px;
  text-align: center;
  border-radius: 20px;
}

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 10px;
}

.social-links img {
  height: 24px;
  width: auto;
  margin: 0;
}

/*Responsive Designing*/

@media (max-width: 600px) {
  aside {
    display: none;
  }

  main {
    max-width: 90%;
    margin: 20px;
  }

  h1 {
    font-size: 32px;
  }

  nav {
    gap: 15px;
  }

  .profile-picture {
    max-width: 40%;
    height: auto;
  }

  .post-overview {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    height: auto;
  }
}
