/* jemdoc CSS - Modern Academic Style */

@import url('/fonts/nyt-fonts.css');

:root {
	--primary: #2563eb;
	--primary-dark: #1d4ed8;
	--primary-light: #93c5fd;
	--text: #1f2937;
	--text-muted: #6b7280;
	--text-light: #9ca3af;
	--bg: #ffffff;
	--bg-secondary: #f9fafb;
	--bg-tertiary: #f3f4f6;
	--border: #e5e7eb;
	--border-dark: #d1d5db;
	--accent: #0ea5e9;
	--success: #10b981;
	--warning: #f59e0b;
}

* {
	box-sizing: border-box;
}

body {
	background: var(--bg-secondary);
	font-family: 'Libre Franklin', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	padding: 0;
	margin: 0;
	color: var(--text);
	font-size: 15px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Main layout */
table#tlayout {
	border: none;
	border-collapse: separate;
	background: var(--bg);
	max-width: 1100px;
	width: 100%;
	margin: 0 auto;
	table-layout: fixed;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Sidebar menu */
#layout-menu {
	background: var(--bg-secondary);
	border: none;
	border-right: 1px solid var(--border);
	padding: 1.5em 1em;
	font-size: 0.9em;
	width: 130px;
	white-space: nowrap;
	text-align: left;
	vertical-align: top;
}

#layout-menu td {
	background: var(--bg-secondary);
	vertical-align: top;
}

#layout-menu a {
	line-height: 1.6;
	display: block;
	padding: 0.5em 0.75em;
	margin: 0.15em 0;
	color: var(--text-muted);
	text-decoration: none;
	border-radius: 6px;
	transition: all 0.15s ease;
}

#layout-menu a:hover {
	color: var(--text);
	background: var(--bg-tertiary);
}

#layout-menu a.current {
	color: var(--primary);
	font-weight: 600;
	background: rgba(37, 99, 235, 0.08);
}

div.menu-category {
	border-bottom: none;
	margin-top: 1.2em;
	margin-bottom: 0.4em;
	padding-bottom: 0.3em;
	font-weight: 600;
	font-size: 0.75em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-light);
}

div.menu-item {
	padding-left: 0;
	text-indent: 0;
}

/* Main content */
#layout-content {
	padding: 1.5em 2.5em 2em;
	border: none;
	background: var(--bg);
	text-align: left;
	vertical-align: top;
	max-width: 900px;
}

/* Title area */
div#toptitle {
	padding-bottom: 0.6em;
	margin-bottom: 1.2em;
	border-bottom: 2px solid var(--primary);
}

div#toptitle h1, #layout-content div#toptitle h1 {
	font-family: 'Cormorant Garamond', 'Libre Baskerville', Georgia, serif;
	margin: 0;
	padding: 0;
	border-bottom: none;
	font-size: 2em;
	font-weight: 700;
	color: var(--text);
	letter-spacing: -0.02em;
}

div#subtitle {
	margin-top: 0.3em;
	padding: 0;
	color: var(--text-muted);
	font-size: 1.05em;
}

/* Headings */
h1, h2, h3 {
	font-family: 'Libre Baskerville', Georgia, serif;
	color: var(--text);
	margin-top: 1.5em;
	margin-bottom: 0.5em;
	padding: 0;
	line-height: 1.3;
	font-weight: 600;
}

h1 {
	font-size: 1.75em;
	padding-bottom: 0.3em;
	border-bottom: 1px solid var(--border);
}

h2 {
	font-size: 1.35em;
	padding-bottom: 0.25em;
	border-bottom: 1px solid var(--border);
}

h3 {
	font-size: 1.15em;
	color: var(--text);
	border-bottom: none;
	margin-top: 1.2em;
}

h2 + h3 {
	margin-top: 0.8em;
}

#layout-content h1:first-child,
#layout-content h2:first-child,
#layout-content h3:first-child {
	margin-top: 0;
}

div#toptitle + h2, div#toptitle + h3 {
	margin-top: 0;
}

/* Paragraphs */
p {
	font-family: 'Lora', Georgia, serif;
	margin-top: 0;
	margin-bottom: 1em;
	padding: 0;
	line-height: 1.7;
}

/* Links */
a {
	color: var(--primary);
	text-decoration: none;
	transition: color 0.15s ease;
}

a:hover {
	color: var(--primary-dark);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Lists */
ul, ol {
	margin-top: 0.5em;
	margin-bottom: 1em;
	padding-left: 1.5em;
	line-height: 1.7;
}

ul {
	list-style-type: disc;
}

ol {
	list-style-type: decimal;
}

li {
	margin-bottom: 0.4em;
}

li ul, li ol {
	margin-top: 0.3em;
	margin-bottom: 0.3em;
}

ol ol {
	list-style-type: lower-alpha;
}

ol ol ol {
	list-style-type: lower-roman;
}

p + ul, p + ol {
	margin-top: -0.5em;
}

li p, dd p {
	margin-bottom: 0.3em;
}

/* Definition lists */
dl {
	margin-left: 0;
}

dt {
	font-weight: 600;
	margin-top: 1em;
	margin-bottom: 0.2em;
}

dd {
	margin-left: 1.5em;
	color: var(--text);
}

dd > *:first-child {
	margin-top: 0;
}

/* Code and preformatted text */
tt, code {
	font-family: "SF Mono", "Fira Code", "Monaco", "Consolas", monospace;
	font-size: 0.9em;
	background: var(--bg-tertiary);
	padding: 0.15em 0.4em;
	border-radius: 4px;
	color: #c7254e;
}

pre {
	font-family: "SF Mono", "Fira Code", "Monaco", "Consolas", monospace;
	font-size: 0.9em;
	padding: 0;
	margin: 0;
	overflow-x: auto;
}

a > tt, a > code {
	color: var(--primary);
}

/* Code blocks */
div.codeblock, div.infoblock {
	margin: 1.2em 0;
}

div.blocktitle {
	font-weight: 600;
	font-size: 0.85em;
	color: var(--text-muted);
	margin-bottom: 0.3em;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

div.blockcontent {
	border: 1px solid var(--border);
	padding: 1em 1.2em;
	border-radius: 8px;
	background: var(--bg-secondary);
}

div.infoblock > div.blockcontent {
	background: #fefce8;
	border-color: #fde68a;
}

div.codeblock > div.blockcontent {
	background: var(--bg-tertiary);
	overflow-x: auto;
}

div.codeblock > div.blockcontent pre {
	margin: 0;
	line-height: 1.5;
}

p + div.codeblock {
	margin-top: 0.5em;
}

/* Syntax highlighting */
span.pycommand { color: #0550ae; }
span.statement { color: #116329; }
span.builtin { color: #0550ae; }
span.special { color: #a40e26; }
span.operator { color: #cf222e; }
span.error { color: #cf222e; font-weight: bold; }
span.comment, span.string { color: #6e7781; }

/* Tables */
table {
	border: 1px solid var(--border);
	border-collapse: collapse;
	margin: 1em 0;
	width: auto;
}

td, th {
	padding: 0.6em 1em;
	text-align: left;
	border: 1px solid var(--border);
}

th, tr.heading td {
	font-weight: 600;
	background: var(--bg-tertiary);
	border-bottom: 2px solid var(--border-dark);
}

tr:hover {
	background: var(--bg-secondary);
}

table.imgtable, table.imgtable td {
	border: none;
	background: transparent;
}

table.imgtable tr:hover {
	background: transparent;
}

/* Images */
img {
	border: none;
	max-width: 100%;
	height: auto;
}

img.eq {
	padding: 0 0.1em;
	margin: 0;
	vertical-align: middle;
}

img.eqwl {
	padding-left: 2em;
	padding-top: 0.6em;
	padding-bottom: 0.2em;
	margin: 0;
}

/* Education badges */
div#member-container {
	display: flex;
	flex-wrap: nowrap;
	justify-content: space-evenly;
	margin: 1.5em 0;
	align-items: flex-start;
}

div#member {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1;
	max-width: 180px;
	text-align: center;
}

div#member a {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	color: inherit;
	padding: 0.5em;
	border-radius: 8px;
	transition: background 0.15s ease;
	width: 100%;
}

div#member a:hover {
	background: var(--bg-secondary);
	text-decoration: none;
}

div#member img {
	width: 80px;
	height: 80px;
	object-fit: contain;
	margin: 0;
	padding: 0;
	opacity: 0.9;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

div#member a:hover img {
	opacity: 1;
	transform: scale(1.05);
}

div#member p {
	text-align: center;
	margin: 0.8em 0 0 0;
	padding: 0;
	font-size: 0.78em;
	line-height: 1.45;
	color: var(--text-muted);
	word-wrap: break-word;
	hyphens: auto;
}

div#member p b {
	color: var(--text);
	font-weight: 600;
	display: block;
	margin-bottom: 0.2em;
}

/* Footer */
div#footer {
	font-size: 0.85em;
	border-top: 1px solid var(--border);
	padding-top: 1em;
	margin-top: 3em;
	color: var(--text-light);
}

div#footer a {
	color: var(--text-muted);
}

div#footer-text {
	float: left;
	padding-bottom: 8px;
}

/* Full-width title support */
#fwtitle {
	margin: 2px;
}

#fwtitle #toptitle {
	padding-left: 0.5em;
	margin-bottom: 0.5em;
}

/* Text formatting */
em {
	font-style: italic;
}

strong {
	font-weight: 600;
}

/* Print styles */
@media print {
	body {
		background: white;
	}

	#layout-menu {
		display: none;
	}

	table#tlayout {
		box-shadow: none;
	}

	#layout-content {
		padding: 0;
	}

	a {
		color: var(--text);
	}

	a[href]:after {
		content: " (" attr(href) ")";
		font-size: 0.8em;
		color: var(--text-muted);
	}
}

/* Mobile responsive */
@media screen and (max-width: 768px) {
	body {
		font-size: 14px;
	}

	#layout-menu {
		display: none;
	}

	#layout-content {
		padding: 1em 1.2em;
	}

	table#tlayout {
		width: 100%;
		box-shadow: none;
	}

	div#toptitle h1 {
		font-size: 1.5em;
	}

	h2 {
		font-size: 1.2em;
	}

	h3 {
		font-size: 1.1em;
	}

	div#member-container {
		flex-wrap: wrap;
		justify-content: center;
		gap: 20px;
	}

	div#member {
		width: 140px;
	}

	div#member img {
		width: 65px;
		height: 65px;
	}
}

/* Tablet adjustments */
@media screen and (max-width: 1024px) and (min-width: 769px) {
	#layout-menu {
		width: 110px;
		padding: 1em 0.75em;
		font-size: 0.85em;
	}

	#layout-content {
		padding: 1.2em 1.8em;
	}
}

/* Selection highlight */
::selection {
	background: var(--primary-light);
	color: var(--text);
}

::-moz-selection {
	background: var(--primary-light);
	color: var(--text);
}
