/*
Theme Name: NovaHub AI
Theme URI: https://wordpress.org/themes/
Author: NovaHub Studio
Description: A clean, minimalist AI-style WordPress hub theme built to showcase all your subdomains — Free Online Tools, Claude AI Skills, Web Apps, and future projects — with instant live filtering, Ctrl+K quick launcher, Dark/Light mode, and 1-click starter import.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: novahub-ai
Tags: dark, light, one-column, custom-colors, custom-logo, custom-menu, featured-images, theme-options
*/

:root {
	--accent: #6366f1;
	--accent-soft: rgba(99, 102, 241, 0.14);
	--bg: #07090f;
	--bg-elevated: #0d111d;
	--bg-card: rgba(16, 21, 35, 0.78);
	--bg-card-hover: rgba(23, 30, 49, 0.94);
	--border: rgba(255, 255, 255, 0.08);
	--border-hover: rgba(255, 255, 255, 0.2);
	--text: #f1f5f9;
	--text-muted: #94a3b8;
	--text-dim: #64748b;
	--glass: rgba(7, 9, 15, 0.72);
	--shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
	--radius: 16px;
	--radius-sm: 10px;
	--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme="light"] {
	--bg: #f8fafc;
	--bg-elevated: #ffffff;
	--bg-card: rgba(255, 255, 255, 0.9);
	--bg-card-hover: #ffffff;
	--border: rgba(15, 23, 42, 0.08);
	--border-hover: rgba(15, 23, 42, 0.2);
	--text: #0f172a;
	--text-muted: #475569;
	--text-dim: #64748b;
	--glass: rgba(248, 250, 252, 0.82);
	--shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font-sans);
	background: var(--bg);
	color: var(--text);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
	transition: background-color 0.25s ease, color 0.25s ease;
}

a {
	color: inherit;
	text-decoration: none;
}

img {
	max-width: 100%;
	height: auto;
}

.nh-container {
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Ambient AI Radial Glow */
.nh-bg-glow {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: -1;
	background:
		radial-gradient(600px circle at 50% -8%, rgba(99, 102, 241, 0.22), transparent 65%),
		radial-gradient(500px circle at 85% 20%, rgba(168, 85, 247, 0.1), transparent 60%),
		radial-gradient(500px circle at 15% 40%, rgba(14, 165, 233, 0.08), transparent 60%);
}

[data-theme="light"] .nh-bg-glow {
	background:
		radial-gradient(600px circle at 50% -8%, rgba(99, 102, 241, 0.12), transparent 65%),
		radial-gradient(500px circle at 85% 20%, rgba(168, 85, 247, 0.07), transparent 60%);
}

/* SVG Sizes */
.nh-icon-xs { width: 16px; height: 16px; flex-shrink: 0; }
.nh-icon-sm { width: 20px; height: 20px; flex-shrink: 0; }
.nh-icon    { width: 24px; height: 24px; flex-shrink: 0; }

/* Header */
.nh-header {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	background: var(--glass);
	border-bottom: 1px solid var(--border);
}

.nh-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 68px;
	gap: 16px;
}

.nh-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	font-size: 1.05rem;
	letter-spacing: -0.02em;
}

.nh-brand-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--accent), #a855f7);
	color: #fff;
	box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
}

.nh-nav-list {
	display: flex;
	align-items: center;
	list-style: none;
	gap: 26px;
	margin: 0;
	padding: 0;
}

.nh-nav-list a {
	font-size: 0.92rem;
	font-weight: 500;
	color: var(--text-muted);
	transition: color 0.2s ease;
}

.nh-nav-list a:hover {
	color: var(--text);
}

.nh-header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.nh-cmd-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--bg-card);
	color: var(--text-muted);
	font-family: inherit;
	font-size: 0.85rem;
	cursor: pointer;
	transition: border-color 0.2s, color 0.2s;
}

.nh-cmd-trigger:hover {
	border-color: var(--border-hover);
	color: var(--text);
}

.nh-cmd-trigger kbd {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	padding: 2px 6px;
	border-radius: 6px;
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	color: var(--text-dim);
}

.nh-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: var(--bg-card);
	color: var(--text);
	cursor: pointer;
	transition: border-color 0.2s, transform 0.15s;
}

.nh-icon-btn:hover {
	border-color: var(--border-hover);
	transform: translateY(-1px);
}

[data-theme="dark"] .nh-theme-icon-moon { display: none; }
[data-theme="light"] .nh-theme-icon-sun { display: none; }

.nh-mobile-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
}

.nh-mobile-toggle span {
	display: block;
	width: 16px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
}

/* Hero Section */
.nh-hero {
	padding: 72px 0 44px;
	text-align: center;
}

.nh-hero-inner {
	max-width: 820px;
}

.nh-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--bg-card);
	color: var(--text-muted);
	font-size: 0.82rem;
	font-weight: 500;
	margin-bottom: 22px;
}

.nh-pill-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #22c55e;
	box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
}

.nh-hero-title {
	margin: 0 0 18px;
	font-size: clamp(2.1rem, 5.2vw, 3.9rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.035em;
	background: linear-gradient(135deg, var(--text) 35%, var(--text-muted) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.nh-hero-subtitle {
	margin: 0 auto 30px;
	max-width: 640px;
	font-size: clamp(1rem, 1.8vw, 1.16rem);
	color: var(--text-muted);
}

.nh-hero-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-bottom: 44px;
}

.nh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 22px;
	border-radius: 12px;
	font-family: inherit;
	font-size: 0.94rem;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid transparent;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.nh-btn:hover {
	transform: translateY(-1px);
}

.nh-btn-primary {
	background: linear-gradient(135deg, var(--accent), #8b5cf6);
	color: #fff;
	box-shadow: 0 10px 26px rgba(99, 102, 241, 0.3);
}

.nh-btn-ghost {
	background: var(--bg-card);
	border-color: var(--border);
	color: var(--text);
}

.nh-btn-ghost:hover {
	border-color: var(--border-hover);
}

/* Stats Strip */
.nh-stats-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.nh-stat-card {
	padding: 18px 14px;
	border-radius: var(--radius-sm);
	background: var(--bg-card);
	border: 1px solid var(--border);
}

.nh-stat-num {
	font-size: 1.45rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--text);
}

.nh-stat-label {
	font-size: 0.8rem;
	color: var(--text-muted);
	margin-top: 2px;
}

/* Sections */
.nh-section {
	padding: 48px 0;
}

.nh-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}

.nh-eyebrow {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 0.74rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	color: var(--accent);
	margin-bottom: 6px;
}

.nh-section-title {
	margin: 0;
	font-size: clamp(1.45rem, 2.8vw, 2rem);
	font-weight: 700;
	letter-spacing: -0.025em;
}

.nh-section-sub {
	margin: 0;
	max-width: 420px;
	font-size: 0.94rem;
	color: var(--text-muted);
}

/* Bento & Directory Grids */
.nh-bento-grid,
.nh-directory-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

/* Cards with Spotlight Hover */
.nh-card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 22px;
	border-radius: var(--radius);
	background: var(--bg-card);
	border: 1px solid var(--border);
	overflow: hidden;
	transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.nh-card::before {
	content: "";
	position: absolute;
	inset: 0;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
	background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(99, 102, 241, 0.14), transparent 60%);
}

.nh-card:hover {
	transform: translateY(-3px);
	border-color: var(--border-hover);
	background: var(--bg-card-hover);
	box-shadow: var(--shadow);
}

.nh-card:hover::before {
	opacity: 1;
}

.nh-card-featured {
	background: linear-gradient(180deg, var(--bg-card-hover), var(--bg-card));
}

.nh-card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.nh-card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: var(--accent-soft);
	color: var(--accent);
	border: 1px solid rgba(99, 102, 241, 0.24);
}

.nh-badge {
	font-family: var(--font-mono);
	font-size: 0.7rem;
	font-weight: 500;
	padding: 4px 9px;
	border-radius: 999px;
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	color: var(--text-muted);
}

.nh-card-title {
	margin: 0 0 8px;
	font-size: 1.12rem;
	font-weight: 700;
	letter-spacing: -0.015em;
}

.nh-card-desc {
	margin: 0 0 16px;
	font-size: 0.9rem;
	color: var(--text-muted);
	flex-grow: 1;
}

.nh-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 18px;
}

.nh-tag {
	font-size: 0.74rem;
	padding: 3px 9px;
	border-radius: 7px;
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	color: var(--text-muted);
}

.nh-card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 12px;
	border-top: 1px solid var(--border);
	font-size: 0.8rem;
	color: var(--text-dim);
}

.nh-subdomain-url {
	font-family: var(--font-mono);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nh-launch-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 8px;
	background: var(--bg-elevated);
	color: var(--text);
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.nh-card:hover .nh-launch-arrow {
	transform: translate(2px, -2px);
	background: var(--accent);
	color: #fff;
}

/* Search & Category Tabs */
.nh-search-box {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 14px;
	border-radius: 12px;
	border: 1px solid var(--border);
	background: var(--bg-card);
	min-width: 270px;
}

.nh-search-box input {
	width: 100%;
	border: none;
	outline: none;
	background: transparent;
	color: var(--text);
	font-family: inherit;
	font-size: 0.9rem;
}

.nh-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 22px;
}

.nh-tab {
	padding: 8px 16px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--bg-card);
	color: var(--text-muted);
	font-family: inherit;
	font-size: 0.86rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.nh-tab:hover {
	color: var(--text);
	border-color: var(--border-hover);
}

.nh-tab.is-active {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.nh-empty-state {
	padding: 36px;
	text-align: center;
	border-radius: var(--radius);
	border: 1px dashed var(--border);
	color: var(--text-muted);
}

/* Bottom CTA Banner */
.nh-cta-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 32px;
	border-radius: var(--radius);
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(168, 85, 247, 0.08));
	border: 1px solid rgba(99, 102, 241, 0.25);
}

.nh-cta-banner h2 {
	margin: 0 0 6px;
	font-size: 1.35rem;
}

.nh-cta-banner p {
	margin: 0;
	color: var(--text-muted);
	max-width: 600px;
}

/* Single / Page Article */
.nh-article-wrap {
	max-width: 820px;
}

.nh-article {
	padding: 32px;
	border-radius: var(--radius);
	background: var(--bg-card);
	border: 1px solid var(--border);
}

.nh-article-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

.nh-article-title {
	margin: 0 0 20px;
	font-size: clamp(1.7rem, 3.6vw, 2.5rem);
	line-height: 1.2;
}

.nh-article-content {
	color: var(--text-muted);
	font-size: 1.02rem;
	line-height: 1.75;
}

.nh-article-content h2,
.nh-article-content h3 {
	color: var(--text);
	margin-top: 28px;
}

/* Footer */
.nh-footer {
	margin-top: 40px;
	border-top: 1px solid var(--border);
	padding: 40px 0 28px;
	background: var(--bg-elevated);
}

.nh-footer-inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 24px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--border);
}

.nh-footer-desc {
	margin: 8px 0 0;
	color: var(--text-muted);
	font-size: 0.9rem;
}

.nh-footer-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
}

.nh-footer-nav,
.nh-social-links {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	gap: 16px;
	margin: 0;
	padding: 0;
	font-size: 0.9rem;
	color: var(--text-muted);
}

.nh-footer-nav a:hover,
.nh-social-links a:hover {
	color: var(--text);
}

.nh-footer-bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	padding-top: 20px;
	font-size: 0.84rem;
	color: var(--text-dim);
}

/* Ctrl+K Command Palette Modal */
.nh-cmd-backdrop[hidden] {
	display: none;
}

.nh-cmd-backdrop {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 10vh 16px 16px;
	background: rgba(0, 0, 0, 0.65);
	backdrop-filter: blur(8px);
}

.nh-cmd-dialog {
	width: 100%;
	max-width: 580px;
	border-radius: var(--radius);
	background: var(--bg-elevated);
	border: 1px solid var(--border-hover);
	box-shadow: var(--shadow);
	overflow: hidden;
}

.nh-cmd-input-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--border);
}

.nh-cmd-input-wrap input {
	flex: 1;
	border: none;
	outline: none;
	background: transparent;
	color: var(--text);
	font-family: inherit;
	font-size: 0.96rem;
}

.nh-cmd-esc {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	padding: 4px 8px;
	border-radius: 6px;
	border: 1px solid var(--border);
	background: var(--bg-card);
	color: var(--text-muted);
	cursor: pointer;
}

.nh-cmd-results {
	max-height: 360px;
	overflow-y: auto;
	padding: 8px;
}

.nh-cmd-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: 10px;
	transition: background-color 0.15s ease;
}

.nh-cmd-item:hover,
.nh-cmd-item.is-selected {
	background: var(--accent-soft);
}

.nh-cmd-item-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: var(--bg-card);
	border: 1px solid var(--border);
	color: var(--accent);
}

.nh-cmd-item-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.nh-cmd-item-body strong {
	font-size: 0.92rem;
}

.nh-cmd-item-body small {
	font-family: var(--font-mono);
	font-size: 0.76rem;
	color: var(--text-dim);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Responsive */
@media (max-width: 960px) {
	.nh-bento-grid,
	.nh-directory-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.nh-stats-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 680px) {
	.nh-bento-grid,
	.nh-directory-grid {
		grid-template-columns: 1fr;
	}
	.nh-cmd-label,
	.nh-cmd-trigger kbd {
		display: none;
	}
	.nh-mobile-toggle {
		display: inline-flex;
	}
	.nh-nav {
		display: none;
		position: absolute;
		top: 68px;
		left: 0;
		right: 0;
		background: var(--bg-elevated);
		border-bottom: 1px solid var(--border);
		padding: 16px 20px;
	}
	.nh-nav.is-open {
		display: block;
	}
	.nh-nav-list {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}
	.nh-search-box {
		width: 100%;
		min-width: 0;
	}
}
