/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
  --lightgray: #e0e0e0;
  --gray: #c0c0c0;
  --darkblue: #1d345e;
  --white: #fff;
  --link: #2e5eab;
  --block: #f2f2fc;
  --darkblock: #191923;
  --placeholder: #f0f0f0;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

* {
  box-sizing: border-box;
  text-underline-offset: 0.3rem;
  text-decoration-thickness: 0.08rem;
}

* {
  outline: #ff880032;
  outline-width: 1px;
  /*outline-style: solid;*/
}

html {
  font-size: 62.5%; /* 1.rem == 10px */
}
@media screen and (max-width: 1512px) and (min-resolution: 2dppx) {
  /* macbook pro show things waaayyy too big by default , scale down by 80%, makes it similar to 1920x1080; */
  html {
    font-size: 50%;
  }
}

html,
body {
  padding: 0;
  margin: 0;
  font-family:
    Inter,
    -apple-system,
    system-ui,
    sans-serif;
  font-size: 15px;
  color: var(--darkblue);
  background-color: var(--white);
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1,
h2,
h3,
h4,
h5 {
  font-weight: 600;
}

h1 {
  font-size: 2.1rem;
  line-height: 2.8rem;
  margin-top: 3.5rem;
  margin-bottom: 1.4rem;
}

h2 {
  font-size: 1.5rem;
  line-height: 2.1rem;
  margin-top: 2.8rem;
  margin-bottom: 0.7rem;
}

h3 {
  font-size: 1.1rem;
  line-height: 2.1rem;
  margin-bottom: 0.7rem;
}

h4 {
  font-size: 1.1rem;
  line-height: 1.4rem;
  margin-bottom: 0.7rem;
}

h5 {
  font-size: 1rem;
  line-height: 1.4rem;
  margin-bottom: 0.7rem;
}

h2 .title-aside {
  padding-top: 0.4rem;
  float: right;
  font-size: 1rem;
  line-height: 1.4rem;
  font-weight: normal;
}

p,
.tmpl-post li {
  font-weight: 350;
  line-height: 1.4rem;
  margin-bottom: 0.7rem;
}

p:last-child {
  margin-bottom: 0;
}

a[href] {
  color: var(--link);
}

a[href]:visited {
  color: var(--darkblue);
}

blockquote {
  border-left: solid 0.5rem #f8f8f8;
  padding-left: 1rem;
  margin-inline: 1.5rem;
  font-style: italic;
}

time {
  display: inline-block;
  height: 1.4rem;
  line-height: 1.4rem;
}

.navlink {
  font-weight: 400;
  line-height: 1.4rem;
}

/* ==========================================================================
   White Space
   ========================================================================== */

.mt-1 {
  margin-top: 0.7rem;
}

.mt-2 {
  margin-top: 1.4rem;
}

.mt-3 {
  margin-top: 2.1rem;
}

.mt-4 {
  margin-top: 2.8rem;
}

.mt-5 {
  margin-top: 4.2rem;
}

.mt-10 {
  margin-top: 8.4rem;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.page {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.top-nav,
.bottom-nav {
  padding: 0 2.1rem;
}

.top-nav {
  margin-top: 1.4rem;
}

.bottom-nav {
  margin-top: 6rem;
  margin-bottom: 3rem;
}
@media (max-width: 767px) {
  .bottom-nav {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 0.7rem;
  }
}

article {
  padding: 1.4rem 2.1rem;
}

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

.tmpl-post br {
  display: none;
}

/* ==========================================================================
   Components
   ========================================================================== */

/* Header */
.home {
  margin: 0;
  font-size: 1rem;
  margin-bottom: 2.1rem;
}

.home :link:not(:hover) {
  text-decoration: none;
}

/* Posts List */
.postlist {
  list-style: none;
  padding: 0;
}

.postlist-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  counter-increment: start-from -1;
  line-height: 1.8;
  position: relative;
}

.postlist-date,
.postlist-item:before {
  left: -24px;
  top: 12px;
  font-size: 0.8125em; /* 13px /16 */
  color: var(--darkblue);
}

.postlist-date {
  word-spacing: -0.5px;
}

.postlist-link {
  padding-right: 0.25em;
  flex: auto;
}

.postlist-item-active .postlist-link {
  font-weight: bold;
}

@media (max-width: 767px) {
  .postlist-item {
    display: block;
    margin-bottom: 0.7rem;
  }
  .postlist-date {
    display: block;
  }
}

/* Link List */
ul.linklist {
  margin-top: 0;
  margin-bottom: 0.7rem;
  list-style: none;
  padding-inline-start: 0;
}

ul.linklist h3 {
  font-weight: normal;
  line-height: 1.4rem;
  margin-bottom: 0;
}

ul.linklist p {
  margin-top: 4px;
}

ul.linklist li {
  margin-bottom: 15px;
}

/* Tags */
.post-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  font-size: 0.75em; /* 12px /16 */
  padding: 0.08333333333333em 0.3333333333333em; /* 1px 4px /12 */
  margin-left: 0.6666666666667em; /* 8px /12 */
  margin-top: 0.5em; /* 6px /12 */
  margin-bottom: 0.5em; /* 6px /12 */
  color: var(--darkblue);
  border: 1px solid var(--gray);
  border-radius: 0.25em; /* 3px /12 */
  text-decoration: none;
  line-height: 1.8;
}

a[href].post-tag,
a[href].post-tag:visited {
  color: inherit;
}

a[href].post-tag:hover,
a[href].post-tag:focus {
  background-color: var(--lightgray);
}

.postlist-item > .post-tag {
  align-self: center;
}

/* Images */
img {
  max-width: 100%;
  width: auto;
  height: auto;
  background: var(--placeholder);
}

img.shadow {
  margin-top: 30px;
  margin-bottom: 30px;
  box-shadow: 0px 0px 20px #0000001a;
}

/* Tables */
table {
  margin: 1em 0;
}

table td,
table th {
  padding-right: 1em;
}

/* Horizontal Rule */
hr {
  border: none;
  height: 1px;
  background: #e0e0e0;
  margin: 30px;
}

/* Comments */
.comments {
  padding: 1.4rem 2.1rem;
}

/* ==========================================================================
   Code Blocks
   ========================================================================== */

pre,
code {
  font-family:
    Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console",
    "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono",
    "Nimbus Mono L", "Courier New", Courier, monospace;
  line-height: 1.4rem;
  font-size: 0.9rem;
  font-weight: 300;
  background-color: var(--block);
}

pre {
  font-size: 1rem;
  line-height: 1.4rem;
  direction: ltr;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  -moz-tab-size: 2;
  -o-tab-size: 2;
  tab-size: 2;
  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
  padding: 1em;
  margin: 0.5em 0;
  overflow: hidden;
  overflow-x: auto;
}

code {
  word-break: break-all;
}

.small-code pre code {
  font-size: 0.7rem;
}
@media (max-width: 767px) {
  .small-code pre code {
    font-size: 0.4rem;
    line-height: 0.5rem;
  }
}

/* Syntax Highlighting */
.highlight-line {
  display: block;
  padding: 0.125em 1em;
  text-decoration: none;
  color: inherit;
}

.highlight-line:empty:before {
  content: " ";
}

.highlight-line + br {
  display: none;
}

.highlight-line-isdir {
  color: #b0b0b0;
  background-color: #222;
}

.highlight-line-active {
  background-color: #f8f8f8;
}

.highlight-line-add {
  background-color: #45844b;
}

.highlight-line-remove {
  background-color: #902f2f;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.nodec {
  text-decoration: none;
}

.nodec:hover {
  text-decoration: underline;
}

.fr {
  float: right;
}

/* Text Selection */
*::selection {
  text-shadow: none;
  background: var(--darkblue);
  color: white;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  html,
  body {
    color: var(--lightgray);
    background: black;
  }

  a[href] {
    color: white;
  }

  a[href]:visited {
    color: var(--lightgray);
  }

  pre,
  code {
    background-color: var(--darkblock);
  }

  .postlist-date,
  .postlist-item:before {
    color: var(--lightgray);
  }

  .highlight-line-active {
    background-color: #222;
  }

  *::selection {
    background: white;
    color: var(--darkblue);
  }
}

/* Touch Devices */
@media (pointer: coarse) {
  .postlist-item {
    height: 48px;
  }
}

/* Print */
@media print {
  .noprint {
    display: none !important;
  }

  :root {
    --lightgray: #e0e0e0;
    --gray: #c0c0c0;
    --darkblue: black;
    --white: white;
    --link: black;
    --block: white;
    --darkblock: black;
    --placeholder: #f0f0f0;
  }
  @page {
    margin-top: 4.2rem;
    margin-bottom: 7rem;
  }
}
