@import "/resources/css/fonts.css";

:root {
  --blue-accent: #498FE6;
  --font-size-body: 18px;
  --font-size-header: 1.2rem;
  --text-color: #444;
}

/* Basic element styles */
html {
  color: var(--text-color);
  font-family: valkyrie_a, sans-serif;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
  margin-block-end: 0;
}

ul[role='list'],
ol[role='list'] {
  list-style: none;
  padding-left: 0;
}

body {
  margin: 0 auto 1rem auto;
  max-width: 900px;
  line-height: 1.6;
  font-size: var(--font-size-body);
}

main {
  padding: 0 1em;
}

article, .stack {
  & > * + * {
    margin-block-start: 1.5rem;
  }

}

footer {
  padding: 0 1em;
}

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

hr {
  color: lightgray;
}

header h1, header h2 {
  margin: 0px;
}

header p {
  font-size: large;
}

h1, h2, h3, .author {
  color: var(--blue-accent);
  line-height: 1.2;
}

a {
  color: var(--text-color);
  text-decoration-color: var(--blue-accent);
}

a:visited {
  color: var(--text-color);
}

code, .code {
  font-family: berkeley_mono, monospace;
}

/* Site header stlyes */
.site-head {
  padding: 1em 0;
}

.site-head .website-title {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0 1em;

  img {
    margin-right: 1em;
  }

  div {
    color: var(--blue-accent);
    font-size: 1.5rem;
  }

}

.site-head nav {
  background-color: var(--blue-accent);
  padding: 0 1em;
}

.site-head ul {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: .5em;
  list-style: none;
}

.site-head li {
  color: white;
  margin-right: 1em;
}

.site-head a {
  color: white;
  text-decoration: none;
}

.site-head a:visited {
  color: white;
}

.blog-list {
  ul {
    list-style: none;
    padding: 0;
  }

  li {
    display: flex;
    flex-direction: column-reverse;
  }

  li + li {
    margin-block-start: 1rem;
  }

  .blog-date {
    display: inline-block;
    color: darkgray;
  }
}

@media (min-width: 700px) {
  .blog-list {
    ul {
      display: grid;
      grid-template-columns: fit-content(20rem) 1fr;
      column-gap: 1rem;
    }
    li { display: contents; }
  }
}
