/* COLOURS : START */

:root {
  color-scheme: light dark;

  --normal-text-color: #161321;
  --heading-text-color: #333;
  --normal-link-color: #0266cc;
  --active-link-color: #006bd6;
  --visited-link-color: #3c6d9e;
  --page-background-color: white;
  --highlighted-background-color: #fafafa;
  --highlighted-text-color: #000;
  --code-background-color: #f9fafa;
  --code-text-color: #000;
  --light-border-color: #d6d6d6;
  --dark-border-color: #d2d2d7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --normal-text-color: #f8f8f1;
    --heading-text-color: #be93f9;
    --normal-link-color: #34b5c7;
    --active-link-color: #37c5d8;
    --visited-link-color: #30a8b8;
    --page-background-color: #161321;
    --highlighted-background-color: #2c2542;
    --highlighted-text-color: #efefe9;
    --code-background-color: #22212d;
    --code-text-color: #f8f8f2;
    --light-border-color: #0b0a10;
    --dark-border-color: #9b7cff;
  }
}

/* For browsers that do not support CSS variables */
:root {
  color: #161321;
  background-color: #fff;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  color: #333;
}
hr {
  border-color: #d2d2d7;
}
code,
pre.highlight {
  color: #000;
  background-color: #f0ebff;
  border-color: #d6d6d6;
}
a {
  color: #0266cc;
}
a:hover,
a:active,
a:focus {
  color: #006bd6;
}
a:visited {
  color: #3c6d9e;
}

:root {
  color: var(--normal-text-color);
  background-color: var(--page-background-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading-text-color);
}

hr {
  border-color: var(--dark-border-color);
  margin: 1.8125em 0;
}

a {
  color: var(--normal-link-color);
}
a:hover,
a:active,
a:focus {
  color: var(--active-link-color);
}
a:visited {
  color: var(--visited-link-color);
}

code.highlighter-rouge {
  padding: 0.25em;
  word-wrap: break-word;
}
code,
pre.highlight {
  color: var(--code-text-color);
  background-color: var(--code-background-color);
  border-color: var(--light-border-color);
}

a code {
  color: var(--normal-link-color);
}

small {
  font-size: 0.75em;
}

.header,
.footer {
  background-color: var(--highlighted-background-color);
  color: var(--highlighted-text-color);
}

.header a,
.header .title a:hover,
.header .title a:active,
.header .title a:focus,
.header .title a:visited {
  color: var(--highlighted-text-color);
  text-decoration: none;
}
.header a:hover {
  text-decoration: underline;
}
.header {
  display: flex;
  flex-wrap: wrap;
  padding: 0 1em 1em;
}
.header .title {
  flex: 10em 1 0;
}

.navigation-links {
  list-style-type: none;
  padding: 0;
  margin: 1em 0;
}
.navigation-links li {
  display: inline-block;
  padding: 0 1em 0 0;
  white-space: nowrap;
}
.navigation-links li:first-child {
  padding-left: 0;
}

.footer a,
.footer a:hover,
.footer a:active,
.footer a:focus,
.footer a:visited {
  color: var(--footer-link-color);
  text-decoration: none;
}

/* COLOURS : END */

/* FONTS : START */

:root {
  font: 20px/2 "Quicksand", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font: 32px/1.25 "Sofia", cursive;
  font-weight: 400;
}

code,
pre {
  font: 16px/2.5 "Source Code Pro", monospace;
}

@font-face {
  font-family: 'icomoon';
  src:  url('/public/fonts/icomoon.eot?8ca6n3');
  src:  url('/public/fonts/icomoon.eot?8ca6n3#iefix') format('embedded-opentype'),
    url('/public/fonts/icomoon.ttf?8ca6n3') format('truetype'),
    url('/public/fonts/icomoon.woff?8ca6n3') format('woff'),
    url('/public/fonts/icomoon.svg?8ca6n3#icomoon') format('svg');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

i {
  /* use !important to prevent issues with browser extensions that change fonts */
  font-family: "icomoon" !important;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  width: 16px;
  height: 16px;

  /* Better Font Rendering =========== */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-x:before {
  content: "\e900";
}
.icon-twitter:before {
  content: "\e900";
}
.icon-home:before {
  content: "\e901";
}
.icon-instagram:before {
  content: "\ea92";
}
.icon-rss:before {
  content: "\ea9b";
}
.icon-github:before {
  content: "\eab0";
}
.icon-linkedin:before {
  content: "\eaca";
}

strong {
  font-weight: 600;
}

time {
  font-family: "Quicksand", sans-serif;
  font-size: 0.75em;
  line-height: 2.5em;
  color: var(--code-text-color);
  opacity: 0.5;
  white-space: nowrap;
}

/* FONTS : END */

h1 {
  font-size: 1.875em;
}
h1 small {
  white-space: nowrap;
}

h2 {
  font-size: 1.75em;
  line-height: 1.071428571;
  margin: 1.071428572em 0;
}

h3 {
  font-size: 1.5em;
  line-height: 1.25;
  margin: 1.25em 0;
}

@media (max-width: 400px) {
  h1,
  h2 {
    font-size: 1.5em;
  }
  h1.title,
  h3 {
    font-size: 1.25em;
  }
}

h4 {
  font-size: 1.25em;
  margin: 0.5em 0;
}

h4 a {
  font-family: "Quicksand", sans-serif;
  font-weight: 400;
  font-size: 0.8em;
  line-height: 2.34375em;
}

h5,
h6 {
  font-size: 1em;
}

p {
  margin: 1.875em 0;
}
li > p {
  margin: 0;
}

p + ul {
  margin-top: 0;
}

ul {
  padding-left: 1.25em;
}

blockquote {
  border-left: 2px solid var(--dark-border-color);
  margin-left: 0;
  padding-left: 1em;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 0.5em;
}

.header {
  border-bottom: 1px solid var(--light-border-color);
}
.header .title {
  margin: 1em 0 0;
  padding: 0;
}
.header .avatar {
  width: 1.25em;
  height: 1.25em;
  border-radius: 50%;
  border: 1px solid var(--light-border-color);
  vertical-align: bottom;
}
.header nav {
  margin: 1em 0 0;
}

.main {
  padding-bottom: 3.75em;
  min-height: calc(100vh - 20em);
}

pre.highlight {
  border: 1px solid var(--light-border-color);
  padding: 0.733333333em 1em;
  overflow-x: scroll;
}

pre.lineno {
  color: var(--dark-border-color);
  text-align: right;
  padding-right: 1em;
  /* border-right: 1px solid var(--light-border-color); */
  margin-right: 1em;
}

.footer {
  border-top: 1px solid var(--light-border-color);
  border-bottom: 1px solid var(--light-border-color);
}

ul.contact {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  text-align: center;
}
ul.contact li {
  display: inline-block;
  padding: 0 0.75em;
  line-height: 3.75;
}

.related {
  margin-top: 4em;
}

.post-date {
  color: var(--heading-text-color);
}

h3:target,
h4:target {
  position: relative;
  text-decoration: underline;
}
h3:target:before,
h4:target:before {
  content: "\02192";
  text-decoration: none;
  position: absolute;
  right: 100%;
  top: 0;
  color: var(--normal-link-color);
  white-space: nowrap;
  padding-right: 0.25em;
}
@media (max-width: 900px) {
  h3:target:before,
  h4:target:before {
    content: "";
  }
}

ul.tags {
  list-style: none;
  padding: 0;
  margin: 1.875em 0;
}
ul.tags li {
  display: inline-block;
  margin-right: 1em;
  background-color: var(--code-background-color);
  border: 1px solid var(--light-border-color);
  line-height: 1.75em;
  border-radius: 5px;
  padding: 0 0.5em;
}
ul.tags li:before {
  content: "# ";
  color: var(--normal-link-color);
}

.main img:not(.emoji),
.main video {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--light-border-color);
  padding: 0.25em;
  margin: 0.8125em auto;
  display: block;
  box-sizing: border-box;
}

figure {
  margin: 0 auto;
}
figcaption {
  text-align: center;
  font-size: 0.75em;
  line-height: 2.5;
}

iframe {
  max-width: 100%;
}
