.member-profile,
.profile-edit-page {
	background: var(--color-paper);
	color: var(--color-ink);
}

.profile-hero {
	background: #101313 url("../images/hero-fantasy-city.png") center 46% / cover;
	color: var(--color-cream);
	isolation: isolate;
	min-height: 31rem;
	position: relative;
}

.profile-hero__shade {
	background:
		linear-gradient(90deg, rgb(5 7 7 / 92%) 0%, rgb(5 7 7 / 64%) 48%, rgb(5 7 7 / 20%) 100%),
		linear-gradient(0deg, rgb(5 7 7 / 86%) 0%, transparent 65%);
	inset: 0;
	position: absolute;
	z-index: -1;
}

.profile-hero__inner {
	align-items: center;
	display: grid;
	gap: clamp(1.5rem, 4vw, 3rem);
	grid-template-columns: clamp(10rem, 20vw, 15.5rem) minmax(0, 1fr) auto;
	min-height: 31rem;
	padding-block: 4rem;
}

.profile-avatar {
	align-items: center;
	background: #252a29;
	border: 4px solid rgb(239 230 214 / 78%);
	border-radius: 50%;
	display: flex;
	font-family: var(--font-display);
	font-size: clamp(2.8rem, 8vw, 5rem);
	height: clamp(10rem, 20vw, 15.5rem);
	justify-content: center;
	overflow: hidden;
	width: clamp(10rem, 20vw, 15.5rem);
}

.profile-avatar img {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.profile-hero__copy {
	max-width: 42rem;
	min-width: 0;
}

.profile-member-label,
.profile-eyebrow {
	color: var(--color-red);
	font-size: 0.66rem;
	font-weight: 800;
	letter-spacing: 0.09em;
	margin: 0 0 0.65rem;
	text-transform: uppercase;
}

.profile-member-label {
	background: rgb(255 255 255 / 10%);
	color: var(--color-cream);
	display: inline-block;
	padding: 0.4rem 0.6rem;
}

.profile-hero h1,
.profile-edit-hero h1,
.profile-not-found h1 {
	font-family: var(--font-display);
	font-weight: 500;
	letter-spacing: -0.03em;
}

.profile-hero h1 {
	font-size: clamp(3.2rem, 6vw, 5.4rem);
	line-height: 0.94;
	margin: 0;
	overflow-wrap: anywhere;
}

.profile-username {
	color: var(--color-red);
	font-size: 0.74rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	margin: 0.8rem 0 1.15rem;
	text-transform: uppercase;
}

.profile-hero__bio {
	font-size: clamp(0.92rem, 1.4vw, 1.05rem);
	line-height: 1.65;
	margin: 0;
	max-width: 38rem;
	overflow-wrap: anywhere;
}

.profile-hero__meta {
	display: flex;
	flex-wrap: wrap;
	font-size: 0.7rem;
	gap: 0.7rem 1.5rem;
	margin-top: 1.7rem;
}

.profile-hero__meta span + span {
	border-left: 1px solid rgb(255 255 255 / 30%);
	padding-left: 1.5rem;
}

.profile-button {
	align-items: center;
	border: 0;
	border-radius: 2px;
	cursor: pointer;
	display: inline-flex;
	font-size: 0.68rem;
	font-weight: 800;
	justify-content: center;
	letter-spacing: 0.04em;
	min-height: 2.9rem;
	padding: 0.8rem 1.2rem;
	text-transform: uppercase;
}

.profile-button--outline {
	border: 1px solid rgb(255 255 255 / 58%);
	color: var(--color-cream);
}

.profile-button--outline:hover,
.profile-button--outline:focus-visible {
	background: var(--color-cream);
	color: var(--color-ink);
}

.profile-button--red {
	background: var(--color-red-dark);
	color: #fff;
}

.profile-button--red:hover,
.profile-button--red:focus-visible {
	background: var(--color-red);
}

.profile-button--quiet {
	border: 1px solid var(--color-line);
	color: var(--color-ink);
}

.profile-body,
.profile-edit-surface {
	background:
		linear-gradient(rgb(247 243 235 / 96%), rgb(247 243 235 / 96%)),
		radial-gradient(circle at 30% 10%, #fff 0, transparent 44%);
}

.profile-overview {
	display: grid;
	grid-template-columns: minmax(16rem, 0.82fr) minmax(0, 1.18fr);
}

.profile-section {
	padding-block: clamp(3rem, 6vw, 5.2rem);
}

.profile-section h2,
.profile-edit-form h2 {
	font-family: var(--font-display);
	font-size: clamp(1.7rem, 3vw, 2.35rem);
	font-weight: 500;
	letter-spacing: -0.02em;
	margin: 0 0 2rem;
	padding-bottom: 0.7rem;
	position: relative;
	text-transform: uppercase;
}

.profile-section h2::after,
.profile-edit-form h2::after {
	background: var(--color-red);
	bottom: 0;
	content: "";
	height: 2px;
	left: 0;
	position: absolute;
	width: 2.6rem;
}

.profile-about {
	border-right: 1px solid var(--color-line);
	padding-right: clamp(2rem, 5vw, 4rem);
}

.profile-activity {
	padding-left: clamp(2rem, 5vw, 4rem);
}

.profile-about__bio {
	font-size: 0.92rem;
	line-height: 1.75;
	margin: 0 0 2.3rem;
	overflow-wrap: anywhere;
}

.profile-details {
	display: grid;
	gap: 1.4rem;
	margin: 0;
}

.profile-details div {
	border-top: 1px solid var(--color-line);
	padding-top: 1rem;
}

.profile-details dt {
	font-size: 0.61rem;
	font-weight: 800;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.profile-details dd {
	font-size: 0.82rem;
	margin: 0.4rem 0 0;
	overflow-wrap: anywhere;
}

.profile-details a {
	color: var(--color-red-dark);
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.profile-empty-state {
	align-items: center;
	border: 1px solid var(--color-line);
	color: var(--color-muted);
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 13rem;
	padding: 2rem;
	text-align: center;
}

.profile-empty-state > span {
	border: 1px solid var(--color-line);
	border-radius: 50%;
	color: var(--color-red);
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	padding: 0.75rem;
}

.profile-empty-state h3 {
	color: var(--color-ink);
	font-family: var(--font-display);
	font-size: 1.2rem;
	margin: 0.9rem 0 0.35rem;
}

.profile-empty-state p {
	font-size: 0.77rem;
	margin: 0;
}

.profile-activity__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.profile-activity__list li {
	border-top: 1px solid var(--color-line);
	display: grid;
	gap: 0.3rem;
	padding: 1rem 0;
}

.profile-activity__list a {
	color: var(--color-red-dark);
	font-weight: 700;
}

.profile-activity__list p,
.profile-activity__list time {
	color: var(--color-muted);
	font-size: 0.72rem;
	margin: 0;
}

.profile-games,
.profile-progression {
	border-top: 1px solid var(--color-line);
}

.profile-section__heading {
	align-items: center;
	display: flex;
	justify-content: space-between;
}

.profile-section__heading > a {
	color: var(--color-red-dark);
	font-size: 0.65rem;
	font-weight: 800;
	text-transform: uppercase;
}

.profile-games__grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

.profile-game-card {
	min-width: 0;
}

.profile-game-card__image {
	align-items: center;
	aspect-ratio: 1 / 1;
	background: var(--color-ink-soft);
	color: var(--color-cream);
	display: flex;
	font-family: var(--font-display);
	font-size: 2.5rem;
	justify-content: center;
	overflow: hidden;
	position: relative;
}

.profile-game-card__image img {
	height: 100%;
	object-fit: cover;
	transition: transform 180ms ease;
	width: 100%;
}

.profile-game-card:hover img {
	transform: scale(1.025);
}

.profile-game-card__main {
	background: var(--color-red);
	bottom: 0;
	color: #fff;
	font-family: var(--font-ui);
	font-size: 0.55rem;
	font-weight: 800;
	left: 0;
	letter-spacing: 0.06em;
	padding: 0.42rem 0.55rem;
	position: absolute;
	text-transform: uppercase;
}

.profile-game-card h3 {
	font-size: 0.76rem;
	line-height: 1.3;
	margin: 0.65rem 0 0;
	overflow-wrap: anywhere;
}

.profile-game-card--add {
	align-items: center;
	border: 1px dashed #b9b0a4;
	color: var(--color-muted);
	display: flex;
	flex-direction: column;
	font-size: 0.65rem;
	font-weight: 800;
	gap: 0.8rem;
	justify-content: center;
	min-height: 10rem;
	text-transform: uppercase;
}

.profile-game-card--add span {
	border: 1px solid var(--color-line);
	border-radius: 50%;
	color: var(--color-ink);
	font-size: 1.8rem;
	height: 3rem;
	line-height: 2.75rem;
	text-align: center;
	width: 3rem;
}

.profile-empty-state--games {
	min-height: 10rem;
}

.profile-empty-state--games .profile-button {
	margin-top: 1rem;
}

.profile-progression {
	background: #151818;
	border-top-color: #353837;
	color: var(--color-cream);
	max-width: none;
	padding-inline: max(var(--page-gutter), calc((100% - var(--page-width)) / 2 + var(--page-gutter)));
}

.profile-progression__heading {
	max-width: 40rem;
}

.profile-progression__heading .profile-eyebrow {
	margin-bottom: 0.45rem;
}

.profile-progression__heading h2 {
	color: var(--color-cream);
	margin-bottom: 1rem;
}

.profile-progression__heading > p:last-child {
	color: #aaa9a3;
	font-size: 0.8rem;
	line-height: 1.65;
	margin: 0 0 2rem;
}

.profile-reputation {
	border-block: 1px solid #3a3d3c;
	display: grid;
	grid-template-columns: minmax(14rem, 0.72fr) minmax(18rem, 1.28fr);
}

.profile-reputation > div {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 13rem;
	min-width: 0;
	padding: clamp(1.5rem, 4vw, 2.7rem);
}

.profile-reputation__score {
	border-right: 1px solid #3a3d3c;
	text-align: center;
}

.profile-reputation__score span,
.profile-reputation__rank > span {
	color: #aaa9a3;
	font-size: 0.62rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.profile-reputation__score strong {
	color: var(--color-cream);
	font-family: var(--font-display);
	font-size: clamp(3rem, 8vw, 7.2rem);
	font-variant-numeric: tabular-nums;
	font-weight: 500;
	letter-spacing: -0.06em;
	line-height: 0.9;
	margin-top: 0.45rem;
	overflow-wrap: anywhere;
}

.profile-reputation__rank strong {
	color: var(--color-cream);
	font-family: var(--font-display);
	font-size: clamp(2rem, 4vw, 3.3rem);
	font-weight: 500;
	line-height: 1;
	margin: 0.45rem 0 1.3rem;
	overflow-wrap: anywhere;
}

.profile-rank-progress {
	background: #303332;
	height: 0.42rem;
	overflow: hidden;
	width: 100%;
}

.profile-rank-progress span {
	background: var(--color-red);
	display: block;
	height: 100%;
}

.profile-reputation__rank p {
	color: #aaa9a3;
	font-size: 0.68rem;
	margin: 0.65rem 0 0;
}

.profile-rank-track {
	display: grid;
	gap: 0;
	grid-template-columns: repeat(8, minmax(0, 1fr));
	margin: 1.2rem 0 3.2rem;
}

.profile-rank-track span {
	border-top: 2px solid #3a3d3c;
	color: #858782;
	font-size: clamp(0.48rem, 0.8vw, 0.58rem);
	font-weight: 800;
	letter-spacing: 0.04em;
	overflow-wrap: anywhere;
	padding: 0.65rem 0.3rem 0;
	position: relative;
	text-align: center;
	text-transform: uppercase;
}

.profile-rank-track span::before {
	background: #4d504e;
	border: 2px solid #151818;
	border-radius: 50%;
	content: "";
	height: 0.7rem;
	left: calc(50% - 0.35rem);
	position: absolute;
	top: -0.42rem;
	width: 0.7rem;
}

.profile-rank-track .is-current {
	border-top-color: var(--color-red);
	color: var(--color-cream);
}

.profile-rank-track .is-current::before {
	background: var(--color-red);
}

.profile-badges > h3 {
	font-family: var(--font-display);
	font-size: clamp(1.8rem, 3vw, 2.4rem);
	font-weight: 500;
	margin: 0 0 1.2rem;
}

.profile-badges__grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-badge {
	align-items: center;
	background: #1d2020;
	border: 1px solid #3a3d3c;
	display: grid;
	gap: 1rem;
	grid-template-columns: 3.6rem minmax(0, 1fr);
	min-width: 0;
	padding: 1.15rem;
}

.profile-badge__symbol {
	align-items: center;
	background: var(--color-red);
	border-radius: 50%;
	color: #fff;
	display: flex;
	font-family: var(--font-display);
	font-size: 1.2rem;
	height: 3.6rem;
	justify-content: center;
	width: 3.6rem;
}

.profile-badge h4 {
	font-family: var(--font-display);
	font-size: 1.05rem;
	font-weight: 600;
	margin: 0 0 0.25rem;
	overflow-wrap: anywhere;
}

.profile-badge p,
.profile-badges__empty {
	color: #aaa9a3;
	font-size: 0.7rem;
	line-height: 1.5;
	margin: 0;
}

.profile-badges__empty {
	border: 1px solid #3a3d3c;
	padding: 1.4rem;
}

.profile-privacy-note {
	color: #858782;
	font-size: 0.67rem;
	margin: 0;
}

.profile-privacy-note {
	margin-top: 1.5rem;
	text-align: center;
}

.profile-not-found {
	min-height: 34rem;
	padding-block: 8rem;
	text-align: center;
}

.profile-not-found h1 {
	font-size: clamp(2.5rem, 6vw, 4rem);
	margin: 0;
}

.profile-not-found p:not(.profile-eyebrow) {
	color: var(--color-muted);
	margin: 1rem 0 1.5rem;
}

.profile-edit-hero {
	background: #111515 url("../images/hero-fantasy-city.png") center 44% / cover;
	color: var(--color-cream);
	isolation: isolate;
	padding-block: clamp(3.5rem, 8vw, 6rem);
	position: relative;
}

.profile-edit-hero::before {
	background: linear-gradient(90deg, rgb(5 7 7 / 94%), rgb(5 7 7 / 42%));
	content: "";
	inset: 0;
	position: absolute;
	z-index: -1;
}

.profile-edit-hero h1 {
	font-size: clamp(2.8rem, 6vw, 4.8rem);
	line-height: 1;
	margin: 0;
}

.profile-edit-hero p:last-child {
	color: #cbc8c0;
	margin: 1rem 0 0;
}

.profile-edit-shell {
	max-width: 58rem;
	padding-block: clamp(3rem, 7vw, 5rem);
}

.profile-notice {
	border: 1px solid var(--color-line);
	font-size: 0.82rem;
	margin-bottom: 1.5rem;
	padding: 1rem 1.15rem;
}

.profile-notice--success {
	background: #e6f0e6;
	border-color: #567c57;
}

.profile-notice--error {
	background: #f8e5e1;
	border-color: #bc493e;
}

.profile-edit-form {
	display: grid;
	gap: 3rem;
}

.profile-edit-form > section {
	background: var(--color-paper);
	border: 1px solid var(--color-line);
	display: grid;
	gap: 1.15rem;
	padding: clamp(1.3rem, 4vw, 2.5rem);
}

.profile-edit-form h2 {
	margin-bottom: 0.5rem;
}

.profile-edit-form label {
	color: #4b4843;
	display: grid;
	font-size: 0.67rem;
	font-weight: 800;
	gap: 0.4rem;
	letter-spacing: 0.025em;
	text-transform: uppercase;
}

.profile-edit-form input[type="text"],
.profile-edit-form input[type="url"],
.profile-edit-form input[type="file"],
.profile-edit-form textarea,
.profile-edit-form select {
	background: #fffdfa;
	border: 1px solid #cfc6bb;
	border-radius: 2px;
	color: var(--color-ink);
	font: inherit;
	font-size: 0.87rem;
	font-weight: 400;
	min-height: 2.9rem;
	padding: 0.7rem 0.8rem;
	text-transform: none;
	width: 100%;
}

.profile-edit-form input:disabled {
	background: #ece7df;
	color: #77736c;
}

.profile-edit-form textarea {
	line-height: 1.55;
	resize: vertical;
}

.profile-edit-form textarea:focus-visible,
.profile-edit-form select:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 3px;
}

.profile-edit-form small,
.profile-form-intro {
	color: var(--color-muted);
	font-size: 0.68rem;
	font-weight: 400;
	line-height: 1.45;
	margin: 0;
	text-transform: none;
}

.profile-form-row {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-avatar-editor {
	align-items: center;
	display: grid;
	gap: 1.4rem;
	grid-template-columns: 7.5rem minmax(0, 1fr);
	margin-bottom: 0.5rem;
}

.profile-avatar--editor {
	border-color: var(--color-line);
	color: var(--color-cream);
	font-size: 2.4rem;
	height: 7.5rem;
	width: 7.5rem;
}

.profile-game-options {
	display: grid;
	gap: 0.65rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-game-options label {
	align-items: center;
	background: #fffdfa;
	border: 1px solid var(--color-line);
	display: flex;
	font-size: 0.75rem;
	gap: 0.65rem;
	min-width: 0;
	padding: 0.8rem;
	text-transform: none;
}

.profile-game-options input {
	accent-color: var(--color-red-dark);
	flex: 0 0 auto;
	height: 1rem;
	width: 1rem;
}

.profile-game-options span {
	overflow-wrap: anywhere;
}

.profile-edit-actions {
	display: flex;
	gap: 0.8rem;
}

@media (max-width: 64rem) {
	.profile-hero__inner {
		grid-template-columns: 11rem minmax(0, 1fr);
	}

	.profile-avatar {
		height: 11rem;
		width: 11rem;
	}

	.profile-hero__edit {
		grid-column: 2;
		justify-self: start;
	}

	.profile-games__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 48rem) {
	.profile-hero__inner {
		align-items: start;
		grid-template-columns: 8.5rem minmax(0, 1fr);
		min-height: 0;
		padding-block: 3rem;
	}

	.profile-avatar {
		height: 8.5rem;
		width: 8.5rem;
	}

	.profile-hero h1 {
		font-size: clamp(2.6rem, 9vw, 4rem);
	}

	.profile-overview {
		grid-template-columns: 1fr;
	}

	.profile-about {
		border-bottom: 1px solid var(--color-line);
		border-right: 0;
		padding-right: 0;
	}

	.profile-activity {
		padding-left: 0;
	}

	.profile-games__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.profile-reputation {
		grid-template-columns: minmax(11rem, 0.65fr) minmax(16rem, 1.35fr);
	}

	.profile-rank-track {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		row-gap: 1.6rem;
	}
}

@media (max-width: 38rem) {
	.profile-hero__inner {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.profile-avatar {
		justify-self: center;
	}

	.profile-hero__copy {
		justify-self: center;
	}

	.profile-hero__bio {
		margin-inline: auto;
	}

	.profile-hero__meta {
		align-items: center;
		flex-direction: column;
	}

	.profile-hero__meta span + span {
		border-left: 0;
		padding-left: 0;
	}

	.profile-hero__edit {
		grid-column: 1;
		justify-self: center;
	}

	.profile-section__heading {
		align-items: flex-start;
		flex-direction: column;
		margin-bottom: 1.5rem;
	}

	.profile-section__heading h2 {
		margin-bottom: 0;
	}

	.profile-games__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.profile-reputation {
		grid-template-columns: 1fr;
	}

	.profile-reputation > div {
		min-height: 10rem;
	}

	.profile-reputation__score {
		border-bottom: 1px solid #3a3d3c;
		border-right: 0;
	}

	.profile-reputation__rank {
		text-align: center;
	}

	.profile-badges__grid {
		grid-template-columns: 1fr;
	}

	.profile-form-row,
	.profile-game-options {
		grid-template-columns: 1fr;
	}

	.profile-avatar-editor {
		grid-template-columns: 1fr;
	}

	.profile-avatar--editor {
		justify-self: center;
	}

	.profile-edit-actions {
		align-items: stretch;
		flex-direction: column;
	}
}
