@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/fonts/dm-sans/dm-sans-variable.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/fonts/dm-sans/dm-sans-italic-variable.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --width: 820px;
  --text-measure: 40em;
  --page-gutter: 20px;
  --media-bleed: min(140px, max(0px, calc((100vw - var(--width)) / 2)));
  --media-max: 1200px;
  --font-main: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-secondary: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --font-scale: 1.125rem;
  --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;
}

html {
  scroll-behavior: smooth;
}

body {
  max-width: var(--width);
  margin: auto;
  padding: var(--page-gutter);
  font-family: var(--font-secondary);
  font-size: var(--font-scale);
  font-optical-sizing: auto;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  overflow-wrap: break-word;
  word-break: normal;
  text-rendering: optimizeLegibility;
}

body.post,
body.page,
body.home {
  hyphens: auto;
  overflow-wrap: anywhere;
}

body.post {
  --text-measure: 38em;
}

body.home:not(.identity) {
  --text-measure: 38em;
}

body.post .post-content,
body.home:not(.identity) .post-content {
  hyphens: none;
  overflow-wrap: break-word;
}

@media (max-width: 520px) {
  :root {
    --font-scale: 1.0625rem;
  }
}

.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");
}

/* Editorial separators follow the readable text column instead of the wider
   article shell. Footnote rules remain full width via their own styles. */
body.post .post-content > hr,
body.home:not(.identity) .post-content > hr {
  width: 100%;
  max-width: var(--text-measure);
}

@media (prefers-color-scheme: dark) {
  hr:not(.post-signature-separator) {
    filter: invert(1) brightness(2);
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-main);
  line-height: 1.2;
  letter-spacing: -0.02em;
  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 .post-header > h1,
body.page main > h1 {
  margin: 0.7rem 0 0;
  font-size: 1.6em;
}

body.page main > h1 {
  margin-bottom: 0.45rem;
}

body.page .post-content > h2 {
  margin-top: 2rem;
  font-size: 1.25em;
}

p {
  margin: 1.05rem 0;
}

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

.rating-stars {
  font-weight: 400;
  letter-spacing: 0;
}

mark {
  padding: 0 0.08em;
  border-radius: 0.15em;
  color: var(--heading-color);
  background: rgba(242, 205, 71, 0.38);
}

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

a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  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);
}

.back-to-top {
  position: fixed;
  right: max(2rem, env(safe-area-inset-right, 0px));
  bottom: max(2rem, env(safe-area-inset-bottom, 0px));
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  min-height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--heading-color);
  background: var(--background-color);
  box-shadow: 0 0.15rem 0.45rem rgba(0, 0, 0, 0.08);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: opacity 160ms ease, transform 160ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top svg {
  flex: 0 0 auto;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-to-top:hover {
  color: var(--background-color);
  background: var(--heading-color);
  opacity: 1;
}

.back-to-top:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 3.2rem;
  padding-top: calc(1.4rem + env(safe-area-inset-top, 0px));
  padding-bottom: 1.05rem;
  border-bottom: 1px solid var(--border);
}

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

.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-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  justify-content: flex-end;
  margin: 0;
  font-size: 0.92em;
  font-weight: 700;
  line-height: inherit;
}

.site-nav a {
  margin-right: 0;
  color: var(--link-color);
  text-decoration: underline;
}

.site-nav a:last-child {
  margin-right: 0;
}

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

.site-nav-icon {
  display: inline-flex;
  align-items: center;
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-nav .site-nav-icon:hover,
.site-nav .site-nav-icon:focus-visible {
  opacity: 1;
}

.site-nav-icon--search:hover,
.site-nav-icon--search:focus-visible {
  color: var(--muted);
}

.site-nav-icon--mastodon:hover,
.site-nav-icon--mastodon:focus-visible {
  color: #6364ff;
}

.site-nav-icon--bluesky:hover,
.site-nav-icon--bluesky:focus-visible {
  color: #1185fe;
}

.site-nav-icon--rss:hover,
.site-nav-icon--rss:focus-visible {
  color: #f26522;
}

.site-nav-icon .identity-connect-icon {
  width: 0.9em;
  height: 0.9em;
}

.site-footer {
  margin-top: 5rem;
  padding: 2.5rem 0 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.86em;
  font-style: italic;
  line-height: 1.6;
  text-align: center;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

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

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

.not-found-content h1 {
  margin: 0;
  font-size: 1.6em;
}

.not-found-content p {
  max-width: 31rem;
  margin: 0.75rem auto 2rem;
}

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

.not-found-discovery {
  display: grid;
  gap: 1.5rem;
  margin: 0 0 2rem;
  text-align: center;
}

.not-found-discovery h2 {
  margin: 0 0 0.6rem;
  font-size: 1.05em;
}

.not-found-discovery ul {
  max-width: 32rem;
  margin: 0 auto;
  padding-left: 1.25rem;
  text-align: left;
}

.not-found-discovery li + li {
  margin-top: 0.4rem;
}

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

/* Markdown wraps standalone images in paragraphs. Let those paragraphs use
   the article shell so wide media stays centered on the page, while prose
   continues to follow the narrower reading measure. */
.post-content > p:has(> img:only-child),
.post-content > p:has(> picture:only-child),
.post-content > p:has(> video:only-child) {
  max-width: none;
}

.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.35rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.4;
}

.post-meta time {
  font-style: normal;
  opacity: 1;
}

.post-content > :first-child {
  margin-top: 0;
}

.post-content > :first-child > img:first-child {
  margin-top: 0;
}

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

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

.author-card {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1.35rem;
  align-items: start;
  width: 100%;
  margin: 1.5rem 0 4rem;
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(127, 127, 127, 0.045);
}

.author-card-photo {
  width: 5.5rem;
  max-width: none;
  margin: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
}

.author-card h1,
.author-card h2 {
  margin: 0 0 0.45rem;
  font-size: 1em;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.6;
}

.author-card-name {
  white-space: nowrap;
}

.author-card p {
  margin: 0;
  text-wrap: pretty;
}

.author-card p a {
  white-space: nowrap;
}

.author-card--compact {
  margin: 3.25rem 0 4rem;
}

.about-page {
  width: 100%;
}

.about-hero {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem 2rem;
  align-items: center;
  margin: 1.5rem 0 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

main .about-portrait {
  grid-row: 1 / span 2;
  width: 9rem;
  max-width: none;
  margin: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
}

.about-kicker {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-hero h1 {
  margin: 0;
  font-size: 2.05em;
  font-weight: 400;
}

.about-lede {
  max-width: 32em;
  margin: 0.75rem 0 0;
  font-size: 1.08em;
  line-height: 1.6;
}

.about-social-links {
  display: grid;
  grid-column: 2;
  grid-template-columns: repeat(3, max-content);
  gap: 0.5rem 1.5rem;
  justify-content: start;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.86rem;
  list-style: none;
}

.about-social-links li {
  margin: 0;
}

.about-social-links a {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.about-social-links a:hover span,
.about-social-links a:focus-visible span {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.about-social-link--mastodon:hover,
.about-social-link--mastodon:focus-visible {
  color: #6364ff;
}

.about-social-link--bluesky:hover,
.about-social-link--bluesky:focus-visible {
  color: #1185fe;
}

.about-social-link--github:hover,
.about-social-link--github:focus-visible {
  color: var(--heading-color);
}

.about-social-link--linkedin:hover,
.about-social-link--linkedin:focus-visible {
  color: #0a66c2;
}

.about-social-link--openstreetmap:hover,
.about-social-link--openstreetmap:focus-visible {
  color: #477a36;
}

.about-social-link--youtube:hover,
.about-social-link--youtube:focus-visible {
  color: #ff0033;
}

.about-social-links .identity-connect-icon {
  width: 0.95rem;
  height: 0.95rem;
}

.about-content {
  width: 100%;
  max-width: var(--text-measure);
  line-height: 1.65;
}

.about-copy-block + .about-copy-block {
  margin-top: 2rem;
}

.about-content p {
  margin: 0;
}

.about-content p + p {
  margin-top: 1.05rem;
}

.about-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  width: 100%;
  max-width: none;
  margin: 3.5rem 0;
}

main .about-gallery figure {
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-small);
}

main .about-gallery img {
  width: 100%;
  max-width: none;
  margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-small);
  object-fit: cover;
}

.about-separator {
  width: 100%;
  max-width: var(--text-measure);
  margin: 4rem 0 3rem;
}

.about-site-notes {
  width: 100%;
  max-width: var(--text-measure);
  scroll-margin-top: 2rem;
  font-size: 1em;
  line-height: 1.65;
}

.about-site-notes p {
  margin: 0.8rem 0;
}

.about-site-notes address {
  font-style: normal;
}

.project-list {
  border-top: 1px solid var(--border);
}

.project-entry {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.project-visual {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-small);
  aspect-ratio: 4 / 3;
  background: rgba(0, 0, 0, 0.035);
  text-decoration: none;
}

main .project-visual > img {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: contain;
}

.project-visual--flat {
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.035);
}

.project-visual--gotosocial {
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.035);
}

main .project-visual--gotosocial > img {
  width: 8rem;
  height: 8rem;
  margin: 0;
  object-fit: contain;
}

.project-visual--above > span {
  position: absolute;
  inset: 0;
}

main .project-visual--above img {
  position: absolute;
  width: auto;
  max-width: none;
  height: auto;
  margin: 0;
  border-radius: 0;
}

main .project-visual--above .project-above-side {
  z-index: 1;
  top: 9%;
  width: 39%;
}

main .project-visual--above .project-above-side--left {
  left: 2%;
}

main .project-visual--above .project-above-side--right {
  right: 2%;
}

main .project-visual--above .project-above-center {
  z-index: 2;
  top: 2%;
  left: 50%;
  width: 36%;
  transform: translateX(-50%);
}

.project-copy h2 {
  margin: 0.15rem 0 0.65rem;
  font-size: 1.45em;
}

.project-copy p {
  margin: 0;
  line-height: 1.55;
}

.project-copy .project-meta {
  color: var(--muted);
  font-size: 0.76em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-copy .project-links {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.9em;
}

.projects-more {
  width: 100%;
  max-width: var(--text-measure);
  margin-top: 3rem;
  line-height: 1.65;
}

.projects-more p + p {
  margin-top: 1.05rem;
}

.home-stream-label,
.projects-list-label {
  max-width: var(--text-measure);
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 42rem) {
  .project-entry {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    padding: 2rem 0;
  }

  .project-visual {
    width: 100%;
    max-width: 22rem;
  }

  .author-card {
    display: flow-root;
    margin: 1rem 0 3.25rem;
    padding: 1rem;
  }

  .author-card-photo {
    float: left;
    width: 4.5rem;
    margin: 0 1rem 0 0;
  }

  .author-card--compact {
    margin: 2.75rem 0 3rem;
  }

  .about-hero {
    display: flow-root;
    margin-top: 1rem;
    padding-bottom: 2.25rem;
  }

  main .about-portrait {
    float: left;
    width: 5.5rem;
    margin: 0 1rem 0.5rem 0;
  }

  .about-hero h1 {
    font-size: 1.6em;
  }

  .about-lede {
    font-size: 1em;
  }

  .about-social-links {
    clear: both;
    grid-template-columns: repeat(3, max-content);
    gap: 0.6rem 0.75rem;
    padding-top: 0.85rem;
    font-size: clamp(0.68rem, 3.3vw, 0.86rem);
  }

  .about-gallery {
    gap: 0.45rem;
    margin: 2.75rem 0;
  }
}

@media (max-width: 32rem) {
  .about-social-links {
    grid-column: 1 / -1;
  }
}

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

/* The stream owns the space between entries. Do not let the final content
   block make that spacing depend on whether a post ends in text or media. */
.stream-entry .post-content > :last-child,
.stream-entry .post-content > p:last-child > :is(img, picture, video):only-child {
  margin-bottom: 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: 100%;
  max-width: var(--text-measure);
  height: 1px;
  margin: 0 0 3.75rem;
  background-color: var(--border);
}

.stream-entry-header h2 {
  margin: 0;
  font-size: 1.6em;
}

.stream-entry-header h2 a {
  color: inherit;
  text-decoration: none;
}

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

/* Title-only thoughts and pure quotes read like a passing thought, not a
   bold section heading: a touch larger than body text, italic, normal weight. */
.stream-entry--thought .stream-entry-header h2,
.stream-entry--quote .stream-entry-header h2 {
  padding-left: 1.1rem;
  border-left: 2px solid var(--quote-border);
  font-size: 1.15em;
  font-weight: 450;
  font-style: italic;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--quote-color);
}

.stream-entry--thought .stream-entry-header .post-meta,
.stream-entry--quote .stream-entry-header .post-meta {
  margin-left: calc(1.1rem + 2px);
}

.stream-entry-header .post-meta {
  margin: 0.35rem 0 0.9rem;
}

body.home:not(.identity) .stream-entry-header {
  width: 100%;
  max-width: var(--text-measure);
}

body.post .post-header {
  width: 100%;
  max-width: var(--text-measure);
}

body.post .post-entry--thought .post-header > h1 {
  max-width: 32em;
  padding-left: 1.1rem;
  border-left: 2px solid var(--quote-border);
  font-size: 1.35em;
  font-weight: 450;
  font-style: italic;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--quote-color);
}

body.post .post-entry--thought .post-header .post-meta {
  margin-left: calc(1.1rem + 2px);
}

.post-footer {
  width: 100%;
  margin-top: 4rem;
}

.post-footer .post-signature-separator {
  width: 100%;
  height: 1px;
  margin: 0 0 2rem;
  border-top: 1px solid var(--border);
  background: none;
}

/* Footnotes already mark the end of the article. Avoid stacking a second
   separator directly below them. */
body.post .post-content:has(.footnotes) + .post-footer {
  margin-top: 2.5rem;
}

body.post .post-content:has(.footnotes) + .post-footer .post-signature-separator {
  display: none;
}

.post-adjacent {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.post-adjacent-link {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  color: var(--text-color);
  text-decoration: none;
}

.post-adjacent-link--newer {
  grid-column: 2;
  text-align: right;
}

.post-adjacent-direction {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.4;
}

.post-adjacent-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.post-adjacent-link:hover .post-adjacent-title {
  text-decoration-thickness: 2px;
}

@media (max-width: 42rem) {
  .post-footer {
    margin-top: 3.5rem;
  }

  .post-content > p > img,
  .post-content > figure img {
    border-radius: 0;
  }

  .post-adjacent {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

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;
}

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;
}

.search-form {
  margin: 0 0 0.9rem;
}

.search-label {
  display: block;
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.82em;
  font-style: italic;
}

.search-input-row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
}

.search-input,
.search-button {
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  font: inherit;
  font-size: 0.92em;
  line-height: 1.25;
}

.search-input {
  width: 100%;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  color: var(--text-color);
  background: var(--background-color);
}

.search-button {
  flex: 0 0 auto;
  padding: 0.55rem 0.85rem;
  color: var(--background-color);
  background: var(--heading-color);
  cursor: pointer;
}

.search-input:focus-visible,
.search-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 0.18rem;
}

.search-button:hover {
  opacity: 0.88;
}

.search-status {
  min-height: 1.5em;
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.85em;
}

.search-status:empty {
  display: none;
}

.search-results {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.search-result + .search-result {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.search-result h2 {
  margin: 0;
  font-size: 1.18em;
}

.search-result h2 a {
  text-decoration: none;
}

.search-result h2 a:hover {
  text-decoration: underline;
}

.search-result-meta {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.82em;
  font-style: italic;
}

.search-result-excerpt {
  margin: 0.55rem 0 0;
  line-height: 1.5;
}

.search-result-excerpt mark {
  padding: 0 0.08em;
  border-radius: 0.15em;
  color: var(--heading-color);
  background: rgba(242, 205, 71, 0.38);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .back-to-top {
    transition: none;
  }

}

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

/* The article navigation is the visual page ending on post pages. The global
   sign-off stays, but without introducing a third horizontal rule. */
body.post .site-footer {
  margin-top: 4rem;
  padding-top: 0;
  border-top: 0;
}

.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) {
  :root {
    --page-gutter: 16px;
    --media-bleed: var(--page-gutter);
  }

  body {
    padding: var(--page-gutter);
  }

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

  .site-nav {
    justify-content: flex-start;
    margin-top: 0.75rem;
  }

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

}

@media (min-width: 25rem) and (max-width: 42rem) {
  .site-header {
    display: flex;
    gap: 0.5rem;
  }

  .site-nav {
    flex-wrap: nowrap;
    gap: 0.35rem 0.65rem;
    margin-top: 0;
  }
}
