:root {
  --bg: #fff;
  --text-color: #141614;
  --transparent-color: #037a0109;
  --green: #037a01;
  --blue: #001489;

  --font-size: calc(1rem * 1.19);
  --font-size-h1: calc(2rem * 1.25);
  --font-size-h2: calc(1.5rem * 1.25);
  --font-size-h3: calc(1.17rem * 1.25);
  --font-size-h4: calc(1rem * 1.25 + 0.05rem);
  --font-size-h5: calc(0.83rem * 1.25 + 0.1rem);
  --font-size-h6: calc(0.67rem * 1.25 + 0.1rem);
  --font-size-a: calc(1rem * 1.2);
  --font-size-nav-a: calc(1rem * 1.3);
  --font-size-post-a: calc(1rem * 1.3);
  --font-size-code: calc(1rem * 1.01);
}

:root.dark {
  --bg: #141519;
  --text-color: #ffd6f1;
  --transparent-color: #ffd6f140;
  --green: #3bcc5a;
  --blue: #1e9dff;
}

@font-face {
    font-family: 'Commit Mono';
    src: url('CommitMono-abdrd-525-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

body {
  margin: 0;
  font-family: "Poly", serif;
  font-size: var(--font-size);
  min-height: 100vh;
  width: 100%;
  background-color: var(--bg);
}


article {
  line-height: 1.5;
  letter-spacing: 0.015em;
}

p {
  color: var(--text-color);  
}

#container {
  margin: 0.5rem auto;
  width: 60%;
}

@media (max-width: 767px) {
  #container {
    width: 88%;
  }

  :root {
    --font-scale: 1rem;
    --font-scale-link: 1.1rem;
  }
}

nav {
  display: flex;
  justify-content: space-between;
}

nav ul {
  margin: 0;
  padding: 0;
}

nav ul li {
  list-style-type: none;
  margin-bottom: 0.2em;
}

nav a {
  font-size: var(--font-size-nav-a);
  text-decoration: none;
}

a {
    text-decoration: underline;
    color: var(--green);
    font-size: var(--font-size-a);
    font-style: italic;
    cursor: pointer;
}

a:hover {
    background: var(--green);
    color: #fff;
}

code {
  font-family: "Commit Mono", monospace;
  font-weight: 550;
  font-size: var(--font-size-code);
  color: var(--green);
  background-color: var(--transparent-color);
}

/* code sections' bg colors should be the same as the site's */
.hljs {
  background-color: var(--bg) !important;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-color);
  font-style: italic;
  font-weight: lighter;
  background-color: var(--transparent-color);
  width: fit-content;
  letter-spacing: 0.03em;
  padding: 0;
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-h4); }
h5 { font-size: var(--font-size-h5); }
h6 { font-size: var(--font-size-h6); }

#nav-right {
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

button {
  font-family: inherit;
  font-size: 1.2rem;
  padding: 0.3em;
  cursor: pointer;
  border: 1px solid;
  background: transparent;
  color: var(--text-color);
}

button img {
  width: 2rem;
  height: auto;
  display: block;
}

#nav-right button {
  background-color: var(--bg);
  align-self: flex-end;
  font-size: 2rem;
  border: none;
}

strong {
  text-decoration: underline;
}

em, i {
  color: var(--blue);
}

img {
    max-width: 100%;
    height: auto;
}

#post-list-container {
  display: flex;
  flex-direction: column;
}

.post-link {
  font-size: var(--font-size-post-a);
  width: fit-content;
}

.post-link::before {
  content: "// "
}

#post-footer-container {
  display: flex;
  justify-content: space-between;
}

#post-footer-container a {
  font-size: var(--font-size-nav-a);
}

ul {
  color: var(--text-color);
}

li {
  margin: 0.3em;
}
