/* 
 * Author: 景昇
 * Email: uninto@icloud.com
 * Website: https://uninto.com/
 * GItHub: https://github.com/uninto/homePage
 * 请勿删除，感谢
*/

:root {
	--body-color: #ecf0f3;
	--main-color: #fff;
	--shadow-color: #e6e6eb;
	--text-color: #424242;
	--other-color: #eee;
	--icon-color: invert(0%);
}

[dark] {
	--body-color: #343434;
	--main-color: #484848;
	--shadow-color: #303030;
	--text-color: #ccc;
	--other-color: #aaa;
	--icon-color: invert(60%);
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'GenSenRounded';
	transition: background-color 0.8s ease, box-shadow 0.8s ease, border 0.8s ease;
	-webkit-tap-highlight-color: transparent;
}

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

li {
	list-style: none;
}

body {
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	background-color: var(--body-color);
}

nav {
	width: 350px;
	height: 50px;
	max-width: 85%;
	background-color: var(--main-color);
	margin-bottom: 15px;
	box-shadow: 1px 1px 1px 1px var(--shadow-color);
	display: flex;
	justify-content: space-evenly;
	align-items: center;
	border-radius: 8px;
}

nav span {
	font-size: large;
	transition: all 0.3s ease;
	cursor: pointer;
}

nav img {
	filter: var(--icon-color);
}

.active {
	color: #2ecc71;
}

main {
	width: 350px;
	height: 440px;
	max-width: 85%;
	position: relative;
	background-color: var(--main-color);
	box-shadow: 1px 1px 1px 1px var(--shadow-color);
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	display: flex;
	overflow: auto;
	border-radius: 8px;
}

main::-webkit-scrollbar,
#aboutMe::-webkit-scrollbar,
#site::-webkit-scrollbar {
	display: none;
}

section {
	width: 100%;
	padding: 15px;
	display: flex;
	flex-shrink: 0;
	flex-direction: column;
	align-items: center;
	scroll-snap-align: center;
	scroll-snap-stop: always;
}

#image {
	width: 100%;
	height: 50%;
	object-fit: cover;
	border-radius: 8px;
}

#avatar {
	width: 90px;
	border-radius: 50%;
	position: absolute;
	top: 40%;
}

#info {
	width: 100%;
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 10px;
	color: var(--text-color);
}

#icon {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

#icon img {
	width: 30px;
	filter: var(--icon-color);
}

.item {
	width: 100%;
	height: 100%;
	padding: 10px;
	box-shadow: inset 0 0 2px 3px var(--shadow-color);
	color: var(--text-color);
	border-radius: 8px;
	line-height: 1.3;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

#aboutMe {
	height: 220px;
	overflow-y: scroll;
}

#project {
	height: auto;
	flex-direction: row;
	align-items: center;
	margin-top: 15px;
}

#project div {
	display: flex;
	gap: 10px;
	line-height: 1;
}

#project img {
	height: 25px;
	filter: var(--icon-color);
}

#line {
	height: 100%;
	padding-left: 10px;
	scroll-snap-type: y mandatory;
	overflow-y: scroll;
}

#line::-webkit-scrollbar {
	width: 5px;
}

#line::-webkit-scrollbar-track {
	border-radius: 8px;
	background-color: var(--body-color);
}

#line::-webkit-scrollbar-thumb {
	border-radius: 8px;
	background-color: #ccc;
}

#line li {
	position: relative;
	padding: 15px 0px 0px 15px;
	border-left: 3px solid var(--other-color);
	scroll-snap-align: end;
	color: #aaa;
}

#line li:first-child {
	color: #2ecc71;
	font-weight: bolder;
}

.focus {
	width: 15px;
	height: 15px;
	border-radius: 22px;
	background-color: var(--other-color);
	border: 3px solid var(--main-color);
	position: absolute;
	left: -9px;
	top: 50%;
}

#line li:first-child .focus {
	background-color: #2ecc71;
	animation: focus 1.8s ease infinite;
}

#site {
	width: 100%;
	overflow: auto;
}

#site li {
	height: 60px;
	cursor: pointer;
	margin-bottom: 15px;
	border: 2px solid var(--other-color);
	overflow: hidden;
	border-radius: 8px;
}

#site li:last-child {
	margin-bottom: 0;
}

#site div {
	display: flex;
	justify-content: space-between;
}

#site a {
	display: block;
	padding: 10px;
	line-height: 40px;
	transition: line-height 0.2s ease-in;
}

#site a:hover {
	line-height: 20px;
}

footer {
	width: 100%;
	padding: 10px;
	background-color: var(--main-color);
	box-shadow: -1px -1px 1px var(--shadow-color);
	font-size: 13px;
	position: fixed;
	bottom: 0px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

@font-face {
	font-family: 'GenSenRounded';
	src: url('GenSenRounded-R.woff2');
}

@keyframes focus {
	0% {
		box-shadow: 0px 0px 0px 0px;
	}

	50% {
		box-shadow: 0px 0px 0px 3px #9ef9a1;
	}

	100% {
		box-shadow: 0px 0px 0px 0px;
	}
}
