/* Academic Typography */
body {
	font-family: 'Crimson Text', Georgia, serif;
	background-color: #fafafa;
	color: #2c2c2c;
	line-height: 1.6;
	margin: 0;
	padding: 0;
}

/* Header and Metadata */
.paper-header {
	background: white;
	border-bottom: 2px solid #1f4788;
	padding: 2rem 0;
	margin-bottom: 2rem;
}

.paper-title {
	font-size: 2.2rem;
	font-weight: 600;
	color: #1f4788;
	text-align: center;
	margin: 0 0 0.5rem 0;
	line-height: 1.2;
}

.paper-subtitle {
	font-size: 1.2rem;
	color: #666;
	text-align: center;
	font-style: italic;
	margin: 0 0 1rem 0;
}

.paper-meta {
	text-align: center;
	font-family: 'Source Sans Pro', sans-serif;
	font-size: 0.9rem;
	color: #666;
}

/* Abstract and Content */
.abstract {
	max-width: 800px;
	margin: 0 auto 3rem auto;
	background: white;
	padding: 2rem;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.abstract h3 {
	font-size: 1.1rem;
	font-weight: 600;
	color: #1f4788;
	margin: 0 0 1rem 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.methodology {
	max-width: 800px;
	margin: 0 auto 2rem auto;
	background: #f8f9fa;
	padding: 1.5rem;
	border-left: 4px solid #1f4788;
}

.methodology h4 {
	color: #1f4788;
	font-weight: 600;
	margin: 0 0 1rem 0;
}

/* Navigation Panel */
.nav-panel {
	position: fixed;
	top: 20px;
	right: 20px;
	background: white;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 1rem;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	font-family: 'Source Sans Pro', sans-serif;
	font-size: 0.85rem;
	z-index: 1000;
	opacity: 0;
	transform: translateX(120px);
	transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;
	visibility: hidden;
}

.nav-panel.visible {
	opacity: 1;
	transform: translateX(0);
	pointer-events: all;
	visibility: visible;
}

/* Force show for debugging */
.nav-panel.debug-show {
	opacity: 1 !important;
	transform: translateX(0) !important;
	pointer-events: all !important;
	visibility: visible !important;
	background: #fffacd !important;
}

.nav-panel h5 {
	margin: 0 0 0.5rem 0;
	color: #1f4788;
	font-weight: 600;
}

.nav-panel button {
	display: block;
	width: 100%;
	margin: 0.25rem 0;
	padding: 0.4rem 0.8rem;
	border: 1px solid #ddd;
	background: white;
	color: #333;
	cursor: pointer;
	border-radius: 3px;
	font-size: 0.8rem;
}

.nav-panel button:hover {
	background: #f0f0f0;
	border-color: #1f4788;
}

.nav-panel button.active {
	background: #1f4788;
	color: white;
	border-color: #1f4788;
}

/* Data Visualization Grid */
.data-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 2rem;
}

.temperament-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1rem;
	margin: 2rem 0;
	transition: all 0.3s ease;
}

.temperament-grid.overview-mode {
	grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
	gap: 0px;
}

.temperament-grid.overview-mode .temperament-card {
	padding: 0;
	border: none;
	background: transparent;
}

.temperament-grid.overview-mode .temperament-image {
	height: 40px;
	margin-bottom: 0;
}

.temperament-grid.overview-mode .temperament-name,
.temperament-grid.overview-mode .temperament-stats {
	display: none;
}

/* Standard mode - default image size */
.temperament-grid.standard-mode .temperament-image {
	height: 120px;
}

/* Detailed mode - larger images */
.temperament-grid.detailed-mode {
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.5rem;
}

.temperament-grid.detailed-mode .temperament-image {
	height: 150px;
}

.temperament-grid.detailed-mode .temperament-card {
	padding: 1.5rem;
}

/* Analysis mode - largest images with more spacing */
.temperament-grid.analysis-mode {
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 2rem;
}

.temperament-grid.analysis-mode .temperament-image {
	height: 200px;
}

.temperament-grid.analysis-mode .temperament-card {
	padding: 2rem;
}

.temperament-grid.analysis-mode .temperament-name {
	font-size: 1rem;
	margin-bottom: 0.75rem;
}

.temperament-grid.analysis-mode .temperament-stats {
	font-size: 0.9rem;
}

.temperament-card {
	background: white;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 1rem;
	transition: all 0.2s ease;
	cursor: pointer;
	position: relative;
}

.temperament-card:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	border-color: #1f4788;
}

.temperament-image {
	width: 100%;
	height: 120px;
	object-fit: cover;
	border-radius: 3px;
	margin-bottom: 0.75rem;
}

.temperament-name {
	font-family: 'Source Sans Pro', sans-serif;
	font-weight: 600;
	color: #1f4788;
	font-size: 0.9rem;
	margin-bottom: 0.5rem;
	line-height: 1.2;
}

.temperament-stats {
	font-family: 'Source Sans Pro', sans-serif;
	font-size: 0.8rem;
	color: #666;
}

.std-dev {
	font-weight: 600;
	color: #d32f2f;
}

/* Links */
a {
	color: #1f4788;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

a:visited {
	color: #5e35b1;
}

/* Footer */
.footer {
	margin-top: 4rem;
	padding: 2rem 0;
	background: #f8f9fa;
	border-top: 1px solid #ddd;
	text-align: center;
	font-family: 'Source Sans Pro', sans-serif;
	font-size: 0.85rem;
	color: #666;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.nav-panel {
		position: fixed;
		top: auto;
		bottom: 20px;
		right: 20px;
		left: 20px;
		transform: translateY(120px);
		opacity: 0;
		visibility: hidden;
	}
	
	.nav-panel.visible {
		transform: translateY(0);
		opacity: 1;
		visibility: visible;
	}
	
	.nav-panel.debug-show {
		transform: translateY(0) !important;
	}
	
	.paper-title {
		font-size: 1.8rem;
	}
	
	.abstract, .methodology {
		margin-left: 1rem;
		margin-right: 1rem;
	}
}

/* Site Navigation Header Styles */
.site-header {
	background: linear-gradient(135deg, #2c2c2c 0%, #1a472a 100%);
	border-bottom: 2px solid #1a472a;
	padding: 1rem 0;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	font-family: 'Source Sans Pro', 'Segoe UI', system-ui, sans-serif;
}

.nav-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.site-title {
	color: #ffffff !important;
	font-size: 1.5rem;
	font-weight: 600;
	text-decoration: none !important;
	font-family: 'Inter', 'Source Sans Pro', sans-serif;
	transition: color 0.2s ease;
}

.site-title:hover {
	color: #e9ecef !important;
	text-decoration: none !important;
}

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

.nav-link {
	color: #ffffff !important;
	text-decoration: none !important;
	padding: 0.5rem 1rem;
	border-radius: 4px;
	font-weight: 500;
	transition: all 0.2s ease;
	font-size: 0.95rem;
}

.nav-link:hover {
	background-color: rgba(255, 255, 255, 0.1) !important;
	text-decoration: none !important;
	color: #ffffff !important;
}

.nav-link.current {
	background-color: rgba(255, 255, 255, 0.2) !important;
	font-weight: 600;
	color: #ffffff !important;
}

/* Help button styling */
.help-button {
	background: #6c757d !important;
	color: white !important;
	padding: 0.5rem 1rem !important;
	border-radius: 4px !important;
	font-weight: 500 !important;
	transition: background-color 0.2s ease !important;
}

.help-button:hover {
	background: #5a6268 !important;
	text-decoration: none !important;
}

@media (max-width: 768px) {
	.nav-container {
		flex-direction: column;
		gap: 1rem;
		text-align: center;
	}

	.nav-links {
		flex-wrap: wrap;
		justify-content: center;
	}
}


