/* peter-hoffmann.com stylesheet
   Sections: page + header + components, markdown prose (trimmed github-markdown-css),
   pygments syntax highlighting, site specific overrides. */

/* ---- Styling Page ---- */
/* Lora (SIL Open Font License, see /static/fonts/Lora-OFL.txt) */
@font-face {
    font-family: 'Lora';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(/static/fonts/lora-600-latin.woff2) format('woff2');
}

:root {
    --bg: #fff;
    --fg: #24292f;
    --highlight: oklch(29% 0.156 236);
    --title: oklch(29% 0.156 236);
    --accent-soft: rgb(9 105 218 / 8%);
    --accent-soft-hover: rgb(9 105 218 / 15%);
    --muted: #57606a;
    --border: #d0d7de;
    --bg-muted: #f6f8fa;
    --max-width: 980px;
    --pad: 24px;
    --gap: 20px;
    --header-border: #e2e8f0;
    --header-text: #111827;
    --header-accent: #3b82f6;
}

html,
body {
    background: var(--bg);
    color: var(--fg);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    height: 100%;
    margin: 0px
}

*,
*::before,
*::after {
    box-sizing: border-box;
}
/* ---- Header ---- */

header {
    background: linear-gradient(to bottom, #ffffff 0%, #f5f7fa 100%);
    border-bottom: 1px solid var(--header-border);
    padding: 0.75rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

header .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    max-width: 960px;
    margin: 0 auto;
}

header .site-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--header-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    text-decoration: none;
}

header .menu-toggle {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 0.375rem;
    display: none;
    /* hidden on wide screens */
}

header .menu-toggle:focus-visible {
    outline: 2px solid var(--header-accent);
    outline-offset: 2px;
}

header .menu-icon {
    display: block;
    width: 1.5rem;
    height: 0.15rem;
    background: var(--header-text);
    position: relative;
    border-radius: 999px;
}

header .menu-icon::before,
header .menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--header-text);
    border-radius: inherit;
    transition: transform 0.2s ease, top 0.2s ease, opacity 0.2s ease;
}

header .menu-icon::before {
    top: -0.4rem;
}

header .menu-icon::after {
    top: 0.4rem;
}

header .menu-toggle[aria-expanded="true"] .menu-icon {
    background: transparent;
}

header .menu-toggle[aria-expanded="true"] .menu-icon::before {
    top: 0;
    transform: rotate(45deg);
}

header .menu-toggle[aria-expanded="true"] .menu-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

header nav {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 1.25rem;
    font-size: 0.95rem;
}

header nav a {
    text-decoration: none;
    color: #4b5563;
    padding: 0.3rem 0.4rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    transition: background 0.15s ease;
}

header nav a:hover,
header nav a:focus-visible {
    background: #e5e7eb;
    outline: none;
}

header .logo-icon {
    height: 1.85rem;
    /* matches site-title font-size */
    width: auto;
    margin-right: 0.05rem;
    margin-bottom: 0.15rem;
    flex-shrink: 0;
}

/* Search bar styles (inspired by Mediumish nav search) */
header .nav-search {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 0.25rem;
    border: 1px solid #dddddd;
    padding: 2px 4px;
    background: #fafafa;
    transition:
        box-shadow 0.15s ease,
        border-color 0.15s ease,
        background-color 0.15s ease;
}

header .nav-search:focus-within {
    background: #ffffff;
    border-color: #999999;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.03);
}

header .nav-search input[type="search"] {
    border: none;
    background: transparent;
    font-size: 12px;
    padding: 2px 4px;
    width: 140px;
    outline: none;
    color: #333333;
}

header .nav-search input::placeholder {
    color: #aaaaaa;
}

header .nav-search button {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

header .nav-search svg {
    width: 16px;
    height: 16px;
    stroke: #999999;
}

/* Mobile / narrow layout */
@media (max-width: 768px) {
    header {
        padding: 0.75rem 1.25rem;
        /* keep same height as desktop */
    }

    header .row {
        flex-wrap: wrap;
    }

    header .menu-toggle {
        display: inline-flex;
        /* show burger */
        margin-left: auto;
    }

    header nav {
        display: none;
        /* hidden by default */
        flex-direction: column;
        /* one row per item */
        align-items: flex-start;
        gap: 0;
        width: 100%;
        margin-left: 0;
        padding-top: 0.4rem;
        order: 3;
        /* ensure it appears below title & burger */
    }

    header nav.is-open {
        display: flex;
        /* show when menu is toggled */
    }

    header nav a {
        display: block;
        width: 100%;
        padding: 0.5rem 5px;
    }

    header .nav-search {
        width: 100%;
        margin: 0.5rem 0;
    }

    header .nav-search input[type="search"] {
        width: 100%;
    }
}

/* ---- Footer ---- */
footer {
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
    margin-top: 2rem;
    padding-top: 0.5rem;
    padding-bottom: 1rem;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--pad);
}

footer a:hover {
    text-decoration: underline;
}
footer a {
    color: var(--highlight);
    text-decoration: none;
}

/* ---- Main content ---- */
main {
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--pad);
    padding-top: 0.5rem;
}

h1.title {
    border: none;
    margin-bottom: 0px;
}

.markdown-body img {
    /*display: block;*/
    margin-left: auto;
    margin-right: auto;
}

.markdown-body {
    margin: 0;
    /* Remove GitHub’s default margin */
    padding: 0;
    /* Remove GitHub’s default padding */
    box-shadow: none;
    background: none;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
    scroll-margin-top: 80px;
}

.markdown-body p>img {
    border-radius: 6px;
    max-height: 600px;
    display: block;
    margin: 0 auto;
}

table td,
table tr {
    text-align: left;
    vertical-align: top;
    white-space: normal
}

table th {
    white-space: nowrap
}

table {
    max-width: 100%;
}

table td,
table th {
    text-align: left;
}

.icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---- Post header ---- */
.post-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.post-header h1.title {
    border: none;
    margin-top: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0;
    line-height: 1.25;
}

.byline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.byline > a {
    flex-shrink: 0;
}

.byline img.author {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    transition: opacity 0.2s ease;
}

.byline a:hover img.author {
    opacity: 0.8;
}

.byline .author-name {
    font-weight: 600;
    color: var(--fg);
    text-decoration: none;
}

.markdown-body .contact-links {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

/* spread the links over the full height of the author image */
.markdown-body .byline-page .contact-links {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 80px;
    line-height: 1.2;
}

.markdown-body .byline-page .contact-links li + li {
    margin-top: 0;
}

.byline-page {
    align-items: flex-start;
}

.contact-links a {
    text-decoration: none;
}

.contact-links .fa-icon {
    width: 1.1em;
    margin-right: 0.3rem;
    color: var(--muted);
}

.byline .post-meta {
    margin-top: 0.15rem;
}

.post-header p.lead {
    margin: 1.25rem 0 0;
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--muted);
}

.post-header p.older-notice {
    margin: 1.25rem 0 0;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    color: var(--muted);
    background: var(--bg-muted);
    border-radius: 6px;
}

/* byline and summary side by side on wider screens */
@media (min-width: 769px) {
    .post-intro {
        display: flex;
        align-items: flex-start;
        gap: 1.5rem;
    }
    .post-intro .byline {
        flex: 0 0 auto;
        min-width: 330px;
        max-width: 50%;
        align-items: flex-start;
    }
    .post-intro .meta-tags {
        white-space: nowrap;
    }
    .post-intro .meta-sep {
        display: none;
    }
    .post-intro .meta-tags {
        display: block;
        margin-top: 0.4rem;
        line-height: 1.9;
    }
    .post-intro p.lead {
        flex: 1;
        margin: 0;
        padding-left: 1.5rem;
        border-left: 1px solid var(--border);
        font-size: 1.05rem;
    }
}

/* ---- Date and tags line ---- */
.post-meta {
    font-size: 0.9rem;
    color: var(--muted);
}

.post-meta a {
    color: var(--highlight);
    text-decoration: none;
}

.post-meta .article-tag a {
    color: var(--highlight);
    text-decoration: none;
    background: var(--accent-soft);
	border-radius:3px;
	padding:3px 6px;
}

.post-meta .article-tag a:hover {
    background: var(--accent-soft-hover);
	text-decoration:none;
}
/* ==== Markdown prose (based on github-markdown-css, unused rules removed) ==== */

.markdown-body{
    --color-fg-default: #1F2328;
    --color-fg-muted: #656d76;
    --color-fg-subtle: #6e7781;
    --color-canvas-default: #ffffff;
    --color-canvas-subtle: #f6f8fa;
    --color-border-default: #d0d7de;
    --color-border-muted: hsla(210,18%,87%,1);
    --color-neutral-muted: rgba(175,184,193,0.2);
    --color-accent-fg: #0969da;
}

.markdown-body {
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  margin: 0;
  color: var(--color-fg-default);
  background-color: var(--color-canvas-default);
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
  font-size: 16px;
  line-height: 1.5;
  word-wrap: break-word;
}

.markdown-body details {
  display: block;
}

.markdown-body summary {
  display: list-item;
}

.markdown-body [hidden] {
  display: none !important;
}

.markdown-body a {
  background-color: transparent;
  color: var(--color-accent-fg);
  text-decoration: none;
}

.markdown-body b,
.markdown-body strong {
  font-weight: var(--base-text-weight-semibold, 600);
}

.markdown-body h1 {
  margin: .67em 0;
  font-weight: var(--base-text-weight-semibold, 600);
  padding-bottom: .3em;
  font-size: 2em;
  border-bottom: 1px solid var(--color-border-muted);
}

.markdown-body small {
  font-size: 90%;
}

.markdown-body sub {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

.markdown-body sub {
  bottom: -0.25em;
}

.markdown-body img {
  border-style: none;
  max-width: 100%;
  box-sizing: content-box;
  background-color: var(--color-canvas-default);
}

.markdown-body code,
.markdown-body pre {
  font-family: monospace;
  font-size: 1em;
}

.markdown-body hr {
  box-sizing: content-box;
  overflow: hidden;
  background: transparent;
  border-bottom: 1px solid var(--color-border-muted);
  height: 1px;
  padding: 0;
  margin: 2rem 0;
  background-color: var(--color-border-muted);
  border: 0;
}

.markdown-body input {
  font: inherit;
  margin: 0;
  overflow: visible;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.markdown-body [type=button],
.markdown-body [type=submit] {
  -webkit-appearance: button;
  appearance: button;
}

.markdown-body [type=number]::-webkit-inner-spin-button,
.markdown-body [type=number]::-webkit-outer-spin-button {
  height: auto;
}

.markdown-body [type=search]::-webkit-search-cancel-button,
.markdown-body [type=search]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.markdown-body ::-webkit-input-placeholder {
  color: inherit;
  opacity: .54;
}

.markdown-body ::-webkit-file-upload-button {
  -webkit-appearance: button;
  appearance: button;
  font: inherit;
}

.markdown-body a:hover {
  text-decoration: underline;
}

.markdown-body ::placeholder {
  color: var(--color-fg-subtle);
  opacity: 1;
}

.markdown-body hr::before {
  display: table;
  content: "";
}

.markdown-body hr::after {
  display: table;
  clear: both;
  content: "";
}

.markdown-body table {
  border-spacing: 0;
  border-collapse: collapse;
  display: block;
  width: max-content;
  max-width: 100%;
  overflow: auto;
}

.markdown-body td,
.markdown-body th {
  padding: 0;
}

.markdown-body details summary {
  cursor: pointer;
}

.markdown-body details:not([open])>*:not(summary) {
  display: none !important;
}

.markdown-body a:focus,
.markdown-body [role=button]:focus {
  outline: 2px solid var(--color-accent-fg);
  outline-offset: -2px;
  box-shadow: none;
}

.markdown-body a:focus:not(:focus-visible),
.markdown-body [role=button]:focus:not(:focus-visible) {
  outline: solid 1px transparent;
}

.markdown-body a:focus-visible,
.markdown-body [role=button]:focus-visible {
  outline: 2px solid var(--color-accent-fg);
  outline-offset: -2px;
  box-shadow: none;
}

.markdown-body a:not([class]):focus,
.markdown-body a:not([class]):focus-visible {
  outline-offset: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin-top: 24px;
  margin-bottom: 16px;
  font-weight: var(--base-text-weight-semibold, 600);
  line-height: 1.25;
}

.markdown-body h2 {
  font-weight: var(--base-text-weight-semibold, 600);
  padding-bottom: .3em;
  font-size: 1.5em;
  border-bottom: 1px solid var(--color-border-muted);
}

.markdown-body h3 {
  font-weight: var(--base-text-weight-semibold, 600);
  font-size: 1.25em;
}

.markdown-body h4 {
  font-weight: var(--base-text-weight-semibold, 600);
  font-size: 1em;
}

.markdown-body h5 {
  font-weight: var(--base-text-weight-semibold, 600);
  font-size: .875em;
}

.markdown-body h6 {
  font-weight: var(--base-text-weight-semibold, 600);
  font-size: .85em;
  color: var(--color-fg-muted);
}

.markdown-body p {
  margin-top: 0;
  margin-bottom: 10px;
}

.markdown-body blockquote {
  margin: 0;
  padding: 0 1em;
  color: var(--color-fg-muted);
  border-left: .25em solid var(--color-border-default);
}

.markdown-body ul,
.markdown-body ol {
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 2em;
}

.markdown-body ol ol,
.markdown-body ul ol {
  list-style-type: lower-roman;
}

.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
  list-style-type: lower-alpha;
}

.markdown-body tt,
.markdown-body code {
  font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
  font-size: 12px;
}

.markdown-body pre {
  margin-top: 0;
  margin-bottom: 0;
  font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
  font-size: 12px;
  word-wrap: normal;
}

.markdown-body input::-webkit-outer-spin-button,
.markdown-body input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

.markdown-body::before {
  display: table;
  content: "";
}

.markdown-body::after {
  display: table;
  clear: both;
  content: "";
}

.markdown-body>*:first-child {
  margin-top: 0 !important;
}

.markdown-body>*:last-child {
  margin-bottom: 0 !important;
}

.markdown-body a:not([href]) {
  color: inherit;
  text-decoration: none;
}

.markdown-body .anchor {
  float: left;
  padding-right: 4px;
  margin-left: -20px;
  line-height: 1;
}

.markdown-body .anchor:focus {
  outline: none;
}

.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body table,
.markdown-body pre,
.markdown-body details {
  margin-top: 0;
  margin-bottom: 16px;
}

.markdown-body blockquote>:first-child {
  margin-top: 0;
}

.markdown-body blockquote>:last-child {
  margin-bottom: 0;
}

.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
  text-decoration: none;
}

.markdown-body h1 tt,
.markdown-body h1 code,
.markdown-body h2 tt,
.markdown-body h2 code,
.markdown-body h3 tt,
.markdown-body h3 code,
.markdown-body h4 tt,
.markdown-body h4 code,
.markdown-body h5 tt,
.markdown-body h5 code,
.markdown-body h6 tt,
.markdown-body h6 code {
  padding: 0 .2em;
  font-size: inherit;
}

.markdown-body summary h1,
.markdown-body summary h2,
.markdown-body summary h3,
.markdown-body summary h4,
.markdown-body summary h5,
.markdown-body summary h6 {
  display: inline-block;
}

.markdown-body summary h1 .anchor,
.markdown-body summary h2 .anchor,
.markdown-body summary h3 .anchor,
.markdown-body summary h4 .anchor,
.markdown-body summary h5 .anchor,
.markdown-body summary h6 .anchor {
  margin-left: -40px;
}

.markdown-body summary h1,
.markdown-body summary h2 {
  padding-bottom: 0;
  border-bottom: 0;
}

.markdown-body ol[type="1"] {
  list-style-type: decimal;
}

.markdown-body div>ol:not([type]) {
  list-style-type: decimal;
}

.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
  margin-top: 0;
  margin-bottom: 0;
}

.markdown-body li>p {
  margin-top: 16px;
}

.markdown-body li+li {
  margin-top: .25em;
}

.markdown-body table th {
  font-weight: var(--base-text-weight-semibold, 600);
}

.markdown-body table th,
.markdown-body table td {
  padding: 6px 13px;
  border: 1px solid var(--color-border-default);
}

.markdown-body table td>:last-child {
  margin-bottom: 0;
}

.markdown-body table tr {
  background-color: var(--color-canvas-default);
  border-top: 1px solid var(--color-border-muted);
}

.markdown-body table tr:nth-child(2n) {
  background-color: var(--color-canvas-subtle);
}

.markdown-body table img {
  background-color: transparent;
}

.markdown-body img[align=right] {
  padding-left: 20px;
}

.markdown-body img[align=left] {
  padding-right: 20px;
}

.markdown-body span.frame {
  display: block;
  overflow: hidden;
}

.markdown-body span.frame>span {
  display: block;
  float: left;
  width: auto;
  padding: 7px;
  margin: 13px 0 0;
  overflow: hidden;
  border: 1px solid var(--color-border-default);
}

.markdown-body span.frame span img {
  display: block;
  float: left;
}

.markdown-body span.frame span span {
  display: block;
  padding: 5px 0 0;
  clear: both;
  color: var(--color-fg-default);
}

.markdown-body code,
.markdown-body tt {
  padding: .2em .4em;
  margin: 0;
  font-size: 85%;
  white-space: break-spaces;
  background-color: var(--color-neutral-muted);
  border-radius: 6px;
}

.markdown-body code br,
.markdown-body tt br {
  display: none;
}

.markdown-body pre code {
  font-size: 100%;
}

.markdown-body pre>code {
  padding: 0;
  margin: 0;
  word-break: normal;
  white-space: pre;
  background: transparent;
  border: 0;
}

.markdown-body .highlight {
  margin-bottom: 16px;
}

.markdown-body .highlight pre {
  margin-bottom: 0;
  word-break: normal;
}

.markdown-body .highlight pre,
.markdown-body pre {
  padding: 16px;
  overflow: auto;
  font-size: 85%;
  line-height: 1.45;
  color: var(--color-fg-default);
  background-color: var(--color-canvas-subtle);
  border-radius: 6px;
}

.markdown-body pre code,
.markdown-body pre tt {
  display: inline;
  max-width: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  line-height: inherit;
  word-wrap: normal;
  background-color: transparent;
  border: 0;
}

.markdown-body ::-webkit-calendar-picker-indicator {
  filter: invert(50%);
}

/* ==== Syntax highlighting (pygments) ==== */

.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #000000; font-weight: bold } /* Keyword */
.highlight .o { color: #000000; font-weight: bold } /* Operator */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold; font-style: italic } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #999999 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #000000; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #000000; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #000000; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #000000; font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { color: #000000; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #009999 } /* Literal.Number */
.highlight .s { color: #d01040 } /* Literal.String */
.highlight .na { color: #008080 } /* Name.Attribute */
.highlight .nb { color: #0086B3 } /* Name.Builtin */
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
.highlight .no { color: #008080 } /* Name.Constant */
.highlight .nd { color: #3c5d5d; font-weight: bold } /* Name.Decorator */
.highlight .ni { color: #800080 } /* Name.Entity */
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
.highlight .nl { color: #990000; font-weight: bold } /* Name.Label */
.highlight .nn { color: #555555 } /* Name.Namespace */
.highlight .nt { color: #000080 } /* Name.Tag */
.highlight .nv { color: #008080 } /* Name.Variable */
.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mf { color: #009999 } /* Literal.Number.Float */
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
.highlight .sb { color: #d01040 } /* Literal.String.Backtick */
.highlight .sc { color: #d01040 } /* Literal.String.Char */
.highlight .sd { color: #d01040 } /* Literal.String.Doc */
.highlight .s2 { color: #d01040 } /* Literal.String.Double */
.highlight .se { color: #d01040 } /* Literal.String.Escape */
.highlight .sh { color: #d01040 } /* Literal.String.Heredoc */
.highlight .si { color: #d01040 } /* Literal.String.Interpol */
.highlight .sx { color: #d01040 } /* Literal.String.Other */
.highlight .sr { color: #009926 } /* Literal.String.Regex */
.highlight .s1 { color: #d01040 } /* Literal.String.Single */
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #008080 } /* Name.Variable.Class */
.highlight .vg { color: #008080 } /* Name.Variable.Global */
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */

/* ==== Site specific ==== */

.markdown-body {
  margin-top: 1rem;
}

.markdown-body h1.title {
  padding-bottom: 0;
}

.post-header h1.title,
h2.card-title {
  color: var(--title);
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
}

/* ---- Post list ---- */

h2.card-title {
  margin-top: 0;
  margin-bottom: .4rem;
  font-size: 1.45em;
  line-height: 1.3;
  border: none;
  padding-bottom: 0;
}

h2.card-title a {
  color: inherit;
}

h2.card-title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.layout {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}

.post-list .layout:first-child {
  padding-top: 0.75rem;
}

.post-list p.summary {
  margin: 0.6rem 0 0;
}

.read-more {
  font-weight: 500;
  white-space: nowrap;
}

.content {
  flex: 2;
}

.teaser {
  flex: 1;
}

.teaser img {
  display: block;
  width: 100%;
  max-width: 300px;
  border: 1px solid var(--color-border-muted);
  border-radius: 8px;
  transition: opacity 0.2s ease;
}

.teaser a:hover img {
  opacity: 0.85;
}

@media (max-width: 1024px) {
  .layout {
    flex-direction: column;
  }
  .layout {
    gap: 1rem;
  }
  .content,
  .teaser {
    flex: none;
  }
  .teaser img {
    max-width: 100%;
  }
}

.markdown-body .more-link {
  margin-top: 2.5rem;
  text-align: center;
}

.button {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--highlight);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.markdown-body a.button:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

.edit-link {
  background-color: yellow;
}

/* ---- Archive search ---- */

#search {
  margin-top: .5rem;
  margin-bottom: .5rem;
}

#search input {
  width: 100%;
  padding: 6px 8px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  transition: border-color 0.2s;
}

@media (min-width: 601px) {
  #posts {
    display: table;
    width: 100%;
  }
}

#search input:focus {
  outline: none;
  border-color: #4a90e2;
}

/* ---- Utilities ---- */

.nowrap {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hide {
  display: none;
}

.fa-icon {
  width: 1.25em;
  height: 1em;
  vertical-align: -0.125em;
  overflow: visible;
}

/* ---- Small screens ---- */
@media (max-width: 600px) {
  .markdown-body h1 {
    font-size: 1.6em;
  }
  .post-header p.lead {
    font-size: 1rem;
  }
  .byline img.author {
    width: 60px;
    height: 60px;
  }
  .markdown-body .byline-page .contact-links {
    height: 60px;
  }
  /* archive: drop the long summary column */
  #posts th:nth-child(5),
  #posts td:nth-child(5) {
    display: none;
  }
}
