/**
 * Christian Ackermann – Code & Console design
 *
 * Table of Contents:
 *
 * 1.0 - Design tokens
 * 2.0 - Base & reset
 * 4.0 - Header & navigation
 * 5.0 - Windows (editor + terminal)
 * 6.0 - Hero
 * 7.0 - Post cards
 * 7.6 - Margin note slider (start page)
 * 8.0 - Pagination
 * 9.0 - Single post & page
 * 10.0 - WordPress content (blocks, alignments, captions, tables)
 * 11.0 - Forms, search, widgets, comments
 * 12.0 - Footer / status bar
 * 13.0 - Reduced motion
 *
 * Animations only use transform and opacity, so they never cause layout shifts.
 */

/**
 * 1.0 - Design tokens
 */

:root {
	--bg: #f3f6fc;
	--bg-2: #f1f4f9;
	--surface: #ffffff;
	--border: #dde3ee;
	--text: #0b1730;
	--muted: #4b5568;
	--accent: #1d4ed8;
	--on-accent: #ffffff;
	--accent-2: #0ea5e9;
	--glow: rgba(37, 99, 235, .20);
	--on: #15803d;
	--off: #b45309;
	/* Editor and terminal windows are always dark, like a real IDE or console */
	--ed-bg: #0a1222;
	--ed-bar: #0f1a30;
	--ed-border: #1b2a47;
	--ed-text: #d6e2f5;
	--ed-muted: #8a9ab8;
	--ed-line: #111d36;
	--kw: #60a5fa;
	--ty: #38bdf8;
	--fn: #93c5fd;
	--str: #fbbf24;
	--num: #f472b6;
	--cm: #8a9ab8;
	--ok: #4ade80;
	--pp: #a5b4fc;
	--mono: 'JetBrains Mono', ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
	--sans: 'Rubik', system-ui, -apple-system, "Segoe UI", sans-serif;
	--radius: 10px;
	--wrap: 1200px;
	--sheet-shadow: 0 1px 2px rgba(11, 23, 48, .06), 0 12px 32px -18px rgba(11, 23, 48, .25);
	color-scheme: light;
}

:root:not([data-theme="light"]),
:root[data-theme="dark"] {
	--bg: #060c18;
	--bg-2: #233150;
	--surface: #1b2741;
	--border: #2c3d5e;
	--text: #e5edfb;
	--muted: #9aa8c4;
	--accent: #7aa7ff;
	--on-accent: #060c18;
	--accent-2: #38bdf8;
	--glow: rgba(59, 130, 246, .30);
	--on: #4ade80;
	--off: #fbbf24;
	--sheet-shadow: none;
	color-scheme: dark;
}

/**
 * 2.0 - Base & reset
 */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 76px;
}

/* Column layout, so the status bar sits at the bottom of short pages */
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	margin: 0;
	font-family: var(--mono);
	font-size: 15px;
	line-height: 1.65;
	background: var(--bg);
	color: var(--text);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

a {
	color: inherit;
	text-decoration: none;
}

img,
svg,
video,
iframe {
	max-width: 100%;
}

img {
	display: block;
	height: auto;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--mono);
	line-height: 1.25;
	letter-spacing: -.02em;
	margin: 0 0 .6em;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

::selection {
	background: var(--accent);
	color: var(--on-accent);
}

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

.wrap {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 20px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 100;
	width: auto;
	height: auto;
	clip: auto;
	clip-path: none;
	padding: 10px 14px;
	border-radius: 8px;
	background: var(--accent);
	color: var(--on-accent);
}

.cursor {
	display: inline-block;
	width: .6ch;
	height: 1.15em;
	margin-left: 3px;
	vertical-align: -3px;
	background: var(--accent);
	animation: ep-blink 1.1s steps(1) infinite;
}

@keyframes ep-blink {
	50% { opacity: 0; }
}

/**
 * 4.0 - Header & navigation
 */

.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: color-mix(in srgb, var(--bg) 78%, transparent);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--border);
}

.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}

.site-header .wrap {
	display: flex;
	align-items: stretch;
	grid-auto-rows: 1fr;
	justify-content: space-between;
	gap: 16px;
	height: 58px;
}

.logo {
	display: flex;
	align-items: center;
	font-weight: 700;
	font-size: 17px;
	letter-spacing: -.02em;
	white-space: nowrap;
}

.logo .p { color: var(--accent); }
.logo .dot { color: var(--accent-2); }

.tabs {
	display: flex;
	align-items: stretch;
	grid-auto-rows: 1fr;
	min-width: 0;
}

.tabs ul {
	display: flex;
	align-items: stretch;
	grid-auto-rows: 1fr;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tabs li {
	display: flex;
	position: relative;
}

.tabs a {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0 14px;
	font-size: 14px;
	color: var(--muted);
	border-top: 2px solid transparent;
	white-space: nowrap;
	transition: color .2s, background .2s;
}

.tabs a:hover {
	color: var(--text);
	background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.tabs .current-menu-item > a,
.tabs .current-menu-ancestor > a,
.tabs .current_page_item > a {
	color: var(--text);
	background: var(--surface);
	border-top-color: var(--accent);
}

/* Menu icons (CSS classes "is-blog", "is-notes", "is-gallery", "is-projects", "is-about"): small line icons in the accent colour */
.tabs .is-blog > a::before,
.tabs .is-notes > a::before,
.tabs .is-gallery > a::before,
.tabs .is-projects > a::before,
.tabs .is-about > a::before,
.mobile-nav .is-blog > a::after,
.mobile-nav .is-notes > a::after,
.mobile-nav .is-gallery > a::after,
.mobile-nav .is-projects > a::after,
.mobile-nav .is-about > a::after {
	content: "";
	display: inline-block;
	width: 15px;
	height: 15px;
	flex: none;
	background: var(--accent-2);
	-webkit-mask: var(--menu-icon) center / contain no-repeat;
	mask: var(--menu-icon) center / contain no-repeat;
}

.tabs .is-blog > a::before,
.mobile-nav .is-blog > a::after { --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3Cpath d='M9 13h6'/%3E%3Cpath d='M9 17h6'/%3E%3C/svg%3E"); }
.tabs .is-notes > a::before,
.mobile-nav .is-notes > a::after { --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9a2.8 2.8 0 0 0-4-4L4 16z'/%3E%3Cpath d='M13.5 6.5l4 4'/%3E%3Cpath d='M14 20h6'/%3E%3C/svg%3E"); }
.tabs .is-gallery > a::before,
.mobile-nav .is-gallery > a::after { --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E"); }
.tabs .is-projects > a::before,
.mobile-nav .is-projects > a::after { --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E"); }
.tabs .is-about > a::before,
.mobile-nav .is-about > a::after { --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); }

.tabs .is-notes > a {
	color: var(--text);
}

.tabs .is-blog > a:hover::before,
.tabs .is-notes > a:hover::before,
.tabs .is-gallery > a:hover::before,
.tabs .is-projects > a:hover::before,
.tabs .is-about > a:hover::before {
	background: var(--accent);
}

.mobile-nav .is-blog > a::after,
.mobile-nav .is-notes > a::after,
.mobile-nav .is-gallery > a::after,
.mobile-nav .is-projects > a::after,
.mobile-nav .is-about > a::after {
	margin-left: 8px;
	vertical-align: -2px;
	background: var(--ok);
}

/* Narrow desktops: hide the small icons (except KI-Hub) so all tabs fit next to logo and theme switch */
@media (max-width: 1180px) {
	.tabs a { padding: 0 11px; }

	.tabs .is-blog > a::before,
	.tabs .is-notes > a::before,
	.tabs .is-gallery > a::before,
	.tabs .is-projects > a::before,
	.tabs .is-about > a::before { display: none; }
}

/* KI-Hub (CSS class "is-ki"): the blog's main topic – text and sparkle icon glow softly in the accent colour */
.tabs .is-ki > a {
	color: var(--text);
	font-weight: 600;
	text-shadow: 0 0 4px var(--accent), 0 0 12px var(--accent), 0 0 26px color-mix(in srgb, var(--accent) 70%, transparent);
}

.tabs .is-ki > a::before {
	filter: drop-shadow(0 0 3px var(--accent-2)) drop-shadow(0 0 8px var(--accent-2)) drop-shadow(0 0 16px color-mix(in srgb, var(--accent-2) 70%, transparent));
}

.tabs .is-ki > a:hover {
	text-shadow: 0 0 6px var(--accent), 0 0 16px var(--accent), 0 0 34px var(--accent);
}

.tabs .is-ki > a::before,
.mobile-nav .is-ki > a::after {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	flex: none;
	background: var(--accent-2);
	-webkit-mask: var(--ki-icon) center / contain no-repeat;
	mask: var(--ki-icon) center / contain no-repeat;
	--ki-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M10 2l1.8 5.2L17 9l-5.2 1.8L10 16l-1.8-5.2L3 9l5.2-1.8z'/%3E%3Cpath d='M18 13l.9 2.6 2.6.9-2.6.9L18 20l-.9-2.6-2.6-.9 2.6-.9z'/%3E%3C/svg%3E");
}

/* Badge "NEU" for the new section KI-Hub */
.tabs .is-ki > a::after {
	content: "NEU";
	padding: 2px 5px;
	border-radius: 4px;
	background: var(--accent);
	color: var(--bg);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: .06em;
}

.mobile-nav .is-ki > a {
	font-weight: 600;
	color: var(--text);
}

.mobile-nav .is-ki > a::after {
	margin-left: 8px;
	vertical-align: -2px;
}

/* Drop-down for nested menu items */
.tabs .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 5;
	display: block;
	min-width: 220px;
	padding: 6px;
	border: 1px solid var(--border);
	border-radius: 0 0 8px 8px;
	background: var(--surface);
	box-shadow: 0 18px 30px -18px var(--glow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity .2s, transform .2s, visibility .2s;
}

.tabs li:hover > .sub-menu,
.tabs li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.tabs .sub-menu a {
	padding: 8px 10px;
	border: 0;
	border-radius: 6px;
}

.actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.icon-btn {
	display: grid;
	place-items: center;
	flex: none;
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
	cursor: pointer;
	transition: border-color .2s, color .2s;
}

.icon-btn:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.icon-btn svg {
	width: 17px;
	height: 17px;
}

/* Colour scheme toggle: icon of the active scheme plus "theme:dark" or "theme:light" */
.theme-toggle {
	display: flex;
	gap: 7px;
	width: auto;
	padding: 0 11px;
	font: 600 13px var(--mono);
	white-space: nowrap;
}

.theme-toggle .mode::before {
	content: "theme:";
	color: var(--muted);
	font-weight: 400;
}

.theme-toggle .mode::after {
	content: "dark";
	color: var(--accent-2);
}

:root[data-theme="light"] .theme-toggle .mode::after {
	content: "light";
	color: var(--off);
}

/* Small phones: the toggle shows only its icon (the label is in aria-label) */
@media (max-width: 480px) {
	.logo { font-size: 15px; }
	.theme-toggle { width: 44px; padding: 0; justify-content: center; }
	.theme-toggle .mode { display: none; }
}

.icon-btn .sun { display: none; }
:root:not([data-theme="light"]) .icon-btn .sun { display: block; }
:root:not([data-theme="light"]) .icon-btn .moon { display: none; }

.menu-btn {
	display: none;
}

@media (pointer: coarse) {
	.icon-btn { width: 44px; height: 44px; }
	.theme-toggle { width: auto; }
}

/* Hamburger menu below 1040px */
@media (max-width: 1040px) {
	.tabs { display: none; }
	.menu-btn { display: grid; }
}

/* Mobile menu: slides in as a terminal window */
.nav-parent {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 60;
	width: min(360px, 92vw);
	overflow-y: auto;
	background: var(--ed-bg);
	color: var(--ed-text);
	border-left: 1px solid var(--ed-border);
	box-shadow: -20px 0 50px -20px rgba(0, 0, 0, .5);
	visibility: hidden;
	transform: translate3d(100%, 0, 0);
	transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility .3s;
}

.nav-parent.mobile-menu-open {
	visibility: visible;
	transform: none;
}

.admin-bar .nav-parent { top: 46px; }

.nav-parent .win-bar {
	position: sticky;
	top: 0;
}

.menubar-close {
	position: absolute;
	right: 8px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	color: #9fb0d0;
}

.menubar-close:hover {
	background: #2563eb;
	color: #fff;
}

.menubar-close,
.mobile-nav .dropdown-toggle {
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.menubar-close svg {
	width: 12px;
	height: 12px;
}

.mobile-nav {
	margin: 0;
	padding: 12px 16px 24px;
	list-style: none;
}

.mobile-nav li {
	position: relative;
	list-style: none;
}

.mobile-nav a {
	display: block;
	padding: 13px 48px 13px 0;
	border-bottom: 1px solid var(--ed-border);
	font-size: 16px;
}

.mobile-nav > li > a::before {
	content: "$ cd ";
	color: var(--ok);
}

.mobile-nav a:hover {
	color: var(--kw);
}

.mobile-nav .sub-menu {
	display: none;
	margin: 0;
	padding-left: 16px;
}

.mobile-nav .dropdown-toggle {
	position: absolute;
	top: 2px;
	right: 0;
	width: 44px;
	height: 44px;
	text-align: center;
	color: var(--kw);
	transition: transform .2s;
}

.mobile-nav .dropdown-toggle::before {
	content: "▾";
}

.mobile-nav .dropdown-toggle.toggled {
	transform: rotate(180deg);
}

/**
 * 5.0 - Windows (editor + terminal)
 */

.win {
	border: 1px solid var(--ed-border);
	border-radius: var(--radius);
	background: var(--ed-bg);
	color: var(--ed-text);
	overflow: hidden;
	box-shadow: 0 30px 60px -30px var(--glow);
}

.win-bar {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 36px;
	padding: 0 10px;
	background: var(--ed-bar);
	border-bottom: 1px solid var(--ed-border);
	font: 13px var(--mono);
	color: #9fb0d0;
}

.win-bar .ico {
	position: absolute;
	left: 12px;
	width: 15px;
	height: 15px;
	color: var(--kw);
}

.win-bar .title {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	max-width: 58%;
}

.win-bar .ctl {
	position: absolute;
	right: 8px;
	display: flex;
	gap: 4px;
}

.win-bar .ctl b {
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	color: #9fb0d0;
	transition: background .2s, color .2s;
}

.win-bar .ctl b:hover {
	background: #1e2e4f;
	color: #fff;
}

.win-bar .ctl b:last-child:hover {
	background: #2563eb;
}

.win-bar .ctl svg {
	width: 10px;
	height: 10px;
}

.win .copy {
	position: absolute;
	right: 88px;
	padding: 2px 8px;
	border: 1px solid #2a3b5f;
	border-radius: 5px;
	background: transparent;
	color: #cbd5e1;
	font: 11.5px var(--mono);
	cursor: pointer;
	transition: border-color .2s, color .2s;
}

.win .copy:hover {
	border-color: var(--kw);
	color: var(--kw);
}

@media (max-width: 520px) {
	.win-bar .copy + .title,
	.win-bar .title.has-copy { display: none; }
}

.ed-tabs {
	display: flex;
	overflow: hidden;
	background: var(--ed-bar);
	border-bottom: 1px solid var(--ed-border);
	font-size: 13px;
}

.ed-tabs span {
	padding: 7px 14px;
	color: var(--ed-muted);
	border-right: 1px solid var(--ed-border);
	white-space: nowrap;
}

.ed-tabs span.on {
	color: var(--ed-text);
	background: var(--ed-bg);
	box-shadow: inset 0 2px var(--kw);
}

/* Source code with line numbers via CSS counters */
.src {
	margin: 0;
	padding: 14px 0;
	overflow: auto;
	font: 13.5px/1.75 var(--mono);
	counter-reset: ln;
	tab-size: 4;
}

.src .l {
	display: block;
	padding-right: 18px;
	white-space: pre;
}

.src .l::before {
	counter-increment: ln;
	content: counter(ln);
	display: inline-block;
	width: 3.2em;
	padding-right: 1.2em;
	text-align: right;
	color: #33446a;
	-webkit-user-select: none;
	user-select: none;
}

.src .l.hl { background: var(--ed-line); }
.src .l.hl::before { color: var(--ed-text); }

.kw { color: var(--kw); }
.ty { color: var(--ty); }
.fn { color: var(--fn); }
.str { color: var(--str); }
.num { color: var(--num); }
.cm { color: var(--cm); }
.pp { color: var(--pp); }

.ed-status {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 4px 12px;
	font-size: 11px;
	color: #c7d6f2;
	background: #1d4ed8;
}

.pr .u { color: var(--ok); font-weight: 700; }
.pr .d { color: var(--kw); font-weight: 700; }

.term-body {
	padding: 14px 16px;
	font: 13.5px/1.75 var(--mono);
}

/**
 * 6.0 - Hero
 */

.hero {
	display: flex;
	flex-direction: column;
	padding-top: 42px;
	padding-bottom: 10px;
}

/* Windows first, then title and intro text; on small screens the title comes first */
.hero-grid { order: 1; }
.hero-intro { order: 2; margin-top: 34px; }

.hero-grid {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 20px;
	align-items: stretch;
	grid-auto-rows: 1fr;
}

/* Editor and terminal have the same height */
.hero-grid .win {
	display: flex;
	flex-direction: column;
}

.hero-grid .win .term-body { flex: 1; }

/* The editor adapts to the height of the terminal; empty lines are marked with "~" like in Vim */
.hero .editor .src {
	flex: 1 1 0;
	min-height: 0;
	overflow: hidden;
}

.src .l.fill::before {
	counter-increment: none;
	content: "~";
}

/* Compact windows: smaller type and tighter lines than in posts */
.hero .src,
.hero .term-body {
	font-size: 13px;
	line-height: 1.6;
}

.hero .src { padding: 10px 0; }
.hero .term-body { padding: 12px 16px; }
.hero .ff { margin: 4px 0; }

@media (max-width: 900px) {
	.hero { padding-top: 32px; }
	.hero-grid { display: none; }
	.hero-intro { order: 0; margin: 0; }
}

.ff {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 4px 18px;
	margin: 8px 0 6px;
}

.ff pre {
	margin: 0;
	color: var(--kw);
	font: 12px/1.25 var(--mono);
}

.ff .k {
	display: inline-block;
	color: var(--kw);
	font-weight: 700;
}

/* Key, colon and value in columns, so long values wrap neatly */
.ff > div > div:has(> .k) {
	display: grid;
	grid-template-columns: 9.4ch 1.4ch minmax(0, 1fr);
}

.ff .colon {
	margin-right: .4ch;
	color: var(--ed-muted);
}

.ff .sep { color: var(--ed-muted); }

.swatch {
	display: flex;
	margin-top: 6px;
}

.swatch i {
	width: 22px;
	height: 12px;
}

@media (max-width: 480px) {
	.ff { grid-template-columns: 1fr; }
	.ff pre { display: none; }
}

.hero h1 {
	font-size: clamp(26px, 4.2vw, 44px);
	line-height: 1.15;
	letter-spacing: -.03em;
	margin: 0 0 10px;
	font-weight: 800;
}

.hero h1 .c {
	color: var(--muted);
	font-weight: 500;
}

/* Name and topic as part of the H1, shown as a small line above the title */
.hero h1 .h1-kicker {
	display: block;
	margin-bottom: 8px;
	color: var(--muted);
	font: 500 14px/1.5 var(--mono);
	letter-spacing: 0;
}

.grad {
	color: var(--accent);
}

.lead {
	max-width: 640px;
	margin: 0;
	color: var(--muted);
	font: 17px/1.65 var(--sans);
}

.hero-claim {
	margin: 14px 0 0;
	color: var(--accent);
	font: 500 15px/1.5 var(--mono);
}

.hero-claim .c {
	color: var(--muted);
}

/* Section title as shell command */
.cmd {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px 10px;
	margin: 44px 0 18px;
	font-size: 15px;
	font-weight: 400;
	letter-spacing: 0;
	color: var(--muted);
}

.cmd .pr,
.cmd .c-txt {
	white-space: nowrap;
}

.cmd .c-txt {
	color: var(--text);
}

/* The prompt here sits on the page background, so it uses the page colors instead of the terminal ones */
.cmd .pr .u { color: var(--on); }
.cmd .pr .d { color: var(--accent); }

.cmd::after {
	content: "";
	flex: 1;
	min-width: 40px;
	height: 1px;
	background: linear-gradient(90deg, var(--border), transparent);
}

.archive-desc {
	max-width: 720px;
	margin: -6px 0 18px;
	color: var(--muted);
	font: 16px/1.6 var(--sans);
}

.archive-desc p {
	margin: 0;
}

/* Gallery page (plugin "Galerie"): intro like the archive description, across the full width */
.galerie-seite > p {
	margin: 0 0 10px;
	color: var(--muted);
	font: 16px/1.6 var(--sans);
}

.galerie-seite > p:last-of-type {
	margin-bottom: 18px;
}

/**
 * 7.0 - Post cards
 */

.grid,
.galerie-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 20px;
}

@media (max-width: 380px) {
	.grid,
	.galerie-grid { grid-template-columns: 1fr; }
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	border-radius: var(--radius);
	background: var(--surface);
	border: 1px solid var(--border);
	overflow: hidden;
	isolation: isolate;
	transition: border-color .2s;
}

.sticky .card,
.card.sticky {
	border-color: var(--accent);
}

.card .media {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--bg-2);
}

.card .media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card {
	--fn: var(--accent);
	box-shadow: var(--sheet-shadow);
}

.card:hover {
	border-color: var(--accent);
}

.card .body {
	display: flex;
	flex-direction: column;
	gap: 9px;
	flex: 1;
	padding: 16px 18px 18px;
}

.meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	font-size: 14px;
	color: var(--muted);
}

.meta .c {
	color: var(--accent);
	opacity: .8;
}

.card h2,
.card h3 {
	margin: 0;
	font: 600 20px/1.3 var(--sans);
	overflow-wrap: anywhere;
}

.card .excerpt {
	margin: 0;
	color: var(--muted);
	font: 15px/1.6 var(--sans);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.card .excerpt p {
	margin: 0;
}

.more {
	margin-top: auto;
	font-size: 14px;
	font-weight: 600;
	color: var(--accent);
}

/* The title link covers the whole card */
.card .stretch::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
}

.card.featured {
	grid-column: 1 / -1;
}

.card.featured .inner {
	display: grid;
	grid-template-columns: 1.25fr 1fr;
	flex: 1;
}

/* Featured image is always shown completely (thumbnails often contain text) */
.card.featured .media {
	align-self: center;
	aspect-ratio: 16 / 9;
}

.card.featured .media img {
	object-fit: contain;
}

.card.featured:hover .media img {
	transform: none;
}

.card.featured .body {
	justify-content: center;
	padding: 26px 28px;
}

.card.featured h2 {
	font-size: clamp(22px, 2.4vw, 28px);
	font-weight: 700;
}

.badge {
	align-self: flex-start;
	padding: 2px 10px;
	border-radius: 6px;
	font: 600 13px var(--sans);
	color: var(--on-accent);
	background: var(--accent);
}

/* Gallery filter above the grid (plugin "Galerie") */
.galerie-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 20px;
}

.galerie-filter a {
	padding: 6px 14px;
	border: 1px solid var(--border);
	border-radius: 999px;
	font: 600 14px/1.3 var(--sans);
	color: var(--muted);
	background: var(--surface);
	text-decoration: none;
}

.galerie-filter a:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.galerie-filter a.is-active {
	border-color: var(--accent);
	color: var(--on-accent);
	background: var(--accent);
}

/* Instagram pictures in the gallery (plugin "Instagram-Galerie"): badge top right, play icon for reels */
.ig-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 9px;
	border-radius: 6px;
	font: 600 12px/1.2 var(--sans);
	color: #fff;
	background: rgba(0, 0, 0, .6);
	backdrop-filter: blur(4px);
}

.ig-badge svg {
	width: 14px;
	height: 14px;
	flex: none;
}

.ig-play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	width: 52px;
	height: 52px;
	margin: -26px 0 0 -26px;
	border-radius: 50%;
	background: rgba(0, 0, 0, .55);
	pointer-events: none;
}

.ig-play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -10px 0 0 -6px;
	border-style: solid;
	border-width: 10px 0 10px 17px;
	border-color: transparent transparent transparent #fff;
}

@media (max-width: 760px) {
	.card.featured .inner { grid-template-columns: 1fr; }
	.card.featured .body { padding: 18px; }
}

/**
 * 7.5 - Margin note tiles (category-randnotizen.php): full text, optional image below, links stay clickable
 */

.shorts {
	align-items: start;
}

/* Two tiles per row, newest first, left to right (staggered by theme.js 5.7) */
.grid.shorts {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: auto;
	grid-auto-rows: auto;
	align-items: start;
}

/* Staggered columns (theme.js 5.7): 1px rows, each tile spans its own height plus the gap */
.grid.shorts.is-masonry {
	grid-template-rows: none;
	grid-auto-rows: 1px;
	row-gap: 0;
	align-items: start;
}

@media (max-width: 760px) {
	.grid.shorts {
		grid-template-columns: 1fr;
	}
}

/* Colour fades in reading order: the newest note is tinted most in the accent colour, each older one a little less */
.shorts > .card:nth-child(1) { --i: 0; }
.shorts > .card:nth-child(2) { --i: 1; }
.shorts > .card:nth-child(3) { --i: 2; }
.shorts > .card:nth-child(4) { --i: 3; }
.shorts > .card:nth-child(5) { --i: 4; }
.shorts > .card:nth-child(6) { --i: 5; }
.shorts > .card:nth-child(7) { --i: 6; }
.shorts > .card:nth-child(8) { --i: 7; }
.shorts > .card:nth-child(9) { --i: 8; }
.shorts > .card:nth-child(10) { --i: 9; }
.shorts > .card:nth-child(11) { --i: 10; }

/* Tint start and step per note, mixed onto a base that gets darker with every older note (dark scheme only) */
.shorts {
	--rn-tint: 40%;
	--rn-step: 3.6%;
	--rn-dark: 0%;
	--rn-border: 8.5%;
}

:root:not([data-theme="light"]) .shorts {
	--rn-tint: 26%;
	--rn-step: 4%;
	--rn-dark: 16%;
	--rn-border: 12%;
}

.shorts > .card {
	background: color-mix(in srgb,
		var(--accent) max(0%, calc(var(--rn-tint) - var(--i, 10) * var(--rn-step))),
		color-mix(in srgb, var(--surface) max(0%, calc(100% - var(--i, 10) * var(--rn-dark))), var(--bg)));
	border-color: color-mix(in srgb, var(--accent) max(0%, calc(100% - var(--i, 10) * var(--rn-border))), var(--border));
}

.card.short .body {
	gap: 10px;
}

.card.short .meta a {
	color: inherit;
}

.card.short .meta a:hover {
	color: var(--accent);
}

.short-text {
	font: 16px/1.6 var(--sans);
	overflow-wrap: anywhere;
}

.short-text > * {
	margin: 0 0 .7em;
}

.short-text > :last-child {
	margin-bottom: 0;
}

.short-text a {
	color: var(--accent);
}

.card.short .meta {
	display: flex;
	align-items: center;
	gap: 8px;
}

.star {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-left: auto;
	padding: 3px 8px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: transparent;
	color: var(--muted);
	font: 13px/1 var(--mono);
	cursor: pointer;
	transition: color .15s, border-color .15s, background .15s;
}

.star svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linejoin: round;
}

.star:hover,
.star:focus-visible {
	color: var(--str);
	border-color: var(--str);
}

.star[aria-pressed="true"] {
	color: var(--str);
	border-color: var(--str);
}

.star[aria-pressed="true"] svg {
	fill: currentColor;
}

.star.pop svg {
	animation: star-pop .35s ease-out;
}

@keyframes star-pop {
	50% { transform: scale(1.35); }
}

@media (prefers-reduced-motion: reduce) {
	.star.pop svg { animation: none; }
}

/* Images of notes from the plugin "Randnotizen" */
.short-media {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 6px;
	margin-top: 12px;
}

.short-media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
	background: var(--bg-2);
}

/* Images in tiles are never cropped: several images share a 3:2 box each (whole image, padded),
   a single image keeps its own format, is not enlarged beyond its size and at most 420 px high */
.short-media > img {
	aspect-ratio: 3 / 2;
	max-height: 260px;
	object-fit: contain;
}

.short-media:has(> img:only-child) {
	display: block;
}

.short-media:has(> img:only-child) > img {
	aspect-ratio: auto;
	width: auto;
	max-width: 100%;
	max-height: 420px;
}

.archive-desc.rn-intro {
	max-width: none;
}

.rn-intro p {
	margin: 0 0 10px;
}

.rn-intro p:last-child {
	margin-bottom: 0;
}

/* Links in the intro stand out (the theme's links are plain text otherwise); the X account gets the X logo */
.rn-intro a {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color .15s, text-decoration-color .15s;
}

.rn-intro a:hover,
.rn-intro a:focus-visible {
	color: var(--text);
	text-decoration-thickness: 2px;
}

.rn-intro a[href*="x.com/"],
.rn-intro a[href*="twitter.com/"] {
	display: inline-flex;
	align-items: center;
	gap: .4em;
	font-weight: 600;
}

.rn-intro a[href*="x.com/"]::before,
.rn-intro a[href*="twitter.com/"]::before {
	content: "";
	flex: none;
	width: .85em;
	height: .85em;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.rn-nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 16px;
	margin-top: 18px;
	font-size: 14px;
}

/* Sources and image credits only on the single post */
.short-text .rn-legal {
	display: none;
}

/* Single view of a note from the plugin "Randnotizen": sources and credits are shown there */
.rn-note.is-single .short-text .rn-legal {
	display: block;
}

.rn-legal {
	font-size: 13px;
	color: var(--muted);
}

/**
 * 7.6 - Margin note slider (start page, template-parts/notes-slider.php)
 */

.rn-slider {
	margin-bottom: 60px;
}

.rn-slider-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.rn-slider-head .cmd {
	min-width: 0;
}

.rn-slider-nav {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.rn-slider-nav button {
	width: 40px;
	height: 40px;
	border-radius: 7px;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
	font: 16px/1 var(--mono);
	cursor: pointer;
	transition: border-color .2s, color .2s;
}

.rn-slider-nav button:hover,
.rn-slider-nav button:focus-visible {
	border-color: var(--accent);
	color: var(--accent);
}

.rn-track {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding-bottom: 2px;
}

.rn-track::-webkit-scrollbar {
	display: none;
}

.rn-track:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 4px;
	border-radius: var(--radius);
}

/* Three notes side by side on wide screens, two on tablets, one on phones */
.rn-track > .card {
	flex: 0 0 calc((100% - 40px) / 3);
	scroll-snap-align: start;
	background: color-mix(in srgb, var(--accent) 14%, var(--surface));
	border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

@media (max-width: 960px) {
	.rn-track > .card { flex-basis: calc((100% - 20px) / 2); }
}

@media (max-width: 600px) {
	.rn-track > .card { flex-basis: 88%; }
}

.rn-slider-all {
	margin: 16px 0 0;
	text-align: right;
	font: 14px/1.4 var(--mono);
}

.rn-slider-all a {
	color: var(--accent);
}

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

/**
 * 8.0 - Pagination
 */

:is(.pager, .galerie-seiten) {
	margin: 44px 0 60px;
}

/* Overview pages without pager (e.g. KI-Hub, Randnotizen): same distance to the footer as below the pager */
.site-main > .wrap > .grid:last-child {
	margin-bottom: 60px;
}

:is(.pager, .galerie-seiten) .nav-links {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 13px;
}

:is(.pager, .galerie-seiten) .page-numbers {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border-radius: 7px;
	border: 1px solid var(--border);
	background: var(--surface);
	transition: border-color .2s, color .2s;
}

:is(.pager, .galerie-seiten) a.page-numbers:hover {
	border-color: var(--accent);
	color: var(--accent);
}

:is(.pager, .galerie-seiten) .page-numbers.current {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--on-accent);
}

:is(.pager, .galerie-seiten) .dots {
	border-color: transparent;
	background: transparent;
}

/**
 * 9.0 - Single post & page
 */

.progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 30;
	height: 3px;
	background: linear-gradient(90deg, var(--accent), var(--accent-2));
	transform-origin: left;
	transform: scaleX(0);
}

@supports (animation-timeline: scroll()) {
	.progress {
		animation: ep-grow linear both;
		animation-timeline: scroll(root);
	}
}

@supports not (animation-timeline: scroll()) {
	.progress { display: none; }
}

@keyframes ep-grow {
	to { transform: scaleX(1); }
}

.crumb {
	max-width: 780px;
	margin: 0 auto;
	padding: 40px 20px 0;
	font-size: 14px;
	color: var(--muted);
	overflow-wrap: anywhere;
}

.crumb a:hover { color: var(--accent); }
.crumb .file { color: var(--text); }

.post-head {
	max-width: 780px;
	margin: 0 auto;
	padding: 14px 20px 22px;
}

.post-head h1 {
	margin: 8px 0 14px;
	font-size: clamp(26px, 4vw, 42px);
	line-height: 1.15;
	letter-spacing: -.03em;
	font-weight: 800;
	overflow-wrap: anywhere;
}

.post-head .meta {
	font-size: 14px;
}

.post-head .meta a:hover {
	text-decoration: underline;
}

.post-hero {
	max-width: 1000px;
	margin: 0 auto 8px;
	padding: 0 20px;
}

.post-hero img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--radius);
	border: 1px solid var(--border);
}

/* Title and text sit on a sheet: white paper in the light scheme, dimmed paper in the dark one,
   so the reading area is calm in both and dark mode stays dark. */
.sheet {
	max-width: min(820px, calc(100% - 32px));
	margin: 24px auto 50px;
	padding: 40px 48px 48px;
	border: 1px solid var(--border);
	border-radius: 16px;
	background: var(--surface);
	color: var(--text);
	box-shadow: var(--sheet-shadow);
}

.sheet .post-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
	max-width: none;
	margin: 0 0 28px;
	padding: 0 0 22px;
	border-bottom: 1px solid var(--border);
}

.sheet .post-head h1 {
	flex: 1 0 100%;
	margin: 0;
}

.sheet .post-head .meta {
	flex: 1;
}

/* The title image floats over the sheet: wider than the text, with its own shadow. A blurred copy of the
   image (--hero-img, set in the template) shines out behind it like a light source. */
.sheet .post-hero {
	position: relative;
	isolation: isolate;
	max-width: none;
	margin: 0 -48px 32px;
	padding: 0;
}

.sheet .post-hero::before {
	content: "";
	position: absolute;
	inset: 4% 3%;
	z-index: -1;
	border-radius: var(--radius);
	background: var(--hero-img) center / cover no-repeat;
	filter: blur(36px) saturate(1.3) brightness(1.05);
	opacity: .45;
	transform: scale(1.06);
	pointer-events: none;
}

.sheet .post-head:has(+ .post-hero) {
	padding-bottom: 0;
	border-bottom: 0;
}

.sheet .post-hero img {
	border: 0;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 4px 10px rgba(0, 0, 0, .20), 0 22px 40px -14px rgba(0, 0, 0, .45);
}

@media (min-width: 1000px) {
	.sheet .post-hero {
		margin-left: -96px;
		margin-right: -96px;
	}
}

.sheet .prose {
	max-width: none;
	padding: 0;
}

.reader-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 0 16px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: transparent;
	color: var(--text);
	font: 600 15px var(--sans);
	cursor: pointer;
	transition: border-color .2s, color .2s;
}

@media (pointer: coarse) {
	.reader-toggle { min-height: 44px; }
}

.reader-toggle:hover,
.reader-toggle[aria-pressed="true"] {
	border-color: var(--accent);
	color: var(--accent);
}

/* Simplified view (button "Lesemodus"): only title, image and text on plain paper */
html[data-reader="on"] .single {
	--bg: #f4f3ef;
	--bg-2: #ebe9e3;
	--surface: #ffffff;
	--border: #dcd9d1;
	--text: #111111;
	--muted: #5b5b5b;
	--accent: #1d4ed8;
	--on-accent: #ffffff;
	color-scheme: light;
	background: var(--bg);
}

html[data-reader="on"] .single .progress,
html[data-reader="on"] .single .site-header,
html[data-reader="on"] .single .statusbar,
html[data-reader="on"] .single .crumb,
html[data-reader="on"] .single .whoami {
	display: none;
}

html[data-reader="on"] .single .sheet .post-hero {
	margin: 0 0 28px;
}

html[data-reader="on"] .single .sheet .post-hero img {
	box-shadow: none;
}

html[data-reader="on"] .single .sheet .post-hero::before {
	content: none;
}

html[data-reader="on"] .single .sheet {
	max-width: min(760px, calc(100% - 32px));
	box-shadow: none;
	border: 1px solid var(--border);
}

html[data-reader="on"] .single .post-head h1 {
	font-family: var(--sans);
	letter-spacing: -.01em;
}

html[data-reader="on"] .single .prose {
	font: 20px/1.8 Georgia, "Times New Roman", serif;
}

html[data-reader="on"] .single .prose h2,
html[data-reader="on"] .single .prose h3,
html[data-reader="on"] .single .prose h4 {
	font-family: var(--sans);
}

html[data-reader="on"] .single .prose h2::before,
html[data-reader="on"] .single .prose h3::before,
html[data-reader="on"] .single .prose h4::before,
html[data-reader="on"] .single figcaption::before {
	content: none;
}

html[data-reader="on"] .single .prose ul li::marker {
	content: "• ";
	font-family: inherit;
}

@media (max-width: 600px) {
	.sheet {
		margin-top: 16px;
		padding: 26px 20px 32px;
	}

	.sheet .post-head .meta {
		flex-basis: 100%;
	}

	.sheet .post-hero {
		margin: 0 -20px 26px;
	}
}

.prose {
	max-width: 740px;
	margin: 0 auto;
	padding: 28px 20px 50px;
	font: 18px/1.75 var(--sans);
	overflow-wrap: break-word;
}

/* About page: the sheet and the prose are the same element */
.prose.sheet {
	max-width: min(820px, calc(100% - 32px));
	padding: 40px 48px 48px;
}

@media (max-width: 600px) {
	.prose.sheet {
		padding: 26px 20px 32px;
	}
}

.prose > * {
	margin-top: 0;
	margin-bottom: 1.2em;
}

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

.prose h2,
.prose h3,
.prose h4 {
	margin: 1.9em 0 .55em;
	font-family: var(--mono);
	font-weight: 800;
}

.prose h2 { font-size: 25px; }
.prose h3 { font-size: 21px; }
.prose h4 { font-size: 18px; }

.prose h2::before { content: "## "; color: var(--accent); }
.prose h3::before { content: "### "; color: var(--accent); }
.prose h4::before { content: "#### "; color: var(--accent); }

.prose a {
	color: var(--accent);
	background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
	transition: background-size .3s;
}

.prose a:hover {
	background-size: 0 1px;
	background-position: right bottom;
}

.prose ul,
.prose ol {
	padding-left: 1.4em;
}

.prose li {
	margin-bottom: .35em;
}

.prose ul li::marker {
	content: "› ";
	color: var(--accent);
	font-family: var(--mono);
}

.prose img {
	border-radius: 8px;
}

.prose hr {
	height: 0;
	border: 0;
	border-top: 1px dashed var(--border);
	margin: 2.4em 0;
}

.prose :not(pre) > code,
.prose kbd {
	padding: 2px 6px;
	border-radius: 5px;
	border: 1px solid var(--border);
	background: var(--bg-2);
	color: var(--accent);
	font: .84em var(--mono);
}

/* Code blocks: a plain <pre> until theme.js wraps it into a window */
.prose pre,
.prose .wp-block-code {
	margin: 26px 0;
	padding: 14px 16px;
	overflow: auto;
	border: 1px solid var(--ed-border);
	border-radius: var(--radius);
	background: var(--ed-bg);
	color: var(--ed-text);
	font: 13.5px/1.75 var(--mono);
	tab-size: 4;
}

.prose pre code {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
}

.prose .win {
	margin: 26px 0;
}

.prose .win pre {
	margin: 0;
	border: 0;
	border-radius: 0;
}

.prose .win pre.src {
	padding: 14px 0;
}

/* Blockquote as code comment */
.prose blockquote,
.prose .wp-block-quote {
	margin: 26px 0;
	padding: 14px 18px;
	border-left: 3px solid var(--accent);
	border-radius: 0 8px 8px 0;
	background: color-mix(in srgb, var(--accent) 7%, var(--surface));
	color: var(--muted);
	font: 15.5px/1.7 var(--mono);
}

.prose blockquote::before {
	content: "/* ";
	color: var(--accent);
}

.prose blockquote p:last-of-type::after {
	content: " */";
	color: var(--accent);
}

.prose blockquote p {
	display: inline;
	margin: 0;
}

.prose blockquote p + p::before {
	content: "\A";
	white-space: pre;
}

.prose blockquote cite {
	display: block;
	margin-top: 6px;
	font-style: normal;
	font-size: 13px;
}

.prose blockquote cite::before {
	content: "// ";
}

/* Tweets are shown as plain quotes (the X widget script is removed) */
.prose .twitter-tweet {
	max-width: 550px;
}

/* Author box: a light card that matches the white sheet */
.whoami {
	margin-top: 46px;
	padding: 18px 20px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg-2);
	font-size: 13.5px;
}

.whoami .term-body {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.whoami .av {
	flex: none;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 8px;
	background: var(--accent);
	color: var(--on-accent);
	font: 700 18px var(--mono);
}

.whoami .pr {
	color: var(--muted);
	font-family: var(--mono);
}

.whoami a {
	background: none;
}

.whoami strong {
	color: var(--text);
	font: 700 15px var(--mono);
}

.whoami a:hover strong {
	color: var(--accent);
}

.whoami p {
	margin: 4px 0 0;
	color: var(--muted);
	font: 15px/1.6 var(--sans);
}

.nextprev {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-top: 22px;
	font-size: 13px;
}

.nextprev a {
	display: block;
	padding: 14px 16px;
	border-radius: 8px;
	border: 1px solid var(--border);
	background: var(--surface);
	transition: border-color .25s, transform .25s;
}

.nextprev a:hover {
	border-color: var(--accent);
	transform: translateY(-3px);
}

.nextprev small {
	display: block;
	margin-bottom: 4px;
	color: var(--accent);
}

.nextprev .next {
	grid-column: 2;
	text-align: right;
}

@media (max-width: 560px) {
	.nextprev { grid-template-columns: 1fr; }
	.nextprev .next { grid-column: auto; text-align: left; }
}

.link-pages {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font: 13px var(--mono);
}

.post-edit {
	margin-top: 20px;
	font-size: 13px;
}

.post-edit a {
	color: var(--accent);
}

/* 404 / nothing found */
.not-found {
	max-width: 780px;
	margin: 0 auto;
	padding: 60px 20px 80px;
}

.not-found .win {
	margin-bottom: 26px;
}

.not-found .err {
	color: #f87171;
}

.not-found p a {
	color: var(--accent);
}

/**
 * 10.0 - WordPress content
 */

.alignleft {
	float: left;
	margin: .3em 1.4em 1em 0;
}

.alignright {
	float: right;
	margin: .3em 0 1em 1.4em;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.alignwide {
	margin-left: calc(50% - 46vw);
	margin-right: calc(50% - 46vw);
	max-width: 92vw;
}

@media (min-width: 1100px) {
	.alignwide {
		margin-left: -130px;
		margin-right: -130px;
		max-width: none;
	}
}

.alignfull {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	max-width: 100vw;
}

.wp-caption,
figure {
	max-width: 100%;
	margin: 26px 0;
}

.wp-caption-text,
figcaption,
.wp-element-caption {
	margin-top: 8px;
	font: 14px var(--mono);
	color: var(--muted);
	text-align: center;
}

figcaption::before,
.wp-caption-text::before {
	content: "// ";
	color: var(--accent);
}

/* Galerien mit verschachtelten Bildblöcken (has-nested-images) nutzen das
   Flex-Layout von WordPress; im Raster würden deren Prozentbreiten die Bilder
   auf Briefmarkengröße schrumpfen. */
.gallery,
.wp-block-gallery:not(.has-nested-images) {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 10px;
}

/* Das Layout-CSS von WordPress (.is-layout-flex) fehlt im klassischen Theme. */
.wp-block-gallery.has-nested-images {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--style--unstable-gallery-gap, 16px);
}

.gallery-item {
	margin: 0;
}

.prose table {
	width: 100%;
	border-collapse: collapse;
	font: 14px var(--mono);
	display: block;
	overflow-x: auto;
}

.prose th,
.prose td {
	padding: 8px 12px;
	border: 1px solid var(--border);
	text-align: left;
}

.prose th {
	background: var(--bg-2);
}

.wp-block-embed iframe,
.wp-block-embed .embed-privacy-container {
	max-width: 100%;
	border-radius: var(--radius);
}

.wp-block-button__link,
.wp-element-button {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 8px;
	background: var(--accent);
	color: var(--on-accent) !important;
	font: 600 14px var(--mono);
	background-image: none !important;
}

.wp-block-separator {
	border: 0;
	border-top: 1px dashed var(--border);
}

.has-text-align-center { text-align: center; }
.has-text-align-right { text-align: right; }

.bypostauthor {
	display: block;
}

/**
 * 11.0 - Forms, search, widgets, comments
 */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="password"],
textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: var(--surface);
	font: 14px var(--mono);
	transition: border-color .2s;
}

input:focus,
textarea:focus {
	outline: none;
	border-color: var(--accent);
}

button,
input[type="submit"] {
	padding: 10px 16px;
	border: 1px solid var(--accent);
	border-radius: 8px;
	background: var(--accent);
	color: var(--on-accent);
	font: 600 14px var(--mono);
	cursor: pointer;
}

.icon-btn,
.win-bar .copy,
.mobile-nav .dropdown-toggle {
	font-weight: 400;
}

.search-form {
	display: flex;
	gap: 8px;
}

.search-form label {
	flex: 1;
}

.widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 30px;
	padding-top: 40px;
	padding-bottom: 40px;
	border-top: 1px solid var(--border);
	font-size: 14px;
}

.widget-title {
	font-size: 14px;
	color: var(--accent);
}

.widget-title::before {
	content: "// ";
}

.widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.widget li {
	padding: 4px 0;
}

.widget a:hover {
	color: var(--accent);
}

.comments {
	max-width: 740px;
	margin: 0 auto 60px;
	padding: 0 20px;
}

.comment-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.comment-list .comment {
	padding: 16px 0;
	border-top: 1px solid var(--border);
}

.comment-list .children {
	padding-left: 24px;
	list-style: none;
}

.comment-author img {
	display: inline-block;
	border-radius: 6px;
	vertical-align: middle;
	margin-right: 8px;
}

.comment-content {
	font-family: var(--sans);
}

/**
 * 12.0 - Footer / status bar
 */

.site-main {
	flex: 1 0 auto;
}

.statusbar {
	display: flex;
	align-items: stretch;
	grid-auto-rows: 1fr;
	justify-content: space-between;
	min-height: 44px;
	font-size: 13px;
	color: #e8f0ff;
	background: #1d4ed8;
}

.statusbar .l,
.statusbar .r {
	display: flex;
	align-items: stretch;
	grid-auto-rows: 1fr;
	overflow: hidden;
}

.statusbar span,
.statusbar a {
	display: flex;
	align-items: center;
	padding: 0 10px;
	white-space: nowrap;
}

.statusbar .mode {
	background: #1e3a8a;
	font-weight: 700;
	letter-spacing: .05em;
}

.statusbar a:hover {
	background: rgba(255, 255, 255, .12);
}

@media (max-width: 640px) {
	.statusbar .hide-s,
	.cmd .hide-s { display: none; }
	.cmd { font-size: 13px; }
}

/**
 * 12.45 - Projects page: every project is a group block with the class "project"
 */

.prose .project {
	margin: 0 0 18px;
	padding: 20px 22px 6px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	transition: border-color .2s, transform .2s;
}

.prose .project:hover {
	border-color: var(--accent);
	transform: translateY(-2px);
}

.prose .project > h2 {
	margin-top: 0;
	font-size: 22px;
}

/* Teaser tiles on the projects pages: icon, title, one sentence, the whole tile links to the project */
.prose .teaser-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 14px;
	margin: 0 0 30px;
	padding: 0;
	list-style: none;
}

.prose .teaser-grid li {
	margin: 0;
	padding: 0;
}

.prose .teaser-grid li::marker {
	content: none;
}

.prose .teaser {
	display: grid;
	grid-template-columns: 40px 1fr;
	gap: 4px 14px;
	height: 100%;
	padding: 16px 18px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--muted);
	font-size: 15px;
	line-height: 1.5;
	text-decoration: none;
	transition: border-color .2s, transform .2s;
}

.prose .teaser:hover,
.prose .teaser:focus-visible {
	border-color: var(--accent);
	transform: translateY(-2px);
}

.prose .teaser svg {
	grid-row: span 2;
	width: 40px;
	height: 40px;
	color: var(--accent);
}

.prose .teaser strong {
	color: var(--text);
	font-size: 17px;
}

/* Download box of the published plugins and tools (shortcode [projekt_download], must-use plugin) */
.prose .download-box {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	margin: 0 0 24px;
	padding: 16px 20px;
	border: 1px solid var(--accent);
	border-radius: var(--radius);
	background: var(--surface);
}

.prose .download-box p {
	margin: 0;
	color: var(--muted);
	font-size: 15px;
}

.prose .download-box strong {
	color: var(--text);
}

.prose .download-box a.button {
	padding: 9px 18px;
	border-radius: 8px;
	font-weight: 600;
	color: var(--on-accent);
	background: var(--accent);
	text-decoration: none;
}

.prose .download-box a.button:hover {
	filter: brightness(1.1);
}

/**
 * 12.5 - About page (page-ueber-mich.php)
 */

.about .crumb { max-width: var(--wrap); }

.about-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
	gap: 48px;
	align-items: center;
	padding-top: 26px;
	padding-bottom: 20px;
}

.about-intro .kicker {
	margin: 0 0 6px;
	font: 14px var(--mono);
	color: var(--muted);
}

.about-intro .kicker .pr { color: var(--accent); }

.about-intro h1 {
	margin: 0 0 10px;
	font-size: clamp(34px, 5.4vw, 60px);
	line-height: 1.08;
	letter-spacing: -.035em;
	font-weight: 800;
}

.about-intro h1 .c {
	color: var(--muted);
	font-weight: 500;
}

.about-intro .role {
	margin: 0 0 18px;
	font: 600 15px/1.5 var(--mono);
	color: var(--accent);
}

.about-intro .role .sep { margin: 0 6px; color: var(--muted); }

.about-intro .lead {
	max-width: 56ch;
	margin: 0 0 24px;
	font-size: 18px;
	line-height: 1.65;
	color: var(--muted);
}

.about-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
}

.btn {
	display: inline-flex;
	align-items: center;
	padding: 10px 18px;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: var(--surface);
	color: var(--text);
	font: 600 14px var(--mono);
	transition: transform .2s, border-color .2s, box-shadow .2s;
}

.btn:hover {
	transform: translateY(-2px);
	border-color: var(--accent);
}

.btn.primary {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--on-accent);
	box-shadow: 0 10px 24px -12px var(--accent);
}

.btn.primary:hover { box-shadow: 0 14px 28px -10px var(--accent); }

.btn .arr { margin-left: .4em; }

.about-photo { margin: 0; }

.about-photo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
}

.about-photo figcaption {
	display: flex;
	justify-content: space-between;
	padding: 8px 14px;
	background: var(--ed-status, #1d4ed8);
	color: #c7d6f2;
	font: 11px var(--mono);
}

.about-facts { padding-top: 10px; padding-bottom: 10px; }

.about-facts dl {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
}

.about-facts dl > div {
	padding: 14px 16px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
}

.about-facts dt {
	margin: 0 0 4px;
	font: 12px var(--mono);
	color: var(--accent);
}

.about-facts dt::before { content: "// "; opacity: .6; }

.about-facts dd {
	margin: 0;
	font-weight: 600;
	line-height: 1.4;
}


.about-points,
.about-tags,
.about-path { list-style: none; padding-left: 0; }

.about-points li,
.about-tags li,
.about-path li { list-style: none; }

.prose .about-points li::marker,
.prose .about-tags li::marker,
.prose .about-path li::marker { content: none; }

.about-points li {
	position: relative;
	margin: 0 0 12px;
	padding-left: 26px;
}

.about-points li::before {
	content: ">";
	position: absolute;
	left: 0;
	font: 700 15px var(--mono);
	color: var(--accent);
}

.about-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.about-tags li {
	margin: 0;
	padding: 4px 11px;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--surface);
	font: 13px var(--mono);
	color: var(--muted);
}

.about-path {
	position: relative;
	margin-left: 6px;
	border-left: 2px solid var(--border);
}

.about-path li {
	position: relative;
	display: grid;
	gap: 2px;
	margin: 0 0 20px;
	padding-left: 24px;
}

.about-path li::before {
	content: "";
	position: absolute;
	left: -7px;
	top: 6px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 0 4px var(--bg);
}

.about-path .k { font: 12px var(--mono); color: var(--accent); }
.about-path span:last-child { font-size: 16px; color: var(--muted); }

.about-cta { margin-top: 40px; }

.about-cta .term-body { display: grid; gap: 10px; padding: 18px 18px 22px; }
.about-cta .out { color: #c7d6f2; }
.about-cta .btn { margin-top: 4px; }

@media (max-width: 900px) {
	.about-hero { grid-template-columns: 1fr; gap: 28px; }
	.about-photo { max-width: 340px; }
	.about-facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.about-facts dl > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
	.about-facts dl { grid-template-columns: 1fr; }
	.about-links .btn { flex: 1 1 auto; justify-content: center; }
}

/**
 * 12.6 - Image lightbox (built by theme.js on the first click on a content image)
 */

.post-hero img[data-lb],
.prose img[data-lb] {
	cursor: zoom-in;
}

html:has(.lb[open]) {
	overflow: hidden;
}

.lb {
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	padding: 3vh 2vw;
	border: 0;
	background: transparent;
	color: var(--ed-text);
}

.lb[open] {
	display: grid;
	place-items: center;
	animation: lb-in .18s ease-out;
}

.lb::backdrop {
	background: rgba(4, 9, 20, .84);
	backdrop-filter: blur(6px);
}

.lb-win {
	display: flex;
	flex-direction: column;
	width: min(1100px, 100%);
	max-height: 94vh;
}

.lb-win .win-bar {
	flex: none;
}

.lb-win .title {
	max-width: 62%;
}

.lb-count {
	position: absolute;
	left: 14px;
	color: var(--kw);
}

.lb-x {
	position: absolute;
	right: 4px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #9fb0d0;
	cursor: pointer;
	transition: background .2s, color .2s;
}

.lb-x svg {
	width: 10px;
	height: 10px;
}

.lb-x:hover,
.lb-x:focus-visible {
	background: #2563eb;
	color: #fff;
}

.lb-stage {
	position: relative;
	display: grid;
	place-items: center;
	min-height: 160px;
	background: #060c18;
	overflow: hidden;
}

.lb-stage img {
	display: block;
	max-width: 100%;
	max-height: 76vh;
	width: auto;
	height: auto;
	border-radius: 0;
	filter: none;
	cursor: pointer;
	transition: opacity .2s;
}

.lb.is-loading .lb-stage img {
	opacity: .25;
}

.lb-nav {
	position: absolute;
	top: 50%;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	padding: 0 0 4px;
	border: 1px solid var(--ed-border);
	border-radius: 50%;
	background: rgba(10, 18, 34, .78);
	color: var(--ed-text);
	font: 26px/1 var(--mono);
	cursor: pointer;
	transition: background .2s, border-color .2s;
}

.lb-nav:hover,
.lb-nav:focus-visible {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--on-accent);
}

.lb-prev { left: 12px; }
.lb-next { right: 12px; }

.lb.is-single .lb-nav {
	display: none;
}

.lb-cap {
	flex: none;
	margin: 0;
	padding: 10px 16px 12px;
	border-top: 1px solid var(--ed-border);
	font: 12.5px var(--mono);
	color: #9fb0d0;
	text-align: center;
}

.lb-cap:empty {
	display: none;
}

.lb-cap::before {
	content: "// ";
	color: var(--kw);
}

@keyframes lb-in {
	from { opacity: 0; transform: scale(.97); }
	to   { opacity: 1; transform: none; }
}

@media (max-width: 600px) {
	.lb { padding: 2vh 8px; }
	.lb-stage img { max-height: 72vh; }
	.lb-nav { width: 38px; height: 38px; margin-top: -19px; }
	.lb-prev { left: 6px; }
	.lb-next { right: 6px; }
}

/**
 * 13.0 - Reduced motion
 */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}

	.progress { display: none; }
}
