/*
Theme Name: Ossahmad Theme
Author: Oss Ahmad
Description: A lean WordPress block theme scaffold for a personal site, portfolio, and blog.
Version: 0.1.0
Requires at least: 6.5
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ossahmad-theme
*/

/* FONTS FAMILIES FOR PERSAIN AND ENGLISH */

html {
	scroll-behavior: smooth;
}

body {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--foreground);
	font-family: var(--wp--preset--font-family--english-serif);
}

a {
	text-underline-offset: 0.18em;
}

.wp-site-blocks {
	min-height: 100vh;
}

input,
textarea,
select {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	color: var(--wp--preset--color--foreground);
	font: inherit;
	padding: 0.75rem 0.9rem;
}

:dir(ltr) {
	font-family: var(--wp--preset--font-family--english-serif);
}

:dir(rtl) {
	font-family: var(--wp--preset--font-family--persian-arabic);
}

:where(code, pre, kbd, samp, .wp-block-code, .wp-block-preformatted) {
	direction: ltr;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	unicode-bidi: isolate;
}

:where(math, .katex, .MathJax) {
	font-family: math, "Cambria Math", "STIX Two Math", serif;
}


/* HEADER CODE ESPECIALLY FOR HOME  */

.oss-site-header__inner {
	align-items: center;
	display: grid;
	gap: var(--wp--preset--spacing--40);
	grid-template-columns: auto auto;
	justify-content: end;
}

.oss-site-header__brand,
.oss-home-header__brand,
.oss-home-header__links a {
	color: var(--wp--preset--color--foreground);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
}

.oss-site-header__brand:hover,
.oss-site-header__brand:focus-visible,
.oss-home-header__brand:hover,
.oss-home-header__brand:focus-visible,
.oss-home-header__links a:hover,
.oss-home-header__links a:focus-visible {
	color: var(--wp--preset--color--primary);
}

.oss-site-header__toggle {
	align-items: center;
	background: transparent;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	color: var(--wp--preset--color--foreground);
	cursor: pointer;
	display: inline-flex;
	flex-direction: column;
	gap: 0.25rem;
	height: 2.35rem;
	justify-content: center;
	padding: 0;
	width: 2.35rem;
}

.oss-site-header__toggle:hover,
.oss-site-header__toggle:focus-visible {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

.oss-site-header__toggle:focus-visible,
.oss-home-header a:focus-visible {
	outline: 2px solid var(--wp--preset--color--foreground);
	outline-offset: 3px;
}

.oss-site-header__toggle span {
	background: currentColor;
	border-radius: 999px;
	display: block;
	height: 2px;
	width: 1rem;
}

.oss-home-header__links {
	display: flex;
	flex: 0 1 auto;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--40);
	justify-content: flex-end;
}

.oss-home-header__inner {
	align-items: center;
	display: flex;
	justify-content: space-between;
	margin-left: auto !important;
	margin-right: auto !important;
	max-width: var(--wp--style--global--content-size, 760px) !important;
	min-height: clamp(5rem, 12vw, 8rem);
	position: relative;
	width: 100%;
}

.oss-home-header__brand {
	flex: 0 0 auto;
}

.oss-home-header__logo-link {
	border-radius: 1.75rem;
	display: block;
	line-height: 0;
	left: 50%;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
}

.oss-home-header__logo {
	aspect-ratio: 1;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 1.75rem;
	box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.24);
	display: block;
	height: clamp(5rem, 12vw, 8rem);
	object-fit: cover;
	width: clamp(5rem, 12vw, 8rem);
}

@media (max-width: 640px) {
	.oss-site-header__inner {
		gap: var(--wp--preset--spacing--30);
	}

	.oss-home-header__inner {
		align-items: center;
		flex-wrap: wrap;
		min-height: clamp(4rem, 18vw, 5rem);
		row-gap: var(--wp--preset--spacing--40);
	}

	.oss-home-header__links {
		gap: var(--wp--preset--spacing--30);
	}

	.oss-home-header__logo {
		height: clamp(3.5rem, 16vw, 4.5rem);
		width: clamp(3.5rem, 16vw, 4.5rem);
	}

	.oss-home-header__brand,
	.oss-home-header__links a {
		font-size: 0.95rem;
	}
}

/* ============================================================
   DEFAULT PAGE SIDEBAR / NAVIGATION DRAWER
   Used by the hamburger button in parts/header.html.
   ============================================================ */

.oss-sidebar-shell {
	inset: 0;
	opacity: 0;
	pointer-events: none;
	position: fixed;
	transition: opacity 220ms ease;
	visibility: hidden;
	z-index: 9998;
}

.oss-sidebar-shell.is-open {
	opacity: 1;
	pointer-events: auto;
	visibility: visible;
}

.oss-sidebar-backdrop {
	background: rgba(0, 0, 0, 0.62);
	inset: 0;
	position: absolute;
}

.oss-sidebar {
	background: #050505;
	border-left: 1px solid rgba(170, 20, 20, 0.55);
	box-shadow: -2rem 0 5rem rgba(0, 0, 0, 0.55);
	color: #ffffff;
	display: flex;
	flex-direction: column;
	gap: 2rem;
	height: 100%;
	max-width: min(88vw, 24rem);
	padding: 1.25rem;
	position: absolute;
	right: 0;
	top: 0;
	transform: translateX(100%);
	transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
	width: 24rem;
}

.oss-sidebar-shell.is-open .oss-sidebar {
	transform: translateX(0);
}

.oss-sidebar__top {
	align-items: center;
	display: flex;
	justify-content: space-between;
}

.oss-sidebar__close,
.oss-sidebar__theme-toggle {
	align-items: center;
	background: transparent;
	border: 1px solid rgba(170, 20, 20, 0.7);
	border-radius: 999px;
	color: #ffffff;
	cursor: pointer;
	display: inline-flex;
	font-family: inherit;
	font-size: 1.4rem;
	font-weight: 800;
	height: 2.5rem;
	justify-content: center;
	line-height: 1;
	padding: 0;
	transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
	width: 2.5rem;
}

.oss-sidebar__theme-toggle {
	font-size: 1.15rem;
}

.oss-sidebar__close:hover,
.oss-sidebar__close:focus-visible,
.oss-sidebar__theme-toggle:hover,
.oss-sidebar__theme-toggle:focus-visible {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: #ffffff;
	transform: scale(1.05);
}

.oss-sidebar__nav {
	border-top: 1px solid rgba(170, 20, 20, 0.65);
	display: flex;
	flex-direction: column;
}

.oss-sidebar__nav a {
	border-bottom: 1px solid rgba(170, 20, 20, 0.45);
	color: #ffffff;
	font-size: clamp(1.05rem, 2.2vw, 1.45rem);
	font-weight: 800;
	line-height: 1.1;
	padding: 0.95rem 0;
	text-decoration: none;
	transform-origin: left center;
	transition: color 180ms ease, padding-left 180ms ease, transform 180ms ease;
}

.oss-sidebar__nav a:hover,
.oss-sidebar__nav a:focus-visible {
	color: var(--wp--preset--color--primary);
	padding-left: 0.35rem;
	transform: scale(1.025);
}

.oss-sidebar__close:focus-visible,
.oss-sidebar__theme-toggle:focus-visible,
.oss-sidebar__nav a:focus-visible,
.oss-site-header__toggle:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 3px;
}

body.oss-sidebar-is-open {
	overflow: hidden;
}

@media (max-width: 640px) {
	.oss-sidebar {
		max-width: 92vw;
		width: 92vw;
	}

	.oss-sidebar__nav a {
		font-size: 1.2rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.oss-sidebar-shell,
	.oss-sidebar,
	.oss-sidebar__nav a,
	.oss-sidebar__close,
	.oss-sidebar__theme-toggle {
		transition: none;
	}
}

/* FOOTER STYLE */

.oss-site-footer {
	text-align: center;
}

.oss-footer-copyright {
	color: var(--wp--preset--color--foreground);
	font-size: 0.95rem;
	font-weight: 700;
	margin: 0 0 1.25rem;
}

/* SOCIAL ICONS STYLING */

.oss-social-icons {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.oss-social-icons a {
	align-items: center;
	background: var(--wp--preset--color--primary);
	border: 1px solid var(--wp--preset--color--primary);
	border-radius: 999px;
	color: var(--wp--preset--color--foreground);
	display: inline-flex;
	height: 2.65rem;
	justify-content: center;
	text-decoration: none;
	transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
	width: 2.65rem;
}

.oss-social-icons a:hover,
.oss-social-icons a:focus-visible {
	background: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--primary-dark);
	color: var(--wp--preset--color--primary);
	transform: translateY(-2px);
}

.oss-social-icons a:focus-visible {
	outline: 2px solid var(--wp--preset--color--foreground);
	outline-offset: 3px;
}

.oss-social-icons svg {
	fill: currentColor;
	height: 1.25rem;
	width: 1.25rem;
}

/* STYLE FOR allblogs PAGE */

.oss-all-blogs {
	margin-top: var(--wp--preset--spacing--50);
}

.oss-all-blogs__list {
	list-style-position: outside;
	margin: 0;
	padding-left: 1.5rem;
}

.oss-all-blogs__item {
	margin-bottom: 0.45rem;
	font-size: clamp(1.05rem, 1.6vw, 1.3rem);
	line-height: 1.45;
}

.oss-all-blogs__date {
	color: var(--wp--preset--color--muted);
	font-size: 0.95em;
	white-space: nowrap;
}

.oss-all-blogs__separator {
	color: var(--wp--preset--color--muted);
	margin-left: 0.25rem;
	margin-right: 0.25rem;
}

.oss-all-blogs__link {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.16em;
}

.oss-all-blogs__item:dir(rtl) {
	text-align: right;
}

/* PHONE LAYOUT AND TYPE SCALE */

@media (max-width: 640px) {
	body {
		--wp--style--root--padding-left: 0.75rem;
		--wp--style--root--padding-right: 0.75rem;
		font-size: 0.9375rem;
		padding-left: 0.75rem;
		padding-right: 0.75rem;
	}

	body h1,
	body .has-xx-large-font-size {
		font-size: 2.25rem;
		line-height: 1.15;
	}

	body h2,
	body .has-x-large-font-size {
		font-size: 1.625rem;
		line-height: 1.25;
	}

	body h3,
	body .has-large-font-size {
		font-size: 1.125rem;
		line-height: 1.35;
	}

	.oss-home-header__brand,
	.oss-home-header__links a,
	.oss-site-header__brand {
		font-size: 0.875rem;
	}

	.oss-sidebar__nav a {
		font-size: 1.05rem;
	}

	.oss-footer-copyright {
		font-size: 0.875rem;
	}

	.oss-all-blogs__item {
		font-size: 1rem;
	}

	body .oss-home-content {
		width: 100%;
	}

	body .oss-home-title {
		font-size: 2rem;
		line-height: 1.25;
		max-width: 100%;
	}

	body .oss-home-subtitle {
		font-size: 0.9375rem;
	}

	body .oss-button,
	body .oss-home-tile__title {
		font-size: 0.9375rem;
	}

	body .oss-modal__panel {
		padding: 1.25rem;
		width: min(calc(100vw - 1.5rem), 44rem);
	}

	body .oss-modal__panel h2 {
		font-size: 1.5rem;
		line-height: 1.35;
	}

	body .oss-modal__panel p {
		font-size: 0.9375rem;
	}

	body .oss-resume-page {
		padding-left: 0.5rem;
		padding-right: 0.5rem;
	}

	body .oss-resume-inner {
		width: 100%;
	}

	body .oss-resume-header h1 {
		font-size: 2.25rem;
		line-height: 1.15;
	}

	body .oss-resume-subtitle {
		font-size: 0.9375rem;
	}

	body .oss-resume-card {
		padding: 1rem;
	}

	body .oss-resume-card h2 {
		font-size: 1.5rem;
		line-height: 1.35;
	}

	body .oss-resume-card h3 {
		font-size: 1.0625rem;
		line-height: 1.4;
	}

	body .oss-resume-card p,
	body .oss-resume-card li {
		font-size: 0.9375rem;
	}
}
