/* Vars */

:root {
  --background: hsl(0, 0%, 96%);
  --text: hsl(0, 0%, 13%);
  --faded: hsl(0, 0%, 33%);
}

/* Margins and padding */

body {
  margin: 0 auto 0 30vw;
}

.inner-body {
  margin: 0 1rem;
}


header {
  padding: 4rem 1rem 1rem 1rem;
  margin-bottom: 1rem;

  h1 {
    margin: 0;
  }

  p {
    margin: 0;
  }
}

footer {
  margin-bottom: 2rem;
}

article {
  margin-bottom: 3rem;
}

/* Styling */

body {
  max-width: 40rem;
  background-color: var(--background);
  color: var(--text);
  font-size: 1.2em;
  font-family: "Crimson Pro";
  line-height: 1.3;
}

::selection {
  color: var(--background);
  background-color: var(--text);
}

/*h1, h2, h3 { font-weight: normal; }*/
h1 {
  font-size: 2em;
}

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

h3 {
  font-weight: normal;
  font-size: 1.17em;
}

.shrink-headings h1 {
  color: var(--faded);
  font-size: 1.5em;
}

.shrink-headings h2 {
  color: var(--faded);
  font-size: 1.17em;
}

.shrink-headings h3 {
  color: var(--faded);
  font-size: 1em;
}

/* Utility */

a {
  color: inherit;
  text-decoration-style: dotted;

  &:hover {
    text-decoration-style: solid;
  }
}

a.hover-line {
  text-decoration: none;

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

a.btn {
  text-decoration: none;
  outline: 1px solid var(--faded);
  background-color: hsl(0, 0%, 90%);
  font-size: 0.8em;
  font-family: inherit;
  padding: 0.3rem 0.5rem;
  border-radius: 5px;

  &:hover {
    background-color: hsl(0, 0%, 85%);
    text-decoration: none;
    cursor: pointer;
  }

  &:active {
    background-color: hsl(0, 0%, 75%);
    cursor: pointer;
  }
}

.align-right {
  text-align: right;
  margin-right: 0.6rem;
}

.ital {
  font-style: italic;
}

.faded {
  color: var(--faded);
}

.no-mar-top {
  margin-top: 0;
}

.no-mar-bot {
  margin-bottom: 0;
}

.small {
  font-size: 0.8em;
}

/* Components */

.margin-flair {
  float: right;
  width: 20rem;
  margin: 0rem -4rem 1rem 1rem;

  img {
    width: 100%;
  }
}

.sidenote {
  text-align: right;
  float: left;
  width: 16rem;
  margin: 0rem 0rem 0rem -18rem;
}

/* Responsive corrections */

@media screen and (width <=60rem) {
  body {
    margin: 0 auto;
  }

  .sidenote {
    width: inherit;
    text-align: left;
    float: none;
    margin: 0rem 0rem 0rem -0.6rem;
  }
}

@media screen and (width <=30rem) {
  header {
    padding-top: 4rem;
    color: var(--background);
    background-image: url("/res/titmouse.avif");
    background-position: 0% 30%;
    background-size: cover;
  }

  .margin-flair {
    display: none;
  }
}