/* Color Palettes Reference */
:root {
	/* Blog-inspired color scheme */
	--primary-blue: #598be7;  /* Main blue accent */
	--blue-hover: #9bb9f1;     /* Blue hover state */
	--text-dark: #000000;      /* Dark text */
	--text-gray: #666666;      /* Muted text */
	--bg-light: #ffffff;       /* Main background */
	--bg-alt: #f8f9fa;         /* Alternative background */
	--border-light: #e9ecef;   /* Light borders */
	--nord12: #D08770;         /* Orange (keeping for contributions) */
	--nord14: #A3BE8C;         /* Green (keeping for contributions) */
	--nord15: #b48ead;         /* Purple (keeping for contributions) */
}

/* Base Styles */
body {
	font-family: 'Source Sans Pro', 'Lato', Verdana, Helvetica, sans-serif;
	font-size: 15px;
	line-height: 1.6;
	font-weight: 400;
	background-color: var(--bg-light);
	color: #000000;
	max-width: 60em;
	margin: auto;
	padding: 2em 1em;
	-webkit-font-smoothing: antialiased;
}

/* Abstract section - no special styling */
section:has(#abstract) {
	/* No special background or border styling */
}

/* Fallback for browsers that don't support :has() */
#abstract {
	margin-top: 0;
}

#abstract + p {
	margin-bottom: 0;
}

/* Headers */
h1, h2, h3, h4, h5, h6 {
	font-family: 'Source Sans Pro', 'Lato', Verdana, Helvetica, sans-serif;
	font-weight: 500;
	color: rgb(51, 51, 51);
}

h1 {
	text-align: center;
	font-size: 2.1em;
	margin: 0.75em 0 0.35em 0;
	color: rgb(51, 51, 51);
	font-weight: 600;
}

h3 {
	font-weight: 550;
}

h4 {
	font-weight: 550;
}

/* Links in main content - make them bold */
main a, section a {
	font-weight: 600;
}

/* Make strong elements slightly less bold */
strong {
	font-weight: 550;
}

h2 {
	font-size: 2em;
	text-align: center;
	margin: 2.5em 0 1em 0;
	padding-bottom: 0.5em;
	border-bottom: 1px solid #cccccc;
}

/* Problem Statement uses normal h2 styling */

/* Links */
a, a:focus {
	color: var(--primary-blue);
	text-decoration: none;
}

a:hover {
	color: var(--blue-hover);
	text-decoration: none;
}

/* Navigation */
nav {
	text-align: center;
	display: flex;
	justify-content: center;
}

nav > ul {
	margin: 1em 0 1.5em 0;
	list-style-type: none;
	font-weight: bold;
	font-size: 110%;
	text-align: center;
}

nav > ul > li {
	display: inline-block;
	margin: 0 0.5em;
}

.nav-button {
	display: inline-block;
	padding: 0.35em 0.75em;
	background-color: #f8f9fa;
	border: 1px solid var(--border-light);
	border-radius: 4px;
	color: #666666 !important;
	text-decoration: none;
	transition: all 0.2s ease;
	font-size: 0.9em;
}

.nav-button:hover {
	background-color: var(--border-light);
	color: #999999 !important;
	transform: translateY(-1px);
}

.nav-button i {
	margin-right: 0.5em;
}

/* Authors section */
.authors {
	text-align: center;
	margin: 1em 0;
	font-size: 1.1em;
}

.author-names {
	margin-bottom: 0.5em;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.15em;
}

.author-block {
	display: inline-block;
	margin: 0;
	white-space: nowrap;
	font-size: 0.95em;
}

.author-block a {
	color: var(--primary-blue);
	text-decoration: none;
	font-weight: 600;
	padding: 0 0.1em;
}

.author-block a:hover {
	color: var(--blue-hover);
}

.author-block sup, .affiliation-block sup {
	color: #999999;
}

.author-affiliations {
	font-size: 0.9em;
	color: #555555;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.3em;
}

.affiliation-block {
	display: inline-block;
	margin: 0;
	white-space: nowrap;
}

.author-notes {
	margin-top: 0.5em;
	font-size: 0.85em;
	color: #e0e0e0;
}

/* Teaser figure */
#teaser {
	margin-bottom: 2em;
}

#teaser > img {
	width: 100%;
	margin: 0 0 0.5em 0;
	border-radius: 8px;
	border: 3px solid var(--border-light);
	padding: 1em;
	box-sizing: border-box;
	max-width: 100%;
}

#teaser > figcaption {
	font-style: italic;
	font-size: 90%;
	color: #666666;
}

/* Demo section */
#demo-figure {
	margin: 2em 0;
	text-align: center;
}

#demo-figure > img {
	width: 100%;
	max-width: 100%;
	margin: 0;
	border-radius: 8px;
	border: 3px solid var(--border-light);
	padding: 1em;
	box-sizing: border-box;
	background-color: var(--bg-light);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#demo-figure > figcaption {
	font-style: italic;
	font-size: 90%;
	color: #666666;
	text-align: center;
	max-width: 700px;
	margin: 0 auto 1.5em auto;
	line-height: 1.5;
}

/* Citation section */
.section {
	padding: 3rem 1.5rem;
	margin-top: 1.5em;
}

.container {
	margin: 0 auto;
	position: relative;
	width: 100%;
}

.is-max-desktop {
	max-width: 960px;
}

.content {
	margin-top: 0;
}

.citation-box {
	position: relative;
	background-color: var(--bg-alt);
	border: 1px solid var(--border-light);
	border-radius: 8px;
	padding: 1rem 1.25rem;
	border-left: 5px solid var(--primary-blue);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#citation pre {
	margin: 0;
	padding: 0;
	background: none;
	border: none;
	overflow-x: auto;
	white-space: pre;
	word-wrap: normal;
}

#citation code {
	font-family: 'Source Code Pro', monospace;
	font-size: 0.85em;
	line-height: 1.4;
	color: #000000;
	background: none;
	padding: 0;
	border: none;
	text-decoration: none;
}

#citation .copy {
	position: absolute;
	right: 0.5rem;
	top: 0.5rem;
	background: none;
	border: none;
	color: #999999;
	cursor: pointer;
	padding: 0.1rem;
	border-radius: 0.25rem;
	transition: background-color 0.2s;
}

#citation .copy:hover {
	background-color: var(--border-light);
	color: var(--primary-blue);
}

/* Footer */
footer {
	margin-top: 3em;
	padding-top: 1em;
	border-top: 1px solid #cccccc;
	font-size: 0.9em;
	color: #999999;
}

.license {
	margin: 0.5em 0;
	font-size: 0.9em;
	line-height: 1.4;
}

.license a {
	color: var(--primary-blue);
}

.license a:hover {
	color: var(--blue-hover);
}

/* Responsive design */
@media screen and (max-width: 768px) {
	.section {
		padding: 1.5rem 1rem;
	}
	
	.citation-box {
		padding: 1rem;
	}
	
	#citation code {
		font-size: 0.85em;
	}
	
	.author-block {
		font-size: 0.85em;
	}
	
	.author-affiliations {
		font-size: 0.8em;
	}
	
	.author-notes {
		font-size: 0.8em;
	}
}

/* Key Contributions section */
.contributions-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 1.5em;
	margin: 1.5em 0;
}

.contribution-box {
	border-radius: 8px;
	padding: 1.5em;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
}

.contribution-box:nth-child(1) {
	background-color: rgba(89, 139, 231, 0.1);
	border: 2px solid var(--primary-blue);
}

.contribution-box:nth-child(2) {
	background-color: rgba(89, 139, 231, 0.15);
	border: 2px solid var(--primary-blue);
}

.contribution-box:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.contribution-box:nth-child(1):hover {
	border-color: var(--blue-hover);
	background-color: rgba(89, 139, 231, 0.15);
}

.contribution-box:nth-child(2):hover {
	border-color: var(--blue-hover);
	background-color: rgba(89, 139, 231, 0.2);
}

.contribution-box h3 {
	font-size: 1.3em;
	margin: 0 0 0.8em 0;
	font-weight: 600;
	text-align: center;
}

.contribution-box:nth-child(1) h3 {
	color: var(--primary-blue);
}

.contribution-box:nth-child(2) h3 {
	color: var(--primary-blue);
}

.contribution-box p {
	margin: 0;
	line-height: 1.6;
	color: #000000;
	font-weight: 400;
}

.highlight {
	font-weight: 600;
	padding: 0.1em 0.3em;
	border-radius: 4px;
}

.highlight-blue {
	color: var(--primary-blue);
	background-color: rgba(89, 139, 231, 0.25);
	font-weight: 600;
}

.highlight-green {
	color: #5A7C5A;
	background-color: rgba(163, 190, 140, 0.25);
}

.highlight-orange {
	color: var(--nord12);
	background-color: rgba(208, 135, 112, 0.15);
}

.contribution-box strong {
	font-weight: 700;
	padding: 0.1em 0.3em;
	border-radius: 3px;
}

.contribution-box:nth-child(1) strong {
	color: var(--primary-blue);
	background-color: rgba(89, 139, 231, 0.3);
	font-weight: 600;
}

.contribution-box:nth-child(2) strong {
	color: var(--primary-blue);
	background-color: rgba(89, 139, 231, 0.3);
	font-weight: 600;
}

/* Math equation styling */
.math-display {
	text-align: center;
	margin: 1.5em 0;
	padding: 0.8em;
	border-radius: 0;
	overflow-x: auto;
	background-color: #f8f9fa;
	border: 2px dashed #cccccc;
}

.math-display .MathJax {
	font-size: 1.2em;
}

/* Enhanced table styling with Nord theme */
figure.table-figure {
	display: flex;
	flex-direction: column;
	margin: 2em 0;
	overflow-x: auto;
}

figure.table-figure .table-styled {
	order: 2;
	margin: 0;
}

figure.table-figure figcaption {
	order: 1;
	margin-bottom: 0.8em;
}

.table-styled {
	width: 100%;
	border-collapse: collapse;
	font-family: 'Source Sans Pro', 'Lato', Verdana, Helvetica, sans-serif;
	border-top: 2px solid #000000;
	border-bottom: 2px solid #000000;
}

.table-styled th,
.table-styled td {
	padding: 0.8em 1em;
	text-align: left;
	border-bottom: 1px solid #cccccc;
}

.table-styled th {
	background-color: transparent;
	color: rgb(51, 51, 51);
	font-weight: 700;
	font-size: 1em;
	border-bottom: 2px solid #999999;
}

.table-styled tbody tr {
	background: transparent;
}

.table-styled tbody tr:nth-child(even) {
	background-color: transparent;
}

.table-styled tbody tr:hover {
	background-color: var(--bg-alt);
}

.table-styled td {
	color: #000000;
	font-size: 0.95em;
	line-height: 1.5;
}

/* Right-align all columns except the first one */
.table-styled th:not(:first-child),
.table-styled td:not(:first-child) {
	text-align: right;
}

.table-styled td strong {
	color: rgb(51, 51, 51);
	font-weight: 700;
}

/* Enhanced table caption */
figcaption {
	text-align: center;
	margin: 0.5em 0 0 0;
	font-size: 0.9em;
	color: #999999;
	font-style: italic;
}

/* Responsive adjustments for project goal section */
@media screen and (max-width: 768px) {
	#project-goal {
		padding: 1.2em 1em;
		margin-top: 1.5em;
	}
	
	#project-goal h3 {
		font-size: 1.2em;
	}
	
	#project-goal ul {
		padding-left: 1.5em;
	}
	
	.math-display {
		padding: 0.5em;
		margin: 1.2em 0;
	}
	
	.table-styled th,
	.table-styled td {
		padding: 0.6em 0.8em;
	}
}

#project-goal ul li {
	margin-bottom: 2em !important;
	padding-bottom: 0.5em;
}