* {
	padding: 0;
	margin: 0;
} 
/* =========================================================
   Colour palette
   Light is the default. The dark palette is written out twice on
   purpose: once for the visitor's OS setting (works with no
   JavaScript) and once for the header switch (data-theme="dark").
   Keep the two dark blocks in sync.
   ========================================================= */
:root {
	color-scheme: light;
	--bg: #fff;
	--fg: #444;
	--muted: #888;
	--faint: #ccc;
	--line: #eee;
	--link: #5cc265; /* Change Link Color */
	--tag-bg: #ccc;
	--tag-fg: #fff;
	--code-bg: #eee;
	--code-fg: #333;
	--code-comment: #998;
	--code-string: #dd1144;
	--code-number: #0086b3;
	--code-title: #795da3;
	--code-name: #a31515;
	--card-line: rgba(0, 0, 0, 0.1);
}
/* OS setting is dark, unless the visitor picked light by hand */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		color-scheme: dark;
		--bg: #15171c;
		--fg: #d7dade;
		--muted: #99a0aa;
		--faint: #6f7681;
		--line: #2b2f38;
		--link: #6fd07a;
		--tag-bg: #3a404b;
		--tag-fg: #e9ecef;
		--code-bg: #1d2027;
		--code-fg: #d7dade;
		--code-comment: #7f848e;
		--code-string: #98c379;
		--code-number: #d19a66;
		--code-title: #61afef;
		--code-name: #e06c75;
		--card-line: rgba(255, 255, 255, 0.14);
	}
}
/* Header switch: dark chosen by hand */
:root[data-theme="dark"] {
	color-scheme: dark;
	--bg: #15171c;
	--fg: #d7dade;
	--muted: #99a0aa;
	--faint: #6f7681;
	--line: #2b2f38;
	--link: #6fd07a;
	--tag-bg: #3a404b;
	--tag-fg: #e9ecef;
	--code-bg: #1d2027;
	--code-fg: #d7dade;
	--code-comment: #7f848e;
	--code-string: #98c379;
	--code-number: #d19a66;
	--code-title: #61afef;
	--code-name: #e06c75;
	--card-line: rgba(255, 255, 255, 0.14);
}
/* Soften the switch between schemes */
body, header, article, footer, pre, code, .taglist a, .kg-bookmark-container {
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
/* Basic Typography */
html, body {
	font-size: 1em;
	line-height: 1.65em;
	font-family: "Open Sans", sans-serif;
	font-weight: 300;
	background: var(--bg);
	color: var(--fg);
}
html {
	height: 100%;
}
body {
	padding: 2em 2.5em 1em 20em;
}                  
/* Blocks */
header {
	border-right: 1px solid var(--line);
	padding: 2em;
	position:fixed;
	top: 0;
	left: 0;
	height:100%;
	width:13.5em;
	background-repeat: no-repeat;
	background-size: cover;
}
#content {
	display: block;
	width: 100%;
}
footer {
	padding: 1em 0em 2.5em 0em;
	font-size:0.8em;
	line-height: 1.5em;
	color: var(--muted);
}
article {
	border-bottom: 0.1em solid var(--line);
	padding-bottom: 1.7em;
	max-width: 56em;
}
p, hr, h4, h5, h6 {
	margin-top: 0.9em;
	margin-bottom: 0.9em;
}
/* Headings */
h1, h2, h3, h4, h5, h6 {
	font-family: "Bree Serif", serif;
	font-weight: 400 !important;
}
h1 {
	font-size: 2.5em;
	line-height: 1.1em;
	margin-top: 0.6em;
	margin-bottom: 0.6em;
}
h2 {
	font-size:1.9em;
	line-height: 1.2em;
	margin-top: 0.7em;
	margin-bottom: 0.7em;	
}
h3 {
	font-size:1.4em;
	line-height: 1.3em;
	margin-top: 0.8em;
	margin-bottom: 0.8em;	
}
h4 {
	font-size:1.3em;
}
h5 {
	font-size:1.2em;
}
h6 {
	font-size:1.1em;
}
/* Page Elements */
img, iframe {
	max-width: 100%;
}
a {
	font-weight:700;
	text-decoration:none;
	color: var(--link);
}
a:hover {
	text-decoration:underline;
}
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
	font-weight:400 !important;
}
strong {
	font-weight: 700;
}
blockquote {
	border-left: 0.4em solid var(--line);
	padding-left: 1.2em;
	font-size: 1.3em;
}
hr{
 	border: 0;
	height: 1px;
	background: var(--line);
}
ul, ol {
	margin-left: 3em; 
}
code {
	font-size:1.4em;
	background: var(--code-bg);
}
pre {
	font-size: 0.8em;
	line-height: 2em;
	background: var(--code-bg);
	padding: 1em;
	word-break: break-all;
	word-wrap: break-word;
	white-space: pre;
	white-space: -moz-pre-wrap;
	white-space: pre-wrap;
	white-space: pre\9; 
}
input {
	font-size:1em;
	padding: 0.3em;
}
/* Sidebar */
header h1 {
	font-size:1.9em;
	margin-top:0.8em;
	margin-bottom:0.6em;
}
header h1 a {
	color: var(--fg);
}  
header h1 a:hover {
	text-decoration:none;
}
header #logo img {
	width:9em;
	height:9em;
	border-radius:4.5em;
	-moz-border-radius: 4.5em;
	-webkit-border-radius: 4.5em;
	border: none;
}
#follow-icons {
	font-size: 0.7em;
	margin-top: -0.7em;
	margin-bottom: 1.5em;
}
#follow-icons a {
	color: var(--faint);
}
/* Inline SVG icons in the sidebar (Font Awesome has no glyph for everything,
   e.g. Bluesky) - sized to sit alongside the fa-2x icons. */
#follow-icons svg {
	width: 1.6em;
	height: 1.6em;
	fill: currentColor;
	vertical-align: baseline;
}	
#follow-icons span {
	vertical-align:top;
	margin-left:-0.15em;
	margin-right:-0.15em;
}
#follow-icons span .fa-stack-1x {
	font-size:1.05em;
	line-height:1.9em;
}
header h6 {
	margin-top:0.5em;
}
/* Home page (static page shown above the post feed on the front page) */
.home-page {
	margin-bottom: 2.4em;
}
.home-page p:last-child {
	margin-bottom: 0;
}
/* Posts */
article .post-stamp {
	color: var(--muted);
}
h1.post-title {
	margin-top:0.35em;
	margin-bottom: 0.6em;
}
h3.post-title {
	margin-top:0.4em;
	padding-bottom:0.9em;
	border-bottom: 1px solid var(--line);
	font-size: 1.2em;
	color: var(--fg);
}
.post-title .feature-star {
	font-size: 0.9em;
}
.separator, .taglist, .feature-star {
	color: var(--faint);
}
.taglist a {
	background-color: var(--tag-bg);
	color: var(--tag-fg);
	display: inline-block;   
	line-height: 1.5em;
	padding:0.3em 0.6em 0.3em 0.6em;
	vertical-align:20%;  
	font-size:0.5em;
	font-family: "Open Sans", sans-serif;
	font-weight: 700 !important;
	text-transform:uppercase;
	letter-spacing:0.05em;
	border-radius:0.25em;
	-moz-border-radius: 0.25em;
	-webkit-border-radius: 0.25em;
}
#social-bar {
	margin-top:1.5em;
	background-color: var(--line);
	padding:0.5em;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}
#comments {
	margin-top: 1em;
	padding-bottom: 0.2em;
	border-bottom: 1px solid var(--line);
}
/* Footer */
.pagination {
	margin-bottom:1em;
}
footer a {
	font-weight:300;
	color: var(--muted);
	text-decoration: underline;
} 
footer a:hover {
	color: var(--fg);
	text-decoration: none;
}
/* Large Screens */
@media only screen and (min-width: 1281px) {
	html, body {
		font-size: 1.1em;
	} 
}
/* Small Screens */
@media only screen and (max-width: 800px) { 
	body {
		padding:0;
	}
	header {
		border-right: none;
		border-bottom: 1px solid var(--line);
		position:relative;
		height:auto;
		width:auto;
		text-align:center;
		padding-bottom:1em;
	}
	#content {
		margin-left: 0;
		padding: 2em 2em 1em 2em;
		width: auto;
	}
	footer {
		padding: 0 2.5em 2em 2.5em;
	}
}
/* Tiny Screens */
@media only screen and (max-width: 320px) { 
	header {
		padding: 1.2em 1.2em 0.6em 1.2em;
	}
	#content {
		padding: 1.2em 1.2em 0.6em 1.2em;
	}
	footer {
		padding: 0 1.5em 1.2em 1.5em;
	}
	ul, ol {
		margin-left: 2em; 
	}
}

/* ghost compatibility */

.kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin: auto calc(50% - 50vw);
  transform: translateX(calc(50vw - 50%));
}

.kg-width-full {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.kg-bookmark-card {
    width: 100%;
    position: relative;
}

.kg-bookmark-container {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row-reverse;
    color: currentColor;
    font-family: inherit;
    text-decoration: none;
    border: 1px solid var(--card-line);
}

.kg-bookmark-container:hover {
    text-decoration: none;
}

.kg-bookmark-content {
    flex-basis: 0;
    flex-grow: 999;
    padding: 20px;
    order: 1;
}

.kg-bookmark-title {
    font-weight: 600;
}

.kg-bookmark-metadata,
.kg-bookmark-description {
    margin-top: .5em;
}

.kg-bookmark-metadata {
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kg-bookmark-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.kg-bookmark-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: text-bottom;
    margin-right: .5em;
    margin-bottom: .05em;
}

.kg-bookmark-thumbnail {
    display: flex;
    flex-basis: 24rem;
    flex-grow: 1;
}

.kg-bookmark-thumbnail img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
    object-fit: cover;
}

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

.kg-bookmark-publisher::before {
    content: "•";
    margin: 0 .5em;
}

.kg-image-card,
.kg-gallery-card {
    margin: 0 0 1.5em;
}

.kg-image-card figcaption,
.kg-gallery-card figcaption {
    margin: -1.0em 0 1.5em;
}

.kg-gallery-container {
    display: flex;
    flex-direction: column;
    margin: 1.5em auto;
    max-width: 1040px;
    width: 100vw;
}

.kg-gallery-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.kg-gallery-image img {
    display: block;
    margin: 0;
    width: 100%;
    height: 100%;
}

.kg-gallery-row:not(:first-of-type) {
    margin: 0.75em 0 0 0;
}

.kg-gallery-image:not(:first-of-type) {
    margin: 0 0 0 0.75em;
}

/* Dark mode switch (rendered by partials/theme-toggle.hbs) */
.theme-toggle {
	background: none;
	border: 0;
	padding: 0;
	margin: 0 0 1.2em 0;
	font-family: inherit;
	font-size: 0.8em;
	font-weight: 700;
	color: var(--muted);
	cursor: pointer;
}
.theme-toggle:hover,
.theme-toggle:focus-visible {
	color: var(--link);
	text-decoration: underline;
}
.theme-toggle i {
	margin-right: 0.35em;
}

/* Share bar (partials/share.hbs). Replaces the old rrssb widget: same look,
   but no jQuery and no plugin. The brand colours are hard-coded on purpose -
   they belong to the platforms, not to the site palette. */
.share-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	padding: 0.45em 0.9em;
	border-radius: 0.25em;
	font-size: 0.7em;
	font-weight: 700;
	line-height: 1.2em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #fff;
	background-color: var(--faint);
}
.share-btn:hover,
.share-btn:focus-visible {
	color: #fff;
	text-decoration: none;
	filter: brightness(0.88);
}
.share-btn svg {
	width: 1.15em;
	height: 1.15em;
	fill: currentColor;
}
.share-btn.email    { background-color: var(--muted); }
.share-btn.bluesky  { background-color: #1185fe; }
.share-btn.linkedin { background-color: #0a66c2; }

/* highlight.js is loaded from a CDN in default.hbs; re-point it at the palette
   so code blocks stay readable when the scheme flips. */
.hljs {
	color: var(--code-fg);
	background: var(--code-bg);
}
.hljs-comment,
.hljs-quote {
	color: var(--code-comment);
}
.hljs-string,
.hljs-symbol,
.hljs-bullet {
	color: var(--code-string);
}
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-attribute,
.hljs-link {
	color: var(--code-number);
}
.hljs-title,
.hljs-section,
.hljs-addition {
	color: var(--code-title);
}
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
	color: var(--code-name);
}