:root {
	--rust-orange: #FF4500;
	--steel-blue: #4B8BBE;
	--charcoal: #333333;
	--light-gray: #F1F1F1;
	--white: #FFFFFF;
	--container-width: 1000px;
	--spacing-unit: 1rem;
	--medium-gray: #666666;
	
	/* Light mode colors (default) */
	--bg-color: var(--light-gray);
	--text-color: var(--charcoal);
	--card-bg: var(--white);
	--border-color: var(--light-gray);
	--link-color: var(--charcoal);
	--muted-text: var(--medium-gray);
	--shadow: rgba(0,0,0,0.05);
}

/* Dark mode colors */
:root[data-theme="dark"] {
	--bg-color: #1a1a1a;
	--text-color: #e0e0e0;
	--card-bg: #2d2d2d;
	--border-color: #404040;
	--link-color: #e0e0e0;
	--muted-text: #b0b0b0;
	--shadow: rgba(0,0,0,0.3);
	--charcoal: #e0e0e0;
	--light-gray: #404040;
}

/* Auto dark mode based on system preference */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg-color: #1a1a1a;
		--text-color: #e0e0e0;
		--card-bg: #2d2d2d;
		--border-color: #404040;
		--link-color: #e0e0e0;
		--muted-text: #b0b0b0;
		--shadow: rgba(0,0,0,0.3);
		--charcoal: #e0e0e0;
		--light-gray: #404040;
	}
}

body {
	font-family: 'Open Sans', sans-serif;
	line-height: 1.25;
	max-width: var(--container-width);
	margin: 0 auto;
	padding: var(--spacing-unit);
	background: var(--bg-color);
	color: var(--text-color);
	font-size: 0.9em;
	transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3 {
	font-family: 'Source Code Pro', monospace;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.brand-header {
	text-align: center;
	margin: calc(var(--spacing-unit) * 2) 0;
}

.brand-header h1 {
	font-size: 2.5em;
	color: var(--rust-orange);
	margin: 0;
	text-transform: uppercase;
}

.brand-header .issue-number {
	font-family: 'Source Code Pro', monospace;
	color: var(--steel-blue);
}

.section {
	margin-bottom: var(--spacing-unit);
	background: var(--card-bg);
	padding: var(--spacing-unit) calc(var(--spacing-unit) * 1.5);
	border-radius: 8px;
	box-shadow: 0 2px 8px var(--shadow);
	border-top: 3px solid var(--rust-orange);
	transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.section-title {
	font-family: 'Source Code Pro', monospace;
	font-size: 1em;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--text-color);
	margin-bottom: var(--spacing-unit);
	padding-bottom: calc(var(--spacing-unit) * 0.5);
	border-bottom: 2px solid var(--border-color);
}

.update-item {
	margin-bottom: calc(var(--spacing-unit) * 0.25);
	padding: calc(var(--spacing-unit) * 0.25) var(--spacing-unit);
	background: var(--card-bg);
	border-left: 4px solid var(--steel-blue);
	border-radius: 0 4px 4px 0;
	transition: all 0.2s ease;
}

.update-item:hover {
	border-left-color: var(--rust-orange);
}

.update-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}

.update-title a {
	font-family: 'Source Code Pro', monospace;
	font-weight: 600;
	color: var(--link-color);
	text-decoration: none;
	transition: border-color 0.2s ease;
}

.update-title a:hover {
	text-decoration: underline;
	text-decoration-color: var(--rust-orange);
	text-decoration-thickness: 2px;
	text-underline-offset: 2px;
}

.update-description {
	margin-top: 0.25em;
	color: var(--text-color);
}

.tag {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 12px;
	font-family: 'Source Code Pro', monospace;
	font-size: 0.8em;
	margin-left: 8px;
	background: var(--border-color);
	color: var(--text-color);
	text-transform: uppercase;
}

.tag.video {
	background: var(--rust-orange);
	color: var(--white);
}

.update-metadata {
	display: flex;
	gap: calc(var(--spacing-unit) * 0.5);
	align-items: center;
	font-family: 'Source Code Pro', monospace;
	color: var(--muted-text);
}

.update-metadata .separator {
	color: var(--steel-blue);
	font-weight: bold;
}

.site {
	color: var(--steel-blue);
	font-style: italic;
	font-family: 'Source Code Pro', monospace;
	margin-left: calc(var(--spacing-unit) * 0.5);
}

.reddit-meta {
    margin-left: auto;
}

.reddit-meta a {
    color: var(--muted-text);
    text-decoration: none;
    transition: color 0.2s ease;
	display: flex;
	gap: 0.25em;
	align-items: center;
}

.reddit-meta a:hover {
    color: var(--rust-orange);
}

.reddit-stat {
	display: flex;
	align-items: center;
	font-family: 'Source Code Pro', monospace;
	color: var(--muted-text);
}

.reddit-icon {
    height: 1em;
}

.update-metadata .author {
	font-weight: 600;
}

.update-metadata .date {
	color: var(--muted-text);
}

.home-link {
	text-decoration: none;
	color: var(--rust-orange);
}

.home-link:hover {
	text-decoration: underline;
}

.subtitle {
	font-family: 'Source Code Pro', monospace;
	color: var(--steel-blue);
	margin-top: calc(var(--spacing-unit) * 0.5);

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

.issues-list {
	max-width: 800px;
	margin: 0 auto;
	background: var(--card-bg);
	padding: var(--spacing-unit) calc(var(--spacing-unit) * 1.5);
	border-radius: 8px;
	box-shadow: 0 2px 8px var(--shadow);
	border-top: 3px solid var(--rust-orange);
	transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.issue-link {
	padding: calc(var(--spacing-unit) * 0.5) 0;
	border-bottom: 1px solid var(--border-color);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.issue-link:last-child {
	border-bottom: none;
}

.issue-link a {
	color: var(--link-color);
	text-decoration: none;
	font-family: 'Source Code Pro', monospace;
	font-weight: 600;
	transition: color 0.2s ease;
}

.issue-link a:hover {
	color: var(--rust-orange);
}

.issue-date {
	font-family: 'Source Code Pro', monospace;
	color: var(--steel-blue);
	font-size: 0.9em;
}

@media (max-width: 768px) {
	body {
		padding: calc(var(--spacing-unit) * 0.5);
	}

	.section {
		padding: var(--spacing-unit);
	}

	.brand-header h1 {
		font-size: 2em;
	}

	.update-metadata {
		flex-wrap: wrap;
		gap: calc(var(--spacing-unit) * 0.25);
	}
	
	.theme-toggle {
		top: 10px;
		right: 10px;
		width: 45px;
		height: 45px;
		font-size: 1em;
	}
}

/* Dark mode toggle button */
.theme-toggle {
	position: fixed;
	top: 20px;
	right: 20px;
	background: var(--card-bg);
	border: 2px solid var(--border-color);
	border-radius: 50%;
	width: 50px;
	height: 50px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2em;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px var(--shadow);
	z-index: 1000;
}

.theme-toggle:hover {
	background: var(--rust-orange);
	color: var(--white);
	border-color: var(--rust-orange);
	transform: scale(1.1);
}

.theme-toggle:focus {
	outline: 2px solid var(--steel-blue);
	outline-offset: 2px;
}

/* Icons for theme toggle */
.theme-toggle .sun-icon {
	display: none;
}

.theme-toggle .moon-icon {
	display: block;
}

:root[data-theme="dark"] .theme-toggle .sun-icon {
	display: block;
}

:root[data-theme="dark"] .theme-toggle .moon-icon {
	display: none;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle .sun-icon {
		display: block;
	}
	
	:root:not([data-theme="light"]) .theme-toggle .moon-icon {
		display: none;
	}
}

/* Original link styling */
.original-link {
	margin-top: calc(var(--spacing-unit) * 2);
	text-align: center;
	padding: var(--spacing-unit);
	background: var(--card-bg);
	border-radius: 8px;
	border: 2px solid var(--border-color);
	transition: all 0.3s ease;
}

.original-link a {
	color: var(--steel-blue);
	text-decoration: none;
	font-family: 'Source Code Pro', monospace;
	font-weight: 600;
	transition: color 0.2s ease;
}

.original-link a:hover {
	color: var(--rust-orange);
	text-decoration: underline;
}

.original-link:hover {
	border-color: var(--rust-orange);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px var(--shadow);
}