/* =========================================================
   dennis.pohlmann.blog — minimal blog template
   Ground-up rewrite. No grid tricks, no box-in-box,
   no Featured badges. Just cards with spacing.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Serif:ital,wght@0,400;0,500;1,400&family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

:root {
	--ink:           #1a1c20;
	--ink-soft:      #3c3e44;
	--paper:         #ffffff;
	--page:          #f5f4f1;
	--page-deep:     #1a1c20;
	--rule-soft:     #e6e5e1;
	--muted:         #6e7079;

	--font-display:  'IBM Plex Sans', system-ui, -apple-system, sans-serif;
	--font-body:     'IBM Plex Serif', Georgia, serif;

	--container:     1080px;
	--gutter:        1.5rem;
	--radius:        6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 16.5px;
	line-height: 1.7;
	color: var(--ink);
	background: var(--page);
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	position: relative;
	overflow-x: hidden;
}

/* =========================================================
   BACKGROUND PATTERN
   Pure-CSS blurred geometric muster — soft pastel blobs
   layered with a faint grid. Gives the page a subtle techy
   ambient texture without any animation or images.
   ========================================================= */
body {
	background-color: var(--page);
	background-image:
		/* Soft colored blobs */
		radial-gradient(circle at 12% 18%, rgba(125, 211, 168, 0.22) 0%, transparent 28%),
		radial-gradient(circle at 88% 14%, rgba(99, 179, 237, 0.18) 0%, transparent 30%),
		radial-gradient(circle at 78% 78%, rgba(247, 178, 103, 0.18) 0%, transparent 32%),
		radial-gradient(circle at 18% 82%, rgba(187, 134, 252, 0.18) 0%, transparent 30%),
		radial-gradient(circle at 50% 50%, rgba(125, 211, 168, 0.10) 0%, transparent 40%),
		/* Faint grid overlay */
		linear-gradient(rgba(26, 28, 32, 0.025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(26, 28, 32, 0.025) 1px, transparent 1px);
	background-size:
		100% 100%,
		100% 100%,
		100% 100%,
		100% 100%,
		100% 100%,
		40px 40px,
		40px 40px;
	background-attachment: fixed, fixed, fixed, fixed, fixed, fixed, fixed;
}

/* Content stays above the background */
.site-header,
.site-banner,
.site-main,
.site-bottom,
.site-footer { position: relative; z-index: 1; }

.site-header, .site-banner, .site-bottom, .site-footer { flex: 0 0 auto; }
.site-main { flex: 1 0 auto; }

img, svg { max-width: 100%; height: auto; display: block; }

a {
	color: var(--ink);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, h4, h5 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.015em;
	margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

.container {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

/* ---------- Header ---------- */
.site-header {
	background: var(--paper);
	border-bottom: 1px solid var(--rule-soft);
	padding: 2.75rem 0;
	box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	flex-wrap: wrap;
}
.brand {
	display: inline-flex;
	align-items: baseline;
	gap: 0.6rem;
	font-family: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
	font-weight: 700;
	font-size: clamp(1.9rem, 4.5vw, 3.25rem);
	letter-spacing: -0.03em;
	text-decoration: none;
	color: var(--ink);
	line-height: 1;
}
.brand::before {
	content: "$";
	color: #16a34a;                     /* terminal green */
	font-weight: 800;
	font-size: 0.85em;
}
.brand::after {
	content: "_";
	color: #16a34a;
	font-weight: 800;
	animation: brand-blink 1s steps(2) infinite;
}
@keyframes brand-blink {
	0%, 49%   { opacity: 1; }
	50%, 100% { opacity: 0; }
}
.site-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 1.5rem;
	flex-wrap: wrap;
}
.site-nav a {
	font-family: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--ink-soft);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a::before {
	content: "› ";
	color: #16a34a;
	opacity: 0.7;
}

/* ---------- Banner ---------- */
.site-banner {
	background: var(--page-deep);
	color: var(--paper);
	padding: clamp(2rem, 5vw, 3.5rem) 0;
	text-align: center;
}
.site-banner * { color: var(--paper); }

/* ---------- Main ---------- */
.site-main {
	padding: 2.5rem 0 3rem;
}

/* The page heading ("Home", category names) — Joomla outputs them at the top of .site-main */
.site-main > .container > h1,
.site-main > .container > h2,
.site-main .page-header,
.site-main .page-header h1,
.site-main .page-header h2,
.com-content-category-blog__title,
.com-content-featured__title {
	color: var(--ink);
	font-family: var(--font-display);
	font-weight: 600;
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	letter-spacing: -0.01em;
	margin: 0 0 1.5rem;
}

/* Breadcrumb */
.breadcrumb,
.mod-breadcrumbs,
ul.breadcrumb {
	color: var(--muted);
	font-family: var(--font-display);
	font-size: 0.85rem;
	list-style: none;
	padding: 0;
	margin: 0 0 1.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}
.breadcrumb li,
.mod-breadcrumbs li { color: var(--muted); }
.breadcrumb a,
.mod-breadcrumbs a {
	color: var(--ink-soft);
	text-decoration: none;
}
.breadcrumb a:hover,
.mod-breadcrumbs a:hover {
	color: var(--ink);
	text-decoration: underline;
}

/* =========================================================
   ARTICLE CARDS — defensive selectors.
   Apply card style to every wrapper class Joomla might emit
   for an individual article in a blog/featured view.
   ========================================================= */

/* Wrappers — completely transparent and forced to stack */
.blog,
.com-content-category-blog,
.com-content-featured,
.items-leading,
.items-row,
.com-content-category-blog__items,
.com-content-featured__items {
	display: block !important;
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0;
	margin: 0;
	/* Override any Bootstrap row/grid that would put them side by side */
	flex-direction: column;
	flex-wrap: nowrap;
	float: none;
	width: 100%;
}

/* Force every direct child of .items-row to stack as a block,
   in case Joomla uses columns (.col-md-6, .row-fluid, etc.) */
.items-row > *,
.items-leading > *,
.com-content-category-blog__items > *,
.com-content-featured__items > * {
	float: none !important;
	clear: both !important;
	width: 100% !important;
	max-width: 100% !important;
	display: block !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* THE CARD — target every class Joomla 3/4/5/6 might use for an article */
.blog-item,
.com-content-category-blog__item,
.com-content-featured__item,
.items-leading > .item,
.items-row > .item,
.items-row > [class*="item-"],
.items-leading > [class*="item-"] {
	position: relative;
	background: var(--paper);
	border: 1px solid var(--rule-soft);
	border-radius: var(--radius);
	padding: 2rem;
	margin: 0 0 2rem !important;
	box-shadow: 0 1px 3px rgba(0,0,0,.04);
	display: block;
	width: 100%;
	float: none;
	clear: both;
}

/* Extra space between BOTTOM articles only (inside .items-row) */
.items-row > * {
	margin-bottom: 4rem !important;
}

/* Decorative separator BELOW each bottom card (except the last one)
   — a thin horizontal line in the gap between cards. */
.items-row > *:not(:last-child)::after,
.com-content-category-blog__items > *:not(:last-child)::after {
	content: "";
	display: block;
	position: absolute;
	left: 50%;
	bottom: -2.2rem;
	transform: translateX(-50%);
	width: 80px;
	height: 1px;
	background: var(--ink);
	opacity: 0.35;
}

/* ===== FEATURED BADGE on the leading article ===== */
.items-leading > .blog-item,
.items-leading > .item,
.items-leading > .com-content-category-blog__item,
.items-leading > .com-content-featured__item,
.items-leading > [class*="item-"] {
	border-top: 3px solid var(--ink);
	padding-top: 2.5rem;
}

.items-leading > .blog-item::before,
.items-leading > .item::before,
.items-leading > .com-content-category-blog__item::before,
.items-leading > .com-content-featured__item::before,
.items-leading > [class*="item-"]::before {
	content: "Featured";
	position: absolute;
	top: 0;
	left: 2rem;
	transform: translateY(-50%);
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-display);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	padding: 0.3rem 0.65rem;
	border: 1px solid var(--ink);
	border-radius: 4px;
	z-index: 2;
}

/* If .blog-item ends up nested inside another article wrapper, reset it */
.blog-item .blog-item,
.com-content-category-blog__item .blog-item,
.com-content-featured__item .blog-item,
.items-row .item .blog-item,
.items-leading .item .blog-item {
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0 !important;
	box-shadow: none;
}

/* Title */
.blog-item h2,
.com-content-category-blog__item h2,
.com-content-featured__item h2,
.items-leading > .item h2,
.items-row > .item h2 {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 600;
	margin: 0 0 1rem;
	line-height: 1.25;
}
.blog-item h2 a,
.com-content-category-blog__item h2 a,
.com-content-featured__item h2 a,
.items-leading > .item h2 a,
.items-row > .item h2 a {
	color: var(--ink);
	text-decoration: none;
}
.blog-item h2 a:hover,
.com-content-category-blog__item h2 a:hover,
.com-content-featured__item h2 a:hover { color: var(--muted); }

/* Meta (date, author, category) */
.article-info,
dl.article-info {
	font-family: var(--font-display);
	font-size: 0.85rem;
	color: var(--muted);
	margin: 0 0 1rem;
	font-style: normal;
}
.article-info dd,
.article-info dt {
	display: inline;
	margin: 0;
	padding: 0;
}
.article-info dd + dd::before {
	content: " · ";
}

/* Images */
.blog-item img,
.com-content-category-blog__item img,
.com-content-featured__item img,
.items-leading > .item img,
.items-row > .item img {
	max-width: 100%;
	height: auto;
	margin: 1rem 0;
	border-radius: 4px;
}

/* Body text */
.blog-item p,
.com-content-category-blog__item p,
.com-content-featured__item p,
.items-leading > .item p,
.items-row > .item p {
	margin: 0 0 1em;
	line-height: 1.7;
}

/* Read more link — compact */
.readmore,
p.readmore {
	margin: 2rem 0 1.5rem;
}
.readmore a,
p.readmore a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-family: var(--font-display);
	font-size: 0.8rem;
	font-weight: 500;
	text-decoration: none;
	color: var(--ink);
	background: transparent;
	border: 1px solid var(--ink);
	border-radius: 4px;
	padding: 0.4rem 0.85rem;
	transition: background-color .15s, color .15s, gap .2s ease;
}
.readmore a::after,
p.readmore a::after {
	content: "→";
	transition: transform .2s ease;
}
.readmore a:hover,
p.readmore a:hover {
	background: var(--ink);
	color: var(--paper);
	gap: 0.6rem;
}

/* ---------- Single article view ---------- */
.item-page {
	background: var(--paper);
	border: 1px solid var(--rule-soft);
	border-radius: var(--radius);
	padding: clamp(1.5rem, 3vw, 2.5rem);
	margin: 0 auto;
	box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.item-page h1, .item-page h2.page-header {
	font-family: var(--font-display);
	font-size: clamp(1.6rem, 3vw, 2.25rem);
	margin: 0 0 1rem;
}
.item-page img {
	margin: 1rem 0;
	border-radius: 4px;
}

/* ---------- Pagination ---------- */
.pagination {
	display: flex;
	list-style: none;
	padding: 1rem;
	margin: 2rem 0 0;
	gap: 0.4rem;
	justify-content: center;
	background: var(--paper);
	border: 1px solid var(--rule-soft);
	border-radius: var(--radius);
}
.pagination li { margin: 0; }
.pagination a, .pagination span {
	padding: 0.4rem 0.75rem;
	text-decoration: none;
	font-family: var(--font-display);
	font-size: 0.9rem;
	color: var(--ink);
}
.pagination .active span,
.pagination [aria-current="page"] {
	background: var(--ink);
	color: var(--paper);
	border-radius: 4px;
}

/* ---------- Bottom modules ---------- */
.site-bottom {
	padding: 2rem 0;
	border-top: 1px solid var(--rule-soft);
}

/* ---------- Footer ---------- */
.site-footer {
	background: var(--page-deep);
	color: #a8aab1;
	padding: 1.9rem 0 1.5rem;
	font-size: 0.66rem;
	text-align: center;
}
.site-footer a { color: var(--paper); text-decoration: none; }
.footer-social {
	display: flex;
	justify-content: center;
	gap: 1.5rem;
	flex-wrap: wrap;
	margin-bottom: 1.1rem;
}
.social-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-family: var(--font-display);
	font-size: 0.68rem;
	color: #a8aab1;
}
.social-link svg {
	width: 15px;
	height: 15px;
}
.social-link:hover { color: var(--paper); }
.copyright {
	margin: 0;
	font-family: var(--font-display);
	font-size: 0.62rem;
	opacity: 0.6;
}

/* ---------- Forms ---------- */
input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="url"], textarea, select {
	font-family: var(--font-display);
	font-size: 0.95rem;
	color: var(--ink);
	background: var(--paper);
	border: 1px solid var(--rule-soft);
	padding: 0.55rem 0.8rem;
	width: 100%;
	border-radius: 4px;
}
button, input[type="submit"], input[type="button"] {
	font-family: var(--font-display);
	font-size: 0.85rem;
	background: var(--ink);
	color: var(--paper);
	border: 1px solid var(--ink);
	padding: 0.6rem 1.2rem;
	cursor: pointer;
	border-radius: 4px;
}

/* ---------- Error page ---------- */
.error-page { background: var(--page); }
.error-container {
	min-height: 60vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	padding: 3rem 0;
}
.error-code {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(4rem, 12vw, 8rem);
	margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
	body { font-size: 16px; }
	.site-header__inner { justify-content: center; }
	.blog-item { padding: 1.5rem; }
}
