:root {
	color-scheme: light dark;
}

/* Outer wrapper */
.rw-profile-wrapper {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f5f7fb;
	padding: 2rem 1rem;
	width: 100%;
	box-sizing: border-box;
}

/* Card */
.rw-profile-card {
	position: relative;
	background: #ffffff;
	border-radius: 28px;
	box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
	max-width: 440px;
	width: 100%;
	padding: 0 0 2rem;
	box-sizing: border-box;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #0f172a;
	margin: 0 auto;
	overflow: hidden;
}

/* Banner / top section */
.rw-profile-banner {
	position: relative;
	padding: 1.5rem 1.5rem 3.5rem;
	background: linear-gradient(135deg, var(--rw-brand, #147efb), #000);
	color: #f9fafb;

	/* Center everything inside */
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.rw-profile-banner::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at top right, rgba(255,255,255,0.28), transparent 55%);
	opacity: 0.9;
	pointer-events: none;
}

/* QR block */
.rw-profile-qr {
	position: relative;
	z-index: 1;
	display: flex;
	justify-content: center;
	margin-bottom: 1.25rem;
}

.rw-profile-qr-inner {
	position: relative;
	border-radius: 22px;
	padding: 0.75rem;
	background: rgba(15, 23, 42, 0.45);
}

.rw-profile-qr-inner::before {
	content: "";
	position: absolute;
	inset: -6px;
	border-radius: 26px;
	border: 2px solid rgba(248, 250, 252, 0.6);
	opacity: 0.8;
	animation: rw-qr-pulse 2.4s ease-out infinite;
}

.rw-profile-qr img {
	width: 170px;
	height: 170px;
	border-radius: 18px;
	display: block;
	background: #f9fafb;
}

/* CTA buttons under QR (if used) */
.rw-profile-cta-buttons {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 1.5rem 0;
}

.rw-profile-cta-button {
	display: inline-block;
	text-align: center;
	padding: 0.75rem 1rem;
	border-radius: 999px;
	border: 2px solid black;
	font-weight: 600;
	text-decoration: none;
	background: #ffffff;
	color: #000000;
}

.rw-profile-cta-button:hover {
	border: 2px solid #147efb;
	background: #000000;
	color: #ffffff;
}

@keyframes rw-qr-pulse {
	0% {
		transform: scale(1);
		opacity: 0.9;
	}
	70% {
		transform: scale(1.08);
		opacity: 0;
	}
	100% {
		transform: scale(1.08);
		opacity: 0;
	}
}

/* Header (avatar + name + title + company) */
.rw-profile-header {
	position: relative;
	z-index: 1;

	/* Force centering in all themes */
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	width: 100%;
}

/* Avatar wrapper: center it explicitly */
.rw-profile-avatar {
	margin: 0 auto 0.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.rw-profile-avatar img {
	width: 96px;
	height: 96px;
	border-radius: 999px;
	object-fit: cover;
	border: 3px solid rgba(249, 250, 251, 0.9);
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.45);
	background: #f9fafb;
}

/* Name / title / company */
.rw-profile-name {
	font-size: 1.45rem;
	font-weight: 700;
	margin: 0;
	color: rgba(255, 255, 255, 0.9) !important;
}

.rw-profile-title {
	font-size: 0.9rem;
	color: rgba(226, 232, 240, 0.9);
	margin-top: 0.25rem;
}

.rw-profile-company {
	font-size: 0.85rem;
	color: rgba(226, 232, 240, 0.9);
	margin-top: 0.15rem;
}

/* Body */
.rw-profile-body {
	padding: 2.1rem 1.75rem 0;
}

/* Contact buttons */
.rw-profile-contact {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	margin-bottom: 1.4rem;
}

.rw-profile-contact a {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.55rem 0.75rem;
	border-radius: 12px;
	text-decoration: none;
	color: #0f172a;
	border: 1px solid #e5e7eb;
	background: #f9fafb;
	font-size: 0.9rem;
}

.rw-profile-contact a span.rw-label {
	font-weight: 500;
}

.rw-profile-contact a span.rw-value {
	color: #4b5563;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Base: Call, Email buttons → black text on white */
.rw-profile-contact a.rw-outline-link {
	background: #ffffff;
	color: #000000;
	border-color: #d1d5db;
}

.rw-profile-contact a.rw-outline-link span.rw-label,
.rw-profile-contact a.rw-outline-link span.rw-value {
	color: #000000;
}

/* Website button: white with black text */
.rw-profile-contact a.rw-primary-link {
	background: #ffffff;
	color: #000000;
	border-color: #d1d5db;
}

.rw-profile-contact a.rw-primary-link span.rw-label,
.rw-profile-contact a.rw-primary-link span.rw-value {
	color: #000000;
}

/* SAVE CONTACT → strong blue CTA */
.rw-profile-contact a.rw-save-contact {
	background: #147efb;
	border-color: #147efb;
	color: #ffffff;
}

.rw-profile-contact a.rw-save-contact span.rw-label,
.rw-profile-contact a.rw-save-contact span.rw-value {
	color: #ffffff;
}

/* HOVER STATE */
.rw-profile-contact a.rw-save-contact:hover {
	background: #ffffff;
	border-color: #147efb;
}

/* FORCE TEXT TO BLACK ON HOVER */
.rw-profile-contact a.rw-save-contact:hover,
.rw-profile-contact a.rw-save-contact:hover span.rw-label,
.rw-profile-contact a.rw-save-contact:hover span.rw-value {
	color: #000000;
}


/* Bio */
.rw-profile-bio {
	font-size: 0.9rem;
	color: #4b5563;
	line-height: 1.5;
	margin-bottom: 1.3rem;
}

.rw-profile-bio p {
	margin: 0;
	white-space: pre-line;
}

/* Section titles */
.rw-profile-section-title {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #9ca3af;
	margin-bottom: 0.4rem;
}

/* Socials */
.rw-profile-socials {
	border-top: 1px solid #e5e7eb;
	padding-top: 1rem;
	margin-top: 0.5rem;
}

.rw-profile-social-list {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.rw-profile-social-item a {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	text-decoration: none;
	font-size: 0.9rem;
	color: #111827;
	padding: 0.4rem 0.25rem;
	border-radius: 10px;
	transition: background 0.15s ease, transform 0.1s ease;
}

.rw-profile-social-item a:hover {
	background: #f3f4f6;
	transform: translateY(-1px);
}

.rw-profile-social-icon {
	width: 28px;
	height: 28px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #111827;
}

.rw-profile-social-icon svg {
	width: 14px;
	height: 14px;
	fill: #f9fafb;
}

.rw-profile-social-text {
	display: flex;
	flex-direction: column;
}

.rw-profile-social-label {
	font-size: 0.78rem;
	color: #6b7280;
}

.rw-profile-social-handle {
	font-weight: 500;
}

/* Footer note */
.rw-profile-footer {
	margin-top: 1.6rem;
	font-size: 0.75rem;
	color: #9ca3af;
	text-align: center;
	padding: 0 1.75rem;
}

.rw-profile-footer a {
	color: var(--rw-brand, #147efb);
	text-decoration: none;
}

.rw-profile-footer a:hover {
	text-decoration: underline;
}

/* Responsive tweaks */
@media (min-width: 640px) {
	.rw-profile-card {
		max-width: 480px;
		border-radius: 30px;
	}
	.rw-profile-body {
		padding: 2.25rem 2rem 0;
	}
}

@media (min-width: 1024px) {
	.rw-profile-wrapper {
		padding: 3rem 1rem;
	}
	.rw-profile-card {
		max-width: 540px;
		margin: 0 auto;
	}
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
	.rw-profile-wrapper {
		background: radial-gradient(circle at top, #1f2937, #020617);
	}
	.rw-profile-card {
		background: #020617;
		box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75);
		color: #e5e7eb;
	}
	.rw-profile-body {
		background: #020617;
	}
	.rw-profile-contact a {
		background: #020617;
		border-color: #111827;
		color: #e5e7eb;
	}
	.rw-profile-contact a span.rw-value {
		color: #d1d5db;
	}
	.rw-profile-contact a.rw-primary-link {
		background: #f9fafb;
		border-color: #f9fafb;
		color: #020617;
	}
	.rw-profile-contact a.rw-primary-link span.rw-value {
		color: #111827;
	}
	.rw-profile-contact a.rw-outline-link {
		background: #020617;
		color: #e5e7eb;
		border-color: #111827;
	}
	.rw-profile-contact a.rw-outline-link span.rw-label,
	.rw-profile-contact a.rw-outline-link span.rw-value {
		color: #e5e7eb;
	}
	.rw-profile-bio {
		color: #d1d5db;
	}
	.rw-profile-section-title {
		color: #6b7280;
	}
	.rw-profile-socials {
		border-top-color: #111827;
	}
	.rw-profile-social-item a {
		color: #e5e7eb;
	}
	.rw-profile-social-item a:hover {
		background: #111827;
	}
	.rw-profile-social-label {
		color: #9ca3af;
	}
	.rw-profile-footer {
		color: #6b7280;
	}
}

/* ============================================================
   Portfolio Button — added v3.1.0
   ============================================================ */
.rw-profile-portfolio-wrap {
	margin-top: 8px;
}

.rw-profile-portfolio-btn {
	background: linear-gradient( 135deg, var( --rw-brand, #147efb ) 0%, color-mix( in srgb, var( --rw-brand, #147efb ) 70%, #000 ) 100% ) !important;
	border: none !important;
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.25 );
	position: relative;
	overflow: hidden;
}

.rw-profile-portfolio-btn::before {
	content: '🏠';
	margin-right: 6px;
}

.rw-profile-portfolio-btn:hover {
	opacity: 0.9;
	transform: translateY( -1px );
}
