/**
Theme Name: NexusByte
Theme URI: https://ascendoor.com/themes/nexusbyte/
Author: Ascendoor
Author URI: https://ascendoor.com/
Version: 3.1.0
Requires PHP: 7.4
Tested up to: 6.7
Requires at least: 5.0
Template: ascendoor-blog
Text Domain: nexus-byte
Description: NexusByte - A premium, high-performance dark mode technology theme for WordPress. Features glassmorphism, advanced grid layouts, and a refined typograhic system.
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Tags: dark-mode, tech-news, magazine, responsive, custom-colors, accessibility-ready
*/

/* ==========================================================================
   1. DESIGN SYSTEM (VARIABLES)
   ========================================================================== */

:root {
	/* -- Theme Colors -- */
	--color-bg-body: #050511;
	/* Deep Space */
	--color-bg-card: #0f1221;
	/* Panel Background */
	--color-bg-header: rgba(15, 18, 33, 0.85);
	--color-bg-input: #15192b;

	/* -- Accents (Neon Tech) -- */
	--color-primary: #7000ff;
	/* Electric Purple */
	--color-secondary: #00d4ff;
	/* Cyan */
	--color-tertiary: #ff007a;
	/* Neon Pink */

	/* -- Gradients -- */
	--gradient-brand: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
	--gradient-glow: radial-gradient(circle at top center, rgba(112, 0, 255, 0.12) 0%, transparent 70%);
	--gradient-card-hover: linear-gradient(to bottom, rgba(255, 255, 255, 0.03), transparent);

	/* -- Typography -- */
	--font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--font-heading: 'Inter', sans-serif;

	--text-main: #ffffff;
	--text-muted: #94a3b8;
	--text-dark: #0f172a;
	/* For light badges */

	/* -- Borders & Effects -- */
	--border-light: rgba(255, 255, 255, 0.06);
	--border-active: rgba(112, 0, 255, 0.5);

	--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
	--shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
	--glow-primary: 0 0 20px rgba(112, 0, 255, 0.4);

	/* -- Spacing & Radius -- */
	--radius-sm: 6px;
	--radius-md: 12px;
	--radius-lg: 18px;
	--radius-pill: 999px;

	--container-width: 1280px;
	--spacing-unit: 20px;
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	background-color: var(--color-bg-body);
	color: var(--text-main);
	font-family: var(--font-primary);
	line-height: 1.6;
	overflow-x: hidden;
	background-image: var(--gradient-glow);
	background-repeat: no-repeat;
	background-attachment: fixed;
	background-size: 100% 100vh;
}

a {
	color: inherit;
	text-decoration: none;
	transition: all 0.2s ease;
}

a:hover,
a:focus {
	color: var(--color-secondary);
	outline: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-heading);
	color: var(--text-main);
	line-height: 1.2;
	margin-top: 0;
	margin-bottom: 0.8em;
	font-weight: 700;
}

p {
	margin-bottom: 1.5em;
	color: var(--text-muted);
}

.ascendoor-wrapper {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 var(--spacing-unit);
}

/* ==========================================================================
   3. HEADER (APP BAR)
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	padding: 15px 0;
	pointer-events: none;
	/* Let clicks pass through padding areas */
}

.header-main-bar {
	background: var(--color-bg-header);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid var(--border-light);
	border-radius: var(--radius-pill);
	margin: 0 auto;
	max-width: var(--container-width);
	padding: 5px 30px;
	box-shadow: var(--shadow-lg);
	pointer-events: all;
	/* Restore clicks */
	transition: 0.3s;
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 60px;
}

/* Branding */
.site-title {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.5px;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.site-title a {
	color: var(--text-main);
}

.site-title::before {
	content: 'N';
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: var(--gradient-brand);
	border-radius: 8px;
	font-size: 18px;
	color: white;
	box-shadow: var(--glow-primary);
}

/* Navigation */
.main-navigation .menu {
	display: flex;
	gap: 5px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.main-navigation .menu>li>a {
	padding: 8px 18px;
	border-radius: var(--radius-pill);
	font-size: 14px;
	font-weight: 500;
	color: var(--text-muted);
}

.main-navigation .menu>li>a:hover,
.main-navigation .menu>li.current-menu-item>a {
	color: var(--text-main);
	background: rgba(255, 255, 255, 0.08);
}

/* Actions */
.header-actions {
	display: flex;
	align-items: center;
	gap: 20px;
}

.header-search-icon {
	color: var(--text-muted);
	font-size: 16px;
}

.header-search-icon:hover {
	color: var(--text-main);
}

.btn-subscribe {
	background: var(--gradient-brand);
	color: white;
	padding: 8px 24px;
	border-radius: var(--radius-pill);
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: var(--glow-primary);
}

.btn-subscribe:hover {
	transform: translateY(-2px);
	box-shadow: 0 5px 20px rgba(112, 0, 255, 0.6);
	color: white;
}

/* ==========================================================================
   4. HERO SECTIONS
   ========================================================================== */

/* Hero Grid */
.hero-tech-grid {
	margin: 30px 0 60px;
}

.hero-grid-container {
	display: grid;
	grid-template-columns: 1.8fr 1fr;
	gap: 25px;
	min-height: 520px;
}

.hero-card {
	background: var(--color-bg-card);
	border: 1px solid var(--border-light);
	border-radius: var(--radius-lg);
	overflow: hidden;
	position: relative;
	transition: 0.3s ease;
	height: 100%;
}

.hero-card:hover {
	border-color: var(--color-primary);
	box-shadow: var(--glow-primary);
}

.hero-overlay-img {
	position: absolute;
	inset: 0;
}

.hero-overlay-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-card:hover .hero-overlay-img img {
	transform: scale(1.06);
}

.hero-card::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, #050511 0%, rgba(5, 5, 17, 0.7) 40%, transparent 100%);
	pointer-events: none;
}

.hero-main-feature {
	height: 100%;
}

.hero-side-stack {
	display: flex;
	flex-direction: column;
	gap: 25px;
	height: 100%;
}

.hero-side-stack .hero-card.small {
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: flex-end;
}

/* Hero Typography */
.hero-content,
.hero-small-content {
	position: relative;
	z-index: 2;
	padding: 30px;
	width: 100%;
}

.hero-card.large .hero-content {
	padding: 40px;
}

.post-badges a {
	display: inline-block;
	background: var(--color-primary);
	color: white;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 5px 12px;
	border-radius: 4px;
	margin-bottom: 15px;
	letter-spacing: 0.5px;
}

.hero-title {
	font-size: 38px;
	margin-bottom: 15px;
	letter-spacing: -0.5px;
}

.hero-small-title {
	font-size: 20px;
	margin-bottom: 10px;
}

.hero-meta {
	font-size: 13px;
	color: var(--text-muted);
	display: flex;
	align-items: center;
	gap: 15px;
}

.hero-meta .author-img img {
	width: 24px;
	height: 24px;
	border-radius: 50%;
}

/* Hot Topics Ticker */
.hot-topics-ticker {
	margin-bottom: 40px;
}

.topics-inner {
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid var(--border-light);
	border-radius: 50px;
	padding: 8px 10px;
	display: flex;
	align-items: center;
	gap: 20px;
}

.topics-label {
	background: var(--color-bg-card);
	color: var(--color-secondary);
	padding: 6px 15px;
	border-radius: 30px;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	border: 1px solid var(--border-light);
}

.topics-list {
	flex: 1;
	display: flex;
	gap: 25px;
	overflow: hidden;
}

.topics-list a {
	font-size: 13px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 8px;
}

.topics-list a i {
	color: var(--color-tertiary);
}

/* ==========================================================================
   5. POSTS & ARCHIVES
   ========================================================================== */

/* Grid Layout */
.ascendoor-blog-archive-layout.grid-layout {
	display: grid;
	gap: 30px;
}

.blog-post-single.grid-design {
	background: var(--color-bg-card);
	border: 1px solid var(--border-light);
	border-radius: var(--radius-lg);
	padding: 24px;
	display: flex;
	gap: 30px;
	align-items: center;
	transition: 0.3s;
}

.blog-post-single.grid-design:hover {
	transform: translateY(-4px);
	border-color: rgba(255, 255, 255, 0.15);
	background: var(--color-bg-card);
	/* Ensure bg stays opaque */
	box-shadow: var(--shadow-lg);
}

.blog-post-single.grid-design:hover::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1px;
	background: linear-gradient(45deg, var(--color-primary), transparent);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	pointer-events: none;
}

.blog-post-single .post-thumbnail {
	width: 260px;
	height: 170px;
	flex-shrink: 0;
	border-radius: 12px;
	overflow: hidden;
}

.blog-post-single .post-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: background 0.3s;
}

.mag-post-title {
	font-size: 24px;
	margin-bottom: 12px;
}

.mag-post-title a {
	background: transparent;
}

.mag-post-excerpt {
	color: var(--text-muted);
	font-size: 15px;
	margin-bottom: 15px;
}

/* Read More Button */
.ascen-readmore-btn a {
	display: inline-flex;
	align-items: center;
	padding: 8px 20px;
	background: rgba(112, 0, 255, 0.1);
	color: var(--color-primary);
	font-weight: 600;
	font-size: 13px;
	border-radius: var(--radius-sm);
	transition: 0.2s;
}

.ascen-readmore-btn a:hover {
	background: var(--color-primary);
	color: white;
}

/* ==========================================================================
   6. SIDEBAR & WIDGETS
   ========================================================================== */

.widget-area {
	margin-left: 20px;
}

.widget {
	background: var(--color-bg-card);
	border: 1px solid var(--border-light);
	border-radius: var(--radius-lg);
	padding: 25px;
	margin-bottom: 30px;
}

.widget-title {
	font-size: 16px;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 25px;
	padding-bottom: 15px;
	border-bottom: 1px solid var(--border-light);
	position: relative;
}

.widget-title::after {
	content: '';
	position: absolute;
	bottom: -1px;
	left: 0;
	width: 50px;
	height: 3px;
	background: var(--gradient-brand);
}

/* Standard Widget Lists */
.widget ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.widget ul li {
	padding: 10px 0;
	border-bottom: 1px solid var(--border-light);
	display: flex;
	justify-content: space-between;
}

.widget ul li a {
	font-size: 14px;
	color: var(--text-muted);
	font-weight: 500;
}

.widget ul li a:hover {
	color: var(--color-secondary);
	padding-left: 5px;
}

/* Tag Cloud */
.tagcloud a {
	display: inline-block;
	background: rgba(255, 255, 255, 0.05);
	color: var(--text-muted);
	padding: 5px 12px;
	font-size: 12px !important;
	border-radius: 4px;
	margin: 0 4px 8px 0;
	border: 1px solid transparent;
}

.tagcloud a:hover {
	border-color: var(--color-secondary);
	color: var(--color-secondary);
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */

.site-footer {
	margin-top: 80px;
	border-top: 1px solid var(--border-light);
	background: linear-gradient(to bottom, var(--color-bg-body), #020205);
	padding-top: 60px;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
	gap: 40px;
	margin-bottom: 50px;
}

.brand-nx {
	display: inline-flex;
	width: 30px;
	height: 30px;
	background: var(--color-primary);
	color: white;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	font-weight: 800;
}

.brand-text {
	font-size: 20px;
	font-weight: 700;
	color: white;
	margin-left: 8px;
}

.footer-desc {
	font-size: 14px;
	line-height: 1.6;
	margin-top: 15px;
	color: var(--text-muted);
}

.footer-social {
	display: flex;
	gap: 15px;
	margin-top: 20px;
}

.footer-social a {
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, 0.05);
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	color: var(--text-main);
	transition: 0.3s;
}

.footer-social a:hover {
	background: var(--color-primary);
	transform: translateY(-3px);
}

.footer-heading {
	font-size: 16px;
	margin-bottom: 20px;
	color: white;
}

.footer-links {
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer-links li {
	margin-bottom: 12px;
}

.footer-links a {
	color: var(--text-muted);
	font-size: 14px;
}

.footer-links a:hover {
	color: var(--color-secondary);
}

/* Newsletter Form */
.input-group {
	display: flex;
	background: var(--color-bg-input);
	border: 1px solid var(--border-light);
	border-radius: 8px;
	padding: 5px;
}

.input-group input {
	background: transparent;
	border: none;
	color: white;
	padding: 10px;
	width: 100%;
}

.input-group input:focus {
	outline: none;
}

.input-group button {
	background: var(--gradient-brand);
	border: none;
	width: 40px;
	border-radius: 6px;
	color: white;
	cursor: pointer;
}

.site-info {
	background: rgba(0, 0, 0, 0.3);
	padding: 20px 0;
	border-top: 1px solid var(--border-light);
	font-size: 13px;
	color: var(--text-muted);
}

.site-info-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.footer-bottom-links a {
	margin: 0 5px;
}

.accent-text {
	color: var(--color-primary);
}

/* ==========================================================================
   8. RESPONSIVE UTILITIES
   ========================================================================== */

@media (max-width: 1024px) {
	.hero-grid-container {
		grid-template-columns: 1fr;
		height: auto;
	}

	.hero-side-stack {
		flex-direction: row;
		height: 300px;
	}

	.footer-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 768px) {
	.header-inner {
		height: 50px;
	}

	.site-title {
		font-size: 18px;
	}

	.main-navigation,
	.header-search,
	.header-cta {
		display: none;
	}

	/* Mobile Menu Implementation needed */
	.menu-toggle {
		display: block;
		filter: invert(1);
	}

	.hero-side-stack {
		flex-direction: column;
		height: auto;
	}

	.blog-post-single.grid-design {
		flex-direction: column;
		align-items: flex-start;
	}

	.blog-post-single .post-thumbnail {
		width: 100%;
		height: 200px;
	}

	.footer-grid {
		grid-template-columns: 1fr;
		gap: 30px;
	}

	.site-info-inner {
		flex-direction: column;
		gap: 10px;
	}
}