/* IMPORTS */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  --bg: #161616;
  --fg: #eceff4;
  --gray: #363636;
  --light-gray: #4c566a;
  --olive: #a3be8c;
  --visited-link: #b48ead;
  --highlight: #81a1c1;
  --alt-bg: #262626;
  --alt-bg-darker: #202020;

  background: #121212;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  max-height: 100vh;

  font-family: 'Roboto Mono';
}

/* STRUCTURE */

body {
  width: min(100%, 1100px);
  min-height: 100vh;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  display: grid;
  box-sizing: border-box;
  overflow: hidden;

  grid-template-columns: 200px 1fr;
  grid-template-rows: 1fr 130px;

  grid-template-areas:
    "header main"
    "footer main";
}

/* STRUCTURE > HEADER-NAV */

body>header {
  grid-area: header;

  background: var(--alt-bg);
  padding-right: 5px;
  padding-left: 5px;
  border-bottom: none;
  border-top: none;
}

body>header>nav>ul {
  margin: 0;
  padding: 0;
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  align-items: baseline;
  justify-content: flex-start;
  list-style-type: none;
  gap: 10px;
}

body>header>nav>ul>li {
  width: 100%;
}

body>header>nav>ul>li>a {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 4px;
  background: var(--bg);
  border: 3px var(--olive) ridge;
  border-radius: 5px;
  color: var(--olive);
  text-decoration: none;
  white-space: nowrap;
}

body>header>nav>ul>li>a:hover {
  border: 3px var(--fg) ridge;
  color: var(--fg);
}

body>header>nav>ul>li>a:hover::before {
  content: "> ";
}

/* STRUCTURE > MAIN BODY SECTION */

body>main {
  grid-area: main;

  margin: 1em;
  overflow-y: scroll;
  overflow-wrap: break-word;

  display: block;
  flex-direction: column;
  gap: 1ch;
}

/* STRUCTURE > FEET */

body>footer {
  grid-area: footer;
  background-color: var(--alt-bg);
  border-top: 3px solid var(--olive);
  padding: 5px;
  margin-bottom: 0;
  display: grid;

  grid-template-areas:
    "sub1 button1"
    "sub2 button2"
    "sub3 button3";


}


/* TEXT */

h1 {
  font-size: 2rem;
  margin: 0;
  color: var(--olive);
}

h1::before {
  content: "# ";
}

h2 {
  font-size: 1.5rem;
  margin: 0;
  color: var(--olive);
}

h2::before {
  content: "## ";
}

h3 {
  font-size: 1rem;
  margin: 0;
  color: var(--olive);
}

h3::before {
  content: "### ";
}

/* USED ON THE POSTS PAGE FOR THE LINKS */
body>main>h2>a {
  text-decoration: none;
  color: var(--olive)
}

body>main>h2>a:visited {
  color: var(--visited-link);
}

body>main>h2:hover>a::before {
  color: var(--fg);
  content: "> ";
}

body>footer>sub {
    font-size: 12px;
  }

/* MOBILE */
/* STRUCTURE > MOBILE */

@media (max-width: 700px) {
  :root {
    max-height: unset;
  }

  body {
    display: flex;
    flex-direction: column;
    height: unset;
    max-height: unset;
    overflow: unset;
  }

  body>header {
    padding-bottom: 6px;
    border-bottom: 3px solid var(--olive);
  }

  body>header>nav>ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40%, 1fr));
  }

  body>header>nav>ul>li {
    text-align: center;
  }

  body>header>nav>ul>li>a {

    padding: 6px;

  }

  body>footer {
    grid-template-areas:
      "sub1 sub2 sub3"
      "button1 button2 button3";
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    text-align: center;
  }
  body>footer>img {
    justify-self: center;
  }
  
}