@import url('fonts/lora.css');
@import url('fonts/montserrat.css');
@import url('fonts/lato.css');

/* Reset some default browser styles */
body, h1, h2, h3, p, ul {
    margin: 0;
    padding: 0;
    font-family: Lato;/*Arial, sans-serif;*/
}

/* Body styling */
body {
    padding: 0;
	line-height: 1.6;
    color: #333;
    background-color: #fffff;
    display: flex;
    flex-direction: column;
	flex-wrap: wrap;
    min-height: 100vh;
}

/* protect images */
img {
	pointer-events: none;
}

/* Container to keep content within a fixed width */
.container {
    width: 100%;
    margin: auto;
    overflow: hidden;
}

/* Header styling */
header {
    width: 100%;/*calc(80vw - 340px);*/
	height: 150px;
	background: #f4f4f4;
	background-image: url("img/backdrop.jpg");
	background-repeat: no-repeat;
	background-size: cover;
	background-position-x: center;
	background-position-y: center;
    color: #333;
	font-weight: bold;
    /*border-bottom: 1px solid #ccc;*/
	/*box-shadow: 0px 0px 25px #666;*/
    padding: 20px 0;
    text-align: center;
    position: fixed;
    top: 0;
	transition: 0.4s;
    /*z-index: 1000;*/
}

.header-default {
	height: 150px;
	background-position-y: center;
}

.header-small {
	height: 50px;
	background-position-y: -40px;
}

header .nav-items {
	border: 2px solid #333;
	background-color: rgba(255,255,255,0.2);
	margin-right: 5vw;
}

header h1 {
    margin: 0;
    font-size: 36px;
	font-variant: small-caps;
}

header p {
    font-size: 18px;
	font-variant: small-caps;
    margin: 10px 0;
}

header nav ul {
	font-variant: small-caps;
    list-style: none;
    margin: 0;
    padding: 0;
	display: flex;
	width: 100%;
	justify-content: space-between;
	line-height: 150%;
}

header nav ul li {
    display: inline;
    margin: 0 15px;
}

header nav ul li a {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

header .nav-items a:hover {
	color: #111;
}

.divider {
	width:calc(80vw);
}

/* Main content area styling */
.page-content {
    display: flex;
    flex: 1;
    margin-top: 150px /* To ensure the main content doesn't go under the header */
}

/* Main section styling */
main {
    flex: 1;
    padding: 20px;
    padding-right: calc(10vw + 360px); /* Space for the sidebar */
	margin-left: 10vw;
	height: calc(100vh - 275px);
	/*overflow-y: auto;*/
}

/* About section styling */
.about-container {
    display: flex;
    align-items: top;
    justify-content: center;
    gap: 20px;
}

.interests li {
	list-style: square;
}

.about-rest {
	margin: 5px 60px;
}

.about-image {
	self-align: center;
}

.about-image img {
    width: 200px;
    height: 200px; /* Square image */
    border-radius: 20px; /* Rounded corners */
    object-fit: cover; /* Ensure image remains well-scaled */
}

.about-content {
    flex: 1;
}

/* CV section styling */
.cv-section {
	margin-bottom: 30px;
	overflow-y: auto;
}

.cv-section h3 {
    font-size: 24px;
	font-variant: small-caps;
    color: #333;
    margin-bottom: 15px;
}

.cv-section ul {
    list-style-type: disc;
    padding-left: 40px;
}

.cv-section ul li {
    margin-bottom: 10px;
    font-size: 18px;
    line-height: 1.5;
}
/* Academic Career styling */
.cv-table tr td {
	font-size: 18px;
	lineheight: 1.5;
	color: #333;
	text-align: left;
	vertical-align: top;
}

.cv-table td:first-child {
	width: 175px;
}

.cv-table td {
	padding-bottom: 18px;
}
table, th, td .cv-table {
	border-collapse: collapse;
}
tr.switch {
	border-bottom: 2px solid #f4f4f4;
} 
.cv-title {
	color: #0086b3;
}

.academic-career {
    display: grid;
    grid-template-columns: 150px auto;
    gap: 20px;
    align-items: start;
}

.career-date {
    font-size: 18px;
    line-height: 1.5;
    color: #333;
}

.career-details p {
    font-size: 18px;
    line-height: 1.5;
}

.career-details strong {
    display: block;
    margin-bottom: 5px;
}

/* Publication styling */
.pub {
	text-indent: -3em;
	padding-left: 3em;
}

.paper {
	text-decoration: none;
	color: #1ac6ff;
}

.paper:hover {
	color: #0086b3;
}

.paper-icon {
	height: 16px;
	width: auto;
}

ul li {
	list-style: none;
}

/* Section styling */
.title-border {
	border: 3px solid #333;
	/*background-color: #f1f1f1;*/
	white-space: preserve;
}

.section {
    padding: 30px 0;
    background-color: #fff;
    margin: 20px 0;
    /*border-radius: 8px;*/
    display: none; /* Hide all sections by default */
}

.section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 28px;
	font-variant: small-caps;
    text-align: left;
}

.section p, .section ul {
    font-size: 18px;
    line-height: 1.5;
}

.section ul {
    list-style-type: disc;
    padding-left: 40px;
}

.section ul li {
    margin-bottom: 10px;
}

/* Sidebar styling */
.sidebar {
    width: 300px;
    padding: 20px;
    background: #f4f4f4;
    /*box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);*/
    position: fixed;
    top: 200px; 
    right: 10vw;
    max-height: calc(100vh - 300px); /* Full height minus header and footer height */
    overflow-y: auto;
    /*transition: background-color 0.3s;*/
	transition: 0.4s;
}

.sidebar-adjusted {
		top: 100px;
		width: 300px;
		padding: 20px;
		background: #f4f4f4;
		/*box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);*/
		position: fixed;
		right: 10vw;
		max-height: calc(100vh - 300px); /* Full height minus header and footer height */
		overflow-y: auto;
		/*transition: background-color 0.3s;*/
		transition: 0.4s;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section h3 {
    font-size: 22px;
	font-variant: small-caps;
    color: #333;
    margin-bottom: 15px;
}

.affiliation {
	display: inline-grid;
	grid-template-columns: auto auto;
}

.affiliation-item {
	text-align: left;
	align-self: center;
	font-size: 18px;
	padding: 5px;
}

.sidebar-section ul {
    list-style-type: none;
    padding: 0;
}

.sidebar-section ul li {
    margin-bottom: 10px;
}

.sidebar-section ul li a {
    color: #333;
    text-decoration: none;
    font-size: 18px;
}

.sidebar-section a:hover {
	color: #0086b3;
}

.sidebar-section .socials-list {
    display: flex;
    gap: 10px;
}

.sidebar-section .socials-list li {
    display: flex;
	justify-content: center;
	align-items: center;
	width: 42px;
	height: 42px;
	-webkit-border-radius: 21px;
	-moz-border-radius: 21px;
	border-radius: 21px;
	background: #333;
}

.sidebar-section .socials-list li:hover {
	background-color: #0086b3;
}

.sidebar-section .social-icon img {
	width: 28px;
    height: 28px;
	-webkit-filter: invert(1);
	filter: invert(1);
}

/* Footer styling */
footer {
    background: #333;
    color: #f4f4f4;
	position: fixed;
	bottom: 0;
    text-align: center;
    padding: 10px 0;
    width: 100%;
    /*border-top: 1px solid #ccc;*/
}

footer p {
    margin: 0;
}

.header-mobile {
	display: none;
}
/* Responsive adjustments */
@media (max-height: 700px) {
	header {
		height: 100px;
	}
	.header-default {
		height: 100px;
	}
	.header-small {
		height: 50px;
	}
	
	.sidebar-adjusted {
		top: 100px;
		width: 300px;
		padding: 20px;
		background: #f4f4f4;
		/*box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);*/
		position: fixed;
		right: 10vw;
		max-height: calc(100vh - 300px); /* Full height minus header and footer height */
		overflow-y: auto;
		/*transition: background-color 0.3s;*/
		transition: 0.4s;
	}
	
	.page-content {
		margin-top: 100px;
	}
}
@media (max-width: 1234px) {
    header {
		height: 100px;
	}
	.header-default {
		height: 100px;
		background-position-y: center;
	}
	.header-small {
		height: 50px;
		background-position-y: -20px;
	}
	
	.page-content{
		flex-wrap: wrap;
		margin-top: 100px;
	}
	
	main {
        margin: 0 0 0 5vw;
        padding-right: 5vw;
		height: auto;
    }
	
	h3 {
		margin-top: 5vw;
	}
	
	aside {
		display: inline;
		max-height: auto;
	}
	
	.sidebar {
		display: inline;
		position: static;
        width: 100%;
		padding: 5vw;
		margin: 0;
		overflow: visible;
		max-height: 100vh;
    }
	
	.sidebar-adjusted {
		display: inline;
		position: static;
        width: 100%;
		padding: 5vw;
		margin: 0;
		overflow: visible;
		max-height: 100vh;
    }
	
	footer {
		position: static;
	}
}
@media (max-width: 700px), (hover: none) {
	header {
		height: 50px;
		position: relative;
	}
	.header-default {
		height: 50px;
		background-position-y: center;
	}
	.header-small {
		height: 50px;
		background-position-y: center;
	}
	
	.page-content {
		margin-top: 50px;
	}
	
	.logo-cv {
		display: none;
	}
	
	.nav-items{
		display: none;
	}
	
	.header-mobile {
		display: inline;
		margin: 1vw;		
		padding: 1vw;
		border: 2px solid #333;
	}
	
	.nav-mobile {
		display: flex;
		list-style: none;
		justify-content: space-between;
	}
	
	.nav-mobile a {
		text-decoration: none;
		font-size: 16;
		font-variant: small-caps;
		font-weight: bold;
		color: #333;
	}
	
	.nav-mobile a:hover {
		color: #0086b3;
	}
	
	.section {
		margin: 0;
		padding: 0;
	}
	
	.section ul {
		padding-left: 0;
	}
	
	.about-container {
		display: inline;
	}
	
	.about-content .about-rest {
		margin: 10px;
		padding: 0;
	}
	    .footer {
		display: inline;
		position: static;
	}
	
	.cv-section {
		margin: 0;
		padding: 0;
	}
	
	table .cv-table {
		margin: 0;
		padding: 0;
	}
	
	.cv-table td:first-child {
	width: 100px;
}
}