:root {
  /* LSC Blue #2557aa */
  --accent: #e27a53;
  --primary: #0f0f0f;
  --secondary: #5c5c5c;
  --background: white;
}
/* START MAIN STYLE BLOCK */
@font-face {
  font-family: "iA Writer Quattro S";
  src: url(/assets/fonts/iAWriterQuattroS-Regular.woff2) format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "iA Writer Quattro S";
  src: url(/assets/fonts/iAWriterQuattroS-Italic.woff2) format("woff2");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "iA Writer Quattro S";
  src: url(/assets/fonts/iAWriterQuattroS-Bold.woff2) format("woff2");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "iA Writer Quattro S";
  src: url(/assets/fonts/iAWriterQuattroS-BoldItalic.woff2) format("woff2");
  font-weight: bold;
  font-style: italic;
  font-display: swap;
}
html {
  box-sizing: border-box;
  scrollbar-color: var(--accent) var(--background);
  scrollbar-width: thin;
}
* {
  box-sizing: inherit;
}
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  font-family: "iA Writer Quattro S", Monaco, Consolas, monospace;
  line-height: 1.5;
  background-color: var(--background);
  color: var(--primary);

  max-width: 1600px;
  border-right: 2px solid var(--accent);

  @media (max-width: 1100px) {
    border: none;
  }
}
h1 {
  font-size: 1.4rem;
}
h2 {
  font-size: 1.3rem;
}
h3 {
  font-size: 1.2rem;
}
h4 {
  font-size: 1.1rem;
}
h1,
h2,
h3,
h4,
p {
  margin: 20px 0;
}
a {
  color: inherit;
}
img {
  max-width: 100%;
  display: block;
  margin: 20px 0;
}
video {
  width: 100%;
  display: block;
  margin: 20px 0;
}
figure {
  border: 1px solid var(--accent);
  margin: 20px 0;

  img,
  video {
    width: 100%;
    margin: 0;
  }

  figcaption {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    font-size: 0.9rem;
    padding: 5px 10px;
    text-align: center;
  }
}
code {
  background: #dadada;
  padding: 2px;
  font-family: Monaco, Consolas, monospace;
  font-size: 0.9rem;
}
pre {
  padding: 1rem;
  margin: 20px 0;
  overflow: auto;
  border: 1px solid var(--accent);
  background: none !important;
  color: var(--accent);

  code {
    margin: 0;
    padding: 0;
    color: inherit;
  }
}
blockquote {
  color: var(--secondary);
  position: relative;
  margin: 20px 0;
  padding: 0 20px;
  border-left: 2px solid var(--accent);

  &p:first-child {
    margin-top: 0;
  }
  &p:last-child {
    margin-bottom: 0;
  }
}
table {
  border-collapse: collapse;
  width: 100%;
  margin: 20px 0;
  font-size: 0.9rem;
}
table,
th,
td {
  border: 1px solid var(--secondary);
  padding: 10px;
}
hr {
  width: 100%;
  border: none;
  background: var(--secondary);
  height: 1px;
  margin-top: 40px;
  margin-bottom: 20px;
}
abbr {
  text-decoration-style: wavy;
  text-decoration-color: var(--accent);
  cursor: help;
}
kbd {
  font-size: 0.8rem;
  padding: 0 2px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
  border-bottom: 4px solid var(--accent);
  border-radius: 4px;
}
details {
  margin: 20px 0;
  border: 1px solid var(--accent);
}
details summary {
  padding: 20px;
  cursor: pointer;
  font-weight: bold;
  color: var(--accent);
}
small {
  font-size: 0.8rem;
}
.container {
  height: 100vh;
  padding: 40px 0;
  display: grid;
  grid-template-columns: 400px auto;
  overflow-y: hidden;

  @media (max-width: 1100px) {
    height: auto;
    grid-template-columns: 1fr;
    padding: 20px 0;
  }
}
.left-panel {
  padding: 0 40px;
  border-right: 2px dashed var(--accent);
  /* display: flex;
  flex-direction: column;
  justify-content: space-between; */

  @media (max-width: 1100px) {
    border: none;
    padding: 0 20px;
  }
}
.right-panel {
  padding: 0 40px;
  overflow-y: scroll;

  @media (max-width: 1100px) {
    padding: 0 20px;
  }
}
/* END MAIN STYLE BLOCK */
/* BEGIN HEADER BLOCK */
.logo {
  background: var(--accent);
  color: var(--background);
  padding: 5px 10px;
}
/* Animated line pattern */
.pattern {
  display: flex;
  margin-bottom: 20px;
  overflow: hidden;

  &:after {
    background: repeating-linear-gradient(90deg, var(--accent), var(--accent) 2px, transparent 0, transparent 10px);
    content: "";
    width: 100%;
    animation: slidePattern 1s linear infinite;
  }

  a {
    text-decoration: none;
    white-space: nowrap;
  }
}
@keyframes slidePattern {
  0% {
    transform: translateX(0px);
  }
  100% {
    transform: translateX(10px);
  }
}
nav h3 {
  @media (max-width: 1100px) {
    display: none;
  }
}
nav ol {
  list-style: lower-roman;

  @media (max-width: 1100px) {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    gap: 0 2rem;
  }
}
footer {
  margin: 40px 0 20px 0;
  color: var(--secondary);
  font-size: 0.8rem;
  text-align: center;
}
/* END HEADER BLOCK */
/* START POST BLOCK */
.post-title {
  position: relative;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 16px;
  /* 1st row of dotted pattern */
  border-bottom: 3px dotted var(--accent);

  /* 2nd row of dotted pattern */
  &:after {
    content: "";
    position: absolute;
    bottom: 2px;
    display: block;
    width: 100%;
    border-bottom: 3px dotted var(--accent);
  }

  a {
    text-decoration: none;
  }
}
.post-meta {
  margin-bottom: 20px;
  color: var(--secondary);
  font-size: 0.8rem;
}
.post {
  ul {
    padding-left: 2ch;
    /* margin: 20px 0; */

    &:marker {
      content: "- ";
      color: var(--accent);
    }

    li ul {
      margin: 0;
    }
  }

  ol {
    padding-left: 3ch;
    /* margin: 20px 0; */
    list-style-type: decimal; /* Main list items */

    &:marker {
      color: var(--accent);
    }

    /* Third order sublist */
    li ol {
      list-style-type: lower-alpha;
    }
  }
}
/* END POST BLOCK */
/* START CUSTOM ELEMENTS */
.image-tooltip {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 0.9rem;
  padding: 5px 10px;
  z-index: 9999;
}
.grid-3x3 {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  word-break: break-word;

  img,
  figure {
    margin: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  @media (max-width: 1100px) {
    grid-gap: 10px;
  }
}
.footnote {
  font-size: 0.8rem;
  color: var(--secondary);
}
.flex {
  display: flex;
  grid-gap: 20px;
  flex-wrap: wrap;
  align-items: center;

  img {
    max-width: 320px;
    margin: 0;
  }
}
/* Only really works for images of same aspect ratio */
.grid-masonry {
  display: grid;
  grid-gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  grid-auto-flow: dense;

  @media (max-width: 1100px) {
    grid-template-columns: 1fr 1fr;
  }

  img,
  video {
    width: 100%;
    height: 100%;
    margin: 0;
  }

  .big {
    grid-column: span 2;
    grid-row: span 2;
  }

  .wide {
    grid-column: span 2;
  }
}
