/*
 * Qjweb Portfolio — main stylesheet.
 * Hand-rolled to avoid forcing a Tailwind build at install time.
 * The Tailwind toolchain lives in /assets/css/tailwind.css if you prefer to compile.
 */

:root {
	--c-black:  #0b0b0b;
	--c-gray:   #1a1a1a;
	--c-yellow: #f6cb48;
	--c-white:  #ffffff;
	--c-muted:  #9aa0a6;
	--c-border: #262626;
	--c-glass:  rgba(255, 255, 255, 0.04);
	--c-glass-hi: rgba(255, 255, 255, 0.08);

	--ff-sans:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--ff-display: 'Manrope', 'Inter', system-ui, sans-serif;
	--ff-mono:    'JetBrains Mono', SFMono-Regular, Consolas, monospace;

	--container: 1240px;
	--narrow:    760px;
	--radius:    14px;
	--radius-sm: 8px;
	--radius-lg: 22px;

	--shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
	--shadow:    0 8px 30px rgba(0,0,0,0.45);
	--shadow-lg: 0 20px 60px rgba(0,0,0,0.55);

	--ease:       cubic-bezier(0.22, 1, 0.36, 1);
	--ease-quick: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
*::selection { background: var(--c-yellow); color: var(--c-black); }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
	margin: 0;
	color: var(--c-white);
	font-family: var(--ff-sans);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;

	/* Paper-grain background — fractal SVG noise tinted warm cream, low alpha, fixed during scroll. */
	background-color: var(--c-black);
	background-image:
		url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' stitchTiles='stitch' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 0.96 0 0 0 0 0.84 0 0 0 0.10 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E"),
		radial-gradient(ellipse 80vw 60vh at 50% -10%, rgba(246,203,72,0.04), transparent 70%);
	background-repeat: repeat, no-repeat;
	background-size: 240px 240px, 100% 100%;
	background-attachment: fixed, fixed;
}

.antialiased { -webkit-font-smoothing: antialiased; }
.bg-black { background: var(--c-black); }
.text-white { color: var(--c-white); }

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--c-yellow); text-decoration: none; transition: color .2s var(--ease-quick); }
a:hover { color: #fff; }

h1, h2, h3, h4 {
	font-family: var(--ff-display);
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 .5em;
	line-height: 1.1;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.muted { color: var(--c-muted); }
.eyebrow {
	display: inline-flex; align-items: center; gap: .5em;
	font-size: .75rem; text-transform: uppercase; letter-spacing: .2em;
	color: var(--c-yellow); font-weight: 500;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-yellow); box-shadow: 0 0 12px rgba(246,203,72,0.7); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--narrow); }

.section { padding: clamp(56px, 7vw, 96px) 0; position: relative; }
.section-head { max-width: 720px; margin: 0 0 40px; }
.section-title { margin: 8px 0 12px; }
.section-lede { font-size: 1.05rem; max-width: 60ch; }

.sr-only-focusable { position: absolute; left: -9999px; }
.sr-only-focusable:focus { left: 16px; top: 16px; padding: 8px 14px; background: var(--c-yellow); color: var(--c-black); border-radius: var(--radius-sm); z-index: 1000; }
.screen-reader-text { position: absolute; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; gap: .55em;
	padding: 12px 22px;
	border-radius: var(--radius-sm);
	font-family: var(--ff-display);
	font-weight: 600;
	font-size: .95rem;
	letter-spacing: -0.01em;
	transition: transform .15s var(--ease-quick), background .2s var(--ease-quick), color .2s var(--ease-quick), box-shadow .2s var(--ease-quick);
	cursor: pointer;
	border: 1px solid transparent;
	text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-yellow); color: var(--c-black); box-shadow: 0 8px 30px rgba(246,203,72,0.18); }
.btn-primary:hover { background: #ffd864; color: var(--c-black); box-shadow: 0 14px 40px rgba(246,203,72,0.28); }
.btn-ghost { background: var(--c-glass); color: var(--c-white); border-color: var(--c-border); }
.btn-ghost:hover { background: var(--c-glass-hi); color: var(--c-white); }

/* Header */
.site-header {
	position: sticky; top: 0; z-index: 50;
	backdrop-filter: blur(14px) saturate(140%);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	background: rgba(11,11,11,0.65);
	border-bottom: 1px solid rgba(255,255,255,0.04);
}
/* Respect the WP admin bar so the sticky header doesn't slide behind it. */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }

/*
 * CRITICAL: when the mobile menu is open, drop backdrop-filter on the header.
 * `backdrop-filter` establishes a containing block for fixed/absolute descendants,
 * which would trap the .primary-nav panel inside the 73px header box.
 * Without this rule, the panel collapses to a tiny sliver right under the header.
 */
body.nav-open .site-header {
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	background: rgba(11,11,11,0.97);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-family: var(--ff-display); font-weight: 700; }
.brand-mark {
	width: 24px; height: 24px;
	border-radius: 6px;
	background: linear-gradient(135deg, var(--c-yellow), #ffaa00);
	box-shadow: 0 0 16px rgba(246,203,72,0.45);
}
.brand-name { font-size: 1rem; letter-spacing: -0.01em; }

.primary-nav .menu { list-style: none; padding: 0; margin: 0; display: flex; gap: 32px; align-items: center; }
.primary-nav .menu li { margin: 0; }
.primary-nav .menu a {
	color: rgba(255,255,255,0.78);
	font-size: .94rem;
	padding: 6px 0;
	transition: color .15s var(--ease-quick);
	text-decoration: none;
}
.primary-nav .menu a:hover,
.primary-nav .menu .current-menu-item > a { color: #fff; }

/* Final/contact menu item gets a subtle pill — also matches any href ending #contact */
.primary-nav .menu .menu-contact,
.primary-nav .menu a[href$="#contact"] {
	padding: 8px 18px;
	border: 1px solid var(--c-border);
	border-radius: 999px;
	background: var(--c-glass);
	transition: background .2s var(--ease-quick), border-color .2s var(--ease-quick), color .2s var(--ease-quick);
}
.primary-nav .menu .menu-contact:hover,
.primary-nav .menu a[href$="#contact"]:hover {
	border-color: var(--c-yellow);
	color: var(--c-yellow);
	background: rgba(246,203,72,0.08);
}

/* Hamburger toggle — 44×44 touch target, animates to X */
.nav-toggle {
	display: none;
	position: relative;
	width: 44px; height: 44px;
	background: transparent; border: 0; padding: 0;
	cursor: pointer;
	border-radius: var(--radius-sm);
}
.nav-toggle:focus-visible { outline: 2px solid var(--c-yellow); outline-offset: 2px; }
.nav-toggle span {
	position: absolute;
	left: 50%;
	width: 22px; height: 2px;
	margin-left: -11px;
	background: #fff;
	border-radius: 2px;
	transition: top .3s var(--ease), transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 28px; }
body.nav-open .nav-toggle span:nth-child(1) { top: 22px; transform: rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

@media (max-width: 880px) {
	.primary-nav { display: none; }
	.nav-toggle { display: inline-flex; }

	body.nav-open { overflow: hidden; }

	/* Panel sits exactly below the header — JS writes the actual offset into --qjweb-header-h. */
	body.nav-open .primary-nav {
		display: block;
		position: fixed;
		top: var(--qjweb-header-h, 72px);
		left: 0;
		right: 0;
		bottom: 0;
		padding: 14px 24px calc(28px + env(safe-area-inset-bottom, 0px));
		background: rgba(11,11,11,0.97);
		backdrop-filter: blur(18px) saturate(140%);
		-webkit-backdrop-filter: blur(18px) saturate(140%);
		z-index: 49;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
	}

	body.nav-open .primary-nav .menu {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		margin: 0;
		padding: 0;
		list-style: none;
		font-family: var(--ff-display);
		font-weight: 500;
		font-size: 1.05rem;
	}
	body.nav-open .primary-nav .menu li {
		display: block;
		width: 100%;
		margin: 0;
	}
	/* Reset desktop pill that may cascade from the rule outside the media query */
	body.nav-open .primary-nav .menu a {
		display: block;
		width: 100%;
		padding: 12px 4px;
		color: rgba(255,255,255,0.85);
		background: transparent;
		border: 0;
		border-radius: 0;
		border-bottom: 1px solid rgba(255,255,255,0.06);
		font-size: 1.05rem;
		line-height: 1.3;
		text-align: left;
		transition: color .15s var(--ease-quick);
	}
	body.nav-open .primary-nav .menu a:hover,
	body.nav-open .primary-nav .menu a:active { color: #fff; }

	/* Contact item: yellow outline pill, always last */
	body.nav-open .primary-nav .menu .menu-contact,
	body.nav-open .primary-nav .menu a[href$="#contact"] {
		margin-top: 14px;
		padding: 12px 22px;
		text-align: center;
		border: 1px solid var(--c-yellow);
		border-radius: 999px;
		color: var(--c-yellow);
		background: rgba(246,203,72,0.08);
		line-height: 1.3;
	}
}

/* Hero */
.hero { padding-top: 80px; padding-bottom: 80px; min-height: 88vh; display: flex; align-items: center; overflow: hidden; }
.hero-grid {
	position: absolute; inset: 0;
	background-image:
		linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
	background-size: 56px 56px;
	mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
	-webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
	pointer-events: none;
	animation: gridFloat 26s linear infinite;
}
@keyframes gridFloat { 0% { background-position: 0 0; } 100% { background-position: 56px 56px; } }
.hero-glow {
	position: absolute; inset: -10%;
	background:
		radial-gradient(circle at 20% 30%, rgba(246,203,72,0.18), transparent 45%),
		radial-gradient(circle at 80% 70%, rgba(246,203,72,0.08), transparent 50%);
	filter: blur(20px);
	pointer-events: none;
}
.hero-inner { position: relative; max-width: 920px; }
.hero-title { font-size: clamp(2.6rem, 6vw, 5rem); margin: 16px 0 12px; }
.hero-role { display: block; color: var(--c-yellow); font-size: clamp(1rem, 1.7vw, 1.5rem); font-weight: 500; letter-spacing: -0.01em; margin-top: 12px; }
.hero-statement { font-size: clamp(1.1rem, 1.6vw, 1.35rem); max-width: 56ch; color: rgba(255,255,255,0.84); }
.hero-highlights { list-style: none; padding: 0; margin: 24px 0 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-highlights li {
	padding: 6px 12px; border: 1px solid var(--c-border); border-radius: 999px;
	font-size: .85rem; color: rgba(255,255,255,0.85); background: var(--c-glass);
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.scroll-cue { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); width: 24px; height: 38px; border: 1px solid var(--c-border); border-radius: 14px; }
.scroll-cue span { display: block; width: 2px; height: 8px; margin: 6px auto; background: var(--c-yellow); border-radius: 2px; animation: scrollDot 1.6s infinite; }
@keyframes scrollDot { 0%, 100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(10px); opacity: .3; } }

/* Cards */
.cards { display: grid; gap: 20px; }
.card {
	position: relative; overflow: hidden;
	padding: 26px;
	background: var(--c-glass);
	border: 1px solid var(--c-border);
	border-radius: var(--radius);
	transition: transform .25s var(--ease), border-color .25s var(--ease-quick), background .25s var(--ease-quick);
}
.card:hover { transform: translateY(-4px); border-color: rgba(246,203,72,0.4); background: var(--c-glass-hi); }
.card-glow { position: absolute; inset: -2px; background: radial-gradient(circle at var(--mx,50%) var(--my,0%), rgba(246,203,72,0.12), transparent 60%); opacity: 0; transition: opacity .25s var(--ease-quick); pointer-events: none; }
.card:hover .card-glow { opacity: 1; }

.expertise-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card-icon { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 10px; background: rgba(246,203,72,0.1); color: var(--c-yellow); margin-bottom: 16px; }
.card-icon svg { width: 20px; height: 20px; }
.card-title { font-size: 1.05rem; }
.card-desc { color: var(--c-muted); font-size: .95rem; margin: 0; }

/* Projects */
.projects-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 32px; }
.projects-search {
	flex: 1 1 220px;
	background: var(--c-glass); color: #fff;
	border: 1px solid var(--c-border); padding: 10px 14px; border-radius: var(--radius-sm);
	font-family: inherit;
}
.projects-search:focus { outline: none; border-color: var(--c-yellow); }
.projects-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
	padding: 8px 14px; background: var(--c-glass); border: 1px solid var(--c-border);
	border-radius: 999px; color: rgba(255,255,255,0.78); cursor: pointer; font-size: .85rem;
	transition: all .2s var(--ease-quick);
}
.chip:hover { border-color: rgba(246,203,72,0.4); color: #fff; }
.chip.is-active { background: var(--c-yellow); color: var(--c-black); border-color: var(--c-yellow); }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.project-card {
	background: var(--c-glass); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden;
	transition: transform .25s var(--ease), border-color .25s var(--ease-quick);
}
.project-card:hover { transform: translateY(-6px); border-color: rgba(246,203,72,0.35); }
.project-thumb { display: block; aspect-ratio: 16/10; background: #111; overflow: hidden; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.project-card:hover .project-thumb img { transform: scale(1.04); }
.thumb-fallback { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #1a1a1a, #0b0b0b 70%); }
.project-body { padding: 22px; }
.project-meta { font-size: .8rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: .12em; margin: 0 0 8px; }
.project-title { margin: 0 0 8px; font-size: 1.15rem; }
.project-title a { color: #fff; }
.project-excerpt { font-size: .92rem; }
.project-tech { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.project-tech li { font-family: var(--ff-mono); font-size: .72rem; padding: 3px 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--c-border); border-radius: 4px; color: rgba(255,255,255,0.7); }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 12px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(to bottom, transparent, var(--c-border) 6%, var(--c-border) 94%, transparent); }
@media (min-width: 880px) { .timeline::before { left: 50%; transform: translateX(-1px); } }
.timeline-item { position: relative; padding: 0 0 36px 44px; }
@media (min-width: 880px) {
	.timeline-item { width: 50%; padding: 0 32px 48px; }
	.timeline-item:nth-child(odd) { margin-left: 50%; }
	.timeline-item:nth-child(even) { text-align: right; padding-right: 32px; padding-left: 0; }
}
.timeline-dot { position: absolute; left: 4px; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--c-black); border: 2px solid var(--c-yellow); box-shadow: 0 0 14px rgba(246,203,72,0.4); }
@media (min-width: 880px) {
	.timeline-item:nth-child(odd) .timeline-dot { left: -9px; }
	.timeline-item:nth-child(even) .timeline-dot { left: auto; right: -9px; }
}
.timeline-card { background: var(--c-glass); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 22px; }
.timeline-role { margin: 0 0 4px; font-size: 1.1rem; }
.timeline-company { color: var(--c-yellow); font-weight: 500; margin: 0 0 12px; }
.timeline-summary { color: rgba(255,255,255,0.85); }
.timeline-achievements { color: var(--c-muted); padding-left: 18px; margin: 8px 0 0; }
.timeline-tech { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 14px 0 0; }
.timeline-tech li { font-family: var(--ff-mono); font-size: .72rem; padding: 3px 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--c-border); border-radius: 4px; }

/* Metrics */
.metrics-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; text-align: center; }
.metric { padding: 24px; background: var(--c-glass); border: 1px solid var(--c-border); border-radius: var(--radius); }
.metric-value { display: block; font-family: var(--ff-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; color: var(--c-yellow); letter-spacing: -0.02em; }
.metric-label { display: block; font-size: .85rem; margin-top: 6px; }

/* Skills */
.marquee { overflow: hidden; padding: 28px 0; mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: inline-flex; gap: 48px; animation: marquee 38s linear infinite; white-space: nowrap; }
.marquee-item { display: inline-flex; align-items: center; gap: 10px; color: var(--c-muted); font-family: var(--ff-display); font-weight: 500; font-size: 1.1rem; }
.marquee-item img { width: 22px; height: 22px; opacity: .8; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.skills-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 16px; }
.skill-group { padding: 24px; background: var(--c-glass); border: 1px solid var(--c-border); border-radius: var(--radius); }
.skill-group-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .15em; color: var(--c-yellow); margin-bottom: 16px; }
.skill-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.skill-pill { display: grid; grid-template-columns: 1fr 130px; align-items: center; gap: 12px; }
.skill-name { color: rgba(255,255,255,0.85); font-size: .9rem; }
.skill-bar { height: 4px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; }
.skill-bar-fill { display: block; height: 100%; width: var(--p, 0%); background: linear-gradient(90deg, var(--c-yellow), #ffaa00); border-radius: 4px; transition: width .8s var(--ease); }

/* Insights */
.insights-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.insight-card { padding: 0; overflow: hidden; }
.insight-thumb { display: block; aspect-ratio: 16/10; background: #111; overflow: hidden; }
.insight-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.insight-card:hover .insight-thumb img { transform: scale(1.04); }
.insight-body { padding: 22px; }
.insight-meta { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; }
.insight-title { margin: 8px 0 6px; font-size: 1.1rem; }
.insight-title a { color: #fff; }

/* Testimonials */
.testimonials-slider { position: relative; }
.slider-track { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 24px; scrollbar-width: thin; scrollbar-color: var(--c-border) transparent; }
.slider-track::-webkit-scrollbar { height: 6px; }
.slider-track::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 3px; }
.quote-card { flex: 0 0 min(420px, 86vw); scroll-snap-align: start; background: var(--c-glass); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 26px; }
.quote-card blockquote { margin: 0 0 18px; font-size: 1.05rem; line-height: 1.6; color: rgba(255,255,255,0.92); }
.quote-card blockquote::before { content: '“'; font-family: var(--ff-display); font-size: 3rem; color: var(--c-yellow); line-height: 0; vertical-align: -0.4em; margin-right: 6px; }
.quote-card figcaption { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.quote-card .avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.quote-card figcaption strong { display: block; }
.rating { color: var(--c-yellow); margin-left: auto; font-size: .9rem; }
.slider-controls { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.slider-controls button { width: 38px; height: 38px; border-radius: 50%; background: var(--c-glass); border: 1px solid var(--c-border); color: #fff; cursor: pointer; transition: all .2s var(--ease-quick); }
.slider-controls button:hover { border-color: var(--c-yellow); color: var(--c-yellow); }

/* Contact */
.contact-grid { display: grid; gap: 48px; grid-template-columns: 1fr; }
@media (min-width: 880px) { .contact-grid { grid-template-columns: 1fr 1.2fr; } }
.contact-aside .section-title { margin-top: 8px; }
.contact-channels { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; }
.contact-channels li { display: grid; grid-template-columns: 110px 1fr; align-items: center; padding: 14px 0; border-top: 1px solid var(--c-border); }
.contact-channels li:last-child { border-bottom: 1px solid var(--c-border); }

.contact-form {
	display: grid; gap: 18px;
	grid-template-columns: 1fr 1fr;
	background: var(--c-glass); border: 1px solid var(--c-border);
	border-radius: var(--radius-lg);
	padding: 32px;
}
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label {
	font-size: .76rem;
	color: var(--c-muted);
	text-transform: uppercase;
	letter-spacing: .14em;
	font-weight: 500;
}
.field input,
.field select,
.field textarea {
	width: 100%;
	background: rgba(0,0,0,0.35);
	color: #fff;
	border: 1px solid var(--c-border);
	border-radius: var(--radius-sm);
	padding: 13px 14px;
	font-family: inherit;
	font-size: .95rem;
	line-height: 1.45;
	transition: border-color .15s var(--ease-quick), box-shadow .15s var(--ease-quick), background .15s var(--ease-quick);
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(255,255,255,0.32); }
.field textarea { resize: vertical; min-height: 130px; }
.field input:hover,
.field textarea:hover,
.field select:hover { border-color: rgba(255,255,255,0.18); }
.field input:focus,
.field select:focus,
.field textarea:focus {
	outline: none;
	border-color: var(--c-yellow);
	box-shadow: 0 0 0 3px rgba(246,203,72,0.18);
	background: rgba(0,0,0,0.55);
}

/* Kill Chrome/Safari autofill yellow background */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field textarea:-webkit-autofill {
	-webkit-text-fill-color: #fff;
	-webkit-box-shadow: 0 0 0 1000px rgba(0,0,0,0.55) inset;
	caret-color: var(--c-yellow);
	border-color: var(--c-border);
	transition: background-color 99999s ease-out, color 99999s ease-out;
}

.form-foot {
	grid-column: 1 / -1;
	display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
	margin-top: 4px;
}
.form-foot .btn { min-width: 140px; }
.form-status { margin: 0; flex: 1 1 220px; }
.form-status[data-state="ok"] { color: #4ade80; }
.form-status[data-state="err"] { color: #f87171; }

/* Honeypot — never displayed, never tabbable, screenreaders ignore it */
.hp-field {
	position: absolute !important;
	left: -10000px !important; top: auto;
	width: 1px; height: 1px;
	opacity: 0;
	pointer-events: none;
}

@media (max-width: 600px) {
	.contact-form {
		grid-template-columns: 1fr;
		padding: 22px;
		gap: 14px;
		border-radius: var(--radius);
	}
	.form-foot { flex-direction: column; align-items: stretch; gap: 12px; }
	.form-foot .btn { width: 100%; }
	.form-status { flex: 1 1 auto; text-align: center; }
}

/* ======================================================================
 * Footer — editorial layout with sitemap, social, colophon, and a
 * large typographic signature row.
 * ====================================================================== */
.site-footer {
	position: relative;
	margin-top: 80px;
	border-top: 1px solid var(--c-border);
	padding: 56px 0 28px;
	overflow: hidden;
}
.site-footer::before {
	content: '';
	position: absolute;
	inset: 0 0 auto 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(246,203,72,0.4), transparent);
}

.footer-top {
	display: grid;
	gap: 40px 32px;
	grid-template-columns: 1fr;
}
@media (min-width: 600px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (min-width: 880px) { .footer-top { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }

.footer-brand .brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand .brand-mark { width: 28px; height: 28px; }
.footer-brand .brand-name { font-size: 1.1rem; }
.footer-motto {
	font-family: var(--ff-display);
	font-weight: 600;
	font-size: 1rem;
	color: var(--c-yellow);
	letter-spacing: -0.01em;
	margin: 4px 0 8px;
}
.footer-tagline { font-size: .9rem; max-width: 36ch; margin: 0; }

.footer-heading {
	font-size: .72rem;
	text-transform: uppercase;
	letter-spacing: .18em;
	color: rgba(255,255,255,0.45);
	font-weight: 500;
	margin: 0 0 16px;
}

.footer-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 10px;
}
.footer-list a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: rgba(255,255,255,0.82);
	font-size: .92rem;
	transition: color .15s var(--ease-quick), gap .2s var(--ease-quick);
}
.footer-list a:hover { color: #fff; }
.footer-list svg { opacity: .65; flex-shrink: 0; transition: opacity .15s var(--ease-quick); }
.footer-list a:hover svg { opacity: 1; }
.footer-list a:hover svg:last-child { color: var(--c-yellow); }
.footer-social a:hover { gap: 10px; }

.footer-colophon p { font-size: .88rem; line-height: 1.55; margin: 0; max-width: 32ch; }

/* Big typographic signature — the wow moment */
.footer-signature {
	margin: 56px -8px 28px;
	padding-bottom: 0.18em; /* room for descenders so 'y'/'g'/'j' aren't clipped */
	font-family: var(--ff-display);
	font-weight: 800;
	font-size: clamp(2.4rem, 12vw, 9rem);
	line-height: 1;
	letter-spacing: -0.04em;
	text-align: center;
	user-select: none;
	white-space: nowrap;
	overflow: hidden;
	pointer-events: none;
}
.footer-signature span {
	display: inline-block;
	background: linear-gradient(180deg, rgba(246,203,72,0.25) 0%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.01) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding-top: 24px;
	border-top: 1px solid rgba(255,255,255,0.04);
	font-size: .82rem;
}

@media (max-width: 600px) {
	.footer-bottom { justify-content: center; text-align: center; }
	.footer-signature { margin: 40px 0 24px; }
}

/* Reveal animation */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* Single article prose */
.prose { line-height: 1.75; }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose img { border-radius: var(--radius); margin: 1.4em 0; }
.prose pre, .prose code { font-family: var(--ff-mono); }
.prose pre { background: #0f0f0f; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px; overflow-x: auto; }
.prose blockquote { border-left: 3px solid var(--c-yellow); padding-left: 18px; color: rgba(255,255,255,0.85); }

/* Page header */
.page-header { padding: 80px 0 32px; }
.empty-state { padding: 48px; text-align: center; border: 1px dashed var(--c-border); border-radius: var(--radius); }

/* ======================================================================
 * Category dropdown — pill-shaped select on /notes/ and category archives.
 * ====================================================================== */
.cat-filter-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin: 28px auto 0;
}
.cat-filter-label {
	font-size: .76rem;
	text-transform: uppercase;
	letter-spacing: .14em;
	color: var(--c-muted);
	font-weight: 500;
}
.cat-filter { position: relative; display: inline-flex; align-items: center; }
.cat-filter::after {
	content: '';
	position: absolute;
	right: 18px;
	top: 50%;
	width: 7px; height: 7px;
	border: 2px solid var(--c-yellow);
	border-top: 0; border-left: 0;
	transform: translateY(-70%) rotate(45deg);
	pointer-events: none;
	transition: transform .25s var(--ease-quick);
}
.cat-filter:hover::after { transform: translateY(-30%) rotate(45deg); }
.cat-filter select {
	appearance: none; -webkit-appearance: none;
	background: var(--c-glass);
	border: 1px solid var(--c-border);
	border-radius: 999px;
	color: #fff;
	font-family: var(--ff-display);
	font-size: .95rem; font-weight: 500;
	letter-spacing: -0.01em;
	padding: 11px 44px 11px 20px;
	min-width: 220px;
	cursor: pointer;
	transition: border-color .2s var(--ease-quick), background .2s var(--ease-quick), box-shadow .2s var(--ease-quick);
}
.cat-filter select:hover { border-color: rgba(246,203,72,0.45); background: var(--c-glass-hi); }
.cat-filter select:focus {
	outline: none;
	border-color: var(--c-yellow);
	box-shadow: 0 0 0 3px rgba(246,203,72,0.18);
}
.cat-filter select option { background: #0b0b0b; color: #fff; font-family: var(--ff-sans); }

/* ======================================================================
 * Category wordmap — visual cloud at the bottom of /notes/.
 * Font size scales with post count; tier-based color emphasis.
 * ====================================================================== */
.categorymap-section {
	position: relative;
	overflow: hidden;
	padding: clamp(64px, 8vw, 100px) 0;
	margin-top: 40px;
	border-top: 1px solid var(--c-border);
}
.categorymap-section::before {
	content: '';
	position: absolute; inset: 0;
	background: radial-gradient(60% 50% at 50% 0%, rgba(246,203,72,0.06), transparent 70%);
	pointer-events: none;
}
.categorymap-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.categorymap-head .eyebrow { justify-content: center; }
.categorymap {
	display: flex; flex-wrap: wrap;
	align-items: baseline; justify-content: center;
	gap: 18px 32px;
	padding: 32px 0;
	line-height: 1.15;
	max-width: 1080px;
	margin: 0 auto;
}
.cloud-word {
	display: inline-block;
	font-family: var(--ff-display);
	font-weight: 700;
	letter-spacing: -0.02em;
	text-decoration: none;
	white-space: nowrap;
	transition: color .25s var(--ease-quick), transform .3s var(--ease), text-shadow .25s var(--ease-quick);
}
.cloud-top { color: var(--c-yellow); }
.cloud-mid { color: rgba(255,255,255,0.88); }
.cloud-low { color: rgba(255,255,255,0.42); }
.cloud-word:hover {
	color: var(--c-yellow);
	transform: translateY(-3px) scale(1.04);
	text-shadow: 0 0 32px rgba(246,203,72,0.45);
}
.cloud-word:focus-visible {
	outline: 2px solid var(--c-yellow);
	outline-offset: 6px;
	border-radius: 4px;
}

@media (max-width: 600px) {
	.categorymap { gap: 12px 22px; padding: 16px 8px; }
	.categorymap-section { padding: 56px 0; }
	.cat-filter select { min-width: 180px; }
}

/* ======================================================================
 * Horizontal card marquee — used by Expertise + Projects + Testimonials.
 *
 * Hybrid: native horizontal scroll (touch swipe + trackpad), JS drives a
 * gentle auto-advance + mouse drag-to-scroll on desktop. Items are
 * duplicated in markup so the JS loop can wrap seamlessly at scrollWidth/2.
 * ====================================================================== */
.hmarquee {
	position: relative;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 12px 0;
	mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
	-webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
	scrollbar-width: none;
	-ms-overflow-style: none;
	cursor: grab;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
}
.hmarquee::-webkit-scrollbar { display: none; height: 0; width: 0; }
.hmarquee.is-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.hmarquee.is-dragging * { pointer-events: none; }

.hmarquee-track {
	display: flex;
	flex-wrap: nowrap;
	gap: 20px;
	width: max-content;
	will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
	.hmarquee { mask-image: none; -webkit-mask-image: none; }
	.hmarquee-track { flex-wrap: wrap; width: auto; justify-content: center; }
}

/* Cards in the horizontal marquee — fixed width so they don't shrink. */
.hmarquee .expertise-card,
.hmarquee .project-card,
.hmarquee .quote-card {
	flex: 0 0 auto;
	width: clamp(260px, 32vw, 360px);
}
.hmarquee .quote-card { width: clamp(300px, 38vw, 420px); }

/* Tighter project cards inside marquee */
.hmarquee .project-thumb { aspect-ratio: 16/10; }
.hmarquee .project-body { padding: 18px 20px; }
.hmarquee .project-title { font-size: 1.05rem; }
.hmarquee .project-excerpt {
	font-size: .88rem;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hmarquee .quote-card blockquote { font-size: .98rem; }

/* Logos scroller — uncategorized wall of certifications / companies / tools */
.logos-section { padding: clamp(56px, 8vw, 96px) 0; }
.logos-head { text-align: center; margin: 0 auto 36px; max-width: 640px; }
.logos-head .eyebrow { justify-content: center; }
.logos-title { font-size: clamp(1rem, 1.4vw, 1.15rem); color: var(--c-muted); font-family: var(--ff-sans); font-weight: 400; letter-spacing: 0; line-height: 1.5; margin: 0; }

.logos-marquee {
	overflow: hidden;
	mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
	-webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.logos-track {
	display: inline-flex;
	align-items: center;
	gap: 64px;
	padding: 12px 32px;
	white-space: nowrap;
	animation: logosSlide 38s linear infinite;
	will-change: transform;
}
.logos-marquee:hover .logos-track { animation-play-state: paused; }
@keyframes logosSlide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.logo-link, .logo-tile { flex-shrink: 0; }
.logo-link { display: inline-flex; }
.logo-tile {
	height: 48px;
	max-width: 180px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.logo-tile img {
	height: 100%;
	width: auto;
	max-width: 180px;
	object-fit: contain;
	opacity: 0.55;
	filter: grayscale(20%);
	transition: opacity .25s var(--ease-quick), filter .25s var(--ease-quick);
}
.logo-link:hover .logo-tile img,
.logo-tile:hover img { opacity: 1; filter: none; }

@media (max-width: 600px) {
	.logos-track { gap: 40px; }
	.logo-tile { height: 36px; max-width: 130px; }
}
