/* RezaOps v2 — terminal console */

:root {
	--bg: #0b0f0d;
	--side: #0f1512;
	--panel: #121a16;
	--raised: #17211c;
	--line: #22302a;
	--line-soft: #18221d;
	--term: #070a09;
	--text: #e6ece8;
	--text-2: #b9c5be;
	--muted: #a3b1a9;
	--dim: #5f6e66;
	--accent: #4ade80;
	--on-accent: #06110b;
	--amber: #f5b454;
	--blue: #7cc4ff;
	--red: #ff7b7b;
	--radius: 10px;
	--sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--side-w: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: color-mix(in srgb, var(--accent) 70%, #fff); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
code, pre, kbd, .mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--on-accent); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 6px; }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: .82rem; }
.t-ok { color: var(--accent); }
.t-amber { color: var(--amber); }
.icon { flex-shrink: 0; vertical-align: -3px; }

/* Shell ---------------------------------------------------------------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
	width: var(--side-w); flex-shrink: 0; background: var(--side); border-right: 1px solid var(--line);
	padding: 24px 16px; display: flex; flex-direction: column; gap: 28px;
	position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.main { flex: 1; min-width: 0; padding: 24px 32px 32px; display: flex; flex-direction: column; gap: 20px; }
.topbar { display: none; }

.brand { font-family: var(--mono); font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none; padding: 0 10px; white-space: nowrap; }
.brand-caret { color: var(--accent); }
.custom-logo { max-height: 40px; width: auto; }

.side-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-family: var(--mono); font-size: 14px; }
.side-menu a { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 6px; color: var(--muted); text-decoration: none; }
.side-menu a:hover { color: var(--text); background: var(--panel); }
.side-menu a.is-current, .side-menu .current-menu-item > a, .side-menu .current_page_item > a { background: var(--raised); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.nav-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.nav-dot--ok { background: var(--accent); }
.nav-dot--warn { background: var(--amber); }

.side-series .side-label, .side-label { font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 0 12px 6px; }
.side-series ul { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: 13px; }
.side-series a { display: flex; justify-content: space-between; padding: 7px 12px; color: var(--muted); text-decoration: none; border-radius: 6px; }
.side-series a:hover, .side-series a.is-current { color: var(--text); }
.side-series a.is-current span { color: var(--accent); }

.node-box { margin-top: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 14px; display: flex; flex-direction: column; gap: 8px; font-family: var(--mono); font-size: 12px; }
.node-cmd { color: var(--muted); }
.node-state { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.node-state .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.node-labels { color: var(--muted); line-height: 1.55; word-break: break-word; }

.topline { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.crumbs { font-family: var(--mono); font-size: 13px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { color: var(--dim); }
.crumbs .here { color: var(--text); }
.topline-actions { display: flex; gap: 8px; }

.site-footer { margin-top: auto; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.footer-menu { list-style: none; display: flex; gap: 16px; margin: 0; padding: 0; }
.footer-menu a { color: var(--muted); text-decoration: none; }

/* Mobile: sidebar becomes a drawer ------------------------------------ */
@media (max-width: 960px) {
	.app { flex-direction: column; }
	.topbar { display: flex; position: sticky; top: 0; z-index: 40; height: 60px; align-items: center; justify-content: space-between; padding: 0 12px 0 6px; background: var(--side); border-bottom: 1px solid var(--line); }
	.nav-toggle { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--text); cursor: pointer; }
	.sidebar { position: fixed; z-index: 60; left: 0; top: 0; height: 100%; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.5); }
	.sidebar.is-open { transform: none; }
	.sidebar-brand { display: none; }
	.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); }
	.main { padding: 16px; }
	.side-menu a { padding: 12px; }
}

/* Panels & buttons ------------------------------------------------------ */
.stack { display: flex; flex-direction: column; gap: 20px; }
.narrow { max-width: 820px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.panel-label { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 10px; }
.panel-label a { color: var(--muted); text-decoration: none; }
.panel-label a:hover { color: var(--text); }
.panel-title { font-size: 16px; margin-bottom: 6px; }
.panel-empty { color: var(--muted); font-size: 14px; }
.table-panel { padding: 0; overflow: hidden; }
.table-panel > .panel-empty { padding: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.panel-cmd { font-family: var(--mono); font-size: 14px; font-weight: 500; letter-spacing: 0; }
.link-sm { font-size: 13px; text-decoration: none; white-space: nowrap; }
.page-head { display: flex; flex-direction: column; gap: 10px; padding: 28px 32px; }
.page-title { font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -0.025em; }
.lead { font-size: 1.05rem; max-width: 46em; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border-radius: 8px; font: 600 15px/1.2 var(--sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.btn-sm { padding: 9px 14px; font-size: 14px; }
.btn-block { display: flex; width: 100%; margin-top: 12px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { color: var(--on-accent); filter: brightness(1.1); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--ok { color: var(--accent); }
.status--warn { color: var(--amber); }
.status--bad { color: var(--red); }
.status--off, .status--muted { color: #8a978f; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; border: 1px solid currentColor; font: 700 15px var(--mono); }
.pill .dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.pill--ok { color: var(--accent); }
.pill--warn { color: var(--amber); }
.pill--muted, .pill--off { color: var(--muted); }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.chips li, .chips a { font: 12px var(--mono); padding: 4px 9px; border-radius: 4px; background: var(--raised); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.chips-links li { padding: 0; border: 0; background: none; }
.chips a:hover { border-color: var(--accent); }

.social { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.social a { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.social a:hover { color: var(--text); border-color: var(--accent); }

/* Homepage -------------------------------------------------------------- */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px; }
.hero { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 32px; }
.hero-name { font-size: clamp(2.2rem, 5vw, 3.2rem); letter-spacing: -0.03em; }
.hero-role { color: var(--accent); font-size: 1.05rem; }
.hero-intro { color: var(--text-2); font-size: 1.05rem; }
@media (max-width: 1100px) { .hero-grid { grid-template-columns: 1fr; } }

.terminal { background: var(--term); border: 1px solid #1c2621; border-radius: var(--radius); overflow: hidden; min-width: 0; }
.terminal-bar { display: flex; gap: 7px; align-items: center; padding: 12px 16px; border-bottom: 1px solid #1c2621; }
.terminal-bar span { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.terminal-bar span:nth-child(2) { background: #febc2e; }
.terminal-bar span:nth-child(3) { background: #28c840; }
.terminal-bar em { margin-left: auto; font: 12px var(--mono); color: var(--muted); font-style: normal; }
.terminal-body { margin: 0; padding: 18px 20px; font-size: 13.5px; line-height: 1.85; color: #d6e2da; overflow-x: auto; }
.t-cmd { color: var(--accent); }
.t-dim { color: var(--muted); }
.t-key { color: var(--blue); }
.t-bad { color: var(--red); }
.t-cursor { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 2.3rem; font-weight: 700; color: var(--accent); line-height: 1.15; }
.stat-note { font-size: 12px; color: var(--muted); }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .trio { grid-template-columns: 1fr; } }
.kv-list, .post-mini { list-style: none; margin: 0; padding: 0; }
.kv-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.kv-list li:last-child, .post-mini li:last-child a { border-bottom: 0; }
.kv-list a { color: var(--text); text-decoration: none; }
.kv-list a:hover { color: var(--accent); }
.kv-list .mono { font-size: 12px; }
.post-mini a { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); color: var(--text); text-decoration: none; }
.post-mini a:hover strong { color: var(--accent); }
.post-mini strong { font-size: 14px; font-weight: 600; line-height: 1.35; }
.post-mini .mono { font-size: 11px; }

.contact { display: flex; flex-direction: column; gap: 12px; padding: 28px 32px; }
.contact h2 { font-size: 1.6rem; }
.contact--form { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px; align-items: start; }
.contact-copy { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 1100px) { .contact--form { grid-template-columns: 1fr; } }

/* kubectl tables -------------------------------------------------------- */
.ktable { display: flex; flex-direction: column; }
.krow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.6fr) 130px 170px; gap: 16px; padding: 15px 20px; border-bottom: 1px solid var(--line-soft); color: var(--text); text-decoration: none; align-items: center; }
.krow:last-child { border-bottom: 0; }
a.krow:hover { background: var(--raised); }
a.krow:hover strong { color: var(--accent); }
.khead { font: 12px var(--mono); color: var(--muted); padding-top: 10px; padding-bottom: 10px; border-bottom-color: var(--line); }
.krow[hidden] { display: none; }
.kname { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kname strong { font-size: 15px; font-weight: 600; }
.kname small { font-size: 13px; color: var(--muted); }
.kstack { font-size: 12px; color: var(--text-2); }
.krow .mono { font-size: 13px; }
.kstatus { display: flex; align-items: center; gap: 12px; }
.gh-mini { font-size: 12px; color: var(--muted); }
.ktable--deploy .krow { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.7fr) 140px; }
@media (max-width: 760px) {
	.krow, .ktable--deploy .krow { grid-template-columns: 1fr auto; gap: 6px 12px; }
	.khead { display: none; }
	.krow > :nth-child(2), .krow > :nth-child(3) { grid-column: 1; font-size: 12px; }
	.krow > :nth-child(4) { grid-column: 2; grid-row: 1; }
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.filter { font: 13px var(--mono); padding: 6px 12px; min-height: 36px; border-radius: 6px; cursor: pointer; background: var(--raised); color: var(--muted); border: 1px solid var(--line); }
.filter:hover { color: var(--text); border-color: var(--accent); }
.filter.is-active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.empty-filter { padding: 20px; }

/* Post lists ------------------------------------------------------------ */
.post-row { display: grid; grid-template-columns: minmax(0, 1fr) 200px 80px; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line-soft); color: var(--text); text-decoration: none; align-items: center; font-size: 15px; }
.post-row:last-child { border-bottom: 0; }
a.post-row:hover { background: var(--raised); }
a.post-row:hover strong { color: var(--accent); }
.post-row strong { font-weight: 600; }
.post-row .mono { font-size: 12px; }
.post-row--head { font-size: 12px; color: var(--muted); padding-top: 10px; padding-bottom: 10px; border-bottom-color: var(--line); }
.post-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.post-row-main small { font-size: 13px; }
.post-row--log { grid-template-columns: 80px minmax(0, 1fr) 110px; }
.post-row--log > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 760px) {
	.post-row, .post-row--log { grid-template-columns: 1fr; gap: 4px; }
	.post-row--head { display: none; }
}

.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.series-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); }
.series-card:hover { border-color: var(--accent); }
.series-card strong { font-size: 17px; }
.series-card .mono { font-size: 12px; }

.search-form { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; background: var(--term); min-width: 240px; }
.search-form input { flex: 1; background: none; border: 0; color: var(--text); font: 14px var(--sans); padding: 10px 0; outline: none; }
.search-prompt { color: var(--muted); }
.search-form:focus-within { border-color: var(--accent); }

.nav-links, .pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.page-numbers { display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; color: var(--text); text-decoration: none; font: 14px var(--mono); padding: 0 10px; }
.page-numbers.current { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Articles --------------------------------------------------------------- */
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.article-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 24px; }
@media (max-width: 1100px) { .article-grid { grid-template-columns: 1fr; } .article-side { position: static; } }
.article { padding: 40px 48px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (max-width: 760px) { .article { padding: 24px 20px; } }
.article--page { max-width: 900px; }
.cmd-line { font-size: 13px; }
.article-title { font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -0.025em; line-height: 1.12; }
.article-dek { font-size: 1.15rem; color: var(--muted); }
.article-thumb { margin: 0; }
.article-thumb img { border-radius: 8px; border: 1px solid var(--line); display: block; width: 100%; }
.article-thumb.diagram img { background: #fff; }
.article-thumb figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }

.meta-list { display: grid; grid-template-columns: auto 1fr; gap: 9px 12px; margin: 0; font-size: 14px; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; text-align: right; font-size: 13px; }
.progress { height: 6px; border-radius: 3px; background: #1c2621; overflow: hidden; margin-top: 14px; }
.progress span { display: block; height: 100%; background: var(--accent); }
.part-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.part-list a { display: block; padding: 5px 0; font-size: 13px; color: var(--muted); text-decoration: none; line-height: 1.4; }
.part-list a:hover, .part-list .is-current a { color: var(--text); }
.part-mark { display: inline-block; width: 18px; color: var(--muted); }
.part-list .is-read .part-mark, .part-list .is-current .part-mark { color: var(--accent); }

.series-nav, .post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.series-nav a, .post-navigation a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--text); }
.series-nav a:hover, .post-navigation a:hover { border-color: var(--accent); }
.series-nav .mono, .post-navigation .mono { font-size: 12px; }
.series-next, .post-navigation .nav-next { text-align: right; grid-column: 2; }
.post-navigation .nav-next a { align-items: flex-end; }
@media (max-width: 640px) { .series-nav, .post-navigation .nav-links { grid-template-columns: 1fr; } .series-next, .post-navigation .nav-next { grid-column: 1; } }

/* Prose ------------------------------------------------------------------ */
.prose { font-size: 1.08rem; line-height: 1.78; color: #cfd9d3; min-width: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.5rem; color: var(--text); margin-top: 1.8em; }
.prose h2::before { content: "## "; font-family: var(--mono); color: var(--accent); }
.prose h3 { font-size: 1.2rem; color: var(--text); margin-top: 1.5em; }
.prose h3::before { content: "### "; font-family: var(--mono); color: var(--accent); font-size: .9em; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose :not(pre) > code { background: var(--raised); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; font-size: .86em; color: var(--accent); }
.prose pre, .wp-block-code { background: var(--term); color: #d6e2da; padding: 16px 20px; border-radius: 8px; border: 1px solid #1c2621; overflow-x: auto; font-size: .86rem; line-height: 1.7; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.wp-block-code.is-style-rz-window { position: relative; padding-top: 44px; }
.wp-block-code.is-style-rz-window::before { content: ""; position: absolute; left: 14px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; box-shadow: 16px 0 0 #febc2e, 32px 0 0 #28c840; }
.code-filename { font: 12px var(--mono); color: var(--muted); margin-bottom: -.8em !important; }
.prose img { border-radius: 8px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose th { background: var(--raised); font-family: var(--mono); font-size: .85rem; }
.prose hr { border: 0; border-top: 1px solid var(--line); }
.prose figcaption, .wp-element-caption { font-size: .85rem; color: var(--muted); text-align: center; }

.is-style-rz-incident { border: 1px solid rgba(245,180,84,.4); background: rgba(245,180,84,.07); border-radius: 8px; padding: 0 16px 14px; font-size: .98rem; }
.is-style-rz-incident > * + * { margin-top: .5em; }
.is-style-rz-incident .incident-title { margin: 0 -16px; padding: 10px 16px 10px 36px; border-bottom: 1px solid rgba(245,180,84,.3); font: 13px var(--mono); color: var(--amber); position: relative; }
.is-style-rz-incident .incident-title::before { content: ""; position: absolute; left: 16px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--amber); }
.is-style-rz-incident .incident-title + * { margin-top: 12px; }
.is-style-rz-note { border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 7%, transparent); border-radius: 8px; padding: 12px 16px; font-size: .98rem; }
.article-tags { margin-top: 4px; }

/* Certs ----------------------------------------------------------------- */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.cert { display: flex; flex-direction: column; gap: 10px; }
.cert-top { display: flex; justify-content: space-between; align-items: flex-start; }
.cert-badge { width: 64px; height: 64px; border-radius: 10px; object-fit: contain; background: #fff; }
.cert-badge--text { display: flex; align-items: center; justify-content: center; background: var(--raised); border: 1px solid var(--line); color: var(--accent); font-size: 13px; font-weight: 700; }
.cert-name { font-size: 1.1rem; line-height: 1.3; }
.cert .mono.muted { font-size: 13px; }
.cert .btn { align-self: flex-start; margin-top: auto; }
.cert .meta-list { margin: 4px 0 8px; }

/* Lab ------------------------------------------------------------------- */
.lab-head { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 28px 32px; flex-wrap: wrap; }
.lab-head > div:first-child { display: flex; flex-direction: column; gap: 10px; flex: 1 1 420px; }
.lab-badge { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.banner { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border-radius: var(--radius); }
.banner--warn { border: 1px solid rgba(245,180,84,.45); background: rgba(245,180,84,.08); }
.banner .dot { margin-top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--amber); flex-shrink: 0; }
.banner strong { color: var(--amber); }
.lab-body { display: flex; flex-direction: column; gap: 20px; }
.lab--offline .lab-body { opacity: .55; }
.lab--offline .stat-value { color: #8a978f; }
.node-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.node { display: flex; flex-direction: column; gap: 14px; }
.node-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.node-head > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.node-head strong { font-size: 1.2rem; }
.node-head small { font-size: 13px; }
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.meter-bar { height: 6px; border-radius: 3px; background: #1c2621; overflow: hidden; }
.meter-bar span { display: block; height: 100%; background: var(--accent); max-width: 100%; }
.lab--offline .meter-bar span { background: #8a978f; }
.flow-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); }
.flow-node { padding: 5px 10px; border: 1px solid var(--line); border-radius: 4px; }

/* GitHub ---------------------------------------------------------------- */
.repo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.repo { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--text); }
.repo:hover { border-color: var(--accent); }
.repo-name { font-weight: 700; font-size: 15px; color: var(--accent); }
.repo-desc { font-size: 14px; line-height: 1.5; flex: 1; }
.repo-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); align-items: center; }
.repo-meta .status { font-size: 12px; }

/* Forms ----------------------------------------------------------------- */
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.contact-form label, .comment-form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-family: var(--mono); }
.contact-form input, .contact-form select, .contact-form textarea,
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; font: 15px var(--sans); color: var(--text); background: var(--term); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px;
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form :focus, .comment-form :focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.contact-form button { align-self: flex-start; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-alert { padding: 12px 14px; border-radius: 8px; font-size: 14px; }
.form-alert--ok { border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--text); }
.form-alert--bad, .form-error { border: 1px solid rgba(255,123,123,.45); background: rgba(255,123,123,.08); color: var(--text); padding: 12px 14px; border-radius: 8px; font-size: 14px; }

.comments .comment-list { list-style: none; padding: 0; }
.comments .comment-body { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.comments .comment-author img { border-radius: 50%; vertical-align: middle; margin-right: 8px; }
.comments .comment-metadata { font: 12px var(--mono); }
.comments .comment-metadata a { color: var(--muted); }
.comment-form p { margin-bottom: 12px; }

/* Résumé ---------------------------------------------------------------- */
.resume-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.resume { max-width: 900px; padding: 44px 52px; display: flex; flex-direction: column; gap: 28px; }
@media (max-width: 760px) { .resume { padding: 24px 20px; } }
.resume-head { display: flex; flex-direction: column; gap: 6px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.resume-head h1 { font-size: 2.2rem; }
.resume-headline { color: var(--accent); font-family: var(--mono); }
.resume-contact { color: var(--muted); font-size: 14px; }
.resume-contact a { color: var(--text-2); text-decoration: none; }
.resume-section h2 { font: 600 13px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 14px; }
.resume-section > p { color: var(--text-2); }
.resume-entry + .resume-entry { margin-top: 18px; }
.resume-entry-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.resume-entry h3 { font-size: 1.05rem; }
.resume-entry h3 a { color: var(--text); text-decoration: none; }
.resume-when { font: 13px var(--mono); color: var(--muted); }
.resume-body, .resume-entry > p { color: var(--text-2); font-size: .97rem; margin-top: 6px; }
.resume-body ul { margin: 6px 0 0; padding-left: 1.2em; }
.resume-body li + li { margin-top: 3px; }
.resume-certs, .resume-skills { margin: 0; padding-left: 1.2em; color: var(--text-2); }
.resume-certs li + li, .resume-skills li + li { margin-top: 6px; }
.resume strong { color: var(--text); }
.admin-hint { font-size: 13px; color: var(--amber); }

/* Widgets --------------------------------------------------------------- */
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 6px 0; border-bottom: 1px solid var(--line-soft); }

/* Print: résumé (and anything else) prints light and clean -------------- */
@media print {
	@page { margin: 14mm 14mm; }
	:root { color-scheme: light; }
	html, body { background: #fff !important; color: #111; font-size: 10.5pt; }
	.sidebar, .topbar, .topline, .site-footer, .no-print, .scrim, .btn, .comments, .article-side { display: none !important; }
	.app, .main { display: block; padding: 0; }
	.panel { background: none; border: 0; padding: 0; border-radius: 0; }
	.resume { max-width: none; gap: 14pt; padding: 0 3pt !important; }
	.resume-head { border-color: #ccc; padding-bottom: 8pt; }
	.resume-head h1 { font-size: 20pt; color: #111; }
	.resume-headline { color: #333; }
	.resume-contact, .resume-contact a, .resume-when { color: #444; }
	.resume-section h2 { color: #111; border-bottom: 1px solid #ccc; padding-bottom: 3pt; margin-bottom: 8pt; }
	.resume-body, .resume-entry > p, .resume-section > p, .resume-certs, .resume-skills { color: #222; }
	.resume strong, .resume-entry h3, .resume-entry h3 a { color: #111; }
	.resume-entry { break-inside: avoid; }
	a { color: #111; text-decoration: none; }
	.prose { color: #222; }
	.prose h2::before, .prose h3::before { content: none; }
}
