/*
* Margarida Cardoso-Moreira's website
* Michkin, 2019
*/

/* Table of contents
––––––––––––––––––––––––––––––––––––––––––––––––––
- elements
- nav-bar
- content
- footer

*/

/* fonts and colours
–––––––––––––––––––––––––––––––––––––––––––––––––– */

:root {
	--fontTitle: 'Poiret One', sans-serif;
	--fontGeneral: 'Open Sans', sans-serif;
	--primaryColorDark: #3A8988;
	--primaryColorLight: #7DB4B442;
	/*--primaryColorDark: #A52200;*/
	--secundaryColor: gray;
	--contrastColor: white;
}

/* elements
–––––––––––––––––––––––––––––––––––––––––––––––––– */

html {
	scroll-behavior: smooth;
}

body {
	font-weight: 300;
	font-family: var(--fontGeneral);
	text-align: justify;
}

main {
	margin: 130px 30px 80px 30px;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--fontTitle);
}

footer,
nav {
	text-align: center;
}

nav {
	background-color: var(--primaryColorDark);
}

a {
	text-decoration: none;
	color: var(--contrastColor);
	display: block;
}

article {
	margin: 40px;
}


/* navbar
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* home link */
#home {
	color: var(--contrastColor);
	position: fixed;
	top: 0px;
	left: 7px;
	opacity: 0.5;
	transition: opacity 1s;
}

#home:hover {
	opacity: 1;
}

.link-icons:hover {
	font-size: 2rem;
}

#contacts {
	display: none;
}

/* main title */
.article-header {
	color: var(--contrastColor);
	font-weight: bolder;
	font-family: var(--fontTitle);
}

#title,
#title-xs-lg {
	font-weight: 800;
	font-size: 5rem;
	white-space: nowrap;
	-webkit-animation: title 2.5s ease-in-out 1 normal forwards;
	-o-animation: title 2.5s ease-in-out 1 normal forwards;
	animation: title 2.5s ease-in-out 1 normal forwards;
}

.lg-screen {
	display: none;
}

.recommended {
	color: var(--primaryColorDark);
	font-weight: 800;
	font-size: 5rem;
	white-space: nowrap;
	-webkit-animation: title 2.5s ease-in-out 1 normal forwards;
	-o-animation: title 2.5s ease-in-out 1 normal forwards;
	animation: title 2.5s ease-in-out 1 normal forwards;
	margin-top: -22px;
	text-align: right;
	padding-right: 95px;
}

@keyframes title {
	0% {transform: translateX(-230px);}
	40% {transform: translateX(80px);}
	70% {transform: translateX(-50px);}
	90% {transform: translateX(10px);}
	100% {transform: translateX(0px);}
}

.name {
	text-align: center;
	white-space: nowrap;
	/*font-weight: bolder;*/
}

/* hamburger button for small devices */
.ham-btn {
	position: relative;
	display: inline-block;
	cursor: pointer;
	top: 6px;
	float: right;
	right: 12px;
	z-index: 10;
}

.bar {
	width: 22px;
	height: 3px;
	background-color: var(--contrastColor);
	margin: 5px 0;
	border-radius: 10px;
}

/* hide btn in larger devices */
@media (min-width: 768px) {
	.rec-books {
		font-size: 4rem !important;
		text-align: left;
		padding-top: 27px;
	}

	.recommended {
		font-size: 7rem !important;
		text-align: left;
		padding-right: 0;
	}
	
	#title {
		font-size: 7rem;
	}

	.xs-screen {
		font-size: 5rem;
	}

	.ham-btn {
		display: none;
	}

	#link-books {
		white-space: normal;
	}

	#link-books > a {
		line-height: 20px;
	}

	#link-contacts {
		display: none;
	}

	#contacts {
		color: var(--contrastColor);
		position: fixed;
		top: 0;
		right: 20px;
		opacity: 0.5;
		transition: opacity 1s;
		display: inline-block;
	}

	#contacts:hover {
		opacity: 1;
	}
}

/* hide btn in larger devices */
@media (min-width: 1100px) {

	#contacts {
		display: none;
	}

	#link-contacts {
		display: inline;
	}

	.xs-screen {
		display: none;
	}

	.lg-screen {
		display: inline-block;
	}

	.rec-books {
		font-size: 4rem !important;
		text-align: center;
		margin-top: -28px;
	}

	.recommended {
		font-size: 7rem !important;
		color: var(--contrastColor);
		/*margin-top: -35px;*/
	}
}

/* nav-bar buttons/behaviour for smaller devices */
.navbar {
	height: 72px;
	position: fixed;
	width: 100%;
	top: 0;
	z-index: 100;
}

.navbar-items {
	/* trigger appearance by clicking menu button */
	display: none;
	margin-top: -12px;
}

.nav-btn {
	display: block;
	padding: 10px;
	width: 100%;
	height: 40px;
	font-size: 1.1em;
	font-family: var(--fontTitle);
	font-variant: small-caps;
	font-weight: 800;
	white-space: nowrap;
	-webkit-transition: all 0.3s ease-in-out; /* Safari */
	transition: all 0.3s ease-in-out;
	color: var(--contrastColor);
	background-color: var(--primaryColorDark);
	margin: 0;
	opacity: 0.85;
}

.nav-btn > a:hover {
	font-size: 1.4em;
}

/* hide drop-menus for cv and research */
ul.drop-menu {
	display: none;
}


/* nav-bar buttons/behaviour for larger devices */
@media (min-width: 768px) {
	.navbar {
		height: 90px;
	}

	.nav-btn {
		display: inline-block;
		background-color: transparent;
	}

	.nav-btn:hover {
		color: var(--contrastColor);
		-ms-transform: translate(0px, -6px); /* IE 9 */
		-webkit-transform: translate(0px, -6px); /* Safari */
		transform: translate(0px, -6px);
	}

	.nav-btn > a {
		height: 50px;
	}

	.nav-btn > a:hover {
		font-size: 1em;
	}

	.navbar-items {
		height: 100%;
		padding-top: 22px;
		margin: 0;
	}

	.flex-container {
		display: flex !important; /* or inline-flex */
		flex-wrap: nowrap;
		justify-content: space-around;
		align-items: flex-end;
	}

	ul.navbar-items.nav-btn {
		float: left;
		width: 150%;
		height: 4rem;
		line-height: 4rem;
		position: relative;
		top: 12px;
		cursor: pointer;
	}

	ul.drop-menu {
		position: fixed;
		/*top: 0;*/
		padding: 7px 0 0 0;
		margin: 0;
		font-family: var(--fontGeneral);
		/*font-variant: normal;*/
		font-weight: 200;
		font-size: 1.7rem;
		white-space: normal;
		min-width: 170px;
	}

	ul.drop-menu li {
		display: none;
		background-color: var(--primaryColorDark);
		margin: 0;
		opacity: 0.85;
		padding: 2px 8px;
		line-height: 3rem;
		border-bottom: 1px solid var(--contrastColor);
	}

	ul.drop-menu li:hover {
		opacity: 0.8;
	}

	li:hover > ul.drop-menu li,
	ul.drop-menu {
		display: block;
	}	
}

/* nav-bar buttons/behaviour for really large devices */
@media (min-width: 1000px) {
	ul.drop-menu li {
		min-width: 143px;
	}
}


/* content
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.welcome {
	color: var(--primaryColorDark);
	font-size: 3rem;
	font-family: var(--fontTitle);
	font-weight: 900;
}

#margarida-picture {
	margin: 0 0 20px 0;
	border-radius: 20px;
	max-width: 100%;
}

/* picture in larger devices */
@media (min-width: 768px) {
	#margarida-picture {
		margin: 0 0 0 23px;
		border-radius: 20px;
		max-width: 40%;
	}
}

.main-article,
.resources,
.links,
.books {
	margin: 0;
}

.left-column {
	color: transparent;
}

.cv {
	margin-bottom: 60px;
}

.cv-item {
	margin: 20px 0;
}

.cv-item-header {
	/*margin-left: 90px;*/
	border-bottom: 1.5px solid var(--primaryColorDark);
	margin-bottom: 0;
	display: inline-block;
	padding-bottom: 4px;
	color: var(--secundaryColor);
	text-align: left;
}

.no-mb {
	margin-bottom: 0;
}

.line-header,
.line-header-books {
	border-bottom: 1px solid var(--primaryColorDark);
	position: -webkit-sticky; /* Safari */
	position: sticky;
	top: 72px;
	background-color: var(--contrastColor);
	z-index: 50;
}

.line-header {
	padding-top: 30px;
}

.line-header-books {
	padding-top: 53px;
}

.line-year {
	border-bottom: 1px solid var(--primaryColorDark);
}

.years-align {
	text-align: center;
	max-width: 60px;
	width: 25%;
}

.info-align {
	width: 85%;
	padding: 0 0 0 15px;
}

@media (max-width: 450px) {
	.info-align{
		width: 95%;
	}
}

.single-line {
	padding: 0px 15px;
}

.legend {
	display: inline;
	float: right;
	font-size: 0.7em;
	background-color: var(--contrastColor);
	margin-top: 1px;
	width: 100%;
	text-align: right;
}

.scroll-padding {
	padding-top: 75px;
}

.position {
	color: var(--primaryColorDark);
	font-variant: small-caps;
	font-weight: 800;
	font-family: var(--fontTitle);
	font-size: 1.1em;
}

.place {
	font-variant: small-caps;
}

.place > strong,
.publication > span > strong {
	font-weight: 500;
}

.extra {
	font-style: italic;
	font-size: 0.8em;
	margin-top: 10px;
}

.advisor {
	font-size: 1em;
}

.google-scholar-link {
	position: fixed;
	top: 80px;
	right: 8px;
	z-index: 60;
}

.google-scholar-link:hover {
	font-weight: 900;
}

.publication > a,
.publication > span  {
	color: var(--primaryColorDark);
}

.publication > a:hover {
	text-decoration: underline;
}

#bg {
	width: 10rem;
}

.publication > a,
.rec {
	display: inline;
}

.research-p {
	margin: 18px;
	text-align: justify;
}

.resource {
	padding: 18px 6px;
}

.resource-link {
	background-color: var(--primaryColorDark);
	text-align: center;
	transition: all 1s;
}

.resource-link:hover {
	background-color: var(--contrastColor);
	color: var(--primaryColorDark);
}

.resource-img {
	border: 2px solid var(--primaryColorDark);
	border-radius: 10px;
	padding: 10px;
}

.interesting-link {
	background-color: var(--primaryColorDark);
	color: var(--contrastColor);
	text-align: center;
	transition: all 1s;
	display: inline-block;
	width: 100%;
}

.interesting-link:hover {
	background-color: var(--contrastColor);
	color: var(--primaryColorDark);
}

.cv span:first-child,
.research span:first-child,
.links span:first-child {
	margin-top: -145px;
	display: block;
}

.resources span:first-child {
	margin-top: -125px;
	display: block;
}

.cv span:first-child,
.research span:first-child,
.links span:first-child {
	padding-bottom: 60px;
}

.resources span:first-child {
	padding-bottom: 75px;
}

.links span:first-child {
	padding-bottom: 104px;
	display: block;
}

.flex-books {
	display: flex !important; /* or inline-flex */
	flex: 0 1 auto;
	flex-wrap: wrap;
	justify-content: space-around;
	align-items: flex-end;
}

.book-img {
	width: 140px;
	height: 200px;
}

.breadcrumb {
	list-style: none;
}

.breadcrumb a {
	display: inline;
	color: var(--primaryColorDark);
	text-decoration: none;
}

.breadcrumb a:hover {
	text-decoration: underline;
}

.contacts {
	padding: 0;
}

.links-contacts {
	margin-top: 30px;
}

.direct-contacts p,
.links-contacts li {
	margin-left: 20px;
}

.links-contacts a {
	color: black;
	text-decoration: underline;
}

.links-contacts a:hover {
	color: var(--primaryColorDark);
}

.goodreads-link,
.book-link,
.google-scholar-link {
	color: var(--primaryColorDark);
	display: inline;
}

.goodreads-link:hover {
	font-weight: 900;
}

/* content behaviour for larger devices */
@media (min-width: 768px) {
	.books-top {
		margin-top: 120px;
	}

	.main-article {
		margin: 0px 40px;
	}

	.line-header {
		top: 86px;
	}

	.cv-item {
		margin: 30px;
	}

	.google-scholar-link {
		top: 100px;
		right: 25px;
	}

	.research-p {
		margin: 38px;
	}

	.resource {
		padding: 2.5rem;
	}

	.cv span:first-child,
	.research span:first-child,
	.resources span:first-child,
	.links span:first-child,
	.books span:first-child {
		margin-top: -125px;
		padding-bottom: 104px;
		display: block;
	}

	.interesting-link {
		width: 30%;
	}

	.contacts {
		padding: 30px;
	}

	.books {
		margin: 40px auto;
	}

	.book-img {
		/*width: 140px;
		height: 200px;*/
		margin: 2px 5px;
	}

	.about-books {
		position: sticky;
		top: 200px;
	}
}

@media (min-width: 950px) {
	.legend {
		font-size: 0.9em;
		padding-top: 24px;
		background-color: transparent;
		margin-top: auto;
		width: auto;
		text-align: right;
	}
}

@media (min-width: 1100px) {
	.about-books {
		top: 170px;
	}
}

/* footer
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.mcm-footer {
	padding: 100px 10px 50px 10px;
	font-family: var(--fontTitle);
	font-size: 1.3em;
}

.mcm-footer-contacts {
	padding: 30px 10px 50px 10px;
	font-family: var(--fontTitle);
	font-size: 1.3em;
}

.socialLinks {
	display: flex;
	flex-direction: row;
	justify-content: center;
	flex-wrap: wrap;
}

.iconSocial {
	height: 30px;
	flex: 0 1 auto;
	height: 30px;
	margin: 11px 11px auto;
	opacity: 0.4;
	transition: opacity 1s;
	border-radius: 10%;
}

.iconSocial:hover {
	opacity: 0.7;
}
