/*  ═══════════════════════════════════════════════════════
    Nexor — Base Styles
    CSS Reset, Variables, Typography, Accessibility
    ═══════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ───────────────────────────── */
:root {
	/* Colors */
	--nexor-primary: #2563eb;
	--nexor-secondary: #1e40af;
	--nexor-accent: #3b82f6;
	--nexor-text: #1f2937;
	--nexor-text-light: #6b7280;
	--nexor-bg: #ffffff;
	--nexor-bg-alt: #f9fafb;
	--nexor-border: #e5e7eb;
	--nexor-success: #10b981;
	--nexor-error: #ef4444;

	/* Typography */
	--nexor-font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--nexor-font-heading: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--nexor-font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

	/* Font Sizes */
	--nexor-text-xs: 0.75rem;
	--nexor-text-sm: 0.875rem;
	--nexor-text-base: 1rem;
	--nexor-text-lg: 1.125rem;
	--nexor-text-xl: 1.25rem;
	--nexor-text-2xl: 1.5rem;
	--nexor-text-3xl: 1.875rem;
	--nexor-text-4xl: 2.25rem;

	/* Spacing */
	--nexor-space-xs: 0.25rem;
	--nexor-space-sm: 0.5rem;
	--nexor-space-md: 1rem;
	--nexor-space-lg: 1.5rem;
	--nexor-space-xl: 2rem;
	--nexor-space-2xl: 3rem;
	--nexor-space-3xl: 4rem;

	/* Layout */
	--nexor-container: 1140px;
	--nexor-container-wide: 1320px;
	--nexor-sidebar-width: 300px;
	--nexor-radius: 8px;
	--nexor-radius-sm: 4px;
	--nexor-radius-lg: 12px;

	/* Shadows */
	--nexor-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
	--nexor-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
	--nexor-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	--nexor-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

	/* Transitions */
	--nexor-transition: 200ms ease;
	--nexor-transition-slow: 400ms ease;
}

/* ── CSS Reset ───────────────────────────────────────── */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

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

body {
	font-family: var(--nexor-font-body);
	font-size: var(--nexor-text-base);
	line-height: 1.7;
	color: var(--nexor-text);
	background-color: var(--nexor-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
	display: block;
	max-width: 100%;
	height: auto;
}

input, button, textarea, select {
	font: inherit;
}

a {
	color: var(--nexor-primary);
	text-decoration: none;
	transition: color var(--nexor-transition);
}

a:hover,
a:focus {
	color: var(--nexor-secondary);
}

/* ── Typography ──────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--nexor-font-heading);
	font-weight: 700;
	line-height: 1.3;
	color: var(--nexor-text);
	margin-bottom: var(--nexor-space-md);
}

h1 { font-size: var(--nexor-text-4xl); }
h2 { font-size: var(--nexor-text-3xl); }
h3 { font-size: var(--nexor-text-2xl); }
h4 { font-size: var(--nexor-text-xl); }
h5 { font-size: var(--nexor-text-lg); }
h6 { font-size: var(--nexor-text-base); }

p {
	margin-bottom: var(--nexor-space-md);
}

ul, ol {
	padding-left: var(--nexor-space-xl);
	margin-bottom: var(--nexor-space-md);
}

blockquote {
	border-left: 4px solid var(--nexor-primary);
	padding: var(--nexor-space-md) var(--nexor-space-lg);
	margin: var(--nexor-space-lg) 0;
	background: var(--nexor-bg-alt);
	border-radius: 0 var(--nexor-radius-sm) var(--nexor-radius-sm) 0;
	font-style: italic;
	color: var(--nexor-text-light);
}

pre, code {
	font-family: var(--nexor-font-mono);
	font-size: var(--nexor-text-sm);
}

pre {
	background: var(--nexor-bg-alt);
	padding: var(--nexor-space-lg);
	border-radius: var(--nexor-radius);
	overflow-x: auto;
	margin-bottom: var(--nexor-space-lg);
}

code {
	background: var(--nexor-bg-alt);
	padding: 2px 6px;
	border-radius: var(--nexor-radius-sm);
}

pre code {
	background: none;
	padding: 0;
}

hr {
	border: 0;
	border-top: 1px solid var(--nexor-border);
	margin: var(--nexor-space-2xl) 0;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: var(--nexor-space-lg);
}

th, td {
	padding: var(--nexor-space-sm) var(--nexor-space-md);
	border: 1px solid var(--nexor-border);
	text-align: left;
}

th {
	background: var(--nexor-bg-alt);
	font-weight: 600;
}

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

.screen-reader-text:focus {
	background-color: var(--nexor-bg);
	border-radius: var(--nexor-radius-sm);
	box-shadow: var(--nexor-shadow-md);
	clip: auto !important;
	color: var(--nexor-primary);
	display: block;
	font-size: var(--nexor-text-sm);
	font-weight: 700;
	height: auto;
	left: 5px;
	padding: var(--nexor-space-md) var(--nexor-space-lg);
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

.skip-link {
	z-index: 999999;
}

:focus-visible {
	outline: 2px solid var(--nexor-primary);
	outline-offset: 2px;
}

/* ── Selection ───────────────────────────────────────── */
::selection {
	background: var(--nexor-primary);
	color: #fff;
}

/* ── Forms (base) ────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select {
	width: 100%;
	padding: var(--nexor-space-sm) var(--nexor-space-md);
	border: 1px solid var(--nexor-border);
	border-radius: var(--nexor-radius-sm);
	background: var(--nexor-bg);
	color: var(--nexor-text);
	font-size: var(--nexor-text-base);
	transition: border-color var(--nexor-transition);
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--nexor-primary);
	outline: none;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button,
input[type="submit"],
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: var(--nexor-space-sm) var(--nexor-space-lg);
	background: var(--nexor-primary);
	color: #fff;
	border: none;
	border-radius: var(--nexor-radius-sm);
	font-size: var(--nexor-text-base);
	font-weight: 600;
	cursor: pointer;
	transition: background var(--nexor-transition), transform var(--nexor-transition);
}

button:hover,
input[type="submit"]:hover,
.button:hover {
	background: var(--nexor-secondary);
	transform: translateY(-1px);
}

/* ── WordPress Core Classes ──────────────────────────── */
.alignleft {
	float: left;
	margin-right: var(--nexor-space-lg);
	margin-bottom: var(--nexor-space-md);
}

.alignright {
	float: right;
	margin-left: var(--nexor-space-lg);
	margin-bottom: var(--nexor-space-md);
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: var(--nexor-space-md);
}

.alignwide {
	width: calc(100% + 4rem);
	max-width: calc(100% + 4rem);
	margin-left: -2rem;
	margin-right: -2rem;
}

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

.wp-caption {
	max-width: 100%;
	margin-bottom: var(--nexor-space-md);
}

.wp-caption-text {
	font-size: var(--nexor-text-sm);
	color: var(--nexor-text-light);
	text-align: center;
	padding-top: var(--nexor-space-sm);
}

.gallery {
	display: grid;
	gap: var(--nexor-space-md);
	margin-bottom: var(--nexor-space-lg);
}

.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }

.sticky .entry-title::before {
	content: '★ ';
	color: var(--nexor-primary);
}