@import url('https://fonts.googleapis.com/css2?family=Francois+One&family=Inconsolata:wght@200..900&family=Sofia+Sans:ital,wght@0,1..1000;1,1..1000&display=swap');

html {
  height: 100%;
}

* {
  box-sizing: border-box;
}

:root {
  --light-color: #fbdcf1;
  --dark-color: #2a051d;
  --head-font: "Francois One", sans-serif;
  --text-font: "Sofia Sans", monospace;
  --code-font: "Inconsolata", monospace;
}

body {
  height: 100%;
  background-color: var(--light-color);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  margin: 0;
  padding: 0;
  gap: 0;
}

.main-col {
  display: flex;
  margin: 0;
  padding: 0 5%;
}

.about-img {
  width: 400px;
  max-width: 50%;
  border-radius: 50px;
  align-self: center;
}

#left-col {
  flex-direction: column;
  align-items: center;
}

#right-col {
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--head-font);
  color: var(--dark-color);
}

h3, h4, h5, h6 {
  margin: 0;
}

p, a, li, dt, dd, blockquote, span, em, sup, th, td {
  font-family: var(--text-font);
  color: var(--dark-color);
}

p, ol, ul, dl {
  font-size: 18px;
  padding-bottom: 1em;
  margin: 0;
}

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

pre {
  padding: 1%;
  margin: 0 1% 1% 1%;
  white-space: pre-wrap;
  letter-spacing: 1.1;
}

.list-post-date {
  font-weight: 800;
  letter-spacing: 0.1em;
  font-size: 16px;
}

.list-post-date:before {
  content: "{{ "
}

.list-post-date:after {
  content: " }}"
}

.list-post-title {
  font-size: 18px;
}

.list-post-tag {
  text-decoration: none;
  color: var(--light-color);
  background-color: var(--dark-color);
  margin: 0.1em;
}

.list-post-tag:before {
  content: "#";
}

.list-post-tag:hover {
  color: var(--dark-color);
  background-color: var(--light-color);
}

h1 {
  font-size: 40px;
  padding-top: 0;
  z-index: 2;
  margin-bottom: 0;
  padding-bottom: 0;
  text-align: center;
  line-height: 0.95em;
}

h2 {
  font-size: 35px;
}

h3 {
  font-size: 32px;
}

h4 {
  font-size: 28px;
}

h5 {
  font-size: 24px;
}

h6 {
  font-size: 20px;
}

code, pre {
  background-color: var(--dark-color);
  color: var(--light-color);
  font-size: 16px;
  overflow-x: scroll;
  font-family: var(--code-font);
}

img.large,
img.medium,
img.small,
img.xsmall {
  height: auto;
}

.main-col img.large,
.main-col img.medium,
.main-col img.small {
  width: 100%;
  margin-left: 0;
}

.main-col img.xsmall {
  margin-left: 25%;
  width: 50%;
}

.post-head {
  align-self: center;
  text-align: center;
  padding: 0;
  margin: 0;
}

#link-bar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  gap: 15px;
  margin-top: 0;
  padding-top: 0;
}

.nav-link {
  font-size: 20px;
  margin-top: 0;
  padding-top: 0;
}

.nav-link:hover {
  text-decoration: none;
}

#index {
  padding: 0 10%;
}

#index > p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px;
}

.subtitle {
  font-size: 21px;
  font-style: italic;
  padding-top: 0;
  margin-top: 0;
  z-index: 2;
}

.post-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
  justify-content: flex-start;
  align-items: stretch;
}

.top-bar {
  display: flex;
  flex-direction: row;
  width: 100%;
  margin: 0;
  padding: 0.2rem;
  border-bottom: 1px solid var(--dark-color);
  justify-content: space-between;
  align-items: center;
}

.top-bar-logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0;
}

.top-bar-logo i {
  font-size: 34px;
  line-height: 1.4;
}


.post-header {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--dark-color);
}

h1.giant-text {
  font-size: 70px;
  letter-spacing: -0.1em;
  margin: 0;
  text-align: left;
  line-height: 0.8;
  align-self: center;
}

h2.post-title {
  line-height: 0.8;
  margin: 0;
  padding: 0;
}

.tag-list {
  display: flex;
  flex-direction: row;
  padding-right: 1em;
}

.tag {
  text-decoration: none;
  color: var(--light-color); 
  background-color: var(--dark-color);
  margin: 0.2em;
  padding: 0.1em;
}

.tag:hover {
  color: var(--dark-color);
  background-color: var(--light-color);
}

.tag:before {
  content: "#";
}

.main-post {
  position: relative;
  width: 100vw;
  overflow-y: auto;
  padding-bottom: 80vh;
}

.main-post > h1.sticky-header,
.main-post > h2.sticky-header,
.main-post > h3.sticky-header,
.main-post > h4.sticky-header,
.main-post > h5.sticky-header,
.main-post > h6.sticky-header {
  position: sticky !important;
  top: 0;
  background-color: var(--light-color);
}

.tag-cloud {
  text-align: justify;
}

.title-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-left: 1em;
}

.series-list {
  border: 1px solid var(--dark-color);
  margin: 1em;
  padding: 1em;
  font-family: var(--text-font);
  font-size: 18px;
}

.series-list > ol {
  padding-bottom: 0;
  font-family: var(--text-font);
}

.bottom-post-navigation {
  display: flex;
  width: 100%;
  align-items: center;
  font-family: var(--text-font);
  font-size: 18x;
  padding: 4px;
}

.emphasis {
  background-color: var(--dark-color);
  color: var(--light-color);
  font-size: 20px;
  font-style: italic;
  font-family: var(--text-font);
  padding: 1%;
}

.emphasis > strong,
.emphasis > em {
  font-weight: 800;
  font-size: 22px;
  font-family: var(--title-font);
  font-style: normal;
  color: var(--light-color);
}

.main-col > .emphasis {
  margin-left: 25%;
  width: 50%;
}

table {
  border: 1px solid var(--dark-color);
  border-collapse: collapse;
}
td {
  border: 1px solid var(--dark-color);
  font-size: 16px;
  padding: 1%;
}

th {
  border: 1px solid var(--dark-color);
  border-bottom: 2px solid var(--dark-color);
  font-size: 18px;
  padding: 1%;
}

@media (orientation: landscape) and (width >= 960px) {
  body {
    flex-direction: row;
  }
  .main-post img.large {
    margin-left: -35%;
    width: 175%;
  }
  .main-post img.medium {
    margin-left: 0;
    width: 125%;
  }
  .main-post img.small {
    margin-left: 0;
    width: 100%;
  }
  .main-post img.xsmall {
    margin-left: 25%;
    width: 50%;
  }
  .main-col {
    height: 100%;
    width: 50%;
  }
  @supports (justify-content: safe center) {
    .main-col {
      justify-content: safe center;
    }
  }
  @supports not (justify-content: safe center) {
    #left-col {
      justify-content: center;
    }
    #right-col {
      justify-content: flex-start;
    }
  }
  #title-image {
    clip-path: circle(50% at 50% 50%);
    margin-bottom: -20px;
    padding-bottom: 0;
  }
  #right-col {
    border-left: 1px solid var(--dark-color);
  }
  h1 {
    margin-top: -20px;
  }
  .top-bar-logo h1 {
    margin-top: 0 !important;
  }
  .post-header {
    flex-direction: row;
  }
  .tag-list {
    justify-content: flex-start;
  }
.main-post > h1.sticky-header,
.main-post > h2.sticky-header,
.main-post > h3.sticky-header,
.main-post > h4.sticky-header,
.main-post > h5.sticky-header,
.main-post > h6.sticky-header {
    margin-left: 25% !important;
    width: 55% !important;
  }

  .main-post > p:not(.sidenote):not(.emphasis),
  .main-post > ul,
  .main-post > ol,
  .main-post > pre,
  .main-post > blockquote,
  .main-post > div,
  .main-post > h1,
  .main-post > h2,
  .main-post > h3,
  .main-post > h4,
  .main-post > h5,
  .main-post > h6,
  .main-post > table,
  .main-post > dl {
    width: 40%;
    margin-left: 40%;
  }
  .title-wrapper {
    justify-content: flex-end;
    align-items: flex-start;
  }
  .main-post > .series-list {
    width: 40%;
    margin-left: 40%;
  }
  .toc-sidebar {
    position: fixed;
    top: 150px;
    left: 0;
    width: 20% !important;
    max-width: 20%;
    margin: 0;
    padding: 0;
  }

  .toc-sidebar li {
    list-style-type: none;
  }

  .sidebar-toc-active {
    font-weight: bold;
  }

  .sidebar-toc-active:before {
    content: "‣";
  }
  .toc-sidebar li.h1 {
    margin-left: 1em;
  }
  .toc-sidebar li.h2 {
    margin-left: 2em;
  }
  .toc-sidebar li.h3 {
    margin-left: 3em;
  }
  .toc-sidebar li.h4 {
    margin-left: 4em;
  }
  .toc-sidebar li.h5 {
    margin-left: 5em;
  }
  .toc-sidebar li.h6 {
    margin-left: 6em;
  }
  .bottom-post-navigation {
    flex-direction: row;
    justify-content: space-between;
  }
  .main-post > .sidenote {
    float: right;
    clear: right;
    width: 18%;
    margin-right: 1%;
    font-style: italic;
    border-top: 1px solid var(--dark-color);
    border-bottom: 2px solid var(--dark-color);
  }
  .main-post > .emphasis {
    margin-left: 50%;
    width: 20%;
  }
}

@media (orientation: portrait) or (width < 960px) {
  body {
    flex-direction: column;
  }
  .main-post img.large,
  .main-post img.medium,
  .main-post img.small {
    width: 100%;
  }
  .main-post img.xsmall {
    margin-left: 25%;
    width: 50%;
  }
  #title-image {
    display: none;
  }
  h1 {
    margin-top: 0;
  }
  .post-header {
    flex-direction: column;
    align-items: center;
  }
  .tag-list {
    justify-content: center;
    width: 100%;
    z-index: 2;
  }
  .title-wrapper {
    align-items: center;
  }
  .post-title {
    text-align: center;
  }
  .toc-sidebar {
    display: none;
  }
  .bottom-post-navigation {
    flex-direction: column;
  }
  .main-post > .sidenote {
    float: right;
    clear: right;
    width: 25%;
    border-left: 1px solid var(--dark-color);
    border-bottom: 2px solid var(--dark-color);
    font-style: italic;
    padding: 1%;
    margin: 1%;
  }
  .main-post > .emphasis {
    margin-left: 25%;
    width: 50%;
  }
  .main-post > table {
    width: 98%;
    margin: 1%;
  }
}
