@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

*,
*::before,
*::after {
	box-sizing: border-box;
}
* {
	margin: 0;
}
body {
	line-height: 1.5;
	height: 100vh;
	-webkit-font-smoothing: antialiased;
	font-family: 'Space Mono', monospace;
	font-size: 13px;
	display: grid;
	justify-items: center;
	align-items: center;
}

img,
picture,
svg {
	display: block;
	max-width: 100%;
}
input,
button {
	font: inherit;
}
p,
h1,
h2,
h3 {
	overflow-wrap: break-word;
}

/* Screen Reader heading */
.main__heading--sr {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.main {
	width: 22rem;
}

.header {
	font-size: 1.2rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.2rem 0;
}

.header__toggle {
	display: flex;
	justify-content: flex-end;
	align-items: center;
}

.header__toggle:hover {
	cursor: pointer;
}

.header__toggle img {
	margin-left: 1rem;
}

.header__toggle--dark {
	display: none;
}

.main__search {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem;
	border-radius: 0.8rem;
	margin-bottom: 2rem;
}

.main__search--div {
	display: flex;
}

.main__search input,
.main__search input:focus {
	outline: none;
	border: none;
	font-size: 1rem;
}

.search__submitBtn {
	border: none;
	padding: 0.7rem;
	border-radius: 0.5rem;
	font-size: 1rem;
}

.search__submitBtn:hover {
	cursor: pointer;
}

.search__icon {
	height: 2rem;
	margin-right: 1rem;
}

.error__para {
	padding: 1em;
	text-align: center;
	font-weight: 700;
}

.user__details {
	padding: 2rem;
	border-radius: 0.8rem;
}

.profile {
	display: grid;
	grid-template-columns: 40% 60%;
	grid-template-rows: 1fr 0.5fr;
	gap: 1rem;
	grid-template-areas:
		'avatar profile-header'
		'bio bio';
}

.profile__avatar {
	width: 6.5rem;
	height: 6.5rem;
	border-radius: 50%;
	margin-right: 2rem;
	grid-area: avatar;
}

.profile__details {
	grid-area: profile-header;
}

.profile__details--name {
	font-size: 1.2rem;
	font-weight: bold;
}

.profile__details--login {
	font-size: 1.2rem;
	font-weight: 400;
	padding-bottom: 1rem;
}

.profile__details--date {
	font-size: 0.9rem;
}

.profile__bio {
	line-height: 1.6rem;
	grid-area: bio;
}

.profile__stats {
	display: flex;
	justify-content: space-between;
	align-items: center;

	padding: 1.5rem;
	border-radius: 1rem;
	margin: 0.5rem 0 1rem;
}

.profile__div {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.2rem;
}

.profile__stats > div {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
}

.stats__span--bold {
	font-weight: 700;
	font-size: 1.2rem;
}

.profile__info {
	display: flex;
	font-size: 1rem;
}

.profile__info img {
	margin-right: 1rem;
	height: 1.5rem;
}

/* Tablet Design */
@media screen and (min-width: 768px) {
	/* body {
		background-color: red;
	} */

	.main {
		width: 44rem;
	}

	.search__icon {
		margin-right: 1rem;
	}

	.profile {
		position: relative;
	}

	.profile__header {
		position: absolute;
		left: 25%;
	}

	.profile__div {
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
			'location twitter'
			'link company';
	}

	.profile__info--location {
		grid-area: location;
	}

	.profile__info--twitter {
		grid-area: twitter;
	}

	.profile__info--link {
		grid-area: link;
	}

	.profile__info--company {
		grid-area: company;
	}
}

@media screen and (min-width: 1280px) {
	.main {
		width: 50rem;
	}

	.header__toggle {
		justify-content: space-around;
		width: 15%;
	}

	.profile {
		position: relative;
		display: flex;
		flex-wrap: wrap;
		padding-left: 10rem;
	}

	.profile__avatar {
		position: absolute;
		left: 0;
	}

	.profile__header {
		display: flex;
		flex-direction: column;
		/* border: 2px solid red; */
	}

	.profile__details--dateShow {
		display: none;
	}

	.profile__details--dateHidden {
		display: block;
		position: absolute;
		right: 0;
	}

	.profile__bio {
		margin-top: 15%;
		margin-bottom: 5%;
	}

	.profile__div,
	.profile__stats {
		margin-left: 10rem;
	}

	.profile__stats {
		padding: 1rem;
		margin-bottom: 2rem;
		justify-content: space-around;
	}

	.main__search {
		padding: 1rem;
	}
}
