:root {
  color-scheme: dark;
  font-family: "Fira Sans", sans-serif;
  font-weight: 300;
  font-style: normal;
  font-size: 20px;
  text-rendering: optimizeLegibility;
  color: #fefefe;
  background: #131313;
}

* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  line-height: 1.75;
  padding: 2rem;
  z-index: 0;
  
}

/* body::before,
body::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(120px, calc((100vw - 720px) / 2.5), 50%);
  background-image:
    linear-gradient(to right, rgba(255,234,244,0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,234,244,0.08) 1px, transparent 1px);
  background-size: 120px 120px;
  pointer-events: none;
  z-index: 0;
}

body::before {
  left: 0;
  background-position: right top;
}

body::after {
  right: 0;
  background-position: left top;
} */

body, h1, h2, h3, a, li {
  font-size: 1rem;
  
}

img {
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.container img,
.container canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.container img.lazy {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.container img.lazy.loaded {
  opacity: 1;
}

.image-wrapper {
  position: relative;
  overflow: hidden;
  background: #000;
}

.image-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--preview-image, none);
  background-size: cover;
  background-position: center;
  filter: blur(24px) grayscale(1) contrast(1.1);
  image-rendering: pixelated;
  opacity: 1;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.image-wrapper img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.image-wrapper.loaded img,
.image-wrapper img.loaded {
  opacity: 1;
}

.image-wrapper.loaded::before {
  opacity: 0;
}

a {
  color: #fefefe;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
}

a:hover {
  text-decoration: underline;
}

a.inline-link {
  background: none;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
  text-decoration-color: grey;
  transition: background 0.25s ease, color 0.25s ease;
}

a.inline-link::before {
  content: "\2197";
  display: inline-block;
  margin-right: 4px;
  text-decoration: none;
}

a.inline-link:hover {
  color: #fff;
}

p.intro-text {
  font-size: 1.25rem;
  line-height: 1.45;
  font-weight: 400;
}

.container {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 0 1rem;
  overflow: visible;
  position: relative;
  z-index: 1;
}

header,
article,
footer {
  margin-bottom: 8rem;
}

header {
  margin-top: 2rem;
}

.post-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.post-title,
header h1,
article h2 {
  font-family: 'Atkinson Hyperlegible Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.post-title {
  margin: 0;
  line-height: 1.4;
}

.post-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  gap: 1.75rem;
  width: calc(100% + 260px);
  margin-right: -260px;
}

.post-body > :not(aside.sidenote) {
  grid-column: 1;
}

.post-body aside.sidenote {
  grid-column: 2;
  margin: 0;
}

header h1,
header p,
article h2,
article p,
footer p {
  margin: 0 0 0.1rem 0;
}

.meta {
  opacity: 0.8;
}

.post-meta {
  margin-bottom: 10rem;
  opacity: 0.85;
  font-family: 'Atkinson Hyperlegible Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  color: #fefefe;
}

.post-category-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  border: 1px solid #fefefe;  
  font-family: 'Atkinson Hyperlegible Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  letter-spacing: 0.1rem;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.5rem;
}

.post-category {
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sidenote,
aside.sidenote {
  opacity: 0.4;
  display: block;
  margin: 0.25rem;
  padding: 0.25rem 0.55rem;
  background: none;
  border: 1px dashed #fefefe;
  font-size: 0.65rem;
  line-height: 1.8;
  color: #fefefe;
  border-radius: 0;
}

.sidenote:hover {
  opacity: 1;
}

.post-list {
  list-style: none;
  font-weight: 400;
  padding: 0;
  margin: 20px 0 0 0 ;
}

.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.post-list time {
  display: inline-block;
  margin-left: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0;
  margin: 6rem 0 0 0;
  list-style: none;
}

.footer-links a {
  font-size: 0.85rem;
  text-decoration: none;
  background: none;
  color: rgba(255, 255, 255, 0.3);
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}

.toc {
  margin-bottom: 2rem;
  padding-top: 1rem;
  padding-left: 1rem;
  padding-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.toc-list a {
  font-family: 'Atkinson Hyperlegible Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: none;
  padding: 0;
}

.toc-list a::before {
  content: "\2192";
  display: inline-block;
  margin-right: 8px;
  text-decoration: none;
}

.toc-list a:hover {
  background: none;
  color: #fefefe;
  text-decoration: underline;
}

.toc-heading {
  font-family: 'Atkinson Hyperlegible Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem;
  scroll-margin-top: 2rem;
  color: rgba(255, 255, 255, 0.5);
  background-color: rgba(255, 255, 255, 0.1);
}

.quellen a {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
  font-weight: 300;
  text-decoration: underline;
  background: none;
}

.quellen a::before {
  content: "\2197";
  font-weight: 600;
  display: inline-block;
  margin-right: 6px;
  text-decoration-color: none;
}

.quellen a:hover {
  color: rgba(255, 255, 255, 1);
  text-decoration-color: rgba(255, 255, 255, 0.6);
}


@media (max-width: 900px) {
  body::before,
  body::after {
    width: clamp(80px, calc((100vw - 640px) / 2), 40%);
    background-size: 80px 80px;
  }

  .post-body {
    width: 100%;
    margin-right: 0;
    grid-template-columns: 1fr;
  }

  .post-body aside.sidenote {
    grid-column: 1;
  }
}

@media (max-width: 600px) {
  :root {
    font-size: 16px;
  }
  body {
    padding: 1rem;
  }

  .container {
    padding: 0;
    border-left: none;
    border-right: none;
  }

  header,
  article,
  footer {
    margin-bottom: 8rem;
  }

  .post-list li {
    margin-bottom: 1rem;
  }

}
