// Variables
$font-color-dark:    rgba(0, 0, 0, 0.87);
$font-color-neutral: rgba(0, 0, 0, 0.30);
$color-primary: #ffde2a;


// Reset
* {
	font-family: 'PingFang TC', 'Microsoft JhengHei', sans-serif;
}

html {
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
	margin: 0;
	padding: 0;
}

button {
	outline: none;
	cursor: pointer;
}

ol, ul {
	margin: 0;
	padding: 0;
	list-style-type: none;
}


// Styles
.user-profile {
	width: 100%;
	margin: 0;
	padding: 0;
	background-color: #fff;
}

header {
	height: 90vw;
	padding: 18px 32px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: flex-start;
	background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.3) 71%, rgba(0, 0, 0, 0.5)), 
	            url('img/img-profile-pic.jpg') no-repeat;
	background-size: cover;
}

main {
	margin: 0;
	padding: 16px;
}

nav {
	margin: 0;
	padding: 0;
}

.showcase-title {
 	display: none;

 	h1, h2 { 
 		margin: 0;
 		font-size: 39px;
		font-weight: 100;
		color: #fff;
 	}

 	h1 {
 		font-weight: 400;
 	}
}

.name {
	margin: 0;
	font-size: 20px;
	font-weight: 500;
	letter-spacing: 3.5px;
	color: #fff;	
}

.description {
	margin: 0 0 16px 0;
	font-size: 16px;
	font-weight: 300;
	letter-spacing: 0.5px;
	color: rgba(255, 255, 255, 0.87);
}

.tab-list {
	display: flex;
	justify-content: space-between;
}

.tab-item {
	flex: 1;
	padding-bottom: 8px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
	color: rgba(0, 0, 0, 0.56);
	font-size: 12px;
	font-weight: 500;
	text-align: center;
	cursor: pointer;

	strong {
		font-size: 18px;

		&::after {
			content: "\A";
			white-space: pre;
		}
	}
}

.tab-item:hover,
.tab-item--active {
	border-bottom: 4px solid $color-primary;
	color: $font-color-dark;
	font-weight: 500;
}

.content {
	margin-top: 24px;
}

.post-list {
}

.post-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 16px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);

	&:last-of-type {
		border-bottom: none;
	}
}

.post {
	margin: 0 0 8px 0;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	color: $font-color-dark;
}

.post-time {
	margin-bottom: 16px;
	font-size: 12px;
	text-align: center;
	color: $font-color-neutral;

	.date {
		margin-right: 16px;
	}
}

.btn-follow {
	border: 0;
	padding: 12px 40px;
	box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.5);
	border-radius: 22px;
	background-color: $color-primary;
	color: $font-color-dark;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	transition: all .3s ease-out;

	&:hover,
	&.following {
		background-color: #fdcd14;
		color: $font-color-neutral;
		box-shadow: none;
	}
}

.btn-like {
	padding: 6px 30px 6px 60px;
	border-radius: 100px;
	background-color: #fff;
	background-image: url('img/ic-like-normal.svg');
	background-repeat: no-repeat;
	background-position: left 30px top 50%;
	border: solid 2px $color-primary;
	color: rgba(0, 0, 0, 0.3);
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	transition: background-color .3s ease-out;

	&:hover,
	&.liked {
		background-color: $color-primary;
		background-image: url('img/ic-like-active.svg');
	}
}

.hide-text {
	position: absolute; 
	overflow: hidden; 
	clip: rect(0 0 0 0);
}


// Another version of user profile
.user-profile--2 {
	display: none;

	header {
		height: 120vw;
		padding: 50px 0 0;
		justify-content: space-between;
		align-items: center;
		background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5) 85%, rgba(0, 0, 0, 0.7)),
		            url('img/img-cover-photo.jpg') no-repeat;
	}

	nav {
		width: 100%;
	}

	.profile-info {
		display: flex;
		flex-direction: column;
		justify-content: space-around;;
		align-items: center;
	}

	.profile-pic {
		width: 100px;
		height: 100px;
		border-radius: 50%;
		margin-bottom: 20px;
		box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.5);
		order: -1;
	}

	.description {
		color: rgba(255,255,255, 0.70);
	}

	.tab-item {
		position: relative;
		padding-bottom: 28px;
		color: rgba(255,255,255, 0.70);
		border: none;
		letter-spacing: 0.5px;

		&::after {
			content: '';
			position: absolute;
			bottom: 10%;
			left: calc(50% - 3px);
			width: 6px;
			height: 6px;
			border-radius: 50%;
			background-color: $color-primary;
		}
	}

	.tab-item:hover,
	.tab-item--active {
		color: #fff;
		font-weight: 500;

		&::after {
			bottom: 0;
			left: calc(50% - 10px);
			width: 0;
			height: 0;
			border-left: 10px solid transparent;
			border-right: 10px solid transparent;
			border-bottom: 13px solid #fff;
			background-color: transparent;
			border-radius: 0;
		}
	}

	.content {
		margin-top: 0;
	}

	.post {
		color: rgba(0, 0, 0, 0.7);
	}
}

@media screen and (min-width: 640px) {
	body {
		display: flex;
		justify-content: center;
		align-items: center;
		width: 100%;
		height: 100vh;
		padding: 80px;
		background: radial-gradient(circle at 100% 100%, #ff7909, #ff9d0c 28%, #ffbd0e 55%, #ffde2a) no-repeat;
		overflow-y: hidden;
	}

	.showcase-title {
		display: block;
		margin-top: -200px;
		margin-right: 100px;
	}

	.user-profile {
		width: 320px;
		min-width: 320px;
		height: 568px;
		overflow: auto;
		box-shadow: 0 8px 13px 0 rgba(0, 0, 0, 0.2), 
					0 3px 5px 0 rgba(0, 0, 0, 0.1);
	}

	header {
		height: 320px;
	}

	.user-profile--2 {
		display: block;
		margin-right: 60px;

		header {
			height: 392px;
		}
	}
}