/*
Theme Name: Nirjon Minimal
Theme URI: https://example.com/nirjon-minimal
Author: Laughing Prometheus
Author URI: https://example.com
Description: A clean, distraction-free single-column blog theme for Bangla writing — Tiro Bangla / Noto Sans Bengali typography and genre badges — inspired by the classic "daily short post" layout, built with WordPress security best practices baked in — escaped output, no comment section, and hardened HTTP headers. Includes a Customizer color scheme picker (Default, Dark, Orange, Blue).
Version: 1.4.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nirjon-minimal
*/

/* ---------- Color scheme variables ---------- */
/* Default (light) scheme lives on :root. Each alternate scheme just
   overrides these custom properties on a body class — no selector
   duplication anywhere else in the file. */
:root {
	--gm-bg: #ffffff;
	--gm-text: #222222;
	--gm-heading: #111111;
	--gm-muted: #999999;
	--gm-label: #888888;
	--gm-border: #eeeeee;
	--gm-border-strong: #cccccc;
	--gm-link: #1e6bb8;
	--gm-btn-bg: #222222;
	--gm-btn-bg-hover: #444444;
	--gm-btn-text: #ffffff;
	--gm-field-bg: #ffffff;
}

body.gm-scheme-dark {
	--gm-bg: #15171a;
	--gm-text: #d8dadd;
	--gm-heading: #f5f6f7;
	--gm-muted: #8a8f96;
	--gm-label: #7d828a;
	--gm-border: #2a2d31;
	--gm-border-strong: #3c4045;
	--gm-link: #6cb2ff;
	--gm-btn-bg: #eceef0;
	--gm-btn-bg-hover: #ffffff;
	--gm-btn-text: #15171a;
	--gm-field-bg: #1e2124;
}

body.gm-scheme-orange {
	--gm-bg: #fffaf5;
	--gm-text: #3a2a1e;
	--gm-heading: #241a12;
	--gm-muted: #a3846d;
	--gm-label: #b5764a;
	--gm-border: #f0ddc9;
	--gm-border-strong: #e2b98d;
	--gm-link: #c1560f;
	--gm-btn-bg: #c1560f;
	--gm-btn-bg-hover: #a3480c;
	--gm-btn-text: #ffffff;
	--gm-field-bg: #ffffff;
}

body.gm-scheme-blue {
	--gm-bg: #f7fafd;
	--gm-text: #1c2b3a;
	--gm-heading: #0f2036;
	--gm-muted: #7488a0;
	--gm-label: #4a7ba8;
	--gm-border: #d9e6f2;
	--gm-border-strong: #a9c6de;
	--gm-link: #0f5fa8;
	--gm-btn-bg: #0f5fa8;
	--gm-btn-bg-hover: #0c4c86;
	--gm-btn-text: #ffffff;
	--gm-field-bg: #ffffff;
}

/* ---------- Reset-ish basics ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--gm-bg);
	color: var(--gm-text);
	font-family: 'Tiro Bangla', Georgia, 'Times New Roman', Times, serif;
	font-size: 19px;
	line-height: 1.85;
	transition: background-color 0.15s ease, color 0.15s ease;
}
img { max-width: 100%; height: auto; }
a { color: var(--gm-link); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
h1, h2, h3, h4 { font-family: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; line-height: 1.25; color: var(--gm-heading); }

/* ---------- Layout ---------- */
.gm-wrap {
	max-width: 1040px;
	margin: 0 auto;
	padding: 32px 20px 60px;
	display: flex;
	gap: 56px;
	align-items: flex-start;
}
.gm-sidebar {
	flex: 0 0 240px;
	position: sticky;
	top: 24px;
}
.gm-content {
	flex: 1 1 auto;
	min-width: 0;
}

/* ---------- Mobile hamburger + off-canvas sidebar ---------- */
.gm-mobile-menu-toggle {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	opacity: 0 !important;
}
.gm-hamburger { display: none; }
.gm-mobile-backdrop { display: none; }

@media (max-width: 780px) {
	.gm-wrap { flex-direction: column; gap: 24px; padding-top: 76px; }

	.gm-hamburger {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 5px;
		position: fixed;
		top: 14px;
		left: 14px;
		z-index: 210;
		width: 42px;
		height: 42px;
		padding: 0;
		background: var(--gm-bg);
		border: 1px solid var(--gm-border);
		border-radius: 8px;
		cursor: pointer;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	}
	.gm-hamburger span {
		display: block;
		width: 20px;
		height: 2px;
		background: var(--gm-heading);
		border-radius: 2px;
	}

	.gm-sidebar {
		position: fixed;
		top: 0;
		left: -100%;
		width: 82%;
		max-width: 300px;
		height: 100vh;
		overflow-y: auto;
		flex-basis: auto;
		background: var(--gm-bg);
		z-index: 200;
		padding: 76px 24px 40px;
		box-shadow: 2px 0 16px rgba(0, 0, 0, 0.18);
		transition: left 0.25s ease;
	}
	.gm-mobile-menu-toggle:checked ~ .gm-wrap .gm-sidebar { left: 0; }

	.gm-mobile-backdrop {
		display: none;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.4);
		z-index: 190;
	}
	.gm-mobile-menu-toggle:checked ~ .gm-mobile-backdrop { display: block; }
}

/* ---------- Site title ---------- */
.gm-site-title {
	font-family: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 28px;
}
.gm-site-title a { color: var(--gm-heading); }

/* ---------- Sidebar ---------- */
.gm-sidebar h2 {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--gm-label);
	margin: 28px 0 8px;
}
.gm-sidebar ul { list-style: none; margin: 0; padding: 0; }
.gm-sidebar li { margin-bottom: 6px; font-size: 15px; }
.gm-sidebar a { color: var(--gm-text); }

.gm-search-form { display: flex; gap: 6px; margin: 0; }
.gm-search-form input[type="search"] {
	flex: 1 1 auto;
	padding: 8px 10px;
	border: 1px solid var(--gm-border-strong);
	border-radius: 3px;
	font-size: 15px;
	font-family: inherit;
	background: var(--gm-field-bg);
	color: var(--gm-text);
}
.gm-search-form button {
	padding: 8px 12px;
	border: 1px solid var(--gm-btn-bg);
	background: var(--gm-btn-bg);
	color: var(--gm-btn-text);
	border-radius: 3px;
	cursor: pointer;
	font-size: 14px;
}
.gm-search-form button:hover { background: var(--gm-btn-bg-hover); border-color: var(--gm-btn-bg-hover); }

.gm-nav-details { margin: 28px 0 0; }
.gm-nav-details summary {
	list-style: none;
	cursor: pointer;
	font-family: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--gm-label);
	display: flex;
	align-items: center;
	gap: 6px;
}
.gm-nav-details summary::-webkit-details-marker { display: none; }
.gm-nav-details summary::before {
	content: "";
	width: 6px;
	height: 6px;
	border-right: 1.5px solid var(--gm-label);
	border-bottom: 1.5px solid var(--gm-label);
	transform: rotate(-45deg);
	transition: transform 0.15s ease;
}
.gm-nav-details[open] summary::before { transform: rotate(45deg); }
.gm-nav-details ul { margin: 12px 0 0; max-height: 320px; overflow-y: auto; }
.gm-nav-details li { margin-bottom: 8px; }

/* ---------- Posts ---------- */
.gm-post { margin-bottom: 52px; padding-bottom: 40px; border-bottom: 1px solid var(--gm-border); }
.gm-post:last-child { border-bottom: none; }
.gm-post-title { font-size: 28px; margin: 0 0 14px; }
.gm-post-title a { color: var(--gm-heading); }
.gm-post-title a:hover { text-decoration: none; color: var(--gm-link); }
.gm-post-body p { margin: 0 0 18px; }
.gm-post-body p:last-child { margin-bottom: 0; }
.gm-post-meta { font-family: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; font-size: 13px; color: var(--gm-muted); margin-top: 18px; }

.gm-share { margin-top: 12px; display: flex; gap: 14px; font-family: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; font-size: 13px; }
.gm-share a { color: var(--gm-muted); }
.gm-share a:hover { color: var(--gm-link); }

/* ---------- Genre badge ---------- */
.gm-genre-badge {
	display: inline-block;
	font-family: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
	font-size: 12px;
	font-weight: 700;
	padding: 3px 11px;
	border-radius: 999px;
	margin-bottom: 12px;
	text-decoration: none;
	border: 1px solid transparent;
}
.gm-genre-badge:hover { text-decoration: none; }
.gm-genre-1 { background: #f4e2da; color: #8a3a1c; }
.gm-genre-2 { background: #dfe3ee; color: #2b3d78; }
.gm-genre-3 { background: #f2e6c9; color: #7a5a10; }
.gm-genre-4 { background: #d9e9e4; color: #1f5c4d; }
body.gm-scheme-dark .gm-genre-1 { background: #4a2a1a; color: #f0b79a; }
body.gm-scheme-dark .gm-genre-2 { background: #262d47; color: #aebbea; }
body.gm-scheme-dark .gm-genre-3 { background: #453b1c; color: #eccd7c; }
body.gm-scheme-dark .gm-genre-4 { background: #1c3a32; color: #90d3bf; }

/* ---------- Pagination ---------- */
.gm-pagination { margin-top: 40px; font-family: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; font-size: 15px; display: flex; justify-content: space-between; }

/* ---------- Footer ---------- */
.gm-footer {
	max-width: 1040px;
	margin: 0 auto;
	padding: 24px 20px 40px;
	font-family: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
	font-size: 13px;
	color: var(--gm-muted);
	border-top: 1px solid var(--gm-border);
}
.gm-footer a { color: var(--gm-muted); text-decoration: underline; }

/* ---------- Color scheme switcher (front-end widget, optional) ---------- */
.gm-scheme-switcher {
	position: fixed;
	top: 18px;
	right: 18px;
	z-index: 100;
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 6px;
	background: var(--gm-bg);
	border: 1px solid var(--gm-border);
	border-radius: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.gm-scheme-switcher button {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 1px solid var(--gm-border-strong);
	cursor: pointer;
	padding: 0;
}
.gm-scheme-switcher button[aria-pressed="true"] { outline: 2px solid var(--gm-link); outline-offset: 2px; }
.gm-scheme-switcher .gm-scheme-swatch-default { background-color: #ffffff !important; }
.gm-scheme-switcher .gm-scheme-swatch-dark { background-color: #15171a !important; border-color: #15171a !important; }
.gm-scheme-switcher .gm-scheme-swatch-orange { background-color: #c1560f !important; border-color: #c1560f !important; }
.gm-scheme-switcher .gm-scheme-swatch-blue { background-color: #0f5fa8 !important; border-color: #0f5fa8 !important; }

@media (max-width: 780px) {
	.gm-scheme-switcher { top: 10px; right: 10px; }
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
