/* Layout and responsive rules shared by the front end and block editor. */
:root, .editor-styles-wrapper {
 --msi-bg: var(--wp--preset--color--background, #121212);
 --msi-panel: var(--wp--preset--color--panel, #1e1e1e);
 --msi-panel-soft: #181a1e;
 --msi-text: var(--wp--preset--color--text, #e4e7eb);
 --msi-muted: var(--wp--preset--color--muted, #a7adb6);
 --msi-link: var(--wp--preset--color--link, #8fb4e8);
 --msi-border: var(--wp--preset--color--border, #343b46);
}
.msi-site-header { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:24px; max-width:1360px; margin:auto; padding:24px 28px 0; }
.msi-standard-page { max-width:1360px; margin:auto; padding:32px 28px; }
.msi-standard-page:has(.msi-page) { padding:0; }
.msi-page > *, .msi-main > *, .msi-cv-grid > *, .msi-cv-row > * { min-width:0; }
.msi-main, .msi-section { overflow-wrap:anywhere; }
.msi-main > .wp-block-post-content { display:grid; grid-template-columns:minmax(0,1fr); gap:24px; min-width:0; }
.msi-main > .wp-block-post-content > * { min-width:0; }
.msi-profile__photo { margin:0; }
.msi-profile__icon { margin:0; flex:0 0 46px; }
.msi-profile__bio a { color:var(--msi-link); }
.msi-cv-button { margin:0; padding:0; border:0; }
.msi-cv-button a { display:inline-block; padding:6px 10px; border:1px solid #4a5360; border-radius:6px; font-size:.86rem; text-decoration:none; }
.msi-section__heading .msi-cv-button { padding:0; border:0; }
.msi-paper__resources, .msi-cv__links { white-space:normal; }
.msi-paper__resources { margin-bottom:0; }
.msi-cv-row .msi-cv-detail { margin-top:3px; font-size:smaller; }
.msi-cv-description .msi-cv__links { margin-top:10px; }
.msi-page :is(a:hover, a:focus-visible) { color:#fff; }
a:focus-visible { outline:2px solid var(--msi-link); outline-offset:4px; }
.wp-block-navigation__submenu-container { background:var(--msi-panel-soft); border:1px solid var(--msi-border); padding:8px; border-radius:8px; }
body.admin-bar .msi-sidebar { top:60px; }
@media(max-width:600px) { .msi-site-header { padding-inline:10px; } }
.msi-page,
.msi-page * {
	box-sizing: border-box;
}

.msi-page {
	display: grid;
	grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
	align-items: start;
	gap: clamp(24px, 4vw, 44px);
	width: min(100%, 1360px);
	margin: 0 auto;
	padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 28px) 36px;
	background: var(--msi-bg);
	color: var(--msi-text);
	font: 16px/1.65 Inter, Arial, sans-serif;
}

.msi-sidebar {
	position: sticky;
	top: 28px;
}

.msi-profile {
	align-self: start;
	max-height: calc(100vh - 56px);
	overflow-y: auto;
	padding: 22px;
	border-radius: 12px;
	background: #151515;
	box-shadow: 0 3px 12px rgba(0, 0, 0, .28);
}

.msi-profile__photo img, img.msi-profile__photo {
	display: block;
	width: min(100%, 270px);
	aspect-ratio: 7 / 9;
	margin: 0 auto;
	border-radius: 48% 48% 46% 46%;
	object-fit: cover;
}

.msi-profile__bio {
	margin: 20px 0 0;
	color: #c8cbd0;

	text-align:justify;

	font-size: 15px;
	line-height: 1.65;
	hyphens: none;
}

.msi-profile__icons {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 22px;
	margin-top: 24px;
}

.msi-profile__icons img {
	display: block;
	width: 46px;
	height: 46px;
	object-fit: contain;
}

.msi-main {
	display: grid;
	gap: 24px;
	min-width: 0;
}

.msi-section {
	padding: clamp(22px, 3vw, 32px);
	border: 1px solid rgba(255, 255, 255, .035);
	border-radius: 12px;
	background: var(--msi-panel);
	box-shadow: 0 4px 12px rgba(0, 0, 0, .24);
}

.msi-section > h2,
.msi-section__heading h2 {
	margin: 0;
	color: var(--msi-link);
	font-size: clamp(1.65rem, 3vw, 2.15rem);
	font-weight: 500;
	line-height: 1.2;
}

.msi-section__heading {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
}

.msi-paper {
	padding: 20px 0;
	border-bottom: 1px solid var(--msi-border);
}

.msi-paper:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.msi-paper h3 {
	margin: 0 0 7px;
	font-size: clamp(1.05rem, 2vw, 1.25rem);
	font-weight: 600;
	line-height: 1.45;
}

.msi-paper__meta {
	margin: 4px 0;
	color: var(--msi-muted);
}

.msi-paper__resources,
.msi-cv__links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	margin-top: 10px;
	font-size: .9rem;
}

.msi-paper__resources a,
.msi-cv__links a {
	text-decoration: none;
}

.msi-cv-button {
	display: inline-block;
	padding: 6px 10px;
	border: 1px solid #4a5360;
	border-radius: 6px;
	font-size: .86rem;
	text-decoration: none;
}

.msi-cv-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px;
}

.msi-cv-group h3 {
	margin: 0 0 10px;
	color: #b8d1f2;
	font-size: 1.15rem;
	font-weight: 500;
}

.msi-cv-row {
	display: grid;
	grid-template-columns: 110px minmax(0, 1fr);
	gap: 14px;
	padding: 10px 0;
	border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.msi-cv-row:last-child {
	border-bottom: 0;
}

.msi-cv-date {
	color: var(--msi-muted);
	font-size: .88rem;
}

.msi-cv-row p {
	margin: 0;
}

.msi-cv-detail {
	display: block;
	margin-top: 3px;
	color: var(--msi-muted);
	line-height: 1.45;
}

@media (max-width: 900px) {
	.msi-page {
		grid-template-columns: 1fr;
	}

	.msi-sidebar {
		position: static;
	}

	.msi-profile {
		max-height: none;
		overflow: visible;
	}

	.msi-profile__photo img, img.msi-profile__photo {
		width: min(70vw, 260px);
	}

	.msi-cv-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	.msi-page {
		padding-inline: 10px;
	}

	.msi-section,
	.msi-profile {
		padding: 18px;
	}

	.msi-cv-row {
		grid-template-columns: 1fr;
		gap: 3px;
	}

	.wp-block-navigation__responsive-container.is-menu-open {
		padding: 24px;
		background: var(--msi-panel-soft);
	}
}


/* Native teaching lists: align markers and keep wrapped links within the card. */
.msi-teaching > p { margin:0 0 1em; }
.msi-teaching > h2 { margin:1em 0 .4em; font-size:1.5rem; font-weight:400; line-height:1.35; color:#a6c8ff; }
.msi-teaching > ul { margin:.4em 0 1em; padding-left:1.5em; line-height:1.7; }
.msi-teaching li + li { margin-top:.35em; }
.msi-teaching li a { text-decoration:none; }

/* Small decorative institution icons beside the profile links. */
.msi-profile__bio a::before { content:""; display:inline-block; width:16px; height:16px; margin-right:4px; vertical-align:-2px; border-radius:50%; background:center / contain no-repeat; }
.msi-profile__bio a[href="http://econ.bilkent.edu.tr/"]::before { background-image:url("https://w3.bilkent.edu.tr/bilkent/wp-content/uploads/sites/2/2015/03/favicon.ico"); }
.msi-profile__bio a[href="https://www.crest.fr/"]::before { background-image:url("https://i0.wp.com/crest.science/wp-content/uploads/2016/09/Favicon.png?ssl=1"); }
.msi-profile__bio a[href="https://eabcn.org/dbc/about/members"]::before { background-image:url("https://eabcn.org/themes/custom/eabcn2/assets/favicon/favicon-16x16.png"); }

/* Shared title typography, including teaching headings and editor previews. */
.msi-page :is(h1,h2,h3,h4,h5,h6), .editor-styles-wrapper :is(h1,h2,h3,h4,h5,h6), .wp-block-site-title { font-family:var(--wp--preset--font-family--abyssinica-sil, "Abyssinica SIL", serif); }

/* Link presentation shared by all public pages and editor previews. */
.wp-site-blocks a, .editor-styles-wrapper a { text-decoration:none !important; }

/* Keep the CV download at the top left without a section title. */
#cv > .msi-section__heading { justify-content:flex-start; }
