@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300..700&display=swap');

:root {
	font-size: 16px;
}

* {
	font-family: Arial, Helvetica, sans-serif;
	box-sizing: border-box;
}

h1, h2 {
	font-family: "Comfortaa", sans-serif; 
	font-optical-sizing: auto;
	margin: 0;
}

a {
	text-decoration: none;
}

img {
	display: block;
}

button {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 1.5rem;
	height: 1.5rem;
	padding: 0;
	border: none;
	background: none;
	cursor: pointer;
}

button > i {
	font-size: 1.5rem;
	color: black;
}

body {
	width: 100%;
	margin: 0 auto;
	background-color: #f0f0f0;
}

nav {
	position: fixed;
	top: 0;
	left: 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	width: 100vw;
	height: 4rem;
	padding: 0 2rem;
	border-bottom: 2px solid #e0e0e0;
	text-wrap: nowrap;
	background: white;
}

nav > div {
	display: flex;
	gap: 1rem;
}

aside {
	position: fixed;
	top: 4rem;
	right: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	width: 40%;
	height: calc(100vh - 4rem);
	padding: 2rem;
}

.user-info {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.user-info > img, .user-suggestion > img, .story > img {
	border-radius: 100rem;
}

.user-suggestions {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.user-suggestions > span {
	color: #606060;
	font-weight: bold;
	text-wrap: nowrap;
}

.user-suggestion {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.user-suggestion > div {
	display: flex;
	flex-direction: column;
	min-width: 12rem;
	width: 12rem;
}

.user-suggestion > div > span:nth-child(1) {
	font-weight: bold;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
}

.user-suggestion > div > span:nth-child(2) {
	color: #606060;
	font-size: 0.875rem;
}

.user-suggestion > a {
	padding-right: 1rem;
	font-size: 0.875rem;
}

main {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	max-width: calc(60% - max(2rem, calc(60% - 40rem)));
	margin: 6rem 0 2rem max(2rem, calc(60% - 40rem));
}

.stories, .card {
	display: flex;
	background-color: #ffffff;
	max-width: 40rem;
	border: 0.125rem solid #e0e0e0;
	border-radius: 0.125rem;
}

.stories {
	align-items: center;
	overflow-x: auto;
}

.story {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	flex: 0 0 6rem;
	padding: 0.5rem 0;
}

.story > img {
	width: 4rem;
	border: 0.25rem solid #e0e0e0;
}

.story > span {
	width: 5rem;
	color: #606060;
	font-size: 0.875rem;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
}

.card {
	flex-direction: column;
}

.card-top {
	display: flex;
	justify-content: space-between;
	margin: 1rem;
}

.card-buttons {
	display: flex;
	gap: 1rem;
	margin: 1rem;
}

.card-buttons > button:last-child {
	margin-left: auto;
}

.card-likes {
	font-weight: bold;
	margin: 0 1rem 1rem 1rem;
}

.card-caption, .card-comments, .card-view-comments {
	font-size: 0.875rem;
	margin: 0 1rem 0.5rem 1rem;
}

.card-comments {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.card-caption-user, .card-comment-user {
	font-weight: bold;
}

.card-date {
	margin: 0 1rem 1rem 1rem;
	text-transform: uppercase;
	font-size: 0.75rem;
	color: #606060
}

.card-bottom {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	border-top: 2px solid #e0e0e0;
}

.card-bottom > input[type=text] {
	flex: 1 1 auto;
	padding: 0.25rem;
	border: none;
	font-size: 0.875rem;
}

.card-bottom > a {
	font-size: 0.875rem;
}

@media screen and (max-width: 1000px) {
	h1 {
		font-size: 1.5rem;
	}

	h2 {
		font-size: 1.25rem;
	}

	aside {
		display: none;
	}

	main {
		align-items: center;
		margin: 6rem auto 2rem auto;
		max-width: min(40rem, 100% - 4rem);
	}

	.stories, .card {
		width: 100%;
	}
}