@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300&family=Noto+Serif+SC&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lora&display=swap');

/*************************
 	global configuration
 *************************/
:root {
	--mobile-device-width: 960px;
	--content-width: 60vw;
	--border-light-gray: #ddd;
	--text-light-gray: #9e9e9e;
	--main-text-color: black;
	--main-background-color: #FBF9F3;
}

* {
	-webkit-transition: all .3s, font-size 0s, font-weight 0s;
	-moz-transform: all .3s, font-size 0s, font-weight 0s;
	-o-transform: all .3s, font-size 0s, font-weight 0s;
	transition: all .3s ease, font-size 0s, font-weight 0s;
	box-sizing: border-box;
	background-color: var(--main-background-color);
}

body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: max(var(--content-width), var(--mobile-device-width));
	padding: 0;
	margin: auto;
	line-height: 1.9;
	font-family: 'Lora','Noto Serif SC', 'Noto Serif CJK SC', 'Merriweather', 'Songti SC', serif;
	font-size: 1.1em;
	/* background-color: #FBF9F3; */
}

code {
	font-family: 'Lora','Noto Serif SC', 'Noto Serif CJK SC', 'Merriweather', 'Songti SC', serif;
}

/* Code */

pre,
code {
	font-size: .9em;
}

pre code {
	display: block;
	border: 1px solid #ddd;
	box-shadow: 5px 5px 5px #eee;
	padding: 1em;
	overflow-x: auto;
	line-height: 1.75;
}

code {
	background: #f9f9f9;
}

pre code {
	background: none;
}

pre .nohighlight {
	background-color: transparent;
}

pre:hover {
	white-space: pre-wrap;
	word-break: break-all;
}

.hljs-comment {
	font-style: inherit;
}

.hljs {
	padding: 1em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	text-align: center;
}

h1 {
	font-size: 32px;
	font-weight: normal;
  }
  
  h2 {
	font-size: 22px;
	font-weight: bold;
  }
  
  h3, h4, h5, h6 {
	font-size: 19px;
	font-weight: bold;
	text-align: left;
  }

a {
	color: black;
	text-decoration: none;
	padding-bottom: 2px;
	border-bottom: none;
}

a:hover {
	border-bottom: 2px solid var(--text-light-gray);
}

/* resize image size when viewport change */
img {
	max-width: 100%;
	border-radius: 15px;
	margin: 5px auto;
	display: block;
	/* width: 50%; */
}


/*******************************
	masthead configuration
*******************************/
.masthead {
	position: sticky;
	top: 0;
	height: 200px;
	width: inherit;
	max-width: var(--mobile-device-width);
	padding: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	border-bottom: 2px solid var(--border-light-gray);
	z-index: 1;
}

/* round website logo */
#masthead>h1>a>img {
	border-radius: 50%;
	filter: grayscale(10%);
}

/* make some space between top */
#masthead>h1 {
	margin: 10px 0;
	height: 100px;
}

/* hide masthead when scroll down */
.masthead.hide {
	top: -200px;
}

/* show masthead when hover */
.masthead:hover {
	top: 0;
}

/* configure menu items */
nav>ul {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 30px;
}

nav>ul li {
	display: inline;
}

/* set default direction for menu items */
.masthead .menu {
	direction: ltr;
	font-weight: bold;
}

.menu ul {
	padding-left: 0;
}


/************************
main content configuration
*************************/
.main {
	padding: 0;
	height: inherit;
	hyphens: auto;
	margin: 0;
	/* width: inherit; */
	max-width: 800px;
	min-height: calc(100vh - 20%);
	border: none;
}

.main a {
	border-bottom: 2px solid var(--text-light-gray);
}

/* remove border of post item,copyright and nav item */
.post-item a,
.tag-cloud-item a,
.anchor a,
.tag-item {
	border-bottom: none;
}

.post-item a:hover {
	border-bottom: 2px solid var(--text-light-gray);
}






/* post items configuration */
.main ul {
	padding-left: 3em;
}

.featured-list,
.post-list,
.terms {
	list-style: none;
	/* margin-left: 30%; */
	margin: auto;
	/* display: flex;
	flex-direction: column;
	justify-content: center; */
}

.featured ul,
.post ul {
	padding-left: 0%;
}

.date {
	padding-right: 10px;
	color: var(--text-light-gray);
}


/* add space to top and bottom for title */
.main .title h1 {
	margin: 20px 0;
}



/*-----------------------------------------
    			footer  
 -----------------------------------------*/

/* beautify article divider line */
.article-end {
	text-align: center;
	font-style: italic;
	font-family: 'Merriweather';
	margin: 40px 0;
	transition: initial;
}

.article-divider {
	display: inline-block;
	border-top: 2px solid var(--border-light-gray);
	width: calc(max(var(--content-width), var(--mobile-device-width))/2 - 4ch);
	max-width: calc(var(--mobile-device-width)/2 - 4ch);
	vertical-align: 5px;
}

footer {
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 60vw;
	/* margin: 10px 40px; */
	/* width: max(var(--content-width), var(--mobile-device-width)); */
	/* align-items: center; */
}

.post-nav {
	display: flex;
	justify-content: space-around;
	font-weight: bold;
	flex-wrap: wrap;
}

.copyright {
	text-align: center;
	margin: 40px 0;
}

/* add beautiful blockquote */
blockquote {
	margin: 1em auto;
	padding: 0 2em;
	border-left: 5px solid var(--text-light-gray);
	font-style: italic;
}

blockquote::before {
	content: open-quote;
	color: var(--text-light-gray);
	font-size: 5rem;
	display: block;
	margin-bottom: -10%;
}

blockquote::after {
	display: block;
	content: close-quote;
	color: var(--text-light-gray);
	/* height: 5vh; */
	font-size: 5rem;
	margin-left: 95%;
	margin-top: -10%
}

blockquote p {
	text-align: center;
}


/* tag cloud and tag item of page */
#tag-wrapper {
	width: 100%;
	height: 400px;
	position: relative;
	background-color: var(--main-background-color) !important;
}

#tag-wrapper>span {
	font-size: 40px;
	font-family: 'Merriweather';
}


.post-meta {
	font-size: 1.2rem;
	color: var(--text-light-gray);
}

.post-meta > span {
	margin: auto 1px;
}

div.post-meta {
	display: flex;
	flex-direction: row;
	justify-content: center;
	flex-wrap: wrap;
}

.post-meta a {
	display: inline-block;
	margin-left: 4px;
    padding: 2px 6px;
    text-decoration: none;
	color: var(--text-light-gray);
	border: none;	
	font-style: italic;
}

.post-meta a span {
	border-bottom: 2px solid var(--border-light-gray);
}

.post-meta a span::before {
	content: '#';
	font-style: italic;
}

header>h3>a>span {
	font-size: .8em;
	font-weight: lighter;
}

/*------------------------------------------------------------------------
	set indent for paragraphs, but exclude paragraphs inside list items.
-------------------------------------------------------------------------*/
p {
	text-indent: 2em;
	color: var(--main-text-color);
}

/* remove text indent for paragraphs under li element */
li>p {
	text-indent: 0;
}


@media screen and (max-width: 960px) {
	body {
		width: auto;
	}

	.masthead {
		margin: 20px 0 0 0;
		width: 100%;
		height: 10%;
	}

	.masthead.hide {
		top: -200px;
	}

	.masthead .menu {
		margin: 0;
	}

	nav>ul {
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: flex-start;
		flex-wrap: wrap;
		gap: 10px;
	}

	nav>ul li {
		display: inline;
	}


	.masthead .menu li {
		border-bottom: none;
	}

	.masthead .menu li:first-child {
		border-top: none;
	}

	.masthead .menu a {
		padding: 0;
	}

	.featured-list,
	.post-list,
	.terms {
		list-style: none;
		margin: auto;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}

	.main {
		/* width: 100%; */
		margin: 0 3%;
	}

	.article-divider {
		display: inline-block;
		border-top: 2px solid var(--border-light-gray);
		width: 40vw;
		vertical-align: 5px;
	}

	footer {
		width: 90%;
	}

}


@media screen and (max-width: 480px) {
	.article-divider {
		display: inline-block;
		border-top: 2px solid var(--border-light-gray);
		width: 20%;
		max-width: 100px;
		vertical-align: 5px;
	}

	.featured-list,
	.post-list,
	.terms {
		display: flex;
		flex-direction: column;
		justify-content: center;
		margin: auto;
	}

	.main ul {
		padding-left: 2em;
	}

	.post ul,
	.featured ul {
		padding-left: 0;
	}

	.hide {
		top: -260px !important;
	}

	.article-divider {
		display: inline-block;
		border-top: 2px solid var(--border-light-gray);
		width: 20vw;
		vertical-align: 5px;
	}
}
