/* Darcula-inspired dark theme */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	--bg-color: #000000;
	--text-color: #a9b7c6;
	--nav-text-color: #eee;
	--text-muted: #808080;
	--link-color: #589df6;
	--link-hover: #8ab4f8;
	--border-color: #333333;
	--code-bg: #1e1e1e;
	--header-bg: #0a0a0a;
}

body {
	background-color: var(--bg-color);
	color: var(--text-color);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Header */
header {
	background-color: var(--header-bg);
	background-image: url('/img/heading-image.png');
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	border-bottom: 1px solid var(--border-color);
	/* padding: 1rem 0; */
	padding: 0;
	position: sticky;
	top: 0;
	z-index: 1000;
	position: relative;
}

header::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.6);
	z-index: 1;
}

header .container {
	position: relative;
	z-index: 2;
}

.header-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 0;
	padding: 0;
}

.site-title {
	font-size: 1.5rem;
	font-weight: 600;
	padding: 0;
	margin: 0;
	margin-top: 1rem;
}

.site-title a {
	color: var(--text-color);
	text-decoration: none;
	margin-top: 0;
	padding: 0;
}

/* Hamburger Menu */
.hamburger {
	display: none;
	flex-direction: column;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	z-index: 1001;
}

.hamburger span {
	width: 25px;
	height: 3px;
	background-color: var(--text-color);
	margin: 3px 0;
	transition: 0.3s;
	border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
	transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
	opacity: 0;
}

.hamburger.active span:nth-child(3) {
	transform: rotate(45deg) translate(-5px, -6px);
}

/* Navigation */
nav {
	margin-top: 0;
	padding: 0;
}

.nav-list {
	list-style: none;
	display: flex;
	gap: 2rem;
	flex-wrap: wrap;
}

.nav-item {
	position: relative;
}

.nav-item a {
	color: var(--nav-text-color);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s;
}

.nav-item a:hover {
	color: var(--link-hover);
}

/* Mobile Navigation (768px breakpoint) */
@media (max-width: 768px) {
	.hamburger {
		display: flex;
	}

	nav {
		display: none;
		padding: 0;
		margin: 0;
	}

	nav.active {
		display: block;
	}

	.nav-list {
		flex-direction: column;
		gap: 1rem;
		padding: 0;
		margin: 0;
	}
}

/* Main Content */
main {
	padding: 2rem 0;
	min-height: calc(100vh - 200px);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--text-color);
	margin: 1.5rem 0 1rem;
	font-weight: 600;
}

h1 {
	font-size: 2.5rem;
}

h2 {
	font-size: 2rem;
}

h3 {
	font-size: 1.5rem;
}

p {
	margin: 1rem 0;
}

a {
	color: var(--link-color);
	text-decoration: none;
}

a:hover {
	color: var(--link-hover);
	text-decoration: underline;
}

/* Code Blocks */
pre {
	border: 1px solid var(--border-color);
	border-radius: 4px;
	padding: 1rem;
	overflow-x: auto;
	margin: 1rem 0;
}

pre code {
	font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
	font-size: 0.9rem;
	background: none;
	padding: 0;
}

/* Inline code only */
:not(pre)>code {
	background-color: var(--code-bg);
	padding: 0.2rem 0.4rem;
	border-radius: 3px;
	font-size: 0.85rem;
	font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* Lists */
ul,
ol {
	margin: 1rem 0;
	padding-left: 2rem;
}

li {
	margin: 0.5rem 0;
}

/* Images */
img {
	max-width: 90%;
	height: auto;
	display: block;
	margin: 1.5rem auto;
	border-radius: 4px;
}

/* Images in paragraphs */
p img {
	margin: 1rem auto;
}

/* Blockquotes */
blockquote {
	border-left: 4px solid var(--border-color);
	padding-left: 1rem;
	margin: 1rem 0;
	color: var(--text-muted);
	font-style: italic;
}

/* Tables */
table {
	width: 100%;
	border-collapse: collapse;
	margin: 1rem 0;
}

th,
td {
	border: 1px solid var(--border-color);
	padding: 0.75rem;
	text-align: left;
}

th {
	background-color: var(--code-bg);
	font-weight: 600;
}

/* Footer */
footer {
	border-top: 1px solid var(--border-color);
	padding: 2rem 0;
	margin-top: 3rem;
	text-align: center;
	color: var(--text-muted);
	font-size: 0.9rem;
}

/* Article List */
.article-list {
	list-style: none;
	padding: 0;
}

.article-list li {
	margin: 1.5rem 0;
	padding: 1rem;
	border: 1px solid var(--border-color);
	border-radius: 4px;
	transition: border-color 0.2s;
}

.article-list li:hover {
	border-color: var(--link-color);
}

.article-card {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
}

.article-card p {
	margin: 0;
}

.article-image {
	flex-shrink: 0;
	width: 200px;
	height: 150px;
	overflow: hidden;
	border-radius: 4px;
}

.article-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
}

.article-content {
	flex: 1;
}

.article-list h3 {
	margin-top: 0;
	margin-bottom: 0;
}

.article-list .description {
	color: var(--text-muted);
}

@media (max-width: 768px) {
	.article-card {
		flex-direction: column;
	}

	.article-image {
		width: 100%;
		height: auto;
		max-height: none;
		overflow: visible;
	}

	.article-image img {
		width: 100%;
		height: auto;
		max-height: 200px;
		object-fit: contain;
	}
}

/* MathJax styling adjustments */
mjx-container {
	color: var(--text-color) !important;
}