:root {
	--bg-color: #ffffff;
	--accent-color: #1a1a1a;
	--text-color: #333333;
	--text-muted: #666666;
	--border-color: #eeeeee;
	--border-light: #f0f0f0;
	--code-bg: #f5f5f5;
	--link-hover: #0066cc;
	--quote-border: #dddddd;
	--shadow-light: rgba(0, 0, 0, 0.1);
	--shadow-medium: rgba(0, 0, 0, 0.15);
	--border-radius: 8px;
	--transition: all 0.3s ease;
}

[data-theme="dark"] {
	--bg-color: #1a1a1a;
	--accent-color: #111111;
	--text-color: #e0e0e0;
	--text-muted: #a0a0a0;
	--border-color: #333333;
	--border-light: #2a2a2a;
	--code-bg: #2a2a2a;
	--link-hover: #4da6ff;
	--quote-border: #444444;
	--shadow-light: rgba(255, 255, 255, 0.1);
	--shadow-medium: rgba(255, 255, 255, 0.15);
}

/* Reset and Base Styles */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	font-size: 16px;
	scroll-behavior: smooth;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
		Ubuntu, Cantarell, sans-serif;
	line-height: 1.6;
	color: var(--text-color);
	background-color: var(--bg-color);
	transition: var(--transition);
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
}

/* Header Styles */
header {
	background-color: var(--bg-color);
	border-bottom: 1px solid var(--border-color);
	position: sticky;
	top: 0;
	z-index: 100;
	backdrop-filter: blur(10px);
	transition: var(--transition);
}

.header-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 0;
}

.logo {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--text-color);
	text-decoration: none;
	transition: var(--transition);
}

.logo:hover {
	color: var(--link-hover);
}

.nav-section {
	display: flex;
	align-items: center;
	gap: 1rem;
}

nav ul {
	display: flex;
	list-style: none;
	gap: 2rem;
	margin: 0;
}

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

nav a:hover {
	color: var(--link-hover);
}

nav a::after {
	content: "";
	position: absolute;
	bottom: -4px;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--link-hover);
	transition: width 0.3s ease;
}

nav a:hover::after {
	width: 100%;
}

/* Theme Toggle Button */
.theme-toggle {
	background: none;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	padding: 0.5rem;
	cursor: pointer;
	color: var(--text-color);
	transition: var(--transition);
	display: flex;
	align-items: center;
	justify-content: center;
}

.theme-toggle:hover {
	background-color: var(--border-light);
	border-color: var(--text-muted);
}

.theme-icon {
	width: 20px;
	height: 20px;
}

/* Main Content */
main {
	min-height: calc(100vh - 140px);
	padding: 2rem 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--text-color);
	font-weight: 600;
	line-height: 1.3;
	margin-bottom: 1rem;
}

h1 {
	font-size: 2.5rem;
}
h2 {
	font-size: 2rem;
}
h3 {
	font-size: 1.5rem;
}
h4 {
	font-size: 1.25rem;
}
h5 {
	font-size: 1.125rem;
}
h6 {
	font-size: 1rem;
}

p {
	margin-bottom: 1rem;
	color: var(--text-color);
}

/* Article Styles */
article {
	background-color: var(--bg-color);
	border-radius: var(--border-radius);
	padding: 2rem;
	margin-bottom: 2rem;
	box-shadow: 0 2px 10px var(--shadow-light);
	border: 1px solid var(--border-color);
}

article h2 {
	color: var(--text-color);
	margin-bottom: 0.5rem;
}

article small {
	color: var(--text-muted);
	font-size: 0.875rem;
}

/* Links */
a {
	color: var(--link-hover);
	text-decoration: none;
	transition: var(--transition);
}

a:hover {
	text-decoration: underline;
}

/* Lists */
ul,
ol {
	margin-left: 1.5rem;
	margin-bottom: 1rem;
}

li {
	margin-bottom: 0.5rem;
}

/* List page styles */
.page-list {
	list-style: none;
	margin-left: 0;
}

.page-list li {
	background-color: var(--border-light);
	border-radius: var(--border-radius);
	padding: 1rem;
	margin-bottom: 1rem;
	border-left: 4px solid var(--link-hover);
	transition: var(--transition);
}

.page-list li:hover {
	background-color: var(--border-color);
	transform: translateX(4px);
}

.page-list li a {
	font-size: 1.125rem;
	font-weight: 500;
	color: var(--text-color);
	text-decoration: none;
}

.page-list li small {
	display: block;
	margin-top: 0.25rem;
	color: var(--text-muted);
}

/* Code Styles */
code {
	background-color: var(--code-bg);
	padding: 0.2rem 0.4rem;
	border-radius: 4px;
	font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas,
		"Courier New", monospace;
	font-size: 0.875rem;
	color: var(--text-color);
}

pre {
	background-color: var(--code-bg);
	padding: 1rem;
	border-radius: var(--border-radius);
	overflow-x: auto;
	margin-bottom: 1rem;
	border: 1px solid var(--border-color);
}

pre code {
	background: none;
	padding: 0;
	color: #ffffff;
}

/* Blockquotes */
blockquote {
	border-left: 4px solid var(--quote-border);
	padding-left: 1rem;
	margin: 1rem 0;
	font-style: italic;
	color: var(--text-muted);
}

/* Tables */
table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1rem;
	border-radius: var(--border-radius);
	overflow: hidden;
	border: 1px solid var(--border-color);
}

th,
td {
	padding: 0.75rem;
	text-align: left;
	border-bottom: 1px solid var(--border-color);
}

th {
	background-color: var(--border-light);
	font-weight: 600;
	color: var(--text-color);
}

tr:nth-child(even) {
	background-color: var(--border-light);
}

/* Related Posts */
.related-posts {
	background-color: var(--border-light);
	border-radius: var(--border-radius);
	padding: 1.5rem;
	margin-top: 2rem;
	border: 1px solid var(--border-color);
}

.related-posts h3 {
	color: var(--text-color);
	margin-bottom: 1rem;
	font-size: 1.25rem;
}

.related-posts ul {
	list-style: none;
	margin-left: 0;
}

.related-posts li {
	margin-bottom: 0.5rem;
}

.related-posts a {
	color: var(--text-color);
	font-weight: 500;
	transition: var(--transition);
}

.related-posts a:hover {
	color: var(--link-hover);
}

/* Images */
img {
	max-width: 100%;
	height: auto;
	border-radius: var(--border-radius);
	margin: 1rem 0;
	box-shadow: 0 4px 12px var(--shadow-light);
}

/* Footer */
footer {
	background-color: var(--accent-color);
	color: var(--text-color);
	text-align: center;
	padding: 2rem 0;
	border-top: 1px solid var(--border-color);
	margin-top: auto;
}

footer p {
	color: var(--text-muted);
	margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
	.container {
		padding: 0 0.75rem;
	}

	.header-content {
		flex-direction: column;
		gap: 1rem;
		padding: 0.75rem 0;
	}

	.nav-section {
		width: 100%;
		justify-content: space-between;
	}

	nav ul {
		gap: 1rem;
	}

	h1 {
		font-size: 2rem;
	}
	h2 {
		font-size: 1.75rem;
	}
	h3 {
		font-size: 1.375rem;
	}

	article {
		padding: 1.5rem;
	}

	main {
		padding: 1rem 0;
	}

	table {
		font-size: 0.875rem;
	}

	th,
	td {
		padding: 0.5rem;
	}
}

@media (max-width: 480px) {
	.container {
		padding: 0 0.5rem;
	}

	.header-content {
		padding: 0.5rem 0;
	}

	nav ul {
		gap: 0.75rem;
		font-size: 0.875rem;
	}

	h1 {
		font-size: 1.75rem;
	}
	h2 {
		font-size: 1.5rem;
	}

	article {
		padding: 1rem;
	}

	.theme-toggle {
		padding: 0.375rem;
	}

	.theme-icon {
		width: 18px;
		height: 18px;
	}
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
		animation: none !important;
	}
}

/* Focus styles for accessibility */
a:focus,
button:focus {
	outline: 2px solid var(--link-hover);
	outline-offset: 2px;
}

/* Print styles */
@media print {
	header,
	footer,
	.theme-toggle,
	.related-posts {
		display: none;
	}

	body {
		color: black;
		background: white;
	}

	a {
		color: black;
		text-decoration: underline;
	}
}
