/*
Theme Name: Hashim
Theme URI: https://drhashimk.com
Author: Khalifa Mahgoub
Description: RTL-first Arabic block theme for the archive of Dr. Hashim Khalifa Mahgoub — Sudanese architect, photographer and broadcaster. Palette drawn from his own architectural photography: Sudanese red brick, ochre, sand and whitewash against Nile sky. Typography pairs IBM Plex Sans Arabic for structure with Amiri for long-form reading.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.0
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: hashim
Tags: blog, portfolio, one-column, block-patterns, full-site-editing, rtl-language-support
*/

/* ---------------------------------------------------------------
   Almost everything lives in theme.json. This file holds only what
   theme.json cannot express: RTL correctness and Arabic typography
   rules that must never be overridden.
   --------------------------------------------------------------- */

/* Arabic script is cursive — letter-spacing severs the joins between
   letters. This is the single most recognisable Arabic typography
   error, so it is enforced globally rather than left to each block. */
body,
h1, h2, h3, h4, h5, h6,
.wp-block-site-title,
.wp-block-navigation,
.wp-block-post-title {
	letter-spacing: 0 !important;
}

/* text-transform has no meaning in Arabic and mangles mixed runs. */
:is(h1, h2, h3, h4, h5, h6, .wp-block-site-title) {
	text-transform: none;
}

/* Latin runs inside Arabic text (URLs, "PhD", years) need isolation or
   trailing punctuation lands on the wrong side. */
bdi,
[dir="ltr"] {
	unicode-bidi: isolate;
}

/* Arabic ascenders, dots and descenders clip at tight line-heights. */
.wp-block-post-title,
.wp-block-post-title a {
	line-height: 1.3;
}

/* Long-form reading measure. His essays run to 6,700 words, so the
   column width matters more here than on a typical blog. */
.entry-content > p {
	max-width: 38rem;
	margin-inline: auto;
}

/* Logical properties only — no left/right — so the layout mirrors
   correctly if the site is ever served LTR. */
.wp-block-quote {
	border-inline-start: 3px solid var(--wp--preset--color--sand);
	border-inline-end: 0;
	padding-inline-start: var(--wp--preset--spacing--30);
	padding-inline-end: 0;
	margin-inline: 0;
	font-style: normal;
}

/* Captions sit under his photographs and carry real information —
   gallery names, building names — so they read as content, not chrome. */
.wp-block-image figcaption,
.wp-block-gallery figcaption {
	text-align: start;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	line-height: 1.6;
}

/* Photographs are the point of this site: let them breathe. */
.wp-block-image img,
.wp-block-gallery img {
	border-radius: 2px;
}

/* Skip link, keyboard focus */
:where(a:focus-visible, button:focus-visible) {
	outline: 2px solid var(--wp--preset--color--brick);
	outline-offset: 2px;
}
