/* ==========================================================
   Azad Khan Portfolio – main styles
   Palette: ink #0F1B2D · paper #F2F4F7 · cobalt (accent) · sun #FFD43B
   Type: Bricolage Grotesque (display) + Figtree (text)
   ========================================================== */

:root {
	--ink: #0f1b2d;
	--paper: #f2f4f7;
	--white: #ffffff;
	--accent: #2d4bff;
	--sun: #ffd43b;
	--mist: #dce2eb;
	--tint: #e7ebf2;
	--muted: #4f5b70;
	--radius: 6px;
	--wrap: 1180px;
	--head: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
	--body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 1.0625rem/1.65 var(--body);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.2em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1em; }

h1, h2, h3 {
	font-family: var(--head);
	line-height: 1.08;
	letter-spacing: -0.02em;
	margin: 0 0 0.5em;
}
h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); font-weight: 800; }
h3 { font-size: 1.35rem; font-weight: 700; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 46rem; }

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

.skip {
	position: absolute; left: -9999px; top: 0; z-index: 100;
	background: var(--ink); color: var(--white); padding: 0.75rem 1rem;
}
.skip:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(242, 244, 247, 0.92);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--mist);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4.25rem; gap: 1rem; }
.brand { font: 800 1.2rem/1 var(--head); letter-spacing: 0.04em; text-decoration: none; }
.brand img { max-height: 2.5rem; width: auto; }

.site-nav .menu { display: flex; gap: 2rem; }
.site-nav a { text-decoration: none; font-weight: 500; padding: 0.4rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--accent); }
.site-nav .current-menu-item > a { border-bottom-color: var(--ink); }

.nav-toggle {
	display: none; width: 2.75rem; height: 2.75rem; border: 1px solid var(--ink);
	background: transparent; border-radius: var(--radius); cursor: pointer; position: relative;
}
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
	display: block; position: absolute; left: 50%; width: 1.2rem; height: 2px; background: var(--ink);
	transform: translateX(-50%); content: "";
}
.nav-toggle .bars { top: 50%; margin-top: -1px; }
.nav-toggle .bars::before { top: -6px; left: 50%; }
.nav-toggle .bars::after { top: 6px; left: 50%; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-block; padding: 0.85rem 1.5rem; border-radius: var(--radius);
	font: 600 1rem/1.2 var(--body); text-decoration: none; border: 2px solid var(--ink);
	cursor: pointer; transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(3.5rem, 7vw, 5.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: clamp(2rem, 6vw, 5rem); align-items: end; }
.hero-name {
	font-size: clamp(3.6rem, 12.5vw, 9.75rem); font-weight: 800; line-height: 0.86;
	letter-spacing: -0.045em; margin: 0 0 1.75rem;
}
.hero-name span { display: block; }
.hero-role { font: 700 clamp(1.25rem, 2.4vw, 1.75rem)/1.2 var(--head); margin-bottom: 0.75rem; }
.hero-text { max-width: 36rem; color: var(--muted); font-size: 1.15rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.75rem; }

.portrait { position: relative; aspect-ratio: 4 / 5; width: 100%; max-width: 26rem; justify-self: end; }
.portrait::before {
	content: ""; position: absolute; inset: 1.25rem -1.25rem -1.25rem 1.25rem;
	background: var(--accent); border-radius: var(--radius);
}
.portrait-img, .portrait-ph {
	position: relative; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius);
}
.portrait-ph { display: grid; place-items: center; background: var(--ink); color: var(--sun); font: 800 6rem/1 var(--head); }

/* ---------- Marquee ---------- */
.marquee { background: var(--sun); color: var(--ink); border-block: 2px solid var(--ink); overflow: hidden; }
.marquee-track { display: flex; width: max-content; animation: slide 36s linear infinite; }
.marquee ul { display: flex; flex-shrink: 0; }
.marquee li { font: 700 1.25rem/1 var(--head); padding: 1rem 1.25rem; white-space: nowrap; }
.marquee li::after { content: "✦"; margin-left: 2.5rem; font-size: 0.9em; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-tint { background: var(--tint); }
.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 34rem; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.split-head { position: sticky; top: 6rem; }

.prose { max-width: 44rem; }
.prose p { margin-bottom: 1.2em; }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose img { border-radius: var(--radius); }
.prose a { color: var(--accent); }

.about-photo { margin-top: 1.5rem; }
.about-photo img { border-radius: var(--radius); }

/* Services */
.rows li {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.5rem;
	padding: 1.6rem 0; border-top: 2px solid var(--ink);
}
.rows li:last-child { border-bottom: 2px solid var(--ink); }
.rows h3 { margin: 0; }
.rows p { margin: 0; color: var(--muted); }

/* Skills */
.skills li { margin-bottom: 1.25rem; }
.skill-top { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 0.4rem; }
.bar { height: 10px; background: var(--mist); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--p); background: var(--accent); border-radius: 99px; }

/* Projects & posts */
.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2rem; }
.filters button {
	font: 600 0.95rem/1 var(--body); padding: 0.65rem 1.1rem; border: 2px solid var(--ink);
	background: transparent; color: var(--ink); border-radius: 99px; cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--white); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18.5rem, 1fr)); gap: 1.75rem; }
.grid[aria-busy="true"] { opacity: 0.5; }

.card { background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius); overflow: hidden; }
.card-link { display: block; text-decoration: none; height: 100%; }
.card-media { aspect-ratio: 4 / 3; background: var(--ink); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.card-link:hover .card-media img { transform: scale(1.04); }
.card-ph { display: grid; place-items: center; height: 100%; color: var(--sun); font: 800 4rem/1 var(--head); }
.card-body { padding: 1.25rem 1.35rem 1.5rem; }
.card-cat { margin: 0 0 0.35rem; font-size: 0.9rem; color: var(--accent); font-weight: 600; }
.card h3, .card-title { margin: 0 0 0.4rem; font-size: 1.3rem; }
.card-result { margin: 0; color: var(--muted); font-size: 0.98rem; }
.empty { color: var(--muted); }

/* Timeline */
.timeline li { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1.5rem; }
.tl-years { font: 700 1rem/1.4 var(--head); padding-top: 0.15rem; }
.tl-body { border-left: 2px solid var(--ink); padding: 0 0 2.25rem 1.75rem; position: relative; }
.tl-body::before {
	content: ""; position: absolute; left: -7px; top: 0.4rem; width: 12px; height: 12px;
	background: var(--sun); border: 2px solid var(--ink); border-radius: 50%;
}
.timeline li:last-child .tl-body { padding-bottom: 0; }
.tl-body h3 { margin-bottom: 0.15rem; }
.tl-company { color: var(--accent); font-weight: 600; margin-bottom: 0.4rem; }

/* Results band */
.band { background: var(--ink); color: var(--white); }
.band-title { color: var(--white); margin-bottom: 2rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 2rem; }
.stats b { display: block; font: 800 clamp(2.6rem, 6vw, 4.5rem)/1 var(--head); color: var(--sun); }
.stats span { color: #c9d2e0; }

/* Testimonials */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 2rem; }
.quote { margin: 0; padding-left: 1.5rem; border-left: 5px solid var(--accent); }
.quote blockquote { margin: 0 0 1rem; font: 500 1.2rem/1.5 var(--head); }
.quote blockquote p { margin: 0; }
.quote figcaption strong { display: block; }
.quote figcaption span { color: var(--muted); font-size: 0.95rem; }

/* Contact */
.contact-list { margin-top: 1.5rem; }
.contact-list li { padding: 0.45rem 0; border-top: 1px solid var(--ink); font-weight: 500; }
.contact-list li:last-child { border-bottom: 1px solid var(--ink); }

.form p { margin-bottom: 1.1rem; }
.form label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.form input, .form textarea, .search-form input[type="search"] {
	width: 100%; padding: 0.85rem 1rem; font: inherit; color: var(--ink);
	background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius);
}
.form input:focus, .form textarea:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; }
.form-status { min-height: 1.5em; font-weight: 600; }
.form-status.is-error { color: #b3261e; }
.form-status.is-ok { color: #1a6b3c; }

/* Inner pages */
.page-main { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3.5rem, 8vw, 6rem); min-height: 60vh; }
.page-head { margin-bottom: 2.25rem; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); font-weight: 800; }
.entry-image { margin-bottom: 2rem; }
.entry-image img { border-radius: var(--radius); width: 100%; }
.entry-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.5rem; }
.facts { display: flex; flex-wrap: wrap; gap: 1rem 3rem; margin: 1.25rem 0 0; }
.facts dt { font-size: 0.9rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

.navigation.pagination { margin-top: 2.5rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.page-numbers { padding: 0.5rem 0.9rem; border: 2px solid var(--ink); border-radius: var(--radius); text-decoration: none; font-weight: 600; }
.page-numbers.current { background: var(--ink); color: var(--white); }

.search-form { display: flex; gap: 0.6rem; max-width: 28rem; }
.search-form label { flex: 1; }
.search-form .search-submit {
	padding: 0.85rem 1.25rem; border: 2px solid var(--ink); background: var(--ink); color: var(--white);
	border-radius: var(--radius); font: 600 1rem var(--body); cursor: pointer;
}

/* WordPress core alignment */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; }
.wp-caption-text, figcaption { font-size: 0.9rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--white); padding: 3.5rem 0 1.5rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.footer-name { font: 800 1.6rem/1.1 var(--head); margin: 0 0 0.25rem; }
.footer-role { color: #c9d2e0; margin: 0; }
.socials { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; align-self: center; }
.socials a, .footer-nav a { text-decoration: none; border-bottom: 1px solid var(--sun); }
.socials a:hover, .footer-nav a:hover { color: var(--sun); }
.footer-nav .menu { display: flex; gap: 1.5rem; }
.footer-base { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid #2a3a54; color: #aab5c8; font-size: 0.95rem; }
.footer-base p { margin: 0; }
.widget-title { font-size: 1.1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.site-nav {
		position: absolute; left: 0; right: 0; top: 100%; background: var(--paper);
		border-bottom: 1px solid var(--mist); display: none; padding: 0.75rem 1.25rem 1.25rem;
	}
	.site-nav.open { display: block; }
	.site-nav .menu { flex-direction: column; gap: 0.25rem; }
	.site-nav a { display: block; padding: 0.7rem 0; }

	.hero-grid, .split { grid-template-columns: 1fr; }
	.portrait { justify-self: start; max-width: 20rem; margin: 0 1.25rem 1.25rem 0; }
	.split-head { position: static; }
	.rows li { grid-template-columns: 1fr; gap: 0.5rem; }
	.timeline li { grid-template-columns: 1fr; gap: 0.25rem; }
	.tl-years { padding-left: 1.75rem; }
	.footer-inner { flex-direction: column; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.marquee-track { animation: none; }
	.marquee { overflow-x: auto; }
	* { transition: none !important; }
}
