/*
Theme Name: Jonathan Eloot
Theme URI: https://jonathan-eloot.be
Author: Jonathan Eloot
Description: Custom lightweight blog theme for jonathan-eloot.be. Classic theme, no page builder, no jQuery.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: jonathan-eloot
License: GPL-2.0-or-later
*/

/* ---------- Fonts (self-hosted) ---------- */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/newsreader-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 400; font-display: swap; src: url("assets/fonts/newsreader-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/newsreader-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
	--bg: #FFFFFF;
	--ink: #1A1A1A;
	--ink-2: #333333;
	--label: #555555;
	--rule: #E6E6E6;
	--panel: #F6F6F4;
	--lime: #D2F34C;

	--sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--serif: "Newsreader", Georgia, "Times New Roman", serif;
	--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--wrap: 1060px;
	--measure: 720px;
	--gutter: 24px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink-2);
	font-family: var(--serif);
	font-size: 18px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--sans); font-weight: 600; color: var(--ink); line-height: 1.15; margin: 0; }
p { margin: 0 0 1em; }
a { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--lime); color: var(--ink); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; left: 16px; top: -100px; z-index: 100;
	background: var(--lime); color: var(--ink); border: 1px solid var(--ink);
	font-family: var(--sans); font-weight: 600; padding: 12px 16px; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.wrap { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.label {
	font-family: var(--mono); font-size: 13px; font-weight: 400; line-height: 1.4;
	text-transform: uppercase; letter-spacing: 0.07em; color: var(--label);
}

.highlight {
	background: var(--lime); color: var(--ink);
	padding: 0 0.12em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

.section-rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* ---------- Buttons ---------- */
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 44px; padding: 10px 18px;
	font-family: var(--sans); font-size: 15px; font-weight: 600; line-height: 1.2;
	color: var(--ink); background: var(--bg); border: 1px solid var(--ink);
	text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--panel); }
.btn--primary { background: var(--lime); }
.btn--primary:hover { background: #c4e63c; }

/* ---------- Header ---------- */
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; border-bottom: 1px solid var(--rule); }
.site-header { padding-top: 8px; }
.wordmark {
	display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
	font-family: var(--sans); font-weight: 600; font-size: 17px; letter-spacing: -0.01em;
	color: var(--ink); text-decoration: none;
}
.wordmark__dot { width: 11px; height: 11px; border-radius: 50%; background: var(--lime); border: 1px solid var(--ink); flex: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
	font-family: var(--sans); font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
.site-nav a[aria-current="page"], .site-nav a.is-current {
	text-decoration: underline; text-decoration-color: var(--lime);
	text-decoration-thickness: 3px; text-underline-offset: 6px;
}

/* ---------- Hero ---------- */
.hero { padding-top: 88px; padding-bottom: 80px; }
.hero__title {
	font-size: clamp(40px, 7vw, 76px); letter-spacing: -0.035em; line-height: 1.2;
	margin: 18px 0 28px;
}
@media (min-width: 900px) {
	.hero__line { display: block; }
	.hero__title .highlight, .page-hero__title .highlight { white-space: nowrap; }
}
.hero__lead { font-size: 19px; line-height: 1.65; max-width: 34em; margin: 0; }

/* ---------- Article list ---------- */
.latest { padding-top: 64px; padding-bottom: 72px; }
.latest__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.latest__head h1, .latest__head h2 { font-size: 26px; letter-spacing: -0.02em; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.filters a {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
	font-family: var(--mono); font-size: 13px; color: var(--ink);
	border: 1px solid var(--rule); text-decoration: none;
}
.filters a:hover { border-color: var(--ink); }
.filters a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.card { position: relative; }
.card__title { font-size: 19px; letter-spacing: -0.01em; line-height: 1.25; margin: 10px 0 8px; }
.card__title a { text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.card:has(a:focus-visible) { outline: 3px solid var(--ink); outline-offset: 4px; }
.card a:focus-visible { outline: none; }
.card__excerpt { font-size: 17px; line-height: 1.55; margin: 0; }

.card--featured { background: var(--panel); padding: 40px 40px 44px; margin-bottom: 36px; }
.card--featured .card__title { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.025em; max-width: 22ch; margin: 14px 0 16px; }
.card--featured .card__excerpt { font-size: 18px; max-width: 34em; }
.card--has-image { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.card--has-image .card__media { order: 2; }
.card__media img { width: 100%; aspect-ratio: 1200 / 627; object-fit: cover; border: 1px solid var(--rule); background: #fff; }
@media (max-width: 760px) {
	.card--has-image { grid-template-columns: 1fr; gap: 24px; }
	.card--has-image .card__media { order: 0; }
}

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; list-style: none; margin: 0; padding: 0; }
.card-grid .card { border-top: 2px solid var(--ink); padding-top: 18px; }

/* ---------- Contact CTA / footer ---------- */
.site-footer { padding: 88px 0 48px; }
.cta__title { font-size: clamp(32px, 4.6vw, 48px); letter-spacing: -0.03em; line-height: 1.08; max-width: 20ch; }
.colophon { margin-top: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.colophon .label { margin: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.footer-links a,
.footer-links__btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--ink); text-underline-offset: 4px; }
.footer-links__btn { background: none; border: 0; text-decoration: underline; cursor: pointer; }

/* ---------- Cookie banner (CookieYes): site colours, Accept = Reject ---------- */
.cky-consent-container .cky-consent-bar,
.cky-preference-center { border-radius: 0 !important; border: 1px solid var(--ink) !important; box-shadow: none !important; }
.cky-consent-container, .cky-preference-center, .cky-consent-container button, .cky-preference-center button { font-family: var(--sans) !important; }
.cky-title, .cky-preference-title { color: var(--ink) !important; letter-spacing: -0.01em; }
.cky-notice-des, .cky-preference-content-wrapper, .cky-accordion-header-des { color: var(--ink-2, #333) !important; }
.cky-btn { border-radius: 0 !important; min-height: 44px; font-weight: 600 !important; }
.cky-btn-accept, .cky-btn-reject, .cky-btn-preferences {
	color: var(--ink) !important; background: var(--lime) !important; border: 1px solid var(--ink) !important;
}
.cky-btn-accept:hover, .cky-btn-reject:hover, .cky-btn-preferences:hover { background: #c4e63c !important; }
.cky-btn-customize { color: var(--ink) !important; background: var(--bg) !important; border: 1px solid var(--ink) !important; }
.cky-btn-customize:hover { background: var(--panel) !important; }
.cky-btn-revisit-wrapper { background: var(--ink) !important; }
/* The site only uses analytics: hide the empty categories (consent stays "no"). */
#ckyDetailCategoryfunctional, #ckyDetailCategoryperformance, #ckyDetailCategoryadvertisement { display: none !important; }
.cky-switch input[type="checkbox"]:checked { background: var(--ink) !important; }
.cky-consent-container :focus-visible, .cky-preference-center :focus-visible, .cky-btn-revisit-wrapper :focus-visible { outline: 3px solid var(--ink) !important; outline-offset: 2px; }

/* ---------- Single article ---------- */
.entry-header { padding-top: 56px; padding-bottom: 40px; }
.entry-title { font-size: clamp(36px, 5.5vw, 52px); letter-spacing: -0.03em; line-height: 1.06; margin: 14px 0 20px; }
.entry-lead { font-size: 21px; line-height: 1.55; color: var(--ink-2); margin: 0 0 28px; }
.byline { display: flex; align-items: center; gap: 14px; font-family: var(--sans); }
.byline__avatar { width: 44px; height: 44px; flex: none; }
.byline__avatar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--rule); }
.byline__name { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.byline__role { font-size: 14px; color: var(--label); line-height: 1.3; }

.entry-figure { max-width: 1012px; margin: 0 auto 48px; padding: 0 var(--gutter); }
.entry-figure img { width: 100%; aspect-ratio: 1200 / 627; object-fit: cover; border: 1px solid var(--rule); }

.toc { background: var(--panel); padding: 24px 28px; margin: 0 0 40px; }
.toc ol { margin: 12px 0 0; padding-left: 1.3em; font-family: var(--sans); font-size: 15px; line-height: 1.5; }
.toc li { padding: 3px 0; }
.toc a { color: var(--ink); text-underline-offset: 3px; }

/* Prose */
.prose { font-family: var(--serif); font-size: 21px; line-height: 1.68; color: var(--ink-2); }
.prose > * + * { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose pre, .prose blockquote, .prose figure, .prose table { margin: 0 0 1.1em; }
.prose h2 { font-size: 28px; letter-spacing: -0.02em; line-height: 1.2; margin: 1.9em 0 0.6em; scroll-margin-top: 24px; }
.prose h3 { font-size: 22px; letter-spacing: -0.01em; line-height: 1.25; margin: 1.6em 0 0.5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0 0 0.45em; }
.prose li::marker { color: var(--ink); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose a {
	color: var(--ink); text-decoration: underline; text-decoration-color: var(--lime);
	text-decoration-thickness: 3px; text-underline-offset: 4px; text-decoration-skip-ink: none;
}
.prose a:hover { background: var(--lime); }
.prose blockquote {
	border-left: 5px solid var(--lime); padding: 2px 0 2px 24px; margin-left: 0; margin-right: 0;
	font-family: var(--sans); font-weight: 500; font-size: 23px; line-height: 1.4; color: var(--ink);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code {
	font-family: var(--mono); font-size: 0.78em; font-weight: 500; color: var(--ink);
	background: var(--panel); border: 1px solid var(--rule); padding: 0.1em 0.35em;
}
.prose pre {
	background: var(--ink); color: #F2F2F2; padding: 22px 24px; overflow-x: auto;
	font-family: var(--mono); font-size: 15px; line-height: 1.6;
}
.prose code, .prose pre { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; font-weight: 400; }
.prose em { font-style: italic; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.prose img { margin: 0 auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 17px; line-height: 1.5; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); }
.prose th { font-family: var(--mono); font-weight: 400; font-size: 13px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--label); }
.table-scroll { overflow-x: auto; }

/* Share + author */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-top: 1px solid var(--rule); padding-top: 28px; margin-top: 48px; }
.share .label { margin-right: 6px; }
.share .btn { font-size: 14px; padding: 8px 14px; }
.share__status { font-family: var(--sans); font-size: 14px; color: var(--ink); }

.author-box { display: flex; gap: 22px; background: var(--panel); padding: 28px; margin-top: 28px; }
.author-box img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; filter: grayscale(1); }
.author-box h2 { font-size: 17px; margin-bottom: 6px; }
.author-box p { font-size: 16px; line-height: 1.55; margin: 0 0 10px; }
.author-box__links { display: flex; gap: 6px; font-family: var(--sans); font-size: 14px; font-weight: 600; }
.author-box__links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px 0 0; text-underline-offset: 4px; }

.keep-reading { padding-top: 72px; padding-bottom: 8px; }
.keep-reading h2 { font-size: 26px; letter-spacing: -0.02em; margin-bottom: 28px; }

/* ---------- Pages (About) ---------- */
.page-hero { padding: 56px 0 72px; display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 64px; align-items: start; }
.page-hero__title { font-size: clamp(36px, 5.6vw, 56px); letter-spacing: -0.035em; line-height: 1.2; margin: 14px 0 28px; }
.page-hero__body p { font-size: 19px; line-height: 1.65; max-width: 33em; }
.page-hero__photo { padding: 0 14px 14px 0; }
.page-hero__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--ink); box-shadow: 14px 14px 0 0 var(--lime); }

.cv-section { padding: 64px 0 72px; }
.cv-section > h2 { font-size: 26px; letter-spacing: -0.02em; padding-bottom: 24px; border-bottom: 2px solid var(--ink); }
.cv-list { list-style: none; margin: 0; padding: 0; }
.cv-item { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.cv-item:last-child { border-bottom: 0; }
.cv-item h3 { font-size: 19px; letter-spacing: -0.01em; }
.cv-item__role { font-family: var(--sans); font-size: 14px; color: var(--label); margin: 4px 0 0; }
.cv-item__sub { font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--ink); margin: 20px 0 0; }
.cv-item__links { margin-top: 6px; }
.cv-item ul { margin: 16px 0 0; padding-left: 1.2em; font-size: 17px; line-height: 1.6; }
.cv-item li { margin-bottom: 8px; }
.cv-item > div > p { font-size: 17px; line-height: 1.6; margin: 14px 0 0; }

.skills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 24px; list-style: none; margin: 32px 0 0; padding: 0; }
.skills li { border-top: 2px solid var(--ink); padding-top: 14px; }
.skills h3 { margin-bottom: 8px; font-weight: 400; }
.skills p { font-size: 16px; line-height: 1.55; margin: 0; }

.page-default { padding-top: 56px; padding-bottom: 72px; }
.page-default h1 { font-size: clamp(36px, 5.5vw, 52px); letter-spacing: -0.03em; margin-bottom: 32px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
	.page-hero { grid-template-columns: 1fr; gap: 40px; }
	.page-hero__photo { max-width: 260px; }
	.skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
	:root { --gutter: 16px; }
	.site-header .wrap { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
	.site-nav ul { gap: 0; margin-left: -10px; }
	.hero { padding-top: 56px; padding-bottom: 56px; }
	.card-grid { grid-template-columns: 1fr; }
	.card--featured { padding: 28px 22px 30px; }
	.prose { font-size: 19px; }
	.prose h2 { font-size: 24px; }
	.entry-lead { font-size: 19px; }
	.cv-item { grid-template-columns: 1fr; gap: 6px; }
	.skills { grid-template-columns: 1fr; }
	.author-box { flex-direction: column; }
}

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

/* Windows high contrast / forced colors */
@media (forced-colors: active) {
	.btn, .filters a, .card-grid .card, .toc, .author-box, .card--featured { border: 1px solid CanvasText; }
	.highlight, .btn--primary { forced-color-adjust: none; background: Highlight; color: HighlightText; }
	.wordmark__dot { forced-color-adjust: none; background: CanvasText; }
	:focus-visible { outline: 3px solid Highlight; }
}

@media print {
	.site-header, .site-footer, .share, .keep-reading, .skip-link { display: none; }
}

picture { display: block; }
.author-box picture { flex: none; }
