/*
Theme Name: Shadab Dev
Theme URI: https://www.shaikhshadab.com/
Author: Shadab Shaikh
Author URI: https://www.shaikhshadab.com/about-me/
Description: Bespoke technical/minimal theme for shaikhshadab.com.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: shadab-dev
*/

/* ===== Tokens ===== */
:root {
	--bg: #0b0e14;
	--surface: #131720;
	--surface-alt: #1a1f2b;
	--border: #242b38;
	--text: #e6e9ef;
	--text-muted: #9aa4b2;
	--accent: #5eead4;
	--accent-strong: #22d3a5;
	--code-bg: #0d1117;
	--code-text: #c9d1d9;

	--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

	--max-width: 1100px;
	--radius: 10px;

	/* gradient accents, inspired by uttamthapa.com's cyan/teal -> indigo/purple palette */
	--grad-a: #14b8a6;
	--grad-b: #6366f1;
	--grad-c: #a855f7;
	--glass-bg: rgba(19, 23, 32, 0.55);
	--glass-border: rgba(94, 234, 212, 0.16);

	--header-bg: rgba(11, 14, 20, 0.92);
}

:root[data-theme="light"] {
	--bg: #ffffff;
	--surface: #f5f7fa;
	--surface-alt: #eceff3;
	--border: #dde3ea;
	--text: #10151d;
	--text-muted: #5b6472;
	--accent: #0d9488;
	--accent-strong: #0f766e;
	--code-bg: #f1f5f9;
	--code-text: #1f2937;
	--glass-bg: rgba(255, 255, 255, 0.65);
	--glass-border: rgba(13, 148, 136, 0.18);
	--header-bg: rgba(255, 255, 255, 0.92);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-sans);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: no-preference) {
	body, .site-header, .card, .glass-card, .skill-tag, .tag, .now-widget, .btn {
		transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	}
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; }
ul, ol { padding-left: 1.2em; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5em; font-weight: 700; }
p { margin: 0 0 1.2em; }
button, input, textarea { font-family: inherit; }

/* ===== Layout ===== */
.wrap {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 24px;
}
.mono { font-family: var(--font-mono); }

/* ===== Header ===== */
.site-header {
	border-bottom: 1px solid var(--border);
	padding: 20px 0;
	position: sticky;
	top: 0;
	background: var(--header-bg);
	backdrop-filter: blur(6px);
	z-index: 50;
	transition: background-color 0.2s ease;
}
.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-branding img { max-height: 36px; width: auto; }

/* Logo swap: two logos in the markup, CSS shows the right one per theme */
.logo-light { display: none; }
.logo-dark { display: inline-block; }
:root[data-theme="light"] .logo-light { display: inline-block; }
:root[data-theme="light"] .logo-dark { display: none; }

/* ===== Theme toggle ===== */
.theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
	flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle .icon-moon { display: inline; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: inline; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.site-title {
	font-family: var(--font-mono);
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--text);
	margin: 0;
}
.site-title a { color: var(--text); }
.site-title a:hover { color: var(--accent); text-decoration: none; }

.primary-nav ul {
	display: flex;
	gap: 28px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-family: var(--font-mono);
	font-size: 0.92rem;
}
.primary-nav a { color: var(--text-muted); }
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: var(--accent); text-decoration: none; }

.nav-toggle {
	display: none;
	background: none;
	border: 1px solid var(--border);
	color: var(--text);
	border-radius: 6px;
	padding: 8px 10px;
	cursor: pointer;
}

@media (max-width: 720px) {
	.nav-toggle { display: block; }
	.primary-nav {
		display: none;
		width: 100%;
		order: 3;
	}
	.primary-nav.is-open { display: block; }
	.primary-nav ul { flex-direction: column; gap: 16px; padding-top: 16px; }
	.site-header .wrap { flex-wrap: wrap; }
}

/* ===== Hero ===== */
.hero { padding: 72px 0 56px; border-bottom: 1px solid var(--border); }
.hero .kicker {
	font-family: var(--font-mono);
	color: var(--accent);
	font-size: 0.95rem;
	margin: 0 0 14px;
}
.hero .kicker::before { content: "$ "; color: var(--text-muted); }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); max-width: 18ch; }
.positioning { color: var(--text); opacity: 0.8; font-size: 1rem; max-width: 55ch; margin-bottom: 28px; }
.hero-layout { display: flex; align-items: center; gap: 48px; flex-wrap: wrap; }
.hero-copy { flex: 1 1 420px; }
.hero-portrait { flex: 0 0 220px; }
.hero-portrait img {
	border-radius: var(--radius);
	border: 1px solid var(--border);
	width: 220px;
	height: 220px;
	object-fit: cover;
}
.button-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 0.92rem;
	padding: 12px 20px;
	border-radius: 6px;
	border: 1px solid var(--border);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 700; }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--bg); }
.btn-secondary { color: var(--text); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Sections ===== */
.section { padding: 56px 0; border-bottom: 1px solid var(--border); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.section-head h2 { font-size: 1.4rem; }
.section-head .mono-label {
	font-family: var(--font-mono);
	color: var(--text-muted);
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.section-head a.see-all { font-family: var(--font-mono); font-size: 0.88rem; }

/* ===== Cards / grids ===== */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-thumb { aspect-ratio: 16/10; background: var(--surface-alt); overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-thumb.placeholder { display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-family: var(--font-mono); font-size: 0.85rem; }
.card-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 1.05rem; margin: 0; }
.card-body h3 a { color: var(--text); }
.card-body h3 a:hover { color: var(--accent); text-decoration: none; }
.card-summary { color: var(--text-muted); font-size: 0.95rem; margin: 0; flex: 1; }
.card-meta { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	background: var(--surface-alt);
	border: 1px solid var(--border);
	color: var(--accent);
	padding: 3px 8px;
	border-radius: 999px;
}

.card-links { display: flex; gap: 14px; font-family: var(--font-mono); font-size: 0.82rem; }

/* ===== Skills row ===== */
.skills-row { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tag {
	font-family: var(--font-mono);
	font-size: 0.88rem;
	background: var(--surface);
	border: 1px solid var(--border);
	padding: 8px 14px;
	border-radius: 6px;
	color: var(--text);
}

/* ===== Photography strip ===== */
.photo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.photo-strip a { display: block; border-radius: 8px; overflow: hidden; aspect-ratio: 1/1; }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s ease; }
.photo-strip a:hover img { transform: scale(1.05); }
@media (max-width: 720px) { .photo-strip { grid-template-columns: repeat(2, 1fr); } }

/* ===== Now widget ===== */
.now-widget {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px 24px;
}
.now-widget .mono-label { display: block; margin-bottom: 8px; }

/* ===== Footer ===== */
.site-footer { padding: 48px 0 32px; }
.footer-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-bottom: 32px; }
.footer-social { display: flex; gap: 12px; flex-wrap: wrap; }
.social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 8px;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text-muted);
}
.social-icon:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.footer-newsletter form { display: flex; gap: 8px; }
.footer-newsletter input[type="email"] {
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--text);
	padding: 10px 12px;
	border-radius: 6px;
	min-width: 220px;
}
.site-footer .copyright { color: var(--text-muted); font-size: 0.85rem; font-family: var(--font-mono); }

/* ===== Post / page content ===== */
.content-wrap { padding: 48px 0; }
.entry-header { margin-bottom: 32px; }
.entry-meta { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }
.entry-title { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.entry-content { font-size: 1.05rem; max-width: 72ch; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content img { border-radius: var(--radius); }
.entry-content pre {
	background: var(--code-bg);
	color: var(--code-text);
	padding: 18px 20px;
	border-radius: var(--radius);
	overflow-x: auto;
	font-family: var(--font-mono);
	font-size: 0.9rem;
	border: 1px solid var(--border);
}
.entry-content code {
	font-family: var(--font-mono);
	background: var(--surface-alt);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.9em;
}
.entry-content pre code { background: none; padding: 0; }
.author-box {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px;
	margin-top: 48px;
}
.author-box img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.share-links { display: flex; gap: 14px; font-family: var(--font-mono); font-size: 0.85rem; margin-top: 24px; }

.pagination { display: flex; gap: 12px; font-family: var(--font-mono); font-size: 0.9rem; margin-top: 32px; }

.search-form { display: flex; gap: 8px; margin-bottom: 32px; }
.search-form input[type="search"] {
	flex: 1;
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--text);
	padding: 10px 12px;
	border-radius: 6px;
}

.work-intro { max-width: 65ch; color: var(--text-muted); margin-bottom: 40px; }

/* ===== Gradient blob backdrop (uttamthapa.com-inspired accent) ===== */
.blob-field {
	position: relative;
	isolation: isolate;
	overflow: hidden;
}
.blob-field::before,
.blob-field::after {
	content: "";
	position: absolute;
	width: 480px;
	height: 480px;
	border-radius: 50%;
	filter: blur(110px);
	opacity: 0.28;
	z-index: -1;
	pointer-events: none;
}
.blob-field::before {
	background: radial-gradient(circle, var(--grad-a), transparent 70%);
	top: -140px;
	left: -120px;
}
.blob-field::after {
	background: radial-gradient(circle, var(--grad-b), var(--grad-c) 70%, transparent 75%);
	bottom: -160px;
	right: -140px;
}
@media (prefers-reduced-motion: no-preference) {
	.blob-field::before, .blob-field::after { animation: blob-drift 18s ease-in-out infinite alternate; }
	.blob-field::after { animation-delay: -9s; }
}
@keyframes blob-drift {
	from { transform: translate(0, 0) scale(1); }
	to   { transform: translate(30px, 20px) scale(1.08); }
}

/* ===== Glass card ===== */
.glass-card {
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	padding: 24px 28px;
}

/* ===== About hero ===== */
.about-hero { padding: 64px 0 48px; }
.about-hero .hero-portrait img {
	width: 180px;
	height: 180px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--glass-border);
	box-shadow: 0 0 0 6px rgba(94, 234, 212, 0.06);
}
.about-hero .hero-copy h1 {
	font-size: clamp(1.7rem, 3.5vw, 2.3rem);
	background: linear-gradient(90deg, var(--text) 40%, var(--grad-a));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}
.about-bio { max-width: none; }
.about-bio p { max-width: none; }

/* ===== Career timeline ===== */
.timeline {
	position: relative;
	margin-left: 10px;
	padding-left: 28px;
	border-left: 1px solid var(--border);
}
.timeline-item { position: relative; margin-bottom: 32px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before {
	content: "";
	position: absolute;
	left: -33px;
	top: 6px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--grad-a);
	box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.18);
}
.timeline-item .period { font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent); margin: 0 0 4px; }
.timeline-item h3 { font-size: 1.05rem; margin: 0 0 2px; }
.timeline-item .org { color: var(--text-muted); font-size: 0.92rem; margin: 0 0 12px; }
.timeline-item .org a, .timeline-item .desc-list a { color: var(--text-muted); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 2px; }
.timeline-item .org a:hover, .timeline-item .desc-list a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.timeline-item .desc-list { list-style: none; padding: 0; margin: 0; max-width: 72ch; display: flex; flex-direction: column; gap: 8px; }
.timeline-item .desc-list li { position: relative; padding-left: 18px; color: var(--text-muted); font-size: 0.95rem; line-height: 1.55; }
.timeline-item .desc-list li::before { content: "\2192"; position: absolute; left: 0; color: var(--accent); }

/* ===== Skill groups (About page) ===== */
.skill-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .skill-groups { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .skill-groups { grid-template-columns: 1fr; } }
.skill-group h4 { font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin: 0 0 12px; }
.skill-group .tag-row { gap: 8px; }

/* ===== Certifications ===== */
.cert-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cert-badge {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.88rem;
	padding: 10px 16px;
	border-radius: 999px;
}
.cert-badge::before { content: "\2713"; color: var(--grad-a); font-weight: 700; }
