/*
Theme Name: Linearis Dark
Theme URI: https://test.mlbx.net/
Author: Freebuff
Description: Tema dark ad alta tecnologia ispirato al layout e alla grafica di linear.app: superfici near-black, bordi sottili, gradienti indaco-viola, ombre profonde e effetti glow.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
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: linearis
Tags: dark, blog, news, custom-colors, custom-menu, featured-images, block-styles
*/

/* ============================================================
   Design tokens — Linear.app inspired
   ============================================================ */
:root {
	--lg-bg: #08090a;
	--lg-bg-soft: #0d0e10;
	--lg-surface: rgba(255, 255, 255, 0.025);
	--lg-surface-hover: rgba(255, 255, 255, 0.045);
	--lg-border: rgba(255, 255, 255, 0.08);
	--lg-border-soft: rgba(255, 255, 255, 0.055);
	--lg-text: #f7f8f8;
	--lg-text-muted: #8a8f98;
	--lg-text-faint: #62666d;
	--lg-accent: #5e6ad2;
	--lg-accent-2: #8b5cf6;
	--lg-accent-soft: rgba(94, 106, 210, 0.35);
	--lg-grad: linear-gradient(135deg, #5e6ad2 0%, #8b5cf6 55%, #22d3ee 100%);
	--lg-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
	--lg-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
	--lg-shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
	--lg-glow: 0 0 0 1px rgba(94, 106, 210, 0.35), 0 8px 40px rgba(94, 106, 210, 0.18);
	--lg-radius: 14px;
	--lg-radius-lg: 20px;
	--lg-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--lg-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--lg-max: 1120px;
	--lg-prose: 760px;
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background-color: var(--lg-bg);
	color: var(--lg-text);
	font-family: var(--lg-font);
	font-size: 16px;
	line-height: 1.6;
	font-feature-settings: "cv02", "cv03", "cv04", "cv11";
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

/* Ambient glow field */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	background:
		radial-gradient(900px 500px at 15% -10%, rgba(94, 106, 210, 0.16), transparent 60%),
		radial-gradient(700px 480px at 90% 0%, rgba(139, 92, 246, 0.10), transparent 55%),
		radial-gradient(800px 600px at 50% 110%, rgba(34, 211, 238, 0.06), transparent 60%);
}

/* Subtle grid overlay */
body::after {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
	background-size: 64px 64px;
	mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, #000 30%, transparent 75%);
	-webkit-mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, #000 30%, transparent 75%);
}

a {
	color: #a5b4fc;
	text-decoration: none;
	transition: color 0.15s ease;
}

a:hover {
	color: #c7d2fe;
}

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

::selection {
	background: var(--lg-accent-soft);
	color: #fff;
}

/* ============================================================
   Layout
   ============================================================ */
.lg-container {
	width: 100%;
	max-width: var(--lg-max);
	margin: 0 auto;
	padding: 0 24px;
	position: relative;
	z-index: 1;
}

.lg-site {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.lg-main {
	flex: 1 0 auto;
	padding: 48px 0 96px;
}

/* ============================================================
   Header
   ============================================================ */
.lg-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(8, 9, 10, 0.72);
	backdrop-filter: blur(14px) saturate(160%);
	-webkit-backdrop-filter: blur(14px) saturate(160%);
	border-bottom: 1px solid var(--lg-border-soft);
}

.lg-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	height: 64px;
}

.lg-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	font-weight: 600;
	letter-spacing: -0.02em;
	font-size: 17px;
	color: var(--lg-text);
}

.lg-brand:hover {
	color: #fff;
}

.lg-brand__mark {
	width: 30px;
	height: 30px;
	border-radius: 9px;
	background: var(--lg-grad);
	box-shadow: var(--lg-glow);
	display: grid;
	place-items: center;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	flex: none;
}

.lg-nav ul {
	display: flex;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lg-nav a {
	display: block;
	padding: 7px 14px;
	border-radius: 9px;
	font-size: 14px;
	color: var(--lg-text-muted);
	border: 1px solid transparent;
	transition: all 0.15s ease;
}

.lg-nav a:hover,
.lg-nav .current-menu-item a,
.lg-nav .current_page_item a {
	color: var(--lg-text);
	background: var(--lg-surface);
	border-color: var(--lg-border);
	box-shadow: var(--lg-shadow-sm);
}

/* ============================================================
   Hero
   ============================================================ */
.lg-hero {
	padding: 72px 0 40px;
	position: relative;
}

.lg-hero__kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--lg-mono);
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--lg-text-muted);
	padding: 6px 14px;
	border: 1px solid var(--lg-border);
	border-radius: 999px;
	background: var(--lg-surface);
	box-shadow: var(--lg-shadow-sm);
	margin-bottom: 24px;
}

.lg-hero__kicker::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #22d3ee;
	box-shadow: 0 0 12px rgba(34, 211, 238, 0.9);
	animation: lg-pulse 2s ease-in-out infinite;
}

@keyframes lg-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.35; }
}

.lg-hero__title {
	margin: 0 0 18px;
	font-size: clamp(38px, 6vw, 64px);
	line-height: 1.05;
	letter-spacing: -0.035em;
	font-weight: 700;
	background: linear-gradient(180deg, #ffffff 20%, rgba(255, 255, 255, 0.55) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.lg-hero__sub {
	margin: 0;
	max-width: 640px;
	font-size: 18px;
	line-height: 1.65;
	color: var(--lg-text-muted);
}

.lg-hero__sub strong {
	color: var(--lg-text);
	font-weight: 600;
}

/* ============================================================
   Section headings
   ============================================================ */
.lg-section-title {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 56px 0 28px;
	font-size: 13px;
	font-family: var(--lg-mono);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--lg-text-faint);
}

.lg-section-title::after {
	content: "";
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, var(--lg-border), transparent);
}

/* ============================================================
   Post cards
   ============================================================ */
.lg-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 20px;
}

.lg-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 26px;
	background: var(--lg-surface);
	border: 1px solid var(--lg-border-soft);
	border-radius: var(--lg-radius);
	box-shadow: var(--lg-shadow-md);
	transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
	overflow: hidden;
}

.lg-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(160deg, rgba(94, 106, 210, 0.14), transparent 45%);
	opacity: 0;
	transition: opacity 0.18s ease;
	pointer-events: none;
}

.lg-card:hover {
	transform: translateY(-3px);
	background: var(--lg-surface-hover);
	border-color: rgba(94, 106, 210, 0.45);
	box-shadow: var(--lg-glow), var(--lg-shadow-lg);
}

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

.lg-card__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--lg-mono);
	font-size: 11.5px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--lg-text-faint);
}

.lg-card__meta .lg-dot {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--lg-accent);
}

.lg-card__title {
	margin: 0;
	font-size: 20px;
	line-height: 1.3;
	letter-spacing: -0.02em;
	font-weight: 600;
}

.lg-card__title a {
	color: var(--lg-text);
}

.lg-card__title a:hover {
	color: #fff;
	background-image: var(--lg-grad);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.lg-card__excerpt {
	margin: 0;
	font-size: 15px;
	line-height: 1.65;
	color: var(--lg-text-muted);
	flex: 1;
}

.lg-card__more {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 13.5px;
	font-weight: 500;
	color: #a5b4fc;
}

.lg-card__more::after {
	content: "→";
	transition: transform 0.15s ease;
}

.lg-card:hover .lg-card__more::after {
	transform: translateX(4px);
}

/* ============================================================
   Article (single / page)
   ============================================================ */
.lg-article {
	max-width: var(--lg-prose);
	margin: 0 auto;
}

.lg-article__header {
	margin-bottom: 36px;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--lg-border-soft);
}

.lg-article__kicker {
	font-family: var(--lg-mono);
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--lg-accent-2);
	margin-bottom: 14px;
}

.lg-article__title {
	margin: 0 0 16px;
	font-size: clamp(30px, 4.4vw, 46px);
	line-height: 1.12;
	letter-spacing: -0.03em;
	font-weight: 700;
	background: linear-gradient(180deg, #ffffff 25%, rgba(255, 255, 255, 0.6) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.lg-article__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	font-size: 13.5px;
	color: var(--lg-text-faint);
	font-family: var(--lg-mono);
}

.lg-article__meta a {
	color: var(--lg-text-muted);
}

.lg-entry {
	font-size: 17px;
	line-height: 1.8;
	color: #cdd1d6;
}

.lg-entry > * + * {
	margin-top: 1.25em;
}

.lg-entry h2,
.lg-entry h3,
.lg-entry h4 {
	color: var(--lg-text);
	letter-spacing: -0.02em;
	line-height: 1.25;
	font-weight: 650;
	margin-top: 2em;
	margin-bottom: 0.6em;
}

.lg-entry h2 {
	font-size: 26px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--lg-border-soft);
}

.lg-entry h3 {
	font-size: 21px;
}

.lg-entry a {
	color: #a5b4fc;
	border-bottom: 1px solid rgba(165, 180, 252, 0.35);
	transition: border-color 0.15s ease, color 0.15s ease;
}

.lg-entry a:hover {
	color: #c7d2fe;
	border-bottom-color: #c7d2fe;
}

.lg-entry strong {
	color: var(--lg-text);
	font-weight: 600;
}

.lg-entry ul,
.lg-entry ol {
	padding-left: 1.4em;
}

.lg-entry li + li {
	margin-top: 0.45em;
}

.lg-entry blockquote {
	margin: 1.6em 0;
	padding: 18px 24px;
	border-left: 3px solid var(--lg-accent);
	border-radius: 0 var(--lg-radius) var(--lg-radius) 0;
	background: linear-gradient(135deg, rgba(94, 106, 210, 0.12), rgba(139, 92, 246, 0.06));
	color: #d7dae0;
	box-shadow: var(--lg-shadow-sm);
}

.lg-entry code {
	font-family: var(--lg-mono);
	font-size: 0.88em;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--lg-border-soft);
	border-radius: 6px;
	padding: 2px 7px;
	color: #e2e8f0;
}

.lg-entry pre {
	background: #0b0c0e;
	border: 1px solid var(--lg-border);
	border-radius: var(--lg-radius);
	padding: 20px;
	overflow-x: auto;
	box-shadow: var(--lg-shadow-md);
}

.lg-entry pre code {
	background: none;
	border: none;
	padding: 0;
}

.lg-entry img {
	border-radius: var(--lg-radius);
	border: 1px solid var(--lg-border);
	box-shadow: var(--lg-shadow-lg);
}

.lg-entry hr {
	border: none;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--lg-border), transparent);
	margin: 2.5em 0;
}

.lg-entry table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	display: block;
	overflow-x: auto;
}

.lg-entry th,
.lg-entry td {
	border: 1px solid var(--lg-border-soft);
	padding: 10px 14px;
	text-align: left;
}

.lg-entry th {
	background: rgba(255, 255, 255, 0.04);
	color: var(--lg-text);
	font-weight: 600;
}

/* Footer meta + post nav */
.lg-article__footer {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--lg-border-soft);
	display: flex;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	font-size: 14px;
	color: var(--lg-text-faint);
}

.lg-post-nav {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin-top: 32px;
}

.lg-post-nav a {
	flex: 1;
	padding: 16px 20px;
	background: var(--lg-surface);
	border: 1px solid var(--lg-border-soft);
	border-radius: var(--lg-radius);
	color: var(--lg-text-muted);
	font-size: 14px;
	transition: all 0.15s ease;
	box-shadow: var(--lg-shadow-sm);
}

.lg-post-nav a:hover {
	border-color: rgba(94, 106, 210, 0.45);
	color: var(--lg-text);
	box-shadow: var(--lg-glow);
}

.lg-post-nav .lg-label {
	display: block;
	font-family: var(--lg-mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--lg-text-faint);
	margin-bottom: 6px;
}

.lg-post-nav .next {
	text-align: right;
}

/* ============================================================
   Page titles (archive / search)
   ============================================================ */
.lg-page-title {
	margin: 0 0 8px;
	font-size: clamp(28px, 4vw, 40px);
	letter-spacing: -0.03em;
	font-weight: 700;
}

.lg-page-sub {
	margin: 0 0 36px;
	color: var(--lg-text-muted);
}

/* ============================================================
   Search form
   ============================================================ */
.lg-search {
	display: flex;
	gap: 10px;
	max-width: 460px;
	margin-bottom: 36px;
}

.lg-search input[type="search"] {
	flex: 1;
	padding: 11px 16px;
	background: var(--lg-surface);
	border: 1px solid var(--lg-border);
	border-radius: 10px;
	color: var(--lg-text);
	font-size: 14.5px;
	font-family: inherit;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	box-shadow: var(--lg-shadow-sm);
}

.lg-search input[type="search"]:focus {
	border-color: var(--lg-accent);
	box-shadow: var(--lg-glow);
}

.lg-search button {
	padding: 11px 20px;
	border: none;
	border-radius: 10px;
	background: var(--lg-grad);
	color: #fff;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	box-shadow: var(--lg-shadow-md);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lg-search button:hover {
	transform: translateY(-1px);
	box-shadow: var(--lg-glow);
}

/* ============================================================
   Pagination
   ============================================================ */
.lg-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 48px;
}

.lg-pagination .page-numbers {
	min-width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	padding: 0 12px;
	border-radius: 10px;
	background: var(--lg-surface);
	border: 1px solid var(--lg-border-soft);
	color: var(--lg-text-muted);
	font-size: 14px;
	transition: all 0.15s ease;
}

.lg-pagination .page-numbers:hover,
.lg-pagination .page-numbers.current {
	color: #fff;
	border-color: rgba(94, 106, 210, 0.5);
	box-shadow: var(--lg-glow);
}

/* ============================================================
   Footer
   ============================================================ */
.lg-footer {
	border-top: 1px solid var(--lg-border-soft);
	background: linear-gradient(180deg, transparent, rgba(94, 106, 210, 0.05));
	padding: 44px 0;
	position: relative;
	z-index: 1;
}

.lg-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	font-size: 13.5px;
	color: var(--lg-text-faint);
}

.lg-footer__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	color: var(--lg-text-muted);
}

.lg-footer nav ul {
	display: flex;
	gap: 18px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.lg-footer nav a {
	color: var(--lg-text-faint);
	font-size: 13.5px;
}

.lg-footer nav a:hover {
	color: var(--lg-text);
}

/* ============================================================
   Misc WP
   ============================================================ */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	word-wrap: normal;
}

.alignwide {
	max-width: 1000px;
	margin-left: auto;
	margin-right: auto;
}

.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
}

.sticky,
.bypostauthor {
	/* keep WP compat without visual noise */
}

/* Comments */
.lg-comments {
	margin-top: 48px;
	padding-top: 28px;
	border-top: 1px solid var(--lg-border-soft);
}

.lg-comments .comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.lg-comments .comment-body {
	padding: 18px 20px;
	border: 1px solid var(--lg-border-soft);
	border-radius: var(--lg-radius);
	background: var(--lg-surface);
	margin-bottom: 14px;
	box-shadow: var(--lg-shadow-sm);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 782px) {
	.lg-header__inner {
		height: auto;
		padding: 12px 0;
		flex-direction: column;
		align-items: flex-start;
	}

	.lg-nav ul {
		flex-wrap: wrap;
	}

	.lg-main {
		padding: 32px 0 72px;
	}

	.lg-hero {
		padding: 48px 0 28px;
	}

	.lg-grid {
		grid-template-columns: 1fr;
	}

	.lg-post-nav {
		flex-direction: column;
	}
}
