/* Modern CSS Reset and Base Styles */
:root {
	--color-bg: #0a0a0f;
	--color-text: #ffffff;
	--color-primary: #F041FF;
	--color-secondary: #D83333;
	--color-accent: #ff6b6b;
	--color-border: rgba(255, 255, 255, 0.1);
	--color-muted: #a0a0a0;
	--color-success: #10b981;
	--color-warning: #f59e0b;
	--color-error: #ef4444;
	--color-code-bg: rgba(255, 255, 255, 0.05);
	--gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
	--gradient-accent: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
	--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
	--shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
	--shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
	--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
	--font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	--max-width: 1200px;
	--border-radius: 8px;
	--border-radius-lg: 12px;
	--transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	--header-height: 3.5rem;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	font-size: 16px;
	scroll-behavior: smooth;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	font-family: var(--font-sans);
	line-height: 1.7;
	color: var(--color-text);
	background: var(--color-bg);
	background-image: 
		radial-gradient(circle at 100% 0%, rgba(240, 65, 255, 0.1) 0%, transparent 50%),
		radial-gradient(circle at 0% 100%, rgba(216, 51, 51, 0.1) 0%, transparent 50%);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	letter-spacing: -0.011em;
}

/* Typography */
h1, h2 {
	line-height: 1.2;
	font-weight: 800;
	margin-bottom: 1.5rem;
	background: var(--gradient-primary);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	letter-spacing: -0.02em;
}

h1 {
	font-size: 2.5rem;
}

h2 {
	font-size: 2rem;
}

h3, h4, h5, h6 {
	line-height: 1.3;
	font-weight: 700;
	margin-top: 2.5rem;
	margin-bottom: 1rem;
	color: var(--color-text);
	letter-spacing: -0.015em;
}

h3 {
	font-size: 1.5rem;
}

h4 {
	font-size: 1.25rem;
}

p {
	margin-bottom: 1.5rem;
	font-size: 1.125rem;
	line-height: 1.8;
}

a {
	color: var(--color-primary);
	text-decoration: none;
	transition: var(--transition);
	position: relative;
	font-weight: 500;
}

a:hover {
	color: var(--color-accent);
}

a::after {
	content: '';
	position: absolute;
	width: 100%;
	height: 2px;
	bottom: -2px;
	left: 0;
	background: var(--gradient-primary);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.3s ease;
}

a:hover::after {
	transform: scaleX(1);
	transform-origin: left;
}

/* Layout */
main {
	flex: 1;
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 1rem 0.75rem;
	padding-top: 6rem;
	width: 100%;
}

/* Header Styles */
header {
	background: rgba(10, 10, 15, 0.8);
	border-bottom: 1px solid var(--color-border);
	height: var(--header-height);
	position: sticky;
	top: 0;
	z-index: 100;
	backdrop-filter: blur(12px);
	box-shadow: var(--shadow-md);
}

nav {
	max-width: var(--max-width);
	height: 100%;
	margin: 0 auto;
	padding: 0 1.25rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-right: auto;
}

.site-branding h1 {
	font-size: 1.125rem;
	font-weight: 500;
	color: var(--color-text);
	margin: 0;
	white-space: nowrap;
}

.site-branding p {
	display: none;
}

.nav-links {
	display: flex;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
	align-items: center;
}

.nav-links a {
	color: var(--color-text);
	font-weight: 500;
	font-size: 0.9375rem;
	padding: 0.5rem 1rem;
	transition: var(--transition);
	white-space: nowrap;
	opacity: 0.8;
	border-radius: var(--border-radius);
}

.nav-links a:hover {
	opacity: 1;
	color: var(--color-primary);
	background: rgba(255, 255, 255, 0.05);
}

.search-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.05);
	cursor: pointer;
	margin-left: auto;
	flex-shrink: 0;
	transition: var(--transition);
	border: 1px solid var(--color-border);
}

.search-icon:hover {
	background: rgba(255, 255, 255, 0.1);
	transform: scale(1.05);
	box-shadow: var(--shadow-sm);
}

.search-icon svg {
	width: 1rem;
	height: 1rem;
	fill: var(--color-text);
}

.search-icon.disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

.search-icon.disabled:hover {
	background: rgba(255, 255, 255, 0.1);
}

/* Main Content */
article {
	max-width: 65ch;
	margin: 0 auto;
	padding: 2rem 1rem;
	background: rgba(255, 255, 255, 0.02);
	border-radius: var(--border-radius-lg);
	backdrop-filter: blur(8px);
	box-shadow: var(--shadow-lg);
}

.content {
	font-size: 1.1rem;
}

.content h2 {
	font-size: 2rem;
	margin-top: 2.5rem;
	margin-bottom: 1.5rem;
}

.content p {
	margin-bottom: 1.5rem;
	line-height: 1.8;
}

/* Code Blocks */
pre, code {
	font-family: var(--font-mono);
	background: var(--color-code-bg);
	border-radius: var(--border-radius);
	padding: 0.2em 0.4em;
	font-size: 0.9em;
	letter-spacing: -0.01em;
}

pre {
	padding: 1.25rem;
	margin: 1.5rem 0;
	overflow-x: auto;
	border: 1px solid var(--color-border);
	line-height: 1.6;
}

/* Footer Styles */
footer {
	background: rgba(10, 10, 15, 0.8);
	border-top: 1px solid var(--color-border);
	padding: 3rem 1.25rem;
	margin-top: 4rem;
	backdrop-filter: blur(12px);
}

footer > div {
	max-width: var(--max-width);
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 2rem;
}

footer section {
	padding: 0.75rem;
}

footer h2 {
	font-size: 1.25rem;
	background: var(--gradient-primary);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	margin-bottom: 1rem;
}

footer h3 {
	font-size: 1rem;
	color: var(--color-primary);
	margin-bottom: 0.75rem;
}

footer dl {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.5rem 1rem;
}

footer dt {
	color: var(--color-secondary);
	font-weight: 500;
}

footer dd {
	color: var(--color-text);
}

footer ul {
	list-style: none;
}

footer li {
	margin-bottom: 0.5rem;
}

footer a {
	color: var(--color-text);
	opacity: 0.8;
	transition: var(--transition);
}

footer a:hover {
	opacity: 1;
	color: var(--color-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
	:root {
		--header-height: 3rem;
	}

	html {
		font-size: 15px;
	}

	nav {
		padding: 0 1rem;
		gap: 1rem;
	}

	.site-branding h1 {
		font-size: 1rem;
	}

	.nav-links {
		position: fixed;
		top: var(--header-height);
		left: 0;
		right: 0;
		background: rgba(10, 10, 15, 0.95);
		padding: 0.75rem;
		border-bottom: 1px solid var(--color-border);
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		-ms-overflow-style: none;
		gap: 1.25rem;
		backdrop-filter: blur(12px);
		box-shadow: var(--shadow-lg);
	}

	.nav-links::-webkit-scrollbar {
		display: none;
	}

	.nav-links a {
		font-size: 0.875rem;
		padding: 0.25rem 0;
	}

	main {
		padding: 1rem 0.75rem;
		padding-top: calc(var(--header-height) * 2);
	}

	article {
		padding: 1.5rem 1rem;
		margin: 0 0.5rem;
	}

	.content {
		font-size: 0.9375rem;
	}

	.content h2 {
		font-size: 1.375rem;
		margin-top: 1.5rem;
	}

	footer {
		padding: 2rem 0.75rem;
		margin-top: 2rem;
	}

	footer > div {
		grid-template-columns: 1fr;
		gap: 1.5rem;
		justify-items: center;
	}

	footer section {
		padding: 0.5rem;
		text-align: center;
	}
}

/* Utility Classes */
.text-center {
	text-align: center;
}

.mt-4 {
	margin-top: 2rem;
}

.mb-4 {
	margin-bottom: 2rem;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
	:root {
		--color-bg: #0a0a0f;
		--color-text: #f8fafc;
		--color-border: rgba(255, 255, 255, 0.1);
		--color-muted: #94a3b8;
	}

	header {
		background-color: rgba(10, 10, 15, 0.9);
	}

	.nav-links a {
		opacity: 0.7;
	}

	.nav-links a:hover {
		opacity: 1;
	}
}

@media (prefers-color-scheme: light) {
	:root {
		--color-bg: #ffffff;
		--color-text: #1a1a1a;
		--color-primary: #D83333;
		--color-secondary: #F041FF;
		--color-accent: #ff6b6b;
		--color-border: rgba(0, 0, 0, 0.1);
		--color-muted: #666666;
		--color-code-bg: rgba(0, 0, 0, 0.05);
	}
	
	body {
		background-image: 
			radial-gradient(circle at 100% 0%, rgba(216, 51, 51, 0.05) 0%, transparent 50%),
			radial-gradient(circle at 0% 100%, rgba(240, 65, 255, 0.05) 0%, transparent 50%);
	}
	
	header {
		background: rgba(255, 255, 255, 0.9);
	}
	
	article {
		background: rgba(255, 255, 255, 0.8);
	}
	
	.search-icon {
		background: rgba(0, 0, 0, 0.05);
	}
	
	.search-icon:hover {
		background: rgba(0, 0, 0, 0.1);
	}
	
	footer {
		background: rgba(255, 255, 255, 0.9);
	}
}

ul, ol {
	margin-top: 1.25rem;
	margin-bottom: 1.25rem;
	padding-left: 2rem;
}

li {
	margin-bottom: 0.5rem;
	line-height: 1.7;
}

/* Responsive Typography */
@media (max-width: 480px) {
	html {
		font-size: 14px;
	}

	h1 {
		font-size: 2rem;
	}

	h2 {
		font-size: 1.5rem;
	}

	h3 {
		font-size: 1.25rem;
	}

	h4 {
		font-size: 1.1rem;
	}
} 