:root {
  font-family: "Crimson Text", "PT Serif", Georgia, serif;

  --sky-white: hsl(205deg, 100%, 98%);
  --dark-gray: light-dark(#505050, #ccc);
  --light-gray: #879ba2;
  --fun-font: "Mirza", sans-serif;
  --rounded: 4pt;

  font-size: 14pt;
  color-scheme: light;
}

body {
  background: url("/assets/header.png") fixed top no-repeat;
  background-color: var(--sky-white);
  background-blend-mode: multiply;

  --main-width: calc(min(100%, 450px + 28vw));
  background-size: var(--main-width);
  margin: 0;
}

.container {
  margin: auto;
  margin-top: calc(var(--main-width) * 0.34);
  width: calc(min(100%, 500px + 28vw));
  margin-bottom: 60px;
  box-sizing: border-box;
  padding: 1rem min(3rem, 6vw);
  box-shadow: 0px 8px 30px #0032;
  border-radius: 10px;
  background: light-dark(white, #222);
}

header {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-family: var(--fun-font);

  & .site-name {
    font-size: 2.5rem;
  }
  & a {
    text-decoration: none;
    color: var(--dark-gray);
    &:hover {
      color: light-dark(black, white);
    }
  }

  & nav {
    display: flex;
    flex-wrap: wrap;
  }
  & nav a {
    color: var(--light-gray);
  }
  & nav a:not(:first-child)::before {
    content: "·";
    padding: 0 8px;
    color: var(--light-gray);
  }
}

footer {
  color: var(--light-gray);
  text-align: center;
  font-size: 0.7em;

  & a {
    color: var(--light-gray);
    text-decoration: none;
  }
}

img {
  border-radius: var(--rounded);
  max-width: 100%;
  height: auto;
}

figure {
  text-align: center;
}

/* text styles */

main a {
  text-decoration: none;
  color: var(--dark-gray);
  cursor: pointer;

  &:hover {
    text-decoration: underline;
  }
}

p a {
  text-decoration: underline;
  text-decoration-color: var(--light-gray);
}

p:first-child {
  margin-top: 0;
}

hr {
  text-align: center;
  border: none;
  margin: 20px 0;
  &:after {
    content: "· · ·";
    color: var(--light-gray);
  }
}

h1 {
  font-size: 1.5em;
  font-weight: normal;
}

h2 {
  font-weight: normal;
  font-style: italic;
}

.post-meta {
  color: var(--light-gray);
  font-family: var(--fun-font);
}

code {
  font-size: 0.75em;
}

pre {
  padding: 0.5em;
  border-radius: 5px;
  box-shadow: 0 2px 5px #0002;
  outline: 2px solid #08a5;
  white-space: pre-wrap;
  background-color: var(--sky-white);
}

.block-equation {
  display: flex;
  justify-content: center;
}

.aside {
  background-color: #acf8;
  border-radius: 8px;
  font-size: 93%;
  padding: 0.7em 1em;
  text-align: justify;
  box-shadow: 0px 2px 5px #0002;
  & > p:last-child,
  & > p:first-child {
    margin-bottom: 0;
    margin-top: 0;
  }
}

/* Blog */

.cover-image {
  max-height: 200px;
  overflow-y: hidden;
  border-radius: var(--rounded);
  box-shadow: 0 4px 8px #0002;
}
