/* Modern CSS for jemdoc - Academic Personal Website */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lora:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* CSS Variables for easy theming */
:root {
	--color-primary: #1a365d;
	--color-accent: #0d9488;
	--color-accent-hover: #0f766e;
	--color-text: #374151;
	--color-text-light: #6b7280;
	--color-heading: #1a365d;
	--color-border: #e5e7eb;
	--color-border-dark: #d1d5db;
	--color-bg-menu: #f9fafb;
	--color-bg-block: #f8fafc;
	--font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--font-body: 'Lora', Georgia, serif;
	--transition-fast: 0.15s ease;
	--transition-normal: 0.2s ease;
}

table#tlayout {
	border: none;
	border-collapse: separate;
	background: white;
}

body {
	background: white;
	font-family: var(--font-body);
	color: var(--color-text);
	padding-bottom: 8px;
	margin: 0;
	line-height: 1.6;
	font-size: 16px;
}

#layout-menu {
	background: var(--color-bg-menu);
	border: none;
	border-right: 1px solid var(--color-border);
	padding: 1.5em 1em;
	font-size: 0.95em;
	width: auto;
	white-space: nowrap;
	text-align: left;
	vertical-align: top;
	font-family: var(--font-heading);
}

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

#layout-content {
	padding-top: 0.5em;
	padding-left: 2.5em;
	padding-right: 2.5em;
	border: none;
	background: white;
	text-align: left;
	vertical-align: top;
	min-width: 800px;
	width: 100vw;
	height: 100vh;
}

#layout-menu a {
	line-height: 1.8em;
	margin-left: 0.5em;
	display: block;
	padding: 0.3em 0.6em;
	border-radius: 6px;
	transition: all var(--transition-fast);
}

tt {
	background: #fef3c7;
	padding: 0.15em 0.4em;
	border-radius: 4px;
	font-size: 0.9em;
}

pre, tt {
	font-size: 90%;
	font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

a, a > tt {
	color: var(--color-accent);
	text-decoration: none;
	transition: color var(--transition-fast);
}

a:hover {
	color: var(--color-accent-hover);
	border-bottom: none;
}

#layout-menu a.current:link, #layout-menu a.current:visited {
	color: var(--color-primary);
	background: rgba(13, 148, 136, 0.1);
	font-weight: 500;
	border-bottom: none;
}

#layout-menu a:link, #layout-menu a:visited {
	color: var(--color-text-light);
	text-decoration: none;
}

#layout-menu a:hover {
	color: var(--color-accent);
	background: rgba(13, 148, 136, 0.05);
	text-decoration: none;
}

div.menu-category {
	border-bottom: none;
	margin-top: 0.5em;
	margin-bottom: 0.8em;
	padding-top: 0.2em;
	padding-bottom: 0.3em;
	font-weight: 600;
	color: var(--color-primary);
	font-size: 1.1em;
	letter-spacing: -0.01em;
}

div.menu-item {
	padding-left: 0;
	text-indent: 0;
	margin-bottom: 0.2em;
}

div#toptitle {
	padding-bottom: 0.5em;
	margin-bottom: 1.8em;
	border-bottom: 2px solid var(--color-border);
}

/* Reduce space if we begin the page with a title. */
div#toptitle + h2, div#toptitle + h3 {
	margin-top: -0.5em;
}

div#subtitle {
	margin-top: 0.0em;
	margin-bottom: 0.0em;
	padding-top: 0em;
	padding-bottom: 0.1em;
}

em {
	font-style: italic;
}

strong {
	font-weight: 600;
	color: var(--color-primary);
}

h1, h2, h3 {
	font-family: var(--font-heading);
	color: var(--color-heading);
	margin-top: 1.2em;
	margin-bottom: 0.5em;
	padding-bottom: 0.3em;
	line-height: 1.3;
	padding-top: 0.5em;
	border-bottom: 1px solid var(--color-border);
	font-weight: 600;
	letter-spacing: -0.02em;
}

h1 {
	font-size: 2.1em;
	font-weight: 700;
}

h2 {
	padding-top: 1em;
	font-size: 1.6em;
}

h2 + h3 {
	padding-top: 0.3em;
}

h3 {
	font-size: 1.3em;
	border-bottom: none;
	color: var(--color-text);
}

p {
	margin-top: 0.0em;
	margin-bottom: 1em;
	padding: 0;
	line-height: 1.7;
}

pre {
	padding: 0;
	margin: 0;
}

div#footer {
	font-size: small;
	border-top: 1px solid var(--color-border);
	padding-top: 1em;
	margin-top: 4.0em;
	color: var(--color-text-light);
	font-family: var(--font-heading);
}

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

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

ul, ol, dl {
	margin-top: 0.2em;
	padding-top: 0;
	margin-bottom: 1em;
}

dt {
	margin-top: 0.5em;
	margin-bottom: 0;
}

dl {
	margin-left: 20px;
}

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

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

ul {
	list-style-position: outside;
	list-style-type: disc;
}

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

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

ol {
	list-style-position: outside;
	list-style-type: decimal;
}

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

li {
	margin-bottom: 0.4em;
	line-height: 1.6;
}

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

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

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

div.codeblock, div.infoblock {
	margin-right: 0%;
	margin-top: 1.5em;
	margin-bottom: 1.5em;
}

div.blocktitle {
	font-family: var(--font-heading);
	font-weight: 600;
	color: var(--color-primary);
	margin-top: 1.2em;
	margin-bottom: 0.3em;
}

div.blockcontent {
	border: 1px solid var(--color-border);
	border-radius: 8px;
	padding: 1em 1.2em;
	background: var(--color-bg-block);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

div.infoblock > div.blockcontent {
	background: var(--color-bg-block);
	border-left: 3px solid var(--color-accent);
}

div.blockcontent p + ul, div.blockcontent p + ol {
	margin-top: 0.4em;
}

div.infoblock p {
	margin-bottom: 0em;
}

div.infoblock li p, div.infoblock dd p {
	margin-bottom: 0.5em;
}

div.infoblock p + p {
	margin-top: 0.8em;
}

div.codeblock > div.blockcontent {
	background: #f8fafc;
	border: 1px solid var(--color-border);
}

span.pycommand {
	color: #1e40af;
}

span.statement {
	color: #059669;
}
span.builtin {
	color: #7c3aed;
}
span.special {
	color: #dc2626;
}
span.operator {
	color: #ea580c;
}
span.error {
	color: #dc2626;
}
span.comment, span.comment > *, span.string, span.string > * {
	color: var(--color-text-light);
}

@media print {
	#layout-menu {
		display: none;
	}
}

#fwtitle {
	margin: 2px;
}

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

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

div#toptitle h1, #layout-content div#toptitle h1 {
	margin-bottom: 0.0em;
	padding-bottom: 0.1em;
	padding-top: 0;
	margin-top: 0.5em;
	border-bottom: none;
}

img.eq {
	padding: 0;
	padding-left: 0.1em;
	padding-right: 0.1em;
	margin: 0;
}

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

table {
	border: 1px solid var(--color-border-dark);
	border-collapse: collapse;
	border-radius: 6px;
}

td {
	padding: 0.6em 1em;
	text-align: center;
	border: 1px solid var(--color-border);
}

table + table {
	margin-top: 1em;
}

tr.heading {
	font-weight: 600;
	font-family: var(--font-heading);
	border-bottom: 2px solid var(--color-border-dark);
	background: var(--color-bg-block);
}

img {
	border: none;
	border-radius: 6px;
}

table.imgtable, table.imgtable td {
	border: none;
	text-align: left;
	padding: 0.8em 1.2em;
}

/* Research highlight cards - for image blocks */
table.imgtable {
	background: var(--color-bg-block);
	border-radius: 10px;
	padding: 1em 1.2em;
	margin: 1em 0;
	border: 1px solid var(--color-border);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	transition: box-shadow var(--transition-normal);
}

table.imgtable:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

table.imgtable img {
	border-radius: 8px;
}

/* Profile/bio image styling */
table.imgtable td:first-child img {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Nested list styling for sub-items like conference presentations */
li ul, li ol {
	margin-top: 0.3em;
	margin-bottom: 0.3em;
}

li li {
	font-size: 0.95em;
	color: var(--color-text-light);
}

/* Selection highlight */
::selection {
	background: rgba(13, 148, 136, 0.2);
}
