/* jfc2026.css — drop-in replacement for newjfc.css (same markup, same classes) */

:root {
	--ink: #2b2b2b;
	--muted: #6b6b6b;
	--accent: #7a1712;      /* UMinho burgundy */
	--rule: #a39a96;
	--side: 12rem;          /* sidebar width */
}

* {font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;}

html {font-size: 17px; -webkit-text-size-adjust: 100%;}

body {
	background: #fff; color: var(--ink);
	line-height: 1.4;
	max-width: 62rem; margin: 0 auto; padding: 2rem 1.5rem 3rem;
}

/* ---------- links ---------- */
a:link, a:visited {color: var(--accent); text-decoration: none;}
a:hover {text-decoration: underline; text-underline-offset: 0.15em;}

/* ---------- top-level grid (dl > dt label / dd.sec_header / dd.sec_body) ---------- */
body > dl {margin: 0; width: 100%;}
body > dl::after {content: ""; display: block; clear: both;}
body > dl > dd {margin-left: 0;}

/* section labels: Research, Teaching, ... */
body > dl > dt {
	width: var(--side); box-sizing: border-box; padding: 0 0 0.15rem 0;
	text-align: right; line-height: 1.2;
	font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
	color: #555;
	margin-top: 1.6rem; margin-bottom: 0;
}

.sec_header {
	float: left; clear: left;
	width: var(--side); box-sizing: border-box; padding: 0.4rem 1.25rem 0 0;
	border-top: 1px solid var(--rule);
	font-size: 0.85rem; color: var(--muted);
	overflow-wrap: anywhere;
}
.sec_header > dl {margin: 0;}
.sec_header > dl > dt {margin-bottom: 0.7rem; font-weight: normal;}

.sec_body {
	margin-left: var(--side) !important;
	padding-left: 1.5rem; padding-top: 0.35rem;
	border-left: 1px solid var(--rule);
}
#logos + .sec_body {border-left: none; padding-top: 0;}

.sec_body > dl {margin: 0;}
.sec_body > dl > dt {
	font-weight: 600; color: var(--ink);
	margin: 0.75rem 0 0.15rem;
}
.sec_body > dl > dt:first-child {margin-top: 0;}
/* publication entries (mkBiblio): the dt is the whole entry, so not a heading */
.sec_body > dl > dt:has(a.bib-title) {font-weight: normal; margin: 0 0 0.8rem;}
.sec_body > dl > dt:has(a.bib-title) b {font-weight: 600;}
.sec_body > dl > dd {
	display: list-item; list-style-type: square;
	margin: 0 0 0.1rem 1.2rem; padding-left: 0.2rem;
}
.sec_body > dl > dd::marker {color: #b9a9a5;}
.sec_body > ul, .sec_body > p {margin: 0; padding-top: 0.5em;}

/* ---------- header ---------- */
#photo {float: left; width: var(--side); text-align: right; padding-right: 1.25rem; box-sizing: border-box; margin-top: 0.7rem !important;}
#photo br, .sec_body > br:first-child {display: none;}
img#jfc {width: 9rem; height: auto; border-radius: 50%; display: inline-block;}
img#jfcs {width: 45%; height: auto;}

#logos {float: right; text-align: right; margin-left: 1rem;}
img#uminho, img#eng {height: 52px; width: auto;}
img#haslab {height: 44px; padding-left: 1em; border-left: 1px solid var(--rule); margin-left: 1em;}

.title {
	font-size: 2.1rem; font-weight: 600; letter-spacing: -0.01em;
	line-height: 1.15; color: #1d1d1d;
	margin: 0.6rem 0 0.5rem;
}
.title1 {font-size: 2.6rem; font-weight: 600;}
.title2 {font-size: 1.5rem; font-weight: 600;}
.title3 {font-size: 1rem; font-weight: 600;}

.extra_info {font-size: 0.95rem; margin-bottom: 0.7rem; max-width: 44rem;}
.extra_info + .extra_info {color: var(--ink);}
.extra_info.contact {font-size: 0.85rem; line-height: 1.5; color: var(--muted); margin-bottom: 0.9rem;}

img#email {height: 1.05em; width: auto; vertical-align: -0.2em; mix-blend-mode: multiply;}
img#flag {height: 10px;}

.aside {font-size: 0.8rem; color: var(--muted); display: inline-block; margin-top: 0.4rem;}
.sec_body dd .aside {display: inline; margin-top: 0;}

/* publisher badges inside lists */
.sec_body dd img {height: 1.3em; width: auto; vertical-align: -0.2em; margin-left: 0.25em; opacity: 0.75;}
.sec_body dd a:hover img {opacity: 1;}

/* ---------- misc ---------- */
address {text-align: right; font-style: normal; font-size: 0.8rem; color: var(--muted); margin-top: 3rem;}
img {border: 0;}
.dim {color: #bbb;}
.nobr {white-space: nowrap;}
.plainlist {list-style-type: disc;}
li.subheading {list-style: none;}
th, td {font-size: 0.85em;}

#bibentry {
	font-family: ui-monospace, Menlo, "Courier New", monospace; font-size: 0.8em;
	background: #f6f4f3; border: 1px solid var(--rule); border-radius: 6px;
	padding: 0.5rem 0.75rem; width: auto; white-space: pre-wrap; overflow-wrap: anywhere;
}

/* ---------- narrow screens ---------- */
@media (max-width: 760px) {
	html {font-size: 16px;}
	body {padding: 1rem 1.1rem 2rem;}
	#photo {width: auto; padding: 0 1rem 0 0; margin-top: 0 !important; border: none !important;}
	img#jfc {width: 5.5rem;}
	img#uminho, img#eng {height: 40px; width: auto;}
	.title {font-size: 1.6rem; margin-top: 0.2rem;}
	/* secondary pages (small photo, id=jfcs): drop photo and logos on phones */
	#photo:has(#jfcs), #photo:has(#jfcs) + #logos > a {display: none;}
	#photo:has(#jfcs) + #logos {float: right; margin: 0.1rem 0 0 0.5rem;}
	#photo:has(#jfcs) + #logos + .sec_body {clear: none !important;}
	#logos .bib-toggle {margin: 0;}
	#photo:has(#jfcs) + #logos:not(:has(.bib-toggle)) {display: none;}
	#photo + #logos + .sec_body {clear: both; margin-left: 0 !important; padding-left: 0; padding-top: 0.5rem;}

	body > dl > dt {width: auto; text-align: left; padding: 0 0 0.3rem; margin-top: 2rem;
	                font-weight: 700; font-size: 0.85rem; color: #333;
	                border-bottom: 1px solid var(--rule);}
	.sec_header {float: none; width: auto; border-top: none; padding: 0.4rem 0 0;}
	.sec_header:empty {display: none;}
	.sec_header > dl {display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem;}
	.sec_header > dl > dt {margin: 0;}
	.sec_body {margin-left: 0 !important; padding-left: 0; border-left: none; padding-top: 0.3rem;}
}

/* ---------- publication overlay (home pages and publication list) ---------- */
#bib-modal {display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9999; overflow-y: auto;}
#bib-modal-box {background: #fff; max-width: 52rem; margin: 3rem auto 2rem; padding: 1.5rem 1.75rem; border-radius: 6px; position: relative;}
#bib-modal-close {position: absolute; top: 0.4rem; right: 0.7rem; font-size: 1.6rem; line-height: 1; cursor: pointer; border: none; background: none; color: #555;}
#bib-modal-close:hover {color: #000;}
#bib-modal-box pre {width: 100%; box-sizing: border-box; white-space: pre-wrap; overflow-x: auto;}
#bib-modal-box img {height: 1.3em; width: auto; vertical-align: -0.2em;}
@media (max-width: 760px) { #bib-modal-box {margin: 0.75rem; padding: 1.25rem 1rem;} #bib-modal-box p {text-align: left !important;} }

/* ---------- pill switches (language, abstracts) ---------- */
.lang-switch, .pill {display: inline-flex; border: 1px solid var(--accent); border-radius: 999px; overflow: hidden;
	font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; line-height: 1; vertical-align: middle;}
.lang-switch {margin-top: 0.5rem;}
.lang-switch > *, .pill > * {padding: 0.3rem 0.65rem;}
.lang-switch .on, .pill .on {background: var(--accent); color: #fff;}
.lang-switch a:link, .lang-switch a:visited, .pill a:link, .pill a:visited {color: var(--accent);}
.lang-switch a:hover, .pill a:hover {background: #f6eceb; text-decoration: none;}

/* ---------- publication links (mkBiblio) ---------- */
.bib-link {display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.03em; margin: 0.15rem 0.6rem 0 0; white-space: nowrap;}
.bib-link-off {color: #b5aaa7; cursor: help;}
.bib-toggle {font-size: 0.8rem; margin-top: 0.5rem; color: var(--muted); display: flex; align-items: center; justify-content: flex-end; gap: 0.45rem;}
