.panel.profile {
	container: profile / inline-size;
	padding: 0;
	gap: 0;
	font-size: 0.875rem;
}

.profile-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 0.75rem;
	background-color: var(--color-profile-header-background);
	
	.character-wrapper {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		text-align: center;
		gap: 0.5rem;
  		text-transform: lowercase;
		padding-bottom: 2rem;
		isolation: isolate;
		
		.ticon {
			position: relative;
  			top: -1rem;
		}
		
		.character-name {
			font-family: var(--font-secondary);
			font-size: 3.5rem;
			letter-spacing: 0.3em;
			line-height: 1;
			text-shadow: 0.5px 0.5px 0px currentColor;
		}
		
		.character-title {
			color: var(--color-character-title);
			font-size: 0.75rem;
			letter-spacing: 0.3em;
			font-weight: 500;
			text-transform: uppercase;
			line-height: 1;
			transform: translateY(-10px);
			z-index: 10;
			color: var(--color);
		}
	}
	
	.short-facts {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-evenly;
		gap: 0.75rem;
		width: 100%;
		
		.short-fact {
			font-size: 0.75rem;
  			text-transform: uppercase;
  			letter-spacing: 0.15em;
			text-align: center;
		}
	}
}

.profile-content {
	
	padding: 1rem;
	display: grid;
	grid-template-columns: 300px repeat(2, 1fr);
	grid-template-areas: "sidebar mainLeft mainRight";
	gap: 1rem;
	
	.content-sidebar {
		grid-column: sidebar;
		display: flex;
		flex-direction: column;
		gap: 1rem;
		
		.avatar {
			display: flex;
			align-items: center;
			justify-content: center;
			
		}
	}
	
	.content-main {
		display: grid;
		grid-template-columns: subgrid;
		grid-column: mainLeft/mainRight;
		grid-template-rows: min-content repeat(3, 1fr);
		row-gap: 1rem;
		
		&:has(#tab1.active) {
			grid-template-rows: min-content repeat(4, 15.5rem);
		}
		
		.tabs {
			grid-column: mainLeft / mainRight;
			display: flex;
			width: 100%;

			.tab-button {
				flex: 1;
				font-size: 0.75rem;
				letter-spacing: 0.15em;
				text-transform: uppercase;
				padding: 0.5rem;
				border-radius: 0;

				&.active {
					font-weight: 600;
					background-color: var(--color-accent-80);
					border-color: var(--color-accent-80);
				}
			}
		}
		
	}
	

}

@media (width < 992px) {
	.profile-header {
		.character-wrapper .character-name {
			font-size: 3rem;
		}
	}
	
	.profile-content {
		grid-template-columns: 1fr 1fr;
		grid-template-areas: "sidebar sidebar"
							 "mainLeft mainRight";			
	}
}

@container profile (width < 40rem) {
	.profile-header .short-facts {
		flex-direction: column;
	}
	
	.profile-content {
		grid-template-columns: 1fr;
		grid-template-areas: "sidebar"
							 "mainLeft"
							 "mainRight";
	}
	
}

@media (width < 577px) {
	.profile-header {
		.character-wrapper .character-name {
			font-size: 2.5rem;
		}

		.character-wrapper .character-title,
		.short-facts .short-fact {
			font-size: 0.625rem;
		}
	}
}

.character-fact {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;

	.title {
		font-weight: 500;
		text-transform: uppercase;
		color: var(--color-text-accent);
	}
}

.profile-content2 {
	width: 100%;
	display: grid;
    grid-template-columns: 300px auto;
	grid-template-areas: "left right";
	gap: 20px;
	
	.profile-left {
		grid-column: left;
	}
	
	.profile-right {
		grid-column: right;
		display: flex;
		flex-direction: column;
		gap: 20px;
	}
	
	.profile-full {
		grid-column: left / right;
	}
	

	
	.tab-content {
		display: none;
		flex-direction: column;
		gap: 40px;
		
		&#tab3 {
			flex: 1;
			justify-content: space-between;
		}
		
		&.active {
			display: flex;
		}
		
		.profile-fields-grid {
			display: grid;
		    grid-template-columns: repeat(2, 1fr);
			grid-template-areas: "left right";
			gap: 20px;
			
			.field-left {
				grid-column: left;
			}
			
			.field-right {
				grid-column: right;
			}
			
			.double-row {
				grid-row: span 2;
				
				.middlebox {
					max-height: 390px;
				}
			}
			
		}
		
		.profile-fields {
			display: flex;
			flex-direction: column;
			gap: 40px;
		}
	}
	
	.character-actions {
		display: flex;
		align-items: center;
		justify-content: space-around;
		
		.character-action {
			font: 7px 'Quicksand';	
		}
	}
}

.profile-fact-title { /* profiltitel + profiltitelfact */
	color: var(--color-text);
  	font: 500 9px 'Quicksand';
	background-color: var(--color-background-profilefield-title);
	padding: 8px;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 1px;
	white-space: nowrap;
	margin-bottom: 5px;
}

.profile-fact-text { /* profiltextfact + profiltext */
	color: var(--color-text);
	text-align: justify;
	font: 10.5px 'Quicksand';
	letter-spacing: 0.1em;
	padding: 0 10px;
	display: flex;
	justify-content: space-between;
	
	div {
		flex: 1;
	}
}

.smallbox {
	max-height: 8rem;
}

.middlebox {
	max-height: 12rem;
}

.bigbox {
	max-height: 16rem;
}

.smallbox,
.middlebox,
.bigbox {
	padding-right: 0.5rem;
	text-align: justify;
	line-height: 1.35;
	overflow: auto;
	scrollbar-width: thin;
}

.character-scales {
	display: flex;
	flex-direction: column;
	gap: 5px;
	
	.category {
		font: 10px 'Quicksand';
		text-transform: uppercase;
		margin-top: 10px;
		
		&:first-child {
			margin-top: 0;
		}
	}
}
	
.scale-wrapper {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	
	.scale-labels {
		display: flex;
		justify-content: space-between;
		gap: 1rem;
		font-size: 0.675rem;
		text-transform: uppercase;
	}

	.character-scale {
		height: 0.625rem;
		width: 100%;
		background: var(--color-character-scale-background);
		border: 1px solid var(--color-character-scale-border);
		box-sizing: border-box;
		position: relative;

		.character-scale-dot {
			width: 0.75rem;
			height: 0.75rem;
			background: var(--color-character-scale-dot-background);
			border: 1px solid var(--color-character-scale-dot-border);
			box-sizing: border-box;
			position: absolute;
			top: 50%;
			transform: translateY(-50%);
			left: calc(((100% - 10px) / 5) * var(--position));
		}
	}
}

.spacer {
	height: 20px;
}
		
