/* ==========================================================================
   Cyberpunk Neon Theme Master Stylesheet
   ========================================================================== */

:root {
	--cyber-bg: #05020c;
	--cyber-card-bg: #12101c;
	--cyber-primary: #00b4ff;
	--cyber-secondary: #a855f7;
	--cyber-accent: #fcee0a;
	--cyber-text: #e8e4f0;
	--cyber-preloader-color: #00b4ff;
	--cyber-border-radius: 0px;
	--cyber-font-title: 'Orbitron', sans-serif;
	--cyber-font-body: 'Rajdhani', sans-serif;
	--cyber-font-mono: 'Share Tech Mono', monospace;
	--cyber-cursor-x: 50%;
	--cyber-cursor-y: 40%;
}

/* Base Body & Reset — cyberpunk atmospheric gradient */
body {
	background-color: var(--cyber-bg);
	background-image:
		radial-gradient(ellipse 90% 60% at var(--cyber-cursor-x) var(--cyber-cursor-y), rgba(0, 180, 255, 0.22), transparent 42%),
		radial-gradient(ellipse 70% 55% at 15% 20%, rgba(168, 85, 247, 0.38), transparent 55%),
		radial-gradient(ellipse 55% 45% at 90% 15%, rgba(0, 140, 255, 0.28), transparent 50%),
		radial-gradient(ellipse 50% 40% at 70% 85%, rgba(252, 238, 10, 0.1), transparent 55%),
		radial-gradient(ellipse 80% 70% at 40% 100%, rgba(88, 28, 135, 0.35), transparent 60%),
		linear-gradient(165deg, #12081f 0%, #05020c 40%, #020108 100%);
	background-attachment: fixed;
	color: var(--cyber-text);
	font-family: var(--cyber-font-body);
	font-size: 1.1rem;
	line-height: 1.6;
	overflow-x: hidden;
	min-height: 100vh;
	position: relative;
}

/* Interactive neon trail canvas */
#cyber-fx-canvas {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 0;
}

/* Cyber Ambient Grid Pattern */
body.cyberpunk-grid-bg::before {
	content: "";
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background-image:
		linear-gradient(rgba(0, 180, 255, 0.045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(168, 85, 247, 0.04) 1px, transparent 1px);
	background-size: 44px 44px;
	pointer-events: none;
	z-index: 1;
}

/* CRT Scanlines Overlay */
body.cyberpunk-scanlines-active::after {
	content: " ";
	display: block;
	position: fixed;
	top: 0; left: 0; bottom: 0; right: 0;
	background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
	background-size: 100% 4px;
	z-index: 999;
	pointer-events: none;
	opacity: 0.6;
}

/* Typography & Headings */
h1, h2, h3, h4, h5, h6,
.cyber-title, .site-title {
	font-family: var(--cyber-font-title);
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: #ffffff;
	margin-top: 0;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }

a {
	color: var(--cyber-primary);
	text-decoration: none;
	transition: all 0.2s ease-in-out;
}

a:hover, a:focus {
	color: var(--cyber-secondary);
	text-shadow: 0 0 8px var(--cyber-secondary);
}

/* Keep page content above the FX canvas */
.site {
	position: relative;
	z-index: 2;
}

/* Cyber Container */
.cyber-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	position: relative;
	z-index: 2;
}

/* Cyber Button Style */
.cyber-btn, .button, input[type="submit"], .page-numbers {
	display: inline-block;
	background: transparent;
	color: var(--cyber-primary) !important;
	border: 1px solid var(--cyber-primary);
	padding: 10px 22px;
	font-family: var(--cyber-font-mono);
	font-size: 0.95rem;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 1px;
	position: relative;
	cursor: pointer;
	clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
	transition: all 0.2s ease;
	box-shadow: inset 0 0 10px rgba(0, 243, 255, 0.1);
}

.cyber-btn:hover, .button:hover, input[type="submit"]:hover, .page-numbers.current {
	background: var(--cyber-primary);
	color: #000000 !important;
	box-shadow: 0 0 15px var(--cyber-primary);
	transform: translateY(-2px);
}

/* Secondary Button Variant */
.cyber-btn-secondary {
	color: var(--cyber-secondary) !important;
	border-color: var(--cyber-secondary);
	box-shadow: inset 0 0 10px rgba(255, 0, 85, 0.1);
}
.cyber-btn-secondary:hover {
	background: var(--cyber-secondary);
	color: #ffffff !important;
	box-shadow: 0 0 15px var(--cyber-secondary);
}

/* Cyber Card Panel */
.cyber-card {
	background-color: var(--cyber-card-bg);
	border: 1px solid rgba(0, 243, 255, 0.2);
	position: relative;
	padding: 24px;
	margin-bottom: 30px;
	clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
	box-shadow: 0 4px 20px rgba(0,0,0,0.5);
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.cyber-card::before {
	content: "";
	position: absolute;
	top: 0; left: 0;
	width: 30px; height: 3px;
	background: var(--cyber-primary);
	box-shadow: 0 0 8px var(--cyber-primary);
}

.cyber-card:hover {
	border-color: var(--cyber-primary);
	box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.cyber-header {
	background: rgba(10, 11, 16, 0.9);
	backdrop-filter: blur(8px);
	border-bottom: 2px solid var(--cyber-primary);
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.cyber-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 15px 0;
}

.cyber-brand-wrapper {
	display: flex;
	align-items: center;
	gap: 15px;
}

.cyber-header-icon-img {
	max-height: 45px;
	width: auto;
	filter: drop-shadow(0 0 5px var(--cyber-primary));
}

.site-title {
	margin: 0;
	font-size: 1.8rem;
}

.site-title a {
	color: #ffffff;
	text-shadow: 0 0 10px var(--cyber-primary);
}

.site-description {
	margin: 2px 0 0 0;
	font-family: var(--cyber-font-mono);
	font-size: 0.8rem;
	color: var(--cyber-accent);
}

.cyber-badge-header {
	display: inline-block;
	background: rgba(0, 243, 255, 0.1);
	border: 1px solid var(--cyber-primary);
	color: var(--cyber-primary);
	font-family: var(--cyber-font-mono);
	font-size: 0.75rem;
	padding: 2px 8px;
	margin-left: 10px;
}

/* Cyber Nav Menu */
.cyber-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 20px;
}

.cyber-nav ul li a {
	font-family: var(--cyber-font-title);
	font-size: 0.95rem;
	color: var(--cyber-text);
	padding: 8px 12px;
	position: relative;
	text-transform: uppercase;
}

.cyber-nav ul li a::after {
	content: "";
	position: absolute;
	bottom: 0; left: 50%;
	width: 0%; height: 2px;
	background: var(--cyber-secondary);
	transition: all 0.3s ease;
	transform: translateX(-50%);
}

.cyber-nav ul li a:hover::after,
.cyber-nav ul li.current-menu-item a::after {
	width: 100%;
	box-shadow: 0 0 10px var(--cyber-secondary);
}

/* Mobile Toggle */
.cyber-menu-toggle {
	display: none;
	background: transparent;
	border: 1px solid var(--cyber-primary);
	color: var(--cyber-primary);
	font-size: 1.5rem;
	padding: 5px 12px;
	cursor: pointer;
}

/* ==========================================================================
   Preloader (Schermata di Caricamento)
   ========================================================================== */

#cyberpunk-preloader {
	position: fixed;
	top: 0; left: 0;
	width: 100vw; height: 100vh;
	background-color: #050609;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.5s ease, visibility 0.5s ease;
}

#cyberpunk-preloader.preloader-hidden {
	opacity: 0;
	visibility: hidden;
}

.cyber-preloader-inner {
	text-align: center;
	max-width: 400px;
	width: 90%;
}

.cyber-hex-symbol {
	font-size: 3rem;
	color: var(--cyber-preloader-color);
	text-shadow: 0 0 20px var(--cyber-preloader-color);
	display: inline-block;
	animation: cyber-hex-pulse 1.5s infinite ease-in-out;
}

@keyframes cyber-hex-pulse {
	0%, 100% { transform: scale(1); opacity: 0.8; }
	50% { transform: scale(1.2); opacity: 1; text-shadow: 0 0 30px var(--cyber-preloader-color); }
}

/* Glitch Bar Loader */
.cyber-glitch-bar {
	width: 100%;
	height: 8px;
	background: #151a28;
	border: 1px solid var(--cyber-preloader-color);
	margin: 20px 0;
	position: relative;
	overflow: hidden;
	box-shadow: 0 0 10px rgba(0,243,255,0.3);
}

.cyber-glitch-progress {
	width: 0%;
	height: 100%;
	background: var(--cyber-preloader-color);
	box-shadow: 0 0 15px var(--cyber-preloader-color);
	animation: cyber-load-progress 2s infinite ease-in-out;
}

@keyframes cyber-load-progress {
	0% { width: 0%; }
	50% { width: 70%; }
	100% { width: 100%; }
}

/* Neon Ring Loader */
.cyber-neon-ring {
	width: 60px; height: 60px;
	margin: 20px auto;
	border: 3px solid transparent;
	border-top-color: var(--cyber-preloader-color);
	border-bottom-color: var(--cyber-secondary);
	border-radius: 50%;
	animation: cyber-spin 1s linear infinite;
	box-shadow: 0 0 15px var(--cyber-preloader-color);
}

@keyframes cyber-spin {
	to { transform: rotate(360deg); }
}

/* Matrix Pulse Loader */
.cyber-matrix-grid {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin: 20px 0;
}
.cyber-matrix-grid span {
	width: 15px; height: 15px;
	background: var(--cyber-preloader-color);
	animation: cyber-matrix-blink 1.2s infinite ease-in-out;
}
.cyber-matrix-grid span:nth-child(2) { animation-delay: 0.2s; }
.cyber-matrix-grid span:nth-child(3) { animation-delay: 0.4s; }
.cyber-matrix-grid span:nth-child(4) { animation-delay: 0.6s; }

@keyframes cyber-matrix-blink {
	0%, 100% { opacity: 0.2; transform: scale(0.8); }
	50% { opacity: 1; transform: scale(1.2); box-shadow: 0 0 10px var(--cyber-preloader-color); }
}

.cyber-preloader-text {
	font-family: var(--cyber-font-title);
	font-size: 1rem;
	letter-spacing: 2px;
	color: var(--cyber-preloader-color);
	text-shadow: 0 0 8px var(--cyber-preloader-color);
}

.cyber-preloader-sub {
	font-family: var(--cyber-font-mono);
	font-size: 0.75rem;
	color: #8899ac;
	margin-top: 8px;
}

/* ==========================================================================
   Blog Feed Grid & Cards
   ========================================================================== */

.cyber-layout-grid {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 30px;
	margin: 40px 0;
}

.cyber-layout-full {
	grid-template-columns: 1fr;
}

.cyber-posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 25px;
}

.post-thumbnail {
	margin: -24px -24px 20px -24px;
	overflow: hidden;
	position: relative;
	max-height: 220px;
}

.post-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: saturate(1.2) contrast(1.1);
	transition: transform 0.4s ease, filter 0.4s ease;
}

.cyber-card:hover .post-thumbnail img {
	transform: scale(1.05);
	filter: saturate(1.6) contrast(1.2);
}

.entry-meta {
	font-family: var(--cyber-font-mono);
	font-size: 0.8rem;
	color: var(--cyber-accent);
	margin-bottom: 10px;
	display: flex;
	gap: 15px;
	flex-wrap: wrap;
}

.entry-title {
	font-size: 1.5rem;
	margin-bottom: 15px;
	line-height: 1.3;
}

.entry-title a {
	color: #ffffff;
}

.entry-title a:hover {
	color: var(--cyber-primary);
}

.entry-summary {
	color: #a0aec0;
	margin-bottom: 20px;
}

/* Single Article Styling */
.single-post-header {
	border-bottom: 1px solid rgba(0, 243, 255, 0.3);
	padding-bottom: 20px;
	margin-bottom: 25px;
}

.single-post-title {
	font-size: 2.5rem;
	text-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

.entry-content {
	line-height: 1.8;
	font-size: 1.15rem;
}

.entry-content blockquote {
	border-left: 4px solid var(--cyber-secondary);
	background: rgba(255, 0, 85, 0.05);
	margin: 25px 0;
	padding: 15px 20px;
	font-style: italic;
	font-family: var(--cyber-font-mono);
}

.entry-content code, pre {
	background: #06070a;
	border: 1px solid var(--cyber-primary);
	color: var(--cyber-primary);
	font-family: var(--cyber-font-mono);
	padding: 4px 8px;
}

pre {
	padding: 15px;
	overflow-x: auto;
}

/* Footer Styling */
.cyber-footer {
	background-color: #06070a;
	border-top: 2px solid var(--cyber-secondary);
	margin-top: 60px;
	padding: 40px 0 20px 0;
	position: relative;
	box-shadow: 0 -5px 20px rgba(255,0,85,0.15);
}

.cyber-footer-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 30px;
	margin-bottom: 30px;
}

.cyber-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 20px;
	text-align: center;
	font-family: var(--cyber-font-mono);
	font-size: 0.85rem;
	color: #718096;
}

/* Forms & Inputs */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea {
	width: 100%;
	background: #08090e;
	border: 1px solid rgba(0, 243, 255, 0.3);
	color: #ffffff;
	padding: 12px 15px;
	font-family: var(--cyber-font-mono);
	margin-bottom: 15px;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus {
	border-color: var(--cyber-primary);
	box-shadow: 0 0 10px var(--cyber-primary);
}

/* Media Queries for Responsiveness */
@media (max-width: 992px) {
	.cyber-layout-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.cyber-menu-toggle {
		display: block;
	}
	.cyber-nav {
		display: none;
		width: 100%;
		margin-top: 15px;
	}
	.cyber-nav.active {
		display: block;
	}
	.cyber-nav ul {
		flex-direction: column;
		gap: 10px;
		background: #0a0b10;
		padding: 15px;
		border: 1px solid var(--cyber-primary);
	}
	.cyber-header-inner {
		flex-wrap: wrap;
	}
}
