/** 
* Table of contents
*
* Global resets
* Basic formatting
* Headings
* Body text
* Lists
* Tables
* Container
* Archive
* Posts
* Masthead
* Code
*

import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&family=Source+Code+Pro:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
*/

:root {
  --gutter: 1.5rem;
  --sans-font: "Inter var", sans-serif;
  --serif-font: "Inter", serif;
  --code-font: "Source Code Pro", monospace;
  --body-bg: #eceff4;
  --body-color: #2e3440;
  --secondary-body-bg: #e5e9f0;
  --secondary-color: #3b4252;
  --heading-color: #434c5e;
  --code-color: var(--body-color);
  --code-bg: #d8dee9;
  --hr-color: #81a1c1;
  --link-color: #88c0d0;
  --link-color-hover: rgba(136, 192, 208, 0.5);
  --blockquote-border: #5e81ac;
  --blockquote-color: rgba(94, 129, 172, 0.75);
}

@media (prefers-color-scheme: dark) {
  :root {
    --body-bg: #2e3440;
    --body-color: #d8dee9;
    --secondary-color: #e5e9f0;
    --secondary-body-bg: #3b4252;
    --heading-color: #eceff4;
    --code-color: var(--body-color);
    --code-bg: #4c566a;
    --hr-color: #81a1c1;
    --link-color: #88c0d0;
    --link-color-hover: rgba(136, 192, 208, 0.25);
    --blockquote-border: #8fbcbb;
    --blockquote-color: rgba(143, 188, 187, 0.75);
  }

  tbody tr:nth-child(odd) td,
  tbody tr:nth-child(odd) th {
    background-color: var(--secondary-body-bg);
  }
}

/** Global resets */

html,
body {
  margin: 0;
  padding: 0;
}

/** Basic formatting */

html {
  font-family: var(--serif-font);
  font-size: 16px;
  overflow: scroll;
  overflow-x: hidden;
}

body {
  padding: 0 var(--gutter);
  margin: 0;
  line-height: 1.6;
  color: var(--body-color);
  background-color: var(--body-bg);
}

::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

/** Headings */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--sans-font);
  font-weight: normal;
  color: var(--heading-color);
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.5rem;
}

h4,
h5,
h6 {
  font-size: 1.25rem;
}

/** Body text */

p {
  position: relative;
  margin: 0 auto;
}

strong {
  font-weight: bold;
}

a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline var(--link-color-hover);
}

hr {
  margin: 2rem 0;
  border: 0;
  border-bottom: 0.125rem solid var(--hr-color);
}

blockquote {
  padding: 0.5rem 1rem;
  margin: 0.8rem 0;
  color: var(--blockquote-color);
  border-left: 0.25rem solid var(--blockquote-border);
}

/** Lists */

ul,
ol {
  margin-top: 0;
  margin-bottom: 1rem;
}

dt {
  font-weight: bold;
}
dd {
  margin-bottom: 0.5rem;
}

/** Tables */

table {
  margin-bottom: 1rem;
  width: 100%;
  margin: 0 0 1rem;
  border: 1px solid var(--blockquote-border);
  border-collapse: collapse;
  text-align: left;
}

td,
th {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--blockquote-border);
  background-color: var(--secondary-body-bg);
}

tbody tr:nth-child(odd) td,
tbody tr:nth-child(odd) th {
  background-color: var(--body-bg);
}

/** Container  */

.container {
  max-width: 48rem;
  margin: 0 auto;
}

/** Archive */

.archive {
  font-family: var(--sans-font);
  margin-bottom: 3rem;
}
.archive-item {
  margin-bottom: 2rem;
  overflow: auto;
  font-size: 1rem;
  align-items: baseline;
  display: flex;
}

.archive-item a {
  color: var(--body-color);
}

.archive-item a:hover {
  text-decoration: underline var(--body-color);
}

.archive-date {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 90%;
}

.archive-spacer {
  border-bottom: 0.075rem dotted var(--hr-color);
  flex: 1;
  margin: 0 0.25rem;
}

@media (min-width: 42rem) {
  .archive-item {
    margin-bottom: 0.5rem;
  }

  .archive-date {
    float: right;
    margin-left: 0.5rem;
  }
}

/** Posts and Pages*/

.post,
.page {
  position: relative;
  margin-bottom: 3rem;
}

.post-title,
.page-title {
  margin-top: 0;
}

.post-date {
  display: block;
  margin-top: 0;
  margin-bottom: var(--gutter);
  font-family: var(--sans-font);
  color: var(---color);
}

/** Masthead */

.masthead {
  padding: .3rem 0;
  height: 4.5rem;
  display: block;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  border-bottom: 0.125rem solid var(--hr-color);
  font-size: 1rem;
  font-family: var(--sans-font);

  top: 0;
  background: var(--body-bg);
  position: -webkit-sticky;
  position: sticky;
  z-index:170;
}

.masthead-title {
  color: var(--body-color);
  font-size: 1.2rem;
  font-weight: 500;
}

.masthead-title a {
  color: var(--body-color);
}

.masthead-title a:hover {
  text-decoration: none;
  background-color: var(--body-bg);
}

small {
  font-weight: 400;
  opacity: 0.5;
}

.nav {
  float: right;
}

.footer {
  padding-top: 1.5rem;
  font-size: 0.875rem;
  border-top: 0.125rem solid var(--hr-color);
  margin-bottom: 2rem;
}

/** Code */

code,
pre {
  font-family: var(--code-font);
}

code {
  padding: 0.25rem 0.5rem;
  font-size: 85%;
  color: var(--code-color);
  background-color: var(--code-bg);
  border-radius: 3px;
}

pre {
  display: flex;
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  font-size: 0.95rem;
  line-height: 1.4;
  white-space: pre;
  white-space: pre-wrap;
  word-break: break-all;
  word-wrap: break-word;
  background-color: var(--code-bg);
}

