/*
	Responsive layer (2026)
	Loaded after screen.css and style.css. Only media queries and safe
	global rules: on wide screens (>= 1120px) the site looks as before.
*/


/*	Global safety rules
___________________________________________________________________ */
/* Running text: 1em (the browser default, normally 16px) instead of the theme's 14px */
body {
	font-size: 1em;
}
img,
video,
iframe {
	max-width: 100%;
}
img {
	height: auto;
}
.entry-content {
	overflow-wrap: break-word;
	word-wrap: break-word;
}
/* Wide LaTeX formulas scroll instead of breaking the layout */
.ql-center-displayed-equation,
.ql-center-picture {
	max-width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
}
pre,
.codecolorer-container {
	max-width: 100%;
	overflow-x: auto;
}
#email,
#comment,
form.standard .textbox,
#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"],
#commentform textarea {
	max-width: 100%;
	box-sizing: border-box;
}


/*	Header contact: e-mail · LinkedIn
___________________________________________________________________ */
#header .menu-contact {
	font: normal 12px/23.8px Helvetica, Arial, sans-serif; /* same as the footer */
}
.menu-contact a {
	color: #6b6b6b;
	text-decoration: none;
}
.menu-contact a:hover {
	color: #333;
	text-decoration: underline;
}
.menu-dot {
	margin: 0 0.25em; /* doubles the space on each side of the dot */
	color: #6b6b6b;
}
.nav-mobile {
	display: none;
}


/*	About page, Short CV and Teaching: date | text (like Research activities)
___________________________________________________________________ */
#primary .cv-list p.cv-row {
	display: grid;
	grid-template-columns: 130px minmax(0, 1fr);
	column-gap: 24px;
	margin: 0 0 10px;
	padding: 0;
	color: #333;
	font-size: 1em;
	line-height: 26px;
}
#primary .cv-list .cv-date {
	color: #6b6b6b;
	font: normal 11px/26px Helvetica, Arial, sans-serif;
	letter-spacing: 1px;
	text-align: right; /* desktop: right-aligned next to the text, like Research activities */
	text-transform: uppercase;
	white-space: nowrap;
}


/*	About page, News: separated items, older ones behind "Show all news"
___________________________________________________________________ */
#primary .cv-news p.cv-row {
	margin: 0;
	padding: 12px 0;
	border-top: 1px solid #eee;
}
#primary .cv-news p.cv-row:first-of-type {
	padding-top: 0;
	border-top: 0;
}
#primary .cv-news p.cv-row[hidden] {
	display: none;
}
.cv-more {
	margin: 4px 0 32px 146px; /* text aligned with the text column (padding 8px); 32px to the line below */
	padding: 6px 8px;
	border: 0;
	border-radius: 3px;
	background: none;
	color: #6b6b6b;
	font: normal 11px/16px Helvetica, Arial, sans-serif;
	letter-spacing: 1px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}
.cv-more:after {
	content: '';
	display: inline-block;
	width: 6px;
	height: 6px;
	margin: 0 0 3px 8px;
	border: solid currentColor;
	border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg);
	transition: transform .15s;
}
.cv-more[aria-expanded="true"]:after {
	margin-bottom: 0;
	transform: rotate(-135deg);
}
.cv-more:hover {
	background: #f0f0f0; /* like "Show abstract" on Publications */
	color: #333;
}


/*	Desktop: content uses the full width of the white box (up to its frame line)
___________________________________________________________________ */
@media (min-width: 1040px) {
	.container_12 {
		width: auto;
		padding: 0 30px;
	}
	.container_12 .grid_2  { width: calc(16.666% - 30px); }
	.container_12 .grid_3  { width: calc(25% - 30px); }
	.container_12 .grid_4  { width: calc(33.333% - 30px); }
	.container_12 .grid_5  { width: calc(41.666% - 30px); }
	.container_12 .grid_6  { width: calc(50% - 30px); }
	.container_12 .grid_7  { width: calc(58.333% - 30px); }
	.container_12 .grid_8  { width: calc(66.666% - 30px); }
	.container_12 .grid_9  { width: calc(75% - 30px); }
	.container_12 .grid_10 { width: calc(83.333% - 30px); }
	.container_12 .grid_11 { width: calc(100% - 30px); }
	.container_12 .grid_12 { width: calc(100% - 30px); }
	/* menu row is absolutely positioned inside #header: same edges as the content */
	#header .container_12 .menu_container {
		left: 45px;
		right: 45px;
		width: auto;
		margin: 0;
	}
}


/*	Desktop and tablet: label column (photo, "News") as wide as the photo, text right next to it
	(the nested 3/9 columns would otherwise leave 30px unused on the right)
___________________________________________________________________ */
@media (min-width: 720px) {
	.entry-content .grid_3.alpha {
		width: 194px;
	}
	.entry-content .grid_9.omega {
		width: calc(100% - 194px - 30px);
	}
}


/*	Below the boxed width: box becomes fluid
___________________________________________________________________ */
@media (max-width: 1119px) {
	#outer {
		width: auto;
		max-width: 1098px;
		margin: 0 auto;
		box-shadow: none;
		-moz-box-shadow: none;
		-webkit-box-shadow: none;
	}
}


/*	Tablet: fluid 12-column grid
___________________________________________________________________ */
@media (max-width: 1039px) {
	.container_12 {
		width: auto;
		padding: 0 24px;
	}
	.container_12 .grid_2  { width: calc(16.666% - 30px); }
	.container_12 .grid_3  { width: calc(25% - 30px); }
	.container_12 .grid_4  { width: calc(33.333% - 30px); }
	.container_12 .grid_5  { width: calc(41.666% - 30px); }
	.container_12 .grid_6  { width: calc(50% - 30px); }
	.container_12 .grid_7  { width: calc(58.333% - 30px); }
	.container_12 .grid_8  { width: calc(66.666% - 30px); }
	.container_12 .grid_9  { width: calc(75% - 30px); }
	.container_12 .grid_10 { width: calc(83.333% - 30px); }
	.container_12 .grid_11 { width: 100%; margin: 0; }
	.container_12 .grid_12 { width: 100%; margin-left: 0; margin-right: 0; }
	/* Nested columns (alpha/omega) only lose one side margin */
	.container_12 .alpha,
	.container_12 .omega {
		box-sizing: border-box;
	}

	#header {
		margin: 40px 0;
	}
	/* Header (menu + e-mail) leaves absolute positioning */
	#header .menu_container,
	.sf-menu,
	.menu-contact {
		position: static;
	}
	#header .menu_container {
		display: flex;
		flex-wrap: wrap;
		align-items: flex-end;
		justify-content: space-between;
		gap: 8px 24px;
		border-bottom: 0;
		padding-bottom: 0;
	}
	.sf-menu {
		width: auto;
		float: none;
		border-bottom: 1px solid #ddd; /* only the menu has a line */
	}
	#header .menu-contact {
		margin-left: auto;
		padding-bottom: 6px;
		text-align: right;
	}
	.sf-menu li a {
		padding-right: 40px;
	}
}


/*	Phone: one column
___________________________________________________________________ */
@media (max-width: 719px) {
	.container_12 {
		padding: 0 16px;
	}
	.container_12 [class*="grid_"] {
		float: none;
		display: block;
		width: auto;
		margin-left: 0;
		margin-right: 0;
	}
	.container_12 .grid_1 {
		display: none;
	}

	#header {
		margin: 20px 0 28px;
	}
	/* Phones: menu icon (native page picker) on the left, e-mail · LinkedIn on the right */
	#header .menu_container {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding-bottom: 10px;
		border-bottom: 1px solid #eee;
	}
	#header .menu_container > .menu-main_menu-container,
	#header .menu_container > div:not(.nav-mobile) {
		display: none;
	}
	.menu-contact {
		order: 2;
		min-width: 0;
		overflow-wrap: anywhere;
		font-size: 14px;
		text-align: right;
	}
	.nav-mobile {
		order: 1;
		display: block;
		position: relative;
		flex: none;
		width: 44px;
		height: 44px;
		border-radius: 3px;
		background: #f0f0f0;
	}
	.nav-mobile-icon,
	.nav-mobile-icon span,
	.nav-mobile-icon:before,
	.nav-mobile-icon:after {
		position: absolute;
		left: 12px;
		width: 20px;
		height: 2px;
		background: #333;
	}
	.nav-mobile-icon {
		top: 21px;
		background: none;
	}
	.nav-mobile-icon span {
		left: 0;
		top: 0;
	}
	.nav-mobile-icon:before,
	.nav-mobile-icon:after {
		content: '';
		left: 0;
	}
	.nav-mobile-icon:before {
		top: -6px;
	}
	.nav-mobile-icon:after {
		top: 6px;
	}
	.nav-mobile-select {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		opacity: 0;
		font-size: 16px;
		cursor: pointer;
		-webkit-appearance: none;
		appearance: none;
	}
	.nav-mobile:focus-within {
		outline: 2px solid #333;
		outline-offset: 2px;
	}

	h1, h2, h3, h4, h5, h6,
	h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
		padding-bottom: 16px;
	}
	.page h2 {
		font-size: 18px;
	}
	.entry-content h1 {
		padding-bottom: 16px;
	}

	/* Publications */
	h3.paper-title {
		font-size: 17px;
		line-height: 1.35;
		padding-bottom: 4px;
	}
	h5.paper-journal {
		padding-bottom: 14px;
	}
	.iconlist {
		float: none;
		margin-top: 10px;
	}
	.iconlist h5 a {
		padding-top: 10px;
		padding-bottom: 10px; /* comfortable tap targets */
	}
	a.toggle {
		padding-top: 8px;
		padding-bottom: 8px;
	}

	.cv-more {
		margin-left: -8px;
	}

	/* Short CV / Teaching: date above the text */
	#primary .cv-list p.cv-row {
		display: block;
		margin-bottom: 14px;
	}
	#primary .cv-list .cv-date {
		display: block;
		text-align: left;
	}
	/* News: the dividers already separate the items, no extra margin */
	#primary .cv-news p.cv-row {
		margin-bottom: 0;
	}
	#primary .cv-list .cv-date {
		line-height: 18px;
		margin-bottom: 2px;
	}

	/* Research activities: month above the entries */
	h5.abroad-subtitle {
		padding-bottom: 6px;
		margin-top: 8px;
	}

	#footer .footer-bottom-wrap .left,
	#footer .footer-bottom-wrap .right {
		float: none;
		text-align: left;
	}
}
