:root {
  color-scheme: light dark;
  --width: 820px;
  --text-measure: 40em;
  --media-bleed: 140px;
  --media-max: 1200px;
  --font-main: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-secondary: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --font-scale: 1.3em;
  --radius: 12px;
  --radius-small: 6px;
  --border: rgba(0, 0, 0, 0.10);
  --background-color: #fffff8;
  --heading-color: #111;
  --text-color: #222;
  --link-color: #111;
  --visited-color: #222;
  --code-bg: rgba(0, 0, 0, 0.035);
  --code-border: rgba(0, 0, 0, 0.10);
  --code-inline-bg: rgba(0, 0, 0, 0.04);
  --code-color: #222;
  --quote-color: rgba(0, 0, 0, 0.78);
  --quote-border: rgba(0, 0, 0, 0.28);
  --muted: rgba(0, 0, 0, 0.62);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #1f1b1b;
    --heading-color: #e2e1e1;
    --text-color: #cdcdcd;
    --link-color: #cdcdcd;
    --visited-color: #cdcdcd;
    --border: rgba(255, 255, 255, 0.14);
    --code-bg: rgba(255, 255, 255, 0.06);
    --code-border: rgba(255, 255, 255, 0.14);
    --code-inline-bg: rgba(255, 255, 255, 0.08);
    --code-color: #cdcdcd;
    --quote-color: rgba(205, 205, 205, 0.86);
    --quote-border: rgba(255, 255, 255, 0.22);
    --muted: rgba(255, 255, 255, 0.65);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  max-width: var(--width);
  margin: auto;
  padding: 20px;
  font-family: var(--font-secondary);
  font-size: var(--font-scale);
  line-height: 1.55;
  color: var(--text-color);
  background-color: var(--background-color);
  overflow-wrap: break-word;
  word-break: normal;
  text-rendering: optimizeLegibility;
}

.site {
  width: 100%;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-main {
  max-width: none;
  line-height: 1.6;
}

img,
video {
  height: auto;
}

hr {
  width: auto;
  height: 40px;
  margin: 2.5rem 0;
  border: 0;
  background: center / contain no-repeat url("/assets/images/fish-line.svg");
}

@media (prefers-color-scheme: dark) {
  hr {
    filter: invert(1) brightness(2);
  }
}

h1,
h2,
h3 {
  font-family: var(--font-main);
  line-height: 1.2;
  color: var(--heading-color);
}

h1 {
  font-size: 2.05em;
}

h2 {
  margin-top: 1.8rem;
  font-size: 1.55em;
}

h3 {
  margin-top: 1.6rem;
  font-size: 1.25em;
}

h4,
h5,
h6 {
  margin-top: 1.6rem;
  font-size: 1.08em;
}

body.post main > article > h1 {
  margin-top: 0.7rem;
  font-size: 2.15em;
}

p {
  margin: 1.05rem 0;
}

strong,
b {
  color: var(--heading-color);
}

time {
  font-style: italic;
  opacity: 0.9;
}

a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

a:visited {
  color: var(--visited-color);
}

a:hover {
  text-decoration-thickness: 2px;
  opacity: 0.85;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  padding: 0.35rem 0.55rem;
  transform: translateY(-150%);
  background: var(--heading-color);
  color: var(--background-color);
  font-size: 0.8rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: block;
  margin-bottom: 5rem;
  padding-top: calc(1.4rem + env(safe-area-inset-top, 0px));
}

.site-title {
  margin: 0;
  font-family: var(--font-main);
  font-size: 1.35em;
  font-weight: 800;
  line-height: 1.12;
}

.home .site-title {
  font-size: 2.15em;
}

.site-title a {
  color: var(--heading-color);
  text-decoration: none;
}

.site-title a:hover {
  text-decoration: underline;
}

.site-tagline {
  max-width: var(--text-measure);
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9em;
  font-style: italic;
  line-height: 1.45;
}

.site-tagline a {
  color: inherit;
  text-decoration: underline;
}

.site-tagline a:hover {
  text-decoration-thickness: 2px;
}

.site-footer {
  margin-top: 5rem;
  padding: 40px 0;
  font-size: 0.75em;
  line-height: 1.6;
  text-align: center;
  color: var(--muted);
}

.not-found-content {
  width: 100%;
  max-width: 720px;
  margin: -0.75rem 0 0;
  text-align: center;
}

main .not-found-illustration {
  width: min(100%, 450px);
  max-width: 100%;
  margin: 0 auto 1.6rem;
  border-radius: 0;
}

.not-found-content p {
  max-width: 28rem;
  margin: 1.05rem auto;
}

.not-found-content a {
  color: inherit;
}

.post-content > p,
.post-content > ul,
.post-content > ol,
.post-content > blockquote:not(.admonition) {
  max-width: var(--text-measure);
}

.post-content > ol {
  padding-left: 1.25em;
}

.post-content > ul,
.post-list {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.post-content > ul > li,
.post-list > li {
  position: relative;
  padding-left: 1.2em;
}

.post-content > ul > li::before,
.post-list > li::before {
  content: "-";
  position: absolute;
  left: 0;
}

.post-list time {
  display: none;
}

.post-meta {
  margin: -0.4rem 0 1.8rem;
  color: var(--muted);
  font-size: 0.9em;
}

.home .post-list {
  margin-top: -0.5rem;
}

.post-stream {
  display: grid;
  gap: 0;
}

.stream-entry {
  display: flow-root;
  margin: 0;
}

.stream-entry + .stream-entry {
  margin-top: 3.75rem;
}

.stream-entry:last-child {
  margin-bottom: 3.75rem;
}

.stream-entry + .stream-entry::before {
  content: "";
  display: block;
  width: 160px;
  height: 1px;
  margin: 0 auto 3.75rem;
  background-color: var(--border);
}

.stream-entry-header h2 {
  max-width: var(--text-measure);
  margin: 0;
  font-size: 1.6em;
}

.stream-entry-header h2 a,
.post-list a {
  text-decoration: none;
}

.stream-entry-header h2 a:hover,
.post-list a:hover {
  text-decoration: underline;
}

.stream-entry-header .post-meta {
  margin: 0.45rem 0 1.6rem;
}

code {
  font-family: var(--font-mono);
  color: var(--code-color);
}

:not(pre) > code {
  padding: 0.15em 0.35em;
  border-radius: var(--radius-small);
  font-size: 0.9em;
  background: var(--code-inline-bg);
}

pre {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  background: var(--code-bg);
}

pre code {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

.admonition {
  --adm-accent: var(--heading-color);
  max-width: var(--text-measure);
  margin: 2.2rem 0;
  padding: 0.9rem 0 0.9rem 1.1rem;
  border: 0;
  border-left: 3px solid var(--adm-accent);
  border-radius: 0;
  color: var(--text-color);
  background: transparent;
  font-style: normal;
}

.admonition-info {
  --adm-accent: rgba(9, 105, 218, 0.75);
}

.admonition-warning {
  --adm-accent: rgba(178, 90, 0, 0.75);
}

.admonition-caution {
  --adm-accent: rgba(180, 35, 24, 0.75);
}

.admonition-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-main);
  font-size: 1.02em;
  font-weight: 800;
  line-height: 1.25;
  color: var(--heading-color);
}

.post-content > blockquote:not(.admonition) {
  margin: 2rem 0;
  padding-left: 1.1rem;
  border-left: 2px solid var(--quote-border);
  color: var(--quote-color);
  font-style: italic;
}

@media (max-width: 900px) {
  :root {
    --media-bleed: 20px;
  }
}

@media (max-width: 520px) {
  :root {
    --media-bleed: 0px;
  }
}

main img,
main video,
main iframe,
main figure,
main .media-embed {
  width: calc(100% + (2 * var(--media-bleed)));
  max-width: var(--media-max);
  margin: 2.5rem auto;
  margin-left: calc(-1 * var(--media-bleed));
}

main img,
main video,
main iframe {
  display: block;
  border-radius: var(--radius);
}

main figure > img {
  width: 100%;
  max-width: none;
  margin: 0;
}

main iframe {
  height: auto !important;
  border: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

main .media-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--code-bg);
}

main .media-embed-portrait {
  aspect-ratio: 9 / 16;
}

main .media-embed iframe {
  display: block;
  width: 100%;
  height: 100% !important;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  aspect-ratio: auto;
}

.embed-placeholder {
  display: flex;
  min-height: 14rem;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: clamp(1.25rem, 5vw, 3rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.embed-provider {
  margin: 0;
  font-family: var(--font-main);
  font-size: 1.35em;
  font-weight: 800;
  line-height: 1.2;
  color: var(--heading-color);
}

.embed-provider::before {
  content: "Externer Inhalt";
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.58em;
  font-style: italic;
  font-weight: 400;
  line-height: 1.25;
}

.embed-placeholder p:not(.embed-provider) {
  max-width: 24rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.9em;
  line-height: 1.45;
}

.embed-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.95rem;
  margin-top: 0.15rem;
}

.embed-load-button {
  appearance: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--link-color);
  background: transparent;
  font: inherit;
  font-size: 0.88em;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.embed-load-button:hover,
.embed-load-button:focus-visible {
  outline: 0;
  opacity: 0.85;
  text-decoration-thickness: 2px;
}

.embed-load-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 0.18rem;
}

.embed-poster-button {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: var(--code-bg);
  cursor: pointer;
}

main .media-embed .embed-poster-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
}

.embed-poster-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.08);
  transition: background 0.18s ease;
}

.embed-youtube-play {
  position: relative;
  width: clamp(4.25rem, 14vw, 5.75rem);
  height: clamp(3rem, 9.8vw, 4rem);
  border-radius: 0.9rem;
  background: #ff0000;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  transition: background 0.18s ease;
}

.embed-youtube-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 52%;
  width: 0;
  height: 0;
  border-top: 0.7rem solid transparent;
  border-bottom: 0.7rem solid transparent;
  border-left: 1.15rem solid #fff;
  transform: translate(-42%, -50%);
}

.embed-poster-button:hover .embed-poster-overlay,
.embed-poster-button:focus-visible .embed-poster-overlay {
  background: rgba(0, 0, 0, 0.18);
}

.embed-poster-button:hover .embed-youtube-play,
.embed-poster-button:focus-visible .embed-youtube-play {
  background: #cc0000;
}

.embed-poster-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 0.18rem;
}

main figcaption {
  display: block;
  max-width: 40em;
  margin: 0.75rem auto 0;
  color: var(--muted);
  font-size: 0.9em;
  line-height: 1.4;
  font-style: italic;
  text-align: center;
}

main figcaption a {
  color: inherit;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0;
  font-size: 0.85em;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.footnotes {
  width: 100%;
  margin-top: 6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92em;
  line-height: 1.6;
}

.footnotes ol {
  margin: 0;
  padding-left: 1.2rem;
}

.footnotes p {
  margin: 0;
}

.footnote-ref {
  font-size: 0.72em;
  vertical-align: super;
}

.footnote-ref a,
.footnotes a.footnote {
  text-decoration: none;
}

@media (max-width: 42rem) {
  body {
    padding: 16px;
  }

  .site-header {
    margin-bottom: 3rem;
  }

  .site-footer {
    margin-top: 3rem;
  }
}

/* Syntax highlighting */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #6f7378;
}

.token.punctuation {
  color: inherit;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol {
  color: #8f3f71;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin {
  color: #3f6f44;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
  color: #7a4f14;
}

.token.atrule,
.token.attr-value,
.token.keyword {
  color: #5b5aa0;
}

.token.function,
.token.class-name {
  color: #8a4b2a;
}

.token.regex,
.token.important,
.token.variable {
  color: #8a4b2a;
}
