/*
Theme Name: ncrmnt-theme
Theme URI: https://ncrmnt.org
Description: Tech blog theme for ncrmnt.org — Verdant colorscheme (green paper, moss chrome, muted terracotta accent).
Author: ncrmnt
Text Domain: ncrmnt-theme
Version: 0.2.0
*/

/* ============================================================
   TOKENS — Verdant colorscheme (source of truth: palette-test/6.html)
   No bare hex values outside this block.
   ============================================================ */
:root {
	/* base greens */
	--paper:        #f3f5ef;  /* page background, green-tinted paper */
	--paper-card:   #fbfcf9;  /* card / surface */
	--ink:          #1d2a1f;  /* near-black green ink — body text */
	--ink-soft:     #4a5a46;  /* meta, captions, nav */
	--ink-faint:    #5f6f5a;  /* tertiary text (AA) */
	--link:         #2e6b39;  /* forest green links */
	--moss:         #b9c6ad;  /* hairlines, chrome */
	--moss-deep:    #8a9c7c;  /* chip borders, secondary chrome */
	--code-bg:      #eef1ea;  /* code block surface */
	--code-key:     #2e6b39;  /* code keywords */
	--code-str:     #8f5238;  /* code strings (muted terracotta) */
	--code-cmt:     #5f6f5a;  /* code comments */

	/* muted terracotta — decorative counterpoint, <=10% of surface */
	--terracotta:       #b06e4f;  /* stripe segments (decor) */
	--terracotta-deep:  #9a573c;  /* badge background, wordmark dot (AA w/ cream) */
	--terracotta-cream: #fdf6ef;  /* text on terracotta-deep */

	/* footer band */
	--footer-bg:   #22301f;  /* dark forest band */
	--footer-ink:  #c8d2bd;  /* footer primary text */
	--footer-dim:  #a9b69c;  /* footer secondary text */
	--footer-link: #d5decb;  /* footer links */
}

/* ============================================================
   RESET / BASE
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 17px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--paper);
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible,
input:focus-visible {
	outline: 2px solid var(--link);
	outline-offset: 2px;
	border-radius: 2px;
}

h1, h2, h3, h4, h5, h6 {
	color: var(--ink);
	line-height: 1.25;
	letter-spacing: -0.01em;
}

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

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--paper-card);
	color: var(--link);
	padding: 8px 16px;
	z-index: 100;
}
.skip-link:focus {
	left: 0;
}

/* separators */
hr,
hr.sep {
	border: none;
	border-top: 1px solid var(--moss);
	margin: 44px 0;
}
hr.sep.striped {
	border-top: none;
	height: 8px;
	background: repeating-linear-gradient(
		90deg,
		var(--terracotta) 0 18px,
		var(--paper) 18px 26px,
		var(--moss-deep) 26px 44px,
		var(--paper) 44px 52px
	);
	background-size: 100% 3px;
	background-position: center;
	background-repeat: no-repeat;
	opacity: 0.9;
}

/* figures */
figure,
.wp-block-image,
.wp-caption {
	margin: 36px 0;
	max-width: 100%;
}
figure img,
.entry-content img,
.wp-block-image img,
.wp-caption img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
	border: 1px solid var(--moss);
	display: block;
}
figcaption,
.wp-caption-text {
	margin-top: 10px;
	font-size: 14px;
	color: var(--ink-faint);
}

/* code */
code,
kbd {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 14.5px;
	background: var(--code-bg);
	border: 1px solid var(--moss);
	border-radius: 5px;
	padding: 1px 7px;
	color: var(--ink);
}

pre,
.code-block {
	background: var(--code-bg);
	border: 1px solid var(--moss);
	border-radius: 8px;
	padding: 18px 20px;
	margin: 28px 0;
	overflow-x: auto;
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 14px;
	line-height: 1.7;
	color: var(--ink);
}
pre code {
	background: transparent;
	border: none;
	padding: 0;
	font-size: inherit;
}
.code-block .cmt { color: var(--code-cmt); }
.code-block .key { color: var(--code-key); }
.code-block .str { color: var(--code-str); }
.code-block .prompt { color: var(--moss-deep); }

/* pullquote */
blockquote,
.pullquote {
	margin: 40px 0;
	padding: 8px 0 8px 22px;
	border-left: 4px solid var(--moss-deep);
	font-size: 22px;
	line-height: 1.45;
	font-weight: 500;
	letter-spacing: -0.01em;
	color: var(--ink);
}
blockquote cite,
.pullquote cite {
	display: block;
	margin-top: 10px;
	font-size: 14px;
	font-weight: 400;
	font-style: normal;
	color: var(--ink-faint);
}

/* tables */
.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 28px 0;
	font-size: 15px;
}
.entry-content th,
.entry-content td {
	border: 1px solid var(--moss);
	padding: 8px 12px;
	text-align: left;
}
.entry-content th {
	background: var(--code-bg);
	font-weight: 600;
}

/* sticky-post badge */
.badge {
	display: inline-block;
	background: var(--terracotta-deep);
	color: var(--terracotta-cream);
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 3px 10px;
	border-radius: 999px;
}

/* ============================================================
   HEADER — sticky, wordmark + nav
   ============================================================ */
.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--paper);
	border-bottom: 1px solid var(--moss);
}
.site-header .inner {
	max-width: 1060px;
	margin: 0 auto;
	padding: 18px 24px;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}
.wordmark {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.01em;
}
.wordmark a { color: var(--ink); }
.wordmark a::before {
	content: "";
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--terracotta-deep);
	margin-right: 9px;
}

.menu-toggle {
	display: none;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--ink-soft);
	background: var(--paper-card);
	border: 1px solid var(--moss);
	border-radius: 8px;
	padding: 6px 14px;
	cursor: pointer;
}

.site-nav ul {
	list-style: none;
	display: flex;
	gap: 26px;
	flex-wrap: wrap;
}
.site-nav a {
	color: var(--ink-soft);
	font-size: 15px;
}
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
	color: var(--link);
}

/* ============================================================
   LAYOUT — content column + sidebar grid
   ============================================================ */
.layout {
	max-width: 1060px;
	margin: 0 auto;
	padding: 56px 24px 96px;
	display: grid;
	grid-template-columns: minmax(0, 700px);
	justify-content: center;
	gap: 56px;
	align-items: start;
}
body.has-sidebar .layout {
	grid-template-columns: minmax(0, 700px) 280px;
	justify-content: space-between;
}
.site-main { min-width: 0; }

/* ============================================================
   ARTICLE
   ============================================================ */
.kicker {
	font-size: 14px;
	letter-spacing: 0.02em;
	color: var(--ink-faint);
	margin-bottom: 14px;
}
.kicker a { color: var(--ink-faint); }
.kicker a:hover { color: var(--link); }

.page-title,
.entry-title {
	font-size: 40px;
	line-height: 1.15;
	font-weight: 750;
	letter-spacing: -0.02em;
	color: var(--ink);
	margin-bottom: 18px;
}
.entry-title a { color: var(--ink); }
.entry-title a:hover { color: var(--link); text-decoration: none; }

.post-meta,
.entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	font-size: 14.5px;
	color: var(--ink-soft);
	padding-bottom: 24px;
	border-bottom: 1px solid var(--moss);
	margin-bottom: 36px;
}
.post-meta .dot,
.entry-meta .dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: var(--moss-deep);
}

.entry-content p { margin-bottom: 24px; }
.entry-content h2 {
	font-size: 26px;
	line-height: 1.3;
	letter-spacing: -0.01em;
	margin: 44px 0 18px;
	color: var(--ink);
}
.entry-content h3 {
	font-size: 20px;
	margin: 36px 0 14px;
}
.entry-content ul,
.entry-content ol {
	margin: 0 0 24px 24px;
}

/* post list items (index / archive / search) */
.blog-list {
	list-style: none;
}
.blog-list > li,
.blog-list > article {
	margin-bottom: 48px;
}
.blog-list .entry-title {
	font-size: 27px;
	margin-bottom: 10px;
}
.blog-list .entry-meta {
	padding-bottom: 14px;
	margin-bottom: 18px;
}
.blog-list .entry-content p { margin-bottom: 0; }
.blog-list .entry-content { margin-bottom: 0; }

/* pagination */
.navigation.pagination {
	margin-top: 48px;
	font-size: 14.5px;
}
.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}
.pagination .page-numbers {
	display: inline-block;
	padding: 4px 12px;
	border: 1px solid var(--moss);
	border-radius: 8px;
	color: var(--ink-soft);
	background: var(--paper-card);
}
.pagination .page-numbers.current {
	background: var(--code-bg);
	color: var(--ink);
	border-color: var(--moss-deep);
}
.pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
}
.pagination a.page-numbers:hover {
	color: var(--link);
	text-decoration: none;
	border-color: var(--moss-deep);
}
.pagination .prev,
.pagination .next { border-color: transparent; background: transparent; padding-left: 0; padding-right: 0; }

/* search form */
.search-form {
	display: flex;
	gap: 8px;
	margin: 24px 0 36px;
	max-width: 480px;
}
.search-field {
	font: inherit;
	font-size: 15px;
	color: var(--ink);
	background: var(--paper-card);
	border: 1px solid var(--moss);
	border-radius: 8px;
	padding: 8px 14px;
	flex: 1;
	min-width: 0;
}
.search-field::placeholder { color: var(--ink-faint); }
.search-submit {
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	color: var(--paper-card);
	background: var(--link);
	border: none;
	border-radius: 8px;
	padding: 8px 18px;
	cursor: pointer;
}
.search-submit:hover { background: var(--ink); }

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-area {
	margin-top: 56px;
}
.comments-title,
.comment-reply-title {
	font-size: 22px;
	margin-bottom: 18px;
}
.comment-list {
	list-style: none;
}
.comment-list ol {
	list-style: none;
	margin-left: 32px;
}
.comment-list .comment,
.comment-list .pingback,
.comment-list .trackback {
	padding: 18px 0;
	border-bottom: 1px solid var(--moss);
}
.comment-list .comment:last-child { border-bottom: none; }
.comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	font-size: 14px;
	color: var(--ink-soft);
	margin-bottom: 8px;
}
.comment-author img {
	border-radius: 50%;
	border: 1px solid var(--moss);
	margin-right: 4px;
	vertical-align: middle;
}
.comment-author .fn { font-weight: 600; color: var(--ink); }
.comment-metadata a { color: var(--ink-faint); }
.comment-metadata a:hover { color: var(--link); }
.comment-content { font-size: 15.5px; }
.comment-content p { margin-bottom: 12px; }
.reply {
	font-size: 14px;
	margin-top: 6px;
}
.bypostauthor { display: block; }

.comment-form {
	font-size: 15px;
}
.comment-form p { margin-bottom: 14px; }
.comment-form label {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--ink-soft);
	margin-bottom: 4px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	font: inherit;
	color: var(--ink);
	background: var(--paper-card);
	border: 1px solid var(--moss);
	border-radius: 8px;
	padding: 8px 12px;
	width: 100%;
}
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form .submit {
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	color: var(--paper-card);
	background: var(--link);
	border: none;
	border-radius: 8px;
	padding: 8px 18px;
	cursor: pointer;
}
.comment-form .submit:hover { background: var(--ink); }
.comment-form .comment-notes,
.logged-in-as,
.no-comments {
	font-size: 13.5px;
	color: var(--ink-faint);
}

/* ============================================================
   SIDEBAR — card widgets
   ============================================================ */
.sidebar { width: 280px; max-width: 100%; }

.widget {
	background: var(--paper-card);
	border: 1px solid var(--moss);
	border-radius: 10px;
	padding: 20px;
	margin-bottom: 24px;
	font-size: 15px;
}
.widget:last-child { margin-bottom: 0; }
.widget-title {
	font-size: 12.5px;
	font-weight: 650;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ink-faint);
	margin-bottom: 14px;
}
.widget ul {
	list-style: none;
}
.widget ul li {
	padding: 9px 0;
	border-bottom: 1px solid var(--moss);
	font-size: 15px;
	line-height: 1.45;
}
.widget ul li:last-child { border-bottom: none; padding-bottom: 0; }
.widget ul li a { color: var(--ink); }
.widget ul li a:hover { color: var(--link); }
.widget ul li span.post-date,
.widget ul li span.count,
.widget .post-date {
	display: block;
	font-size: 12.5px;
	color: var(--ink-faint);
	margin-top: 2px;
}
.widget select {
	font: inherit;
	font-size: 14px;
	color: var(--ink);
	background: var(--paper-card);
	border: 1px solid var(--moss);
	border-radius: 8px;
	padding: 6px 10px;
	width: 100%;
}

/* tag cloud chips */
.tagcloud,
.wp-block-tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.tagcloud a,
.wp-block-tag-cloud a {
	display: inline-block;
	font-size: 13px !important;
	color: var(--ink-soft);
	background: transparent;
	border: 1px solid var(--moss-deep);
	border-radius: 999px;
	padding: 3px 12px;
	line-height: 1.5;
}
.tagcloud a:hover,
.wp-block-tag-cloud a:hover {
	background: var(--code-bg);
	color: var(--ink);
	text-decoration: none;
}

/* language switcher chips — same pill language as the tag cloud */
.lang-switcher-list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.lang-switcher .chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--ink-soft);
	background: transparent;
	border: 1px solid var(--moss-deep);
	border-radius: 999px;
	padding: 3px 12px;
	line-height: 1.5;
}
.lang-switcher .chip:hover {
	background: var(--code-bg);
	color: var(--ink);
	text-decoration: none;
}
.lang-switcher .chip.is-current {
	background: var(--code-bg);
	border-color: var(--link);
	color: var(--ink);
}
.lang-switcher .chip-flag {
	width: auto;
	height: 12px;
	border-radius: 2px;
}

/* ============================================================
   FOOTER — dark forest band, root ornament
   ============================================================ */
.site-footer {
	background: var(--footer-bg);
	color: var(--footer-ink);
}
/* tree-root ornament: small sprite tile (16×14) of horizontal roots */
.site-footer .roots {
	display: block;
	width: 100%;
	height: 14px;
}
.site-footer .roots .roots-s1 { fill: var(--moss); opacity: 0.35; }
.site-footer .roots .roots-s2 { fill: var(--moss-deep); opacity: 0.30; }
.site-footer .roots .roots-bud { fill: var(--terracotta); opacity: 0.60; }
.site-footer .inner {
	max-width: 1060px;
	margin: 0 auto;
	padding: 20px 24px 26px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px 32px;
	font-size: 13px;
	color: var(--footer-dim);
}
.site-footer .fm { color: var(--footer-ink); }
.site-footer a { color: var(--footer-link); }

/* ============================================================
   RESPONSIVE — collapse to single column below 1020px
   ============================================================ */
@media (max-width: 1020px) {
	.layout,
	body.has-sidebar .layout {
		grid-template-columns: 1fr;
		justify-content: stretch;
		padding: 40px 20px 72px;
	}
	.sidebar {
		order: 2;
		width: 100%;
	}

	.menu-toggle { display: inline-block; }
	.site-nav {
		display: none;
		flex-basis: 100%;
	}
	.site-nav.is-open { display: block; }
	.site-nav ul {
		flex-direction: column;
		gap: 4px;
		padding: 10px 0 6px;
	}
	.site-nav ul li a {
		display: block;
		padding: 8px 2px;
		border-bottom: 1px solid var(--moss);
	}
	.site-nav ul li:last-child a { border-bottom: none; }

	.site-header .inner {
		align-items: center;
	}
	.wordmark { flex: 1; }

	.page-title,
	.entry-title { font-size: 30px; }
	.blog-list .entry-title { font-size: 23px; }
}
