/* Colors

Stormy (purple): #494E6B
Stormy Alt (blue): #49566B
Cloud (light red): #98878F
Sunset (red, former accent): #985E6D
Evening (blue/black): #192231

Alt white: #FAFAFA
Dark gray: #444444

Claret (accent, replaces Sunset): #8C3B4A

*/

:root {
	--accent: #8C3B4A; /* Claret: links, title hover, timeline highlight, nav underline */
}

/* Basic Elements */

* {
	margin: 0;
	padding: 0;
}

/*html,body {height:100%;}*/

html {
	scroll-behavior: smooth;
}

body {
 	font-family: 'Work Sans', sans-serif;
	font-weight: 300;
	font-size: 100%;
	color: #444444;
	background: #FAFAFA;
}

h1, h2, h3, h4, h5, h6 {
 	font-family: 'Montserrat', sans-serif;
	font-weight: 500; /* light (300) is reserved for section headings */
}

a {
	color: #000;
	text-decoration: none;
	font-weight: 400;
	color: var(--accent);
}

a:hover {
	text-decoration: none;
	color: #192231; /* same as the paper links (PDF, WP, Abstract) */
}

h1 {
	color: #49566B;
	margin-bottom: 0.3em;
	position: relative; 
}

h1 span{
	position:absolute; top:-4em;
}

h2 {
	color: #49566B;
	font-size: 130%;
	font-weight: normal;
	margin-bottom: 0.3em;
}

h3 {
	color: #49566B;
	margin-bottom: 0.3em;
}


/* Navigation */

nav {
	position: fixed;
	z-index: 1;
	top: 0;
	width: 100%;
	line-height: 4em;
	color: #FAFAFA;
	background-color: none;
	transition: background-color 0.5s ease-out;
}

nav a {
	color: rgba(250, 250, 250, 0.9);
	text-decoration: none;
}

nav ul {
	list-style: none;
	display: block;
	vertical-align: top;
}

nav ul li {
	display: inline-block;
	
	/* für IE 7 and below*/
	zoom: 1;
	*display: inline;
}

nav ul li:hover {
	background-color: transparent;
}


nav ul li a {
	position: relative;
	display: block;
	padding-left: 0.8em;
	padding-right: 0.8em;
	font-family: 'Montserrat', sans-serif;
	font-weight: 500;
	font-size: .74rem;
	letter-spacing: .14em;
	text-transform: uppercase;
}

nav ul li a::after { /* rose underline that slides in on hover */
	content: "";
	position: absolute;
	left: .8em;
	right: .8em;
	bottom: 1.15em;
	height: 2px;
	background: var(--accent);
	transform: scaleX(0);
	transition: transform .2s ease;
}

nav ul li a:hover::after {
	transform: scaleX(1);
}

nav ul li a:hover {
	text-decoration: none;
	color: rgba(250, 250, 250, 0.9);
}

nav h1 { 
	margin: 0;
	float: left;
	font-size: 140%;
	font-weight: 300;
	letter-spacing: .02em;
	color: rgba(250, 250, 250, 0.9);
	margin: 0 2% 0 2%;
}

#smallnav { 
  display: none; /* Hide the link that should open and close the topnav on small screens */
}


/* Header */

header {
	position: relative;
	overflow: hidden;
	height: 30vh;
	max-height: 30vw;
	width: 100%;
	margin-bottom: 2em;
	background: #192231;
}

/* Banco de España facade as a Stormy duotone: grayscale photo + flat colour multiplied on top */
header::before,
header::after {
	content: "";
	position: absolute;
	inset: 0;
}

header::before {
	background: url(../img/header-facade.jpg) center 40% / cover;
	filter: grayscale(1) contrast(1.1);
}

header::after {
	background: #3A4659;
	mix-blend-mode: multiply;
}


/* Footer */

footer {
	display: block;
	clear: both;
	text-align: center;
	height: 60px;
	padding: 20px;
}


/* Content */

main {
	display: block;
	width: 75%;
	min-height: calc(100vh - 20vw - 6em - 100px);
	margin: 0 auto 0em;	
	background: #FAFAFA;
}

.subsection {
	margin-bottom: 2em; /* space after each section */
	width: 75%;
	float: right;
}

.subsection p {
	text-align: justify;
	text-justify: inter-word;
}

.subsection > h1 {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: .9em;
	font-size: 1.3rem;
	font-weight: 300;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.subsection > h1::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #D9DCE3;
}

.subsection ul {
	list-style: none;
}

#references li {
	display: inline-block;
	padding-right: 1em;
	margin-bottom: 0.3em;
}

/* Papers */

/* Entries sit on a thin timeline; each gets a rose ring that fills on hover */

.paper {
	position: relative;
	margin: 0 0 0 4px;
	padding: 0 0 1.75em 1.4rem;
	border-left: 1px solid #D9DCE3;
}

.paper:has(+ h1),
.paper:last-child {
	padding-bottom: .2em; /* line ends with the last entry of a section */
}

.paper::before {
	content: "";
	position: absolute;
	left: -5px;
	top: .42em;
	width: 9px;
	height: 9px;
	box-sizing: border-box;
	border-radius: 50%;
	background: #FAFAFA;
	border: 2px solid #2F3A4E; /* Slate, same as paper titles */
	transition: background .2s, border-color .2s;
}

.paper:has(.paper-title a:hover)::before {
	background: var(--accent); /* accent highlight, together with the title */
	border-color: var(--accent);
}

.paper + h1 {
	margin-top: 2em; /* same spacing when a section heading follows an entry */
}

.paper-venue .sep { /* dot between program and years (teaching) */
	margin: 0 .45em;
	color: #98878F; /* Cloud */
}

.subsection .paper .paper-desc { /* Teaching / misc descriptions */
	font-size: .95rem;
	line-height: 1.6;
	color: #444444;
}

.subsection .paper p {
	text-align: left;
}

.paper-title {
	display: block;
	margin: 0 0 .2em;
	font-family: 'Montserrat', sans-serif;
	font-size: 1.12rem;
	line-height: 1.35;
}

.paper-title a {
	color: #2F3A4E; /* Slate: between Evening and Stormy */
	font-weight: 500;
}

.paper-title a:hover {
	color: var(--accent);
}

.paper-byline,
.paper-venue {
	font-size: .95rem;
	line-height: 1.5;
}

.paper-byline {
	color: #6B7080;
}

.paper-venue {
	color: #49566B;
}

.more-authors {
	border: 0;
	background: none;
	padding: 0;
	font: inherit;
	color: var(--accent);
	cursor: pointer;
}

.more-authors:hover {
	color: #192231;
}

.paper-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .3em 1.15em;
	margin-top: .5em;
	font-size: .88rem;
}

.paper-links a,
.paper-links button {
	border: 0;
	background: none;
	padding: 0;
	font: inherit;
	font-weight: 400;
	color: var(--accent);
	cursor: pointer;
}

.paper-links a:hover,
.paper-links button:hover {
	color: #192231;
}

.paper-links .ico {
	margin-right: .3em;
	opacity: .85;
}


/* Abstracts */

.abs-toggle i {
	margin-left: .35em;
	font-size: .85em;
	transition: transform .2s ease;
}

.abs-toggle[aria-expanded="true"] i {
	transform: rotate(180deg);
}

/* Grouped links ("Other versions", "Media"): open in a panel below, like the abstract */

.grp-toggle .cnt {
	margin-left: .3em;
	font-size: .9em;
	color: #98878F; /* Cloud */
}

.grp-toggle .chev {
	margin-left: .35em;
	font-size: .8em;
	transition: transform .2s ease;
}

.grp-toggle[aria-expanded="true"] .chev {
	transform: rotate(180deg);
}

.paper-panel {
	margin-top: .65em;
}

.paper-panel[hidden] {
	display: none;
}

.subsection .paper-panel .panel-label {
	margin-bottom: .3em;
	font-family: 'Montserrat', sans-serif;
	font-weight: 300;
	font-size: .68rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #49566B;
}

.paper-panel a {
	display: flex;
	align-items: center;
	gap: .55em;
	width: fit-content;
	padding: .18em 0;
	font-size: .9rem;
}

.paper-panel .ico {
	opacity: .85;
}

.subsection .paper-abstract {
	margin-top: .75em;
	font-size: .95rem;
	line-height: 1.65;
	color: #444444;
}

.paper-abstract[hidden] {
	display: none;
}



/* Sidebar */

main aside {
	position: relative;
	margin-bottom: 1.5em;
	width: 20%;
	float: left;
	margin-top: calc(-15vw*0.5 - 2em);
}

main aside img {
	display: block;
	width: 90%;
	max-width: 336px;
	margin-left: auto;
	margin-right: auto;
	border-radius: 50%;
	background-color: #FAFAFA;
	padding: 5%;
}

main aside section {
	width: 100%;
}

main aside ul {
	list-style: none;
}

main aside address {
	font-style: normal;
	font-size: .92rem;
	line-height: 1.65;
	color: #444444;
}

main aside h2 {
	color: #49566B;
	font-size: 120%;
}

.asidesubsection > h2 { /* "Contact", "Quick Links": same style as the section headings */
	margin-bottom: .7em;
	font-size: .78rem;
	font-weight: 300;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #49566B;
}

main aside ul li {
	margin: .25em 0;
	font-size: .9rem;
}

.ql-ico { /* icons take the link colour, like the paper links */
	margin-right: .35em;
	opacity: .85;
}

.asidesubsection {
	margin-bottom: 1.5em;
}

#portraitname {
	margin-bottom: 2.2em;
}

#portraitname ul {
	margin-top: 1em;
	text-align: center;
}

#portraitname ul li {
	display: inline-block;
}

#portraitname h2 {
	margin-bottom: .3em;
	font-size: 1.75rem;
	font-weight: 300;
	letter-spacing: .01em;
	color: #2F3A4E;
	text-align: center;
}

#portraitname h3 { /* role */
	margin-bottom: .35em;
	font-size: .98rem;
	color: #49566B;
	text-align: center;
}

#portraitname h4 { /* institution as a small rose caps label */
	font-size: .68rem;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--accent);
	text-align: center;
}


/* Sticky Sidebar */

.sticky {
	position: fixed;
	top: 6em; /* height of navabr + margin-bottom of header*/
	width: 15%; /*75% * 20%*/
	margin-top: 0;
}


/* Solid navigation */

.solidnav {
	background-color: #192231;
	transition: background-color 0.5s ease;
}


/* Screen size specific settings */

@media screen and (max-width: 1100px) {
	
	main {
		width: 90%;
		margin: 0 auto 10em;
	}
	
	.sticky {
		width: 18%; /*90% * 20%*/
	}
	
}

@media screen and (max-width: 800px) {
	
	main {
		width: 100%;
	}
	
	.subsection, .asidesubsection {
		width: 90%;
		margin: 0% 5% 1.5em 5%;
		float: none;
	}

	.subsection {
		margin-bottom: 2em;
	}
	
	.paper {
		margin: 0 0 0 4px;
	}
	
	main aside {
		width: 100%;
		margin: 0% 0 1.5em 0;
		float: none;
		overflow: hidden;
	}
	
	main aside img {
		display: block;
		width: 70%;
		margin-left: auto;
		margin-right: auto;
	
	}
	
	main aside section {
		width: 100%;
		float: left;
	}
	
	#smallnav {
		display: block;
		float: right;
	}
		
	.topnav {
		display: none;
	}
	
}

@media screen and (max-width: 800px) {
	
	.topnav.responsive {
		display: block;
		float: left;
		width: 100%;
	}
	
	.topnav.responsive li {
		float: none;
		display: block;
		text-align: left;
	}
	
}


/* Print styles */

@media print {
		
	body { 
		font-size: 70%;
	}
	
	main {
		width: 100%;
	}
	
	nav {
		display: none;
	}
	
	nav ul { 
		display: none;
	}
	
	header { 
		display: none;
	}
		
	.sticky {
		position: relative;
		top: 0;
		width: 20%;
	}

}

