/* Profile page */
.profile-page {
	display: flex;
	flex-direction: column;
	min-height: 100dvh;
	height: 100dvh;
	overflow: hidden;
}

.profile-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--top-h);
	padding: .5rem clamp(.75rem, 3vw, 2rem);
	background: var(--bg1);
	border-bottom: 1px solid var(--border);
	flex: 0 0 auto;
}

.profile-layout {
	display: flex;
	flex: 1;
	min-height: 0;
	position: relative;
}

.profile-content {
	flex: 1;
	min-width: 0;
	overflow-y: auto;
	background: var(--bg0);
	scrollbar-width: thin;
	scrollbar-color: var(--bg4) transparent;
}

.profile-menu-button {
	border: 0;
}

.profile-layout .nav-sub-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.profile-layout .nav-item,
.profile-layout .nav-section-header {
	text-decoration: none;
}

.profile-layout .nav-section-header {
	margin: 0;
}

.profile-layout .nav-item:focus-visible,
.profile-layout .nav-section-header:focus-visible,
.profile-menu-button:focus-visible {
	outline: 2px solid var(--accent2);
	outline-offset: -2px;
}

.profile-header__brand,
.profile-header__actions,
.profile-avatar-editor,
.profile-form__footer {
	display: flex;
	align-items: center;
}

.profile-header__brand {
	gap: .4rem;
	color: var(--txt);
	font-family: var(--ui);
	font-size: 1rem;
	font-weight: 700;
	text-decoration: none;
}

.profile-header__brand-main em,
.profile-intro h1 em {
	color: var(--accent);
	font-style: normal;
}

.profile-header__brand-sub {
	color: var(--txt3);
	font-family: var(--mono);
	font-size: .625rem;
	font-weight: 500;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.profile-header__actions {
	gap: .5rem;
}

.profile-header__theme {
	min-height: 2rem;
	padding: .25rem .6rem;
	background: var(--bg2);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--txt2);
	font-size: .9rem;
	cursor: pointer;
}

.profile-header__theme:hover {
	background: var(--bg4);
	color: var(--txt);
}

.profile-header__theme:focus-visible,
.profile-button:focus-visible,
.profile-field input:focus-visible {
	outline: 2px solid var(--accent2);
	outline-offset: 2px;
}

.profile-main {
	width: min(100% - 2rem, 54rem);
	margin-inline: auto;
	padding-block: clamp(2rem, 6vw, 4.5rem);
}

.profile-intro {
	margin-bottom: 1.75rem;
}

.profile-intro__eyebrow {
	margin-bottom: .5rem;
	color: var(--accent2);
	font-family: var(--mono);
	font-size: .6875rem;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.profile-intro h1 {
	margin-bottom: .5rem;
	font-family: var(--ui);
	font-size: clamp(1.8rem, 5vw, 2.5rem);
}

.profile-intro > p:last-child,
.profile-card__heading p,
.profile-field__hint {
	color: var(--txt2);
	font-size: .8rem;
	line-height: 1.6;
}

.profile-form {
	display: grid;
	gap: 1rem;
}

.profile-card {
	padding: clamp(1rem, 3vw, 1.5rem);
	background: var(--bg2);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-md);
}

.profile-card__heading {
	margin-bottom: 1.25rem;
}

.profile-card__heading h2 {
	margin-bottom: .25rem;
	font-family: var(--ui);
	font-size: 1.1rem;
}

.profile-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.profile-field {
	display: grid;
	gap: .4rem;
}

.profile-field label {
	color: var(--txt2);
	font-family: var(--mono);
	font-size: .6875rem;
	font-weight: 500;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.profile-field input {
	width: 100%;
	padding: .7rem .75rem;
	background: var(--bg3);
	border: 1px solid var(--border2);
	border-radius: var(--radius-sm);
	color: var(--txt);
	font-family: var(--body);
	font-size: .85rem;
}

.profile-field input[readonly] {
	color: var(--txt3);
	cursor: not-allowed;
}

.profile-field__hint {
	margin-top: .1rem;
	font-size: .7rem;
}

.profile-avatar-editor {
	align-items: flex-end;
	gap: 1rem;
}

.profile-avatar-editor__preview {
	display: grid;
	flex: 0 0 4rem;
	place-items: center;
	width: 4rem;
	height: 4rem;
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
	font-family: var(--ui);
	font-size: 1.1rem;
	font-weight: 700;
	overflow: hidden;
}

.profile-avatar-editor__preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.profile-form__footer {
	justify-content: flex-end;
	gap: 1rem;
	flex-wrap: wrap;
}

.profile-form__status {
	flex: 1 1 12rem;
	color: var(--green);
	font-size: .75rem;
}

.profile-button {
	padding: .7rem 1.1rem;
	background: linear-gradient(135deg, var(--accent), var(--accent2));
	border: 0;
	border-radius: var(--radius-sm);
	color: #fff;
	font-family: var(--ui);
	font-size: .85rem;
	font-weight: 700;
	cursor: pointer;
}

.profile-button:hover {
	box-shadow: var(--shadow-sm);
}

@media (max-width: 700px) {
	.profile-main {
		padding-top: 4.5rem;
	}

	.profile-form__grid {
		grid-template-columns: 1fr;
	}

	.profile-avatar-editor {
		align-items: stretch;
	}
}

@media (prefers-reduced-motion: reduce) {
	.profile-button,
	.profile-header__theme {
		transition-duration: .01ms;
	}
}

/* Notifications page */
.notifications-empty-state {
	display: grid;
	place-items: center;
	min-height: min(24rem, 55dvh);
	padding: clamp(2rem, 8vw, 4rem);
	background: var(--bg2);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-md);
	text-align: center;
}

.notifications-empty-state__icon {
	display: grid;
	place-items: center;
	width: 4rem;
	height: 4rem;
	margin-bottom: 1.25rem;
	background: var(--glow1);
	border: 1px solid var(--border2);
	border-radius: 50%;
	color: var(--accent2);
}

.notifications-empty-state__icon svg {
	width: 1.75rem;
	height: 1.75rem;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.5;
}

.notifications-empty-state h2 {
	margin-bottom: .5rem;
	font-family: var(--ui);
	font-size: 1.35rem;
}

.notifications-empty-state p {
	max-width: 34rem;
	color: var(--txt2);
	font-size: .8rem;
	line-height: 1.6;
}

.notifications-card {
	padding: clamp(1rem, 3vw, 1.5rem);
	background: var(--bg2);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-md);
}

.notifications-toolbar,
.notifications-filters,
.notification-item__actions {
	display: flex;
	align-items: center;
	gap: .5rem;
}

.notifications-toolbar {
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
	flex-wrap: wrap;
}

.notifications-toolbar h2 {
	font-family: var(--ui);
	font-size: 1.1rem;
}

.notifications-filter {
	padding: .45rem .65rem;
	background: var(--bg3);
	color: var(--txt2);
	font-size: .7rem;
}

.notifications-filter--active {
	background: var(--accent);
	color: #fff;
}

.notifications-list {
	display: grid;
	gap: .75rem;
}

.notification-item {
	padding: 1rem;
	background: var(--bg3);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
}

.notification-item--unread {
	border-inline-start: .2rem solid var(--accent);
}

.notification-item__subject {
	margin-bottom: .35rem;
	font-family: var(--ui);
	font-size: 1rem;
}

.notification-item__meta,
.notification-item__body {
	color: var(--txt2);
	font-size: .78rem;
	line-height: 1.6;
}

.notification-item__body {
	margin-block: .6rem 1rem;
	white-space: pre-wrap;
}

.notification-item__button {
	padding: .45rem .65rem;
	background: var(--bg2);
	border: 1px solid var(--border2);
	color: var(--txt2);
	font-size: .68rem;
}

.notification-item__button:hover {
	background: var(--bg4);
	border-color: var(--border3);
	color: var(--txt);
}

.notifications-reply {
	width: min(34rem, calc(100% - 2rem));
	padding: 1.25rem;
	background: var(--bg2);
	border: 1px solid var(--border2);
	border-radius: var(--radius-md);
	color: var(--txt);
}

.notifications-reply::backdrop {
	background: color-mix(in srgb, #000 60%, transparent);
}

.notifications-reply form {
	display: grid;
	gap: .75rem;
}

.notifications-reply textarea {
	min-height: 8rem;
	padding: .7rem;
	background: var(--bg3);
	border: 1px solid var(--border2);
	border-radius: var(--radius-sm);
	color: var(--txt);
	font: inherit;
	resize: vertical;
}

.notifications-error {
	color: var(--red);
	font-size: .75rem;
}

@media (max-width: 700px) {
	.notifications-filters {
		width: 100%;
	}

	.notifications-filter {
		flex: 1;
	}
}
