@font-face {
  font-family: "Monolisa";
  src: url("/static/MonoLisaVariableNormal.woff2")
       , url("/static/MonoLisaVariableItalic.woff2");

  font-display: swap;
}

@font-face {
  font-family: "Monolisa-ScriptVariant";
  src: url("/static/MonoLisascript-variantItalic.ttf")
       , url("/static/MonoLisascript-variantNormal.ttf");

  font-display: swap;
}

html, body {
  font-family: "Monolisa", monospace;
  background: #050505;
  color: #dedede;
  width: 50vw;
  margin: 0vh auto;
  font-size: 1.1rem;
  line-height: 1.5;

  text-align: justify;  
  font-weight: 200;
}

/* body {
  margin-bottom: 10rem;
} */

h1, h2, h3, h4, h5, h6 {
  text-transform: lowercase;
  color: #f0f0f0;
  font-weight: 400;
  text-align: left;
}

h1 {
  margin-block-start: 2rem;
}

h2 {
  margin-block-start: 2.5rem;
}

h2._homepage {
  margin-block-start: 1rem;
}

h3 {
  margin-block-start: 2rem;
}

h4 {
  margin-block-start: 1.5rem;
}

h5 {
  margin-block-start: 1.2rem;
}

h6 {
  margin-block-start: 1rem;
}

h1:before {
  color: rgb(185, 147, 255);
  content: '# ';
}

h2:before {
  color: rgb(185, 147, 255);
  content: '## ';
}

h3:before {
  color: rgb(185, 147, 255);
  content: '### ';
}

h4:before {
  color: rgb(185, 147, 255);
  content: '#### ';
}

h5:before {
  color: rgb(185, 147, 255);
  content: '##### ';
}

img {
  max-width: 80%;
  height: auto;
  margin: 0 10%;
  /* margin-block-start: 1rem; */
  margin-top: 1rem;
  margin-bottom: 1rem;
}

p {
  /* These are technically the same, but use both */
  overflow-wrap: break-word;
  word-wrap: break-word;

  -ms-word-break: break-all;
  /* This is the dangerous one in WebKit, as it breaks things wherever */
  word-break: break-all;
  /* Instead use this non-standard one: */
  word-break: break-word;

  /* Adds a hyphen where the word breaks, if supported (No Blink) */
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  -webkit-hyphens: auto;
  hyphens: auto;

  margin-block-start: 1.5rem;
  margin-block-end: 1.5rem;

  font-weight: 200;
  font-size: 0.9rem;
}

p > code,
li > code,
dd > code,
td > code {
  background: #2f2f2f;
  font-family: 'Monolisa-ScriptVariant';
  font-size: 0.9rem;
  color: rgb(185, 147, 255);
  word-wrap: break-word;
  box-decoration-break: clone;
  padding: .1rem .3rem .2rem;
  border-radius: .2rem;
}

pre {
  margin: 0 0 2em 0;

  /* TODO: Do this with better UI. */
  /* &:before {
    display: block;
    text-transform: capitalize;
    content: attr(data-lang);
    position: relative;
    width: 100%;
    right: 20px;
    text-align: right;
    top: 32px;
    color: rgb(185, 147, 255);
  } */
}

pre code {
  display: block;
  background: none;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
  overflow-x: scroll;
  max-width: 100%;
  min-width: 100px;
  padding: 0;
  border-radius: 16px;

  font-family: 'Monolisa';
  font-size: 0.8rem;
}

/* EXPERIMENTAL! */
pre code.language-go {
  font-family: 'Monolisa-ScriptVariant';
}

blockquote {
  /* font-style: italic; Not needed with monolisa script variant */
  font-family: 'Monolisa-ScriptVariant';
  color: #fff;
  margin-block-start: 2rem;
  margin-block-end: 2rem;
}

blockquote:before {
  color: #ffa82e;
  content: '>>>';
  font-style: normal;
  font-weight: 400;
  margin-left: -40px;
  margin-right: 15px;
}

blockquote p {
  display: inline;
}

li {
  list-style-type: none;
  margin-bottom: 0.5rem;
  font-weight: 200;
  font-size: 0.9rem;
}

li::before {
  content: '> ';
  color: #ffa82e;
  font-weight: 400;
}

.hljs {
  background: #1f1f1f !important;
}

/* for block of numbers */
.hljs-ln-numbers {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;

  text-align: right;
  color: rgba(185, 147, 255, 0.582);
  margin-right: 16px;
  display: block;
}

.header {
  margin-top: 5vh;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.header img {
  margin: 0;
  padding: 0;
  width: 2rem;
  border-radius: 50%;
}

.header__left {
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
}

.header__right {
  display: flex;
  align-items: center;
  flex-direction: row;
}

.header a {
  text-decoration: none;
  color: #fff;
}

.header__right a {
  margin-left: 1.5rem;
}

.header__right a:before {
  color: rgb(185, 147, 255);
  content: '#';
  padding-right: 6px;
}

.header__left a {
  display: flex;
  align-items: center;
}

.header__left img {
  margin-right: 1rem;
}

.header__left div:before {
  color: rgb(185, 147, 255);
  content: '[';
  padding-right: 4px;
}

.header__left div:after {
  color: rgb(185, 147, 255);
  content: ']';
  padding-left: 4px;
}

.header__left a:hover, .header__right a:hover {
  color: #ffa82e;
}

p > a, li > a {
  color: #fff;
  text-decoration: none;

  &:before {
    color: #ffa82e;
    content: '[';
    padding-right: 4px;
  }
  &:after {
    color: #ffa82e;
    content: ']';
    padding-left: 4px;
  }
}

strong {
  color: #fff;
  font-weight: 400;
}

p > strong {
  text-decoration: underline;
  text-decoration-color: #ffa82e;
  text-decoration-style: dashed;
  text-decoration-thickness: 2px;
}

p > em, li > em {
  font-family: 'Monolisa-ScriptVariant';
  font-style: normal;
  color: #ffa82e;
}

.home-header {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin: 5vh 0 3vh 0;
}

.home-header img {
  width: 10rem;
  border-radius: 50%;
  margin: 0;
}

.home-header > div {
  margin-left: 10vw;
  padding-bottom: 3rem;
}

.home-header > div::before {
  color: rgb(185, 147, 255);
  content: '# ';
  font-size: 2rem;
  font-weight: 500;
  position: relative;
  top: 3.3rem;
  left: -2rem;
}

.home-header > div h1::before {
  display: none;
}

.home-header div.titles {
  margin: 0;
}

.home-header h1 {
  margin: 0;
}

.blog-index .month-item {
  margin: 2.5em 0 0.5em 0;
  font-size: 0.9rem;
}

.blog-index .month-item:first-of-type {
  margin-top: 0;
}

.blog-index .month-item::before {
  content: '[';
  padding-right: 4px;
  
}

.blog-index .month-item::after {
  content: ']';
  padding-left: 4px;
}

.blog-index a {
  color: #fff;
  text-decoration: none;
  
  /* To align the text with the .blog-index .post__header a::before */
  display: flex;
  align-items: center;
}

.blog-index .post__header a:hover {
  color: #ffa82e;
}

.blog-index .post__header a::before {
  content: '>';
  font-size: 1.2rem;
  font-weight: 500;
  padding-right: 8px;
  padding-top: 4px;
  color: #ffa82e;
}

.blog-index .post__header__date {
  display: none;
}

.blog-index .post__header__title {
  text-align: left;
}

.blog-index .post__tldr {
  padding-left: 1.3rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #bbb;
}

div.d2 {
  margin: 2em 0;
}

div.d2 > svg > svg > rect {
  fill: #050505 !important;
}

div.footnotes li {
  margin-top: 0.5rem;
  display: flex;
}

div.footnotes li > p {
  margin: 0;
  margin-block: 0;
}

div.footnotes li > p a:first-child::before, div.footnotes li > p a:first-child::after {
  display: none;
}

div.footnotes li::before {
  content: attr(data-index) ':';
  color: #ffa82e;
  padding-right: 4px;
}

div.footnotes p > a, div.footnotes li::before {
  font-weight: 200;
}

a.footnote-ref {
  color: #ffa82e;
  text-decoration: none;
  padding: 0 4px 0 4px;
}

.action_island {
  position: fixed;
  bottom: 2.5rem;
  width: 9rem;
  height: 2rem;
  /* left: calc(50vw - 4.5em - 20px); */
  left: calc(50% - 4.5em);
  border-radius: 2rem;
  background-color: #efefef;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  /* padding: 8px 20px; */
  color: #050505;

  /* To be ont top of Utteranc.es comment box */
  z-index: 1;
}

.action_island__like {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;
  padding: 0 10px;
  
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
}

.action_island__like_button {
  display: flex;
}
.action_island__likes {
  display: flex;
  margin-left: 0.5rem;
  font-size: 0.8rem;

  /* Disable text selection */
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none; /* Standard syntax */
}

.action_island__comment {
  display: flex;

  width: 100%;
  height: 100%;
  padding: 0 5px;
  justify-content: center;
  align-items: center;
}

.action_island__share {
  display: flex;

  width: 100%;
  height: 100%;
  padding: 0 10px;
  justify-content: center;
  align-items: center;

  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
}

.action_island__like:hover {
  color: red;
  background-color: #ddd;
}

.action_island__comment:hover {
  color: #ffa82e;
  background-color: #ddd;
}

.action_island__share:hover {
  color: rgb(185, 147, 255);
  background-color: #ddd;
}

.x-no-show {
  display: none !important;
}

.footer {
  margin-top: 4rem;
  margin-bottom: 1rem;
  font-size: 0.6rem;
  text-align: center;
  position: absolute;
  width: 100vw;
  left: 0;
  right: 0;
  padding-bottom: 1.5rem;
}

.home-content {
  display: flex;
  flex-direction: row;
  margin-top: -1.5rem;
}

.home-content ul {
  padding: 0;
}

.home-content li {
  text-align: left;
}

.home-content__left {
  flex: 1;
  padding-right: 0.5rem;
}

.home-content__right {
  flex: 1;
  padding-left: 0.5rem;
}

.home-content__right .projects_header {
  display: none;
}

.home-socials {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  margin-top: 0.6rem;
}

.home-socials a {
  display: flex;
  color: #fff;
  font-size: 1.4rem;
}

.home-socials p {
  margin: 1.5em 0;
}

.home-socials a:hover {
  color: #ffa82e;
}

.home-socials a:active {
  color: #fff;
  text-decoration: none;
}

@media screen and (max-width: 1024px) {
  html, body {
    width: 70vw;
    margin: 0.5vh auto;
  }
  /* body {
    margin-bottom: 3rem;
  } */
  img {
    max-width: 100%;
    margin: 1em 0 1em 0;
  }
  /* .home-header {
    margin: 5vh 0 3vh 0;
  } */
}

@media screen and (max-width: 800px) {
  html, body {
    width: 90vw;
    margin: 0.5vh auto;
  }
  /* body {
    margin-bottom: 3rem;
  } */
  img {
    max-width: 100%;
    margin: 1em 0 1em 0;
  }
  .home-header {
    margin: 5vh 0;
  }
}

@media screen and (max-width: 530px) {
  html, body {
    font-size: 1rem;
    font-weight: 300;
  }
  /* body {
    margin-bottom: 5rem;
  } */

  h1 {
    margin-block-start: 0.6rem;
    margin-block-end: 0.4rem;
    font-size: 2rem;
    font-weight: 300;
    line-height: 42px;
  }
  h2 {
    margin-block-start: 0.5rem;
    margin-block-end: 0.4rem;
    font-size: 1.8rem;
    font-weight: 300;
    line-height: 36px;
  }
  h3 {
    margin-block-start: 0.45rem;
    margin-block-end: 0.4rem;
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 32px;
  }
  h4 {
    margin-block-start: 0.4rem;
    margin-block-end: 0.4rem;
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 30px;
  }
  h5 {
    margin-block-start: 0.4rem;
    margin-block-end: 0.4rem;
    font-size: 1.35rem;
    font-weight: 300;
    line-height: 28px;
  }
  h6 {
    margin-block-start: 0.4rem;
    margin-block-end: 0.4rem;
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 24px;
  }
  p {
    margin-top: 0;
    text-align: left;
    font-weight: 300;
    font-size: 0.95rem;
  }

  li {
    text-align: left;
    font-weight: 300;
  }

  .home-header {
    flex-direction: column;
  }
  .home-header > div {
    margin: 0;
    padding: 0;
    margin-top: -1.5rem;
  }
  .home-header > div::before {
    top: 2.9rem;
  }

  .header {
    margin-top: 1rem;
    flex-direction: column;
  }
  .header__right {
    margin-top: 0.5rem;
  }

  .home-content {
    flex-direction: column;
  }
  .home-content__left {
    padding: 0;
  }
  .home-content__right {
    padding: 0;
  }
  .home-content__right .projects_header {
    display: block;
  }

  h2._homepage {
    margin-block-start: 0.5rem;
  }

  img {
    margin: 1em 0 1em 0;
  }

  pre {
    margin: 0 0 2em 0;

    /* EXPERIMENTAL! */
    margin-left: -5vw;
    width: 100vw;
  }
  pre::before{
    display: none;
  }
  pre code {
    font-size: 0.95rem;

    /* EXPERIMENTAL! */
    border-radius: 0;
  }

  .hljs-ln-numbers {
    display: none;
  }
  
  .action_island {
    font-size: 1rem;
    bottom: 1rem;
  }
  .action_island__like:hover {
    background-color: #efefef;
  }
  .action_island__comment:hover {
    background-color: #efefef;
  }
  .action_island__share:hover {
    background-color: #efefef;
  }
}