html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #1D1F20;
  color: #c9c9c9;
  font-family: 'Roboto Mono', monospace;
  font-size: 15px;
  box-sizing: border-box;
  overflow-y: scroll;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

li {
    line-height: 2;
}

/* ---- Header ---- */
.site-header {
  width: 100%;
  padding-top: 48px;
  padding-bottom: 48px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: none;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo-svg {
  display: flex;
  align-items: center;
  margin-right: 8px;
}

.logo {
  display: block;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-right: 32px;
  color: #e5e7eb;
}

.site-header nav {
  display: inline-block;
}

.site-header nav a {
  color: #22d3ee;
  text-decoration: none;
  margin-right: 18px;
  font-size: 1rem;
  font-weight: 400;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}

.site-header nav a.active,
.site-header nav a:hover {
  color: #ffffff;
}

.site-header nav a.active::after {
  content: "";
  display: block;
  height: 2px;
  background: #22d3ee;
  width: 100%;
  position: absolute;
  left: 0;
  bottom: -2px;
  border-radius: 1px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: 48px;
}

.header-right svg,
.hamburger svg {
  stroke: #fff;
  transition: stroke 0.2s;
}

.header-right svg:hover,
.hamburger:hover svg {
  stroke: #38bdf8;
}

/* ---- Main Container ---- */
.container {
  max-width: 800px; /* vorher 600px */
  margin: 0 auto;
  padding: 0 24px 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* ---- Intro Section ---- */
.intro {
  margin-top: 24px;
  margin-bottom: 60px;
  flex: 2;
  min-width: 0;
}

.intro h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.intro p {
  color: #e5e7eb;
  margin: 0 0 8px 0;
  font-size: 0.93rem;
  font-family: 'Roboto Mono', monospace;
  line-height: 1.8;
}

.intro a {
  color: #22d3ee;
  text-decoration: underline;
  transition: color 0.2s;
}

.intro a:hover {
  color: #e5e7eb;
}

.intro svg {
  vertical-align: middle;
  margin-left: 4px;
}

/* ---- Posts & Notes ---- */
.posts, .notes {
  width: 100%;
  margin-bottom: 32px;
}

.posts h2, .notes h2 {
  color: #22d3ee;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  margin-top: 0;
  letter-spacing: 0.5px;
}

.posts ul, .notes ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.posts li, .notes li {
  display: flex;
  align-items: baseline;
  margin-bottom: 10px;
  font-size: 0.93rem;
  line-height: 2.4;
}

.posts .date, .notes .date {
  color: #a1a1aa;
  font-size: 0.95em;
  min-width: 120px;
  display: inline-block;
  margin-right: 12px;
  font-variant-numeric: tabular-nums;
}

.posts a, .notes a {
  color: #e5e7eb;
  text-decoration: underline;
  transition: color 0.2s;
}

.posts a:hover, .notes a:hover {
  color: #22d3ee;
}

/* ---- Posts Grid ---- */
.posts-grid {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 64px;
}

.posts-main {
  flex: 2;
  min-width: 0;
}

.posts-main h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 24px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.posts-list {
  width: 100%;
}

.posts-year {
  font-weight: 700;
  color: #e5e7eb;
  margin: 24px 0 10px 0;
  font-size: 1.07rem;
}

.posts-tags {
  flex: 1;
  min-width: 180px;
  margin-top: 40px;
}

.tags-title {
  color: #fff;
  font-weight: 700;
  margin-bottom: 16px;
  font-size: 1rem;
  display: flex;
  align-items: center;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.tags-list a {
  color: #22d3ee;
  text-decoration: none;
  font-size: 0.98em;
  transition: color 0.2s;
}

.tags-list a:hover {
  text-decoration: underline;
  color: #38bdf8;
}

.tags-viewall a {
  color: #e5e7eb;
  font-size: 0.95em;
  text-decoration: none;
  transition: color 0.2s;
}

.tags-viewall a:hover {
  color: #22d3ee;
  text-decoration: underline;
}

/* ---- Footer ---- */
.site-footer {
  width: 100%;
  text-align: center;
  padding: 24px 0 0px 0;
  color: #99a1a2;
  font-size: 0.80rem;
  background: none;
  border: none;
  margin-top: auto;
  letter-spacing: 0.5px;
}

/* ---- Notes List ---- */
.notes-list {
  background: #262728;
  border-radius: 8px;
  padding: 12px 8px 12px 12px;
  margin: 0 0 16px 0;
  font-size: 0.93em;
  color: #e5e7eb;
  box-shadow: 0 2px 8px 0 rgba(0,0,0,0.04);
  max-width: 650px;
  max-width: 800px;
}

.notes-list a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  font-size: 1.08em;
}

.notes-list .note-date {
  color: #bdbdbd;
  font-size: 0.97em;
  margin-bottom: 8px;
  display: block;
}

.notes-list p {
  margin: 8px 0 0 0;
  line-height: 1.7;
  color: #e5e7eb;
  font-family: 'Roboto Mono', monospace;
}

/* ---- Admonition Alert Boxes ---- */
.admonition {
  margin: 28px 0 24px 0;
  padding: 18px 22px 18px 22px;
  font-size: 0.9em;
  display: block;
}
.admonition-title {
  display: flex;
  align-items: center;
  font-weight: 700;
  margin-bottom: 8px;
  gap: 8px;
  letter-spacing: 0.2px;
}
.admonition-content {
  margin-left: 2px;
  margin-top: 2px;
  line-height: 1.7;
  color: #e5e7eb;
}
.admonition-icon {
  display: flex;
  align-items: center;
  margin-right: 4px;
}
/* Important */
.admonition-important {
  background: #26232B;
  border-left: 2px solid #C27AFF;
  color: #C9C9C9;
}
.admonition-important .admonition-title {
  color: #C27AFF;
}
.admonition-important .admonition-title-text {
  font-weight: bold;
  color: #C27AFF;
  font-size: 1.1em;
}
/* Caution */
.admonition-caution {
  background: #29241E;
  border-left: 2px solid #FF8904;
  color: #C9C9C9;
}
.admonition-caution .admonition-title {
  color: #FF8904;
}
.admonition-caution .admonition-title-text {
  font-weight: bold;
  color: #FF8904;
  font-size: 1.1em;
}
/* Warning */
.admonition-warning {
  background: #291F21;
  border-left: 2px solid #FB2C36;
  color: #C9C9C9;
}
.admonition-warning .admonition-title {
  color: #FB2C36;
}
.admonition-warning .admonition-title-text {
  font-weight: bold;
  color: #FB2C36;
  font-size: 1.1em;
}

.admonition-note {
  background: #20252B;
  border-left: 2px solid #51A2FF;
  color: #C9C9C9;
}
.admonition-note .admonition-title {
  color: #51A2FF;
}
.admonition-note .admonition-title-text {
  font-weight: bold;
  color: #51A2FF;
  font-size: 1.1em;
}

/* ---- Tip ---- */
.admonition-tip {
  background: #22271E;
  border-left: 2px solid #7CCF00;
  color: #C9C9C9;
}
.admonition-tip .admonition-title {
  color: #7CCF00;
}
.admonition-tip .admonition-title-text {
  font-weight: bold;
  color: #7CCF00;
  font-size: 1.1em;
}

/* ---- Remove Scrollbar for Clean Look ---- */
body::-webkit-scrollbar {
  width: 0.5em;
  background: #181a1b;
}
body::-webkit-scrollbar-thumb {
  background: #222326;
}

.section-link {
  color: #22d3ee !important;
  text-decoration: none !important;
  cursor:  pointer;
  transition: none;
}

/* ---- Code Blocks ---- */
.code-block,
.diff-block-outer {
  max-width: 510px;
  width: 100%;
  box-sizing: border-box;
  margin-left: 0;
  margin-right: 0;
}
pre,
pre.diff-code-scrollfix {
  max-width: 700px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto !important;
}
.diff-block-added {
  background: #234c27 !important;
  display: block;
  width: 100%;
  border-left: 4px solid #22c55e;
  padding: 0 0 0 10px;
  font-size: 0.93em;
  line-height: 1.15;
}
.diff-block-removed {
  background: #4b2323 !important;
  display: block;
  width: 100%;
  border-left: 4px solid #ef4444;
  padding: 0 0 0 10px;
  font-size: 0.93em;
  line-height: 1.15;
}
.diff-block-normal {
  background: transparent;
  display: block;
  width: 100%;
  padding: 0 0 0 10px;
  font-size: 0.93em;
  line-height: 1.15;
}
.diff-code-scrollfix {
  overflow: visible !important;
}
pre.diff-code-scrollfix {
  overflow: hidden !important;
}
/* Copy button */
.diff-copy-btn svg {
  stroke: #38bdf8;
  opacity: 0.7;
  transition: stroke 0.2s, opacity 0.2s;
}
.diff-copy-btn:hover svg {
  stroke: #fff;
  opacity: 1;
}

/* ---- Table ---- */
.md-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0 24px 0;
  font-family: 'Roboto Mono', monospace;
  font-size: 1em;
  background: none;
  color: #e5e7eb;
}

.md-table th,
.md-table td {
  padding: 6px 12px;
  border: none;
  text-align: left;
  vertical-align: top;
}

.md-table thead th {
  font-weight: bold;
  color: #fff;
  border-bottom: 2px solid #444;
  background: none;
  font-size: 0.90em;
  letter-spacing: 0.5px;
}

.md-table tbody tr {
  border-bottom: 1px solid #232526;
}

.md-table tbody tr:last-child {
  border-bottom: none;
}

.md-table td {
  color: #e5e7eb;
  font-size: 0.80em;
  line-height: 1.7;
}

.md-table kbd {
  background: #232526;
  color: #fff;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.97em;
  border: 1px solid #444;
  font-family: 'Roboto Mono', monospace;
  margin-right: 2px;
}


/* ---- Footnotes ---- */
.md-footnotes {
  margin: 0 0 2em 1.5em;
  padding: 0;
  color: #bdbdbd;
  font-family: 'Roboto Mono', monospace;
  font-size: 1em;
}

.md-footnotes li {
  margin-bottom: 0.6em;
  line-height: 1.7;
  color: #bdbdbd;
  font-size: 0.98em;
}

.md-footnote-return {
  color: #bdbdbd;
  text-decoration: underline;
  margin-left: 6px;
  font-size: 1.1em;
  transition: color 0.2s;
}

.md-footnote-return:hover {
  color: #38bdf8;
}

.md-ref-link:hover {
  color: #38bdf8 !important;
  border-bottom-color: #38bdf8 !important;
}

.footnote-highlight {
  background: #38bff84d;
  transition: background 0.3s, color 0.3s;
}


/* ---- Search Bar ---- */
.search-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(20, 20, 20, 0.95); /* GANZE Seite */
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 9999;
  width: 100vw;
  height: 100vh; /* Fix: volle Höhe */
}
.search-modal.open {
  display: flex;
}
.search-modal-content {
  background: #1D1F20;
  border-radius: 12px;
  min-width: 520px;
  max-width: 700px;
  width: 100%;
  box-shadow: 0 4px 32px #000a;
  position: relative;
  margin: 80px auto 0 auto;
  display: flex;
  flex-direction: column;
  border: 1px solid #fff;
  font-size: 0.97em; /* kleiner */
}
.search-modal-close {
  position: absolute;
  top: 24px; /* mehr Abstand */
  right: 32px;
  background: #3f3f47;
  color: #fff;
  border: none;
  font-family: 'Roboto Mono', monospace;
  font-size: 1.15em;
  font-weight: bold;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 5px;
  transition: background 0.2s;
  z-index: 2;
}
.search-modal-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 94px 32px 32px 32px; /* mehr Abstand oben */
  align-items: flex-start; /* ganz links */
}
.search-input-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  margin-left: 0;
}
.search-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
#search-input {
  width: 100%;
  max-width: 600px;
  padding: 12px 44px 12px 44px; /* Platz für Icons */
  font-size: 1.1em;
  border-radius: 8px;
  border: 1px solid #444;
  background: #181a1b;
  color: #fff;
  font-family: 'Roboto Mono', monospace;
  box-sizing: border-box;
  text-align: left;
  font-size: 1em; /* kleiner */
}
.search-input-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.search-input-clear:hover {
  opacity: 1;
}
.search-modal-body {
  display: flex;
  flex-direction: row;
  gap: 32px;
  width: 100%;
  justify-content: flex-start;
  align-items: flex-start;
}
.search-tags {
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.search-tag {
  background: #232526;
  color: #bdbdbd;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 0.98em;
  cursor: pointer;
  font-family: 'Roboto Mono', monospace;
  transition: background 0.2s, color 0.2s;
  margin-bottom: 4px;
}
.search-tag.selected,
.search-tag:hover {
  background: #38bdf8;
  color: #232526;
  border-color: #38bdf8;
}
#search-results {
  flex: 1 1 0;
  min-width: 340px;
  max-width: 1000px;
  width: 100%;
  max-height: 420px;
  overflow-y: auto;
  margin-top: 0;
  margin-left: 0;
  font-size: 0.97em;
  text-align: left;
}
.search-result-item {
  margin-bottom: 8px;
  color: #38bdf8;
  font-family: 'Roboto Mono', monospace;
  text-decoration: underline;
  cursor: pointer;
  display: block;
  font-size: 1.05em;
  border-radius: 4px;
  padding: 4px 0;
  transition: background 0.2s;
}
.search-result-item:hover {
  background: #191A21;
}
.search-no-results {
  color: #bdbdbd;
  font-family: 'Roboto Mono', monospace;
  margin-top: 24px;
  font-size: 1.1em;
  text-align: center;
}
.search-highlight {
  background: #38bdf8;
  color: #232526;
  border-radius: 3px;
  padding: 0 2px;
  font-weight: bold;
}
.search-result-section {
  margin-left: 0;
  padding-left: 0;
  margin-bottom: 10px;
}
.search-result-line {
  margin-left: 18px;
  font-size: 0.95em;
  font-family: 'Roboto Mono', monospace;
  color: #fff;
}
.search-result-title {
  font-weight: bold;
  color: #fff;
  font-size: 1.08em;
  margin-bottom: 6px;
  text-decoration: underline;
  font-size: 1.03em;
}

.search-section-link {
  color: #38bdf8;
  text-decoration: underline;
  font-weight: bold;
  font-size: 1em;
  cursor: pointer;
  margin-bottom: 2px;
  display: inline-block;
}
.search-section-link:hover {
  color: #fff;
  background: #232526;
}

/* ---- Mobile View ---- */
.hamburger {
  display: none;
  margin-left: 16px;
  cursor: pointer;
  background: none;
  border: none;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ---- Post Content ---- */
.post-toc {
  display: block;
  margin-bottom: 24px;
}
@media (min-width: 701px) {
  .post-main {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
  }
  .post-toc {
    position: sticky;
    top: 40px;
    align-self: flex-start;
    flex: 0 0 240px;
    min-width: 220px;
    height: fit-content;
    margin-top: 35px;
    margin-left: 48px;
    margin-bottom: 0;
    /* Sidebar rechts */
    order: 2;
  }
  #post-content {
    flex: 2 1 0;
    min-width: 0;
    order: 1;
  }
}
@media (max-width: 700px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  /* ---- Header ---- */
  .main-nav {
    display: none !important;
  }
  .hamburger {
    display: inline-block !important;
  }
  .header-right {
    gap: 8px;
  }
  /* ---- Search Modal ---- */
  .search-modal,
  .search-modal-content,
  .search-modal-inner,
  .search-input-wrapper,
  #search-results {
    box-sizing: border-box !important;
    max-width: 100vw !important;
    width: 100vw !important;
    overflow-x: hidden !important;
  }
  .search-modal-content {
    border-radius: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
    position: static !important;
    min-width: 0 !important;
  }
  .search-modal-inner {
    padding-top: 40px !important;
    padding-right: 8px !important;
    padding-bottom: 16px !important;
    padding-left: 8px !important;
  }
  .search-input-wrapper {
    margin-bottom: 18px !important;
    padding: 0 !important;
  }
  #search-input {
    font-size: 1em !important;
    padding: 10px 40px 10px 40px !important;
    border-radius: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    max-width: 100vw !important;
  }
  .search-modal-close {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    font-size: 1em !important;
    padding: 4px 10px !important;
    z-index: 2;
  }
  .search-modal-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
    align-items: stretch !important;
    min-width: 0 !important;
    max-width: 100vw !important;
  }
  .search-tags {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    justify-content: flex-start !important;
  }
  #search-results {
    min-width: 0 !important;
    max-width: 100vw !important;
    width: 100% !important;
    flex: unset !important;
    margin-left: 0 !important;
    margin-top: 8px !important;
    overflow-x: hidden !important;
    background: none !important;
    display: block !important;
  }
  .search-result-group,
  .search-result-section,
  .search-result-title,
  .search-result-line {
    min-width: 0 !important;
    max-width: 100vw !important;
    word-break: break-word !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
  }
  .post-main {
    flex-direction: column !important;
  }
  .post-toc {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 24px 0 16px 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    background: none !important;
    order: unset;
  }
  .post-content-grid {
    flex-direction: column !important;
    gap: 0 !important;
  }
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: #232526ee;
  z-index: 1001;
  flex-direction: column;
  align-items: flex-end;
  padding: 32px 32px 32px 0;
}
.mobile-menu.open {
  display: flex;
  animation: fadeInMenu 0.2s;
}
@keyframes fadeInMenu {
  from { opacity: 0; }
  to { opacity: 1; }
}
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 24px;
  margin-top: 48px;
}
.mobile-menu nav a {
  color: #38bdf8;
  transition: color 0.2s;
}

.mobile-menu nav a:hover {
  color: #fff;
}
.mobile-menu nav a.active {
  color: #fff;
}
.mobile-menu-close {
  background: none;
  border: none;
  cursor: pointer;
  position: absolute;
  top: 32px;
  right: 32px;
  z-index: 1002;
}
.mobile-search-icon {
  margin-top: 48px;
  align-self: flex-end;
  cursor: pointer;
}