/*
  This file incorporates bits from Josh W Comeau's reset, which is in
  the public domain: https://www.joshwcomeau.com/css/custom-css-reset/
*/

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

* {
  margin: 0;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

html {
  font-size: 16px;
}

body {
  /* Geometric Humanist from modernfontstacks.com */
  font-family: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif;
  line-height: 1.5;
}

#container {
  padding: 0.5rem 1.5rem 0;
  margin: auto;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
}

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

header h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  font-weight: normal;
}

footer {
  margin-top: 1.5rem;
  padding: 0.5rem 0;
}

.asterisk {
  color: #05c127;
}

section > h2 {
  font-size: 1.333rem;
  font-weight: normal;
  margin-bottom: 0.75rem;
}

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

article a {
  text-decoration: underline;
}

a:hover {
  background-color: #d1e7d0;
}

a.home:hover {
  background-color: inherit;
}

#recent .post {
  margin-bottom: 1rem;
}

#recent .project {
  margin-bottom: 1.5rem;
}

.title {
  font-size: 1.083rem;          /* 1 1/12 */
  font-weight: 500;
}

.date {
  font-size: 0.833rem;          /* 5/6 */
}

.description {
  font-size: 0.917rem;          /* 11/12 */
}

.all {
  font-weight: 500;
}

.commit {
  /* Monospace Code from modernfontstacks.com */
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
  font-size: 0.75rem;
}

ul {
  list-style: none;
  padding-left: 0;
}

footer .asterisk {
  font-size: 1rem;
}

footer .name {
  font-size: 0.917rem;
}

footer ul, footer li {
  display: inline;
  font-weight: 500;
  font-size: 0.833rem;
}

footer li::before {
  content: '•';
  font-size: 0.5em;
  vertical-align: middle;
  display: inline-block;
  margin: 0 0.667em;
}

#recent > .posts {
  margin-bottom: 1.5rem;
}

article > p {
  margin-top: 1em;
  font-size: 1.167rem;          /* 1 1/6 */
  max-width: 30em;
}

article > h2 {
  font-size: 1.5rem;
  font-weight: normal;
}

article > h3 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-top: 1.75rem;
  margin-bottom: -0.5rem;
}

article > time {
  font-size: 0.833rem;
}

.all-posts .post {
  margin-bottom: 1rem;
}

hr {
  margin: 0;
  border: none;
}

@media screen and (min-width: 900px) {
  #container {
    width: 900px;
  }
  main {
    flex-direction: row;
  }
  #recent > .posts {
    margin-right: 2rem;
  }
  #recent > .projects {
    margin-top: 0;
  }
  section {
    flex: 1;
  }
}

@media screen and (prefers-color-scheme: dark) {
  body {
    color: #eee;
    background-color: #222;
  }

  a:hover {
    background-color: #454d45;
  }
}
