* { margin: 0; padding: 0; box-sizing: border-box; }

body {
	font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
	background: #faf7f2;
	color: #2a2823;
	line-height: 1.9;
	font-size: 19px;
	padding: 26px 24px 100px;
	direction: rtl;
	text-align: right;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

main, header.blog-header, footer.blog-footer {
	max-width: 760px;
	margin: 0 auto;
}

/* One bar, one spec, sitewide — mirrors automatically under dir=rtl. */
.site-head {
	max-width: 760px;
	margin: 0 auto 56px;
	padding-bottom: 18px;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 20px;
	border-bottom: 1px solid #ece7de;
}

.site-name {
	font-family: "Reem Kufi", "IBM Plex Sans Arabic", sans-serif;
	font-size: 20px;
	font-weight: 500;
	color: #1a1815;
	text-decoration: none;
	white-space: nowrap;
}

.site-name:hover { color: #a04f3c; }

.site-nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px 18px;
	font-size: 14.5px;
}

.site-nav a {
	color: #6b6455;
	text-decoration: none;
	transition: color 0.15s;
}

.site-nav a:hover { color: #a04f3c; }

header.blog-header {
	margin-bottom: 72px;
	padding-bottom: 40px;
	border-bottom: 1px solid #d8d2c6;
}

header.blog-header h1 {
	font-family: "Reem Kufi", "IBM Plex Sans Arabic", sans-serif;
	font-size: 60px;
	font-weight: 700;
	color: #1a1815;
	line-height: 1.1;
	letter-spacing: -0.015em;
	margin-bottom: 16px;
}

header.blog-header .tagline {
	font-size: 20px;
	color: #6b6455;
	font-weight: 400;
	margin-bottom: 24px;
	line-height: 1.6;
}

header.blog-header .home-link {
	font-size: 14px;
	color: #6b6455;
	letter-spacing: 0.03em;
}

a {
	color: #a04f3c;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
	text-decoration-color: #d0aa9d;
	transition: color 0.15s, text-decoration-color 0.15s;
}

a:hover {
	color: #7a3a2b;
	text-decoration-color: #a04f3c;
}

.post-list {
	list-style: none;
	counter-reset: post 0;
}

.post-list li {
	margin-bottom: 56px;
	padding-bottom: 48px;
	border-bottom: 1px solid #ece7de;
	counter-increment: post;
	position: relative;
}

.post-list li:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.post-list li::before {
	content: counter(post, arabic-indic);
	font-family: "Reem Kufi", sans-serif;
	font-size: 13px;
	font-weight: 500;
	color: #b8895e;
	letter-spacing: 0.1em;
	display: block;
	margin-bottom: 10px;
}

.post-list h2 {
	font-family: "Reem Kufi", "IBM Plex Sans Arabic", sans-serif;
	font-size: 34px;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 14px;
	letter-spacing: -0.01em;
}

.post-list h2 a {
	color: #1a1815;
	text-decoration: none;
	transition: color 0.15s;
}

.post-list h2 a:hover {
	color: #a04f3c;
}

.post-list .meta {
	font-size: 13px;
	color: #8a7f6d;
	font-weight: 500;
	letter-spacing: 0.05em;
	margin-bottom: 14px;
}

.post-list .excerpt {
	color: #4a4640;
	line-height: 1.85;
	font-size: 17.5px;
}

article {
	padding-top: 8px;
}

article h1.post-title {
	font-family: "Reem Kufi", "IBM Plex Sans Arabic", sans-serif;
	font-size: 52px;
	font-weight: 700;
	color: #1a1815;
	line-height: 1.2;
	letter-spacing: -0.015em;
	margin-bottom: 18px;
}

article .post-meta {
	font-size: 13px;
	color: #8a7f6d;
	font-weight: 500;
	letter-spacing: 0.08em;
	margin-bottom: 48px;
	padding-bottom: 36px;
	border-bottom: 1px solid #d8d2c6;
}

article .content {
	font-size: 20px;
	line-height: 1.95;
	color: #2a2823;
}

article .content p {
	margin-bottom: 28px;
}

article .content h2 {
	font-family: "Reem Kufi", "IBM Plex Sans Arabic", sans-serif;
	font-size: 32px;
	font-weight: 700;
	color: #1a1815;
	margin: 48px 0 22px;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

article .content h3 {
	font-family: "Reem Kufi", "IBM Plex Sans Arabic", sans-serif;
	font-size: 26px;
	font-weight: 500;
	color: #1a1815;
	margin: 36px 0 16px;
}

article .content blockquote {
	border-right: 3px solid #a04f3c;
	padding: 8px 28px 8px 0;
	margin: 36px 12px 36px 0;
	color: #4a4640;
	font-style: italic;
	font-size: 21px;
	line-height: 1.75;
}

article .content ul, article .content ol {
	margin: 22px 28px 30px 0;
	padding-right: 8px;
}

article .content li {
	margin-bottom: 12px;
}

article .content figure {
	margin: 44px 0;
}

article .content figure img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
	border-radius: 4px;
}

article .content figcaption {
	text-align: center;
	font-size: 14px;
	color: #6b6455;
	margin-top: 14px;
}

article .content img {
	max-width: 100%;
	height: auto;
}

article .content strong {
	font-weight: 700;
	color: #1a1815;
}

article .content code {
	background: #efe9dd;
	padding: 2px 8px;
	border-radius: 3px;
	font-family: "SF Mono", Menlo, monospace;
	font-size: 15px;
	direction: ltr;
	display: inline-block;
}

article .content pre {
	background: #efe9dd;
	padding: 20px;
	border-radius: 6px;
	overflow-x: auto;
	direction: ltr;
	text-align: left;
	margin: 26px 0;
}

article .content pre code {
	background: none;
	padding: 0;
	font-size: 14px;
}

footer.blog-footer {
	margin-top: 80px;
	padding-top: 32px;
	border-top: 1px solid #d8d2c6;
	font-size: 15px;
	color: #6b6455;
}

footer.blog-footer a {
	color: #6b6455;
	text-decoration-color: #d8d2c6;
}

footer.blog-footer a:hover {
	color: #a04f3c;
}

@media (max-width: 640px) {
	body {
		padding: 22px 20px 72px;
		font-size: 18px;
	}

	header.blog-header {
		margin-bottom: 52px;
		padding-bottom: 32px;
	}

	header.blog-header h1 {
		font-size: 42px;
	}

	header.blog-header .tagline {
		font-size: 18px;
	}

	.post-list li {
		margin-bottom: 44px;
		padding-bottom: 36px;
	}

	.post-list h2 {
		font-size: 26px;
	}

	.post-list .excerpt {
		font-size: 16.5px;
	}

	article h1.post-title {
		font-size: 36px;
	}

	article .content {
		font-size: 18.5px;
	}

	article .content h2 {
		font-size: 26px;
	}
}
