/* ============================================
   BIO HUB — public bio page
   Editorial / refined aesthetic
   ============================================ */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body.bh-body {
	background-color: var(--bh-bg);
	color: var(--bh-fg);
	font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
	min-height: 100vh;
	font-feature-settings: "ss01" on, "cv11" on;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	position: relative;
	overflow-x: hidden;
}

/* Subtle film-grain texture for warmth */
.bh-grain {
	position: fixed;
	inset: 0;
	pointer-events: none;
	opacity: .08;
	z-index: 1;
	background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
	mix-blend-mode: overlay;
}

.bh-wrap {
	position: relative;
	z-index: 2;
	max-width: 520px;
	margin: 0 auto;
	padding: 48px 24px 32px;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* ---------- HEADER ---------- */

.bh-header {
	text-align: center;
	margin-bottom: 32px;
}

.bh-meta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-family: 'IBM Plex Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.12em;
	color: var(--bh-fg-soft);
	margin-bottom: 32px;
	text-transform: uppercase;
	animation: bh-fade-down 0.6s ease both;
}
.bh-meta-line { position: relative; }
.bh-meta-line::before, .bh-meta-line::after {
	content: '';
	position: absolute;
	top: 50%;
	width: 24px;
	height: 1px;
	background: var(--bh-fg-line);
}
.bh-meta-line:first-child::before { right: calc(100% + 8px); }
.bh-meta-line:last-child::after { left: calc(100% + 8px); }
.bh-meta-dot {
	color: var(--bh-accent);
	font-size: 8px;
	animation: bh-pulse 2s ease-in-out infinite;
}

.bh-avatar-wrap {
	position: relative;
	width: 112px;
	height: 112px;
	margin: 0 auto 20px;
	animation: bh-fade-down 0.7s ease 0.05s both;
}
.bh-avatar {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	position: relative;
	z-index: 2;
	border: 3px solid var(--bh-bg);
}
.bh-avatar-ring {
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	background: conic-gradient(from 180deg, var(--bh-accent), transparent 30%, var(--bh-accent) 70%, transparent);
	z-index: 1;
	animation: bh-spin 8s linear infinite;
}
.bh-avatar-wrap::after {
	content: '';
	position: absolute;
	inset: -2px;
	border-radius: 50%;
	background: var(--bh-bg);
	z-index: 1;
}
.bh-avatar-wrap .bh-avatar { z-index: 2; }

.bh-name {
	font-family: 'Fraunces', Georgia, serif;
	font-weight: 800;
	font-size: clamp(28px, 6vw, 38px);
	line-height: 1.1;
	margin: 0 0 4px;
	letter-spacing: -0.02em;
	font-variation-settings: "opsz" 144;
	animation: bh-fade-down 0.7s ease 0.1s both;
}

.bh-verified {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	background: var(--bh-accent);
	color: var(--bh-bg);
	border-radius: 50%;
	font-size: 13px;
	font-weight: bold;
	margin-left: 6px;
	vertical-align: middle;
	font-family: 'DM Sans', sans-serif;
}

.bh-handle {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 13px;
	color: var(--bh-fg-soft);
	margin: 0 0 16px;
	letter-spacing: 0.02em;
	animation: bh-fade-down 0.7s ease 0.15s both;
}

.bh-bio {
	font-size: 15px;
	color: var(--bh-fg-soft);
	max-width: 360px;
	margin: 0 auto;
	line-height: 1.55;
	animation: bh-fade-down 0.7s ease 0.2s both;
}

/* ---------- SOCIALS ---------- */

.bh-socials {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 36px;
	animation: bh-fade-down 0.7s ease 0.25s both;
}
.bh-social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	color: var(--bh-fg);
	text-decoration: none;
	border-radius: 50%;
	background: var(--bh-fg-faint);
	transition: transform .2s ease, background .2s ease, color .2s ease;
}
.bh-social svg {
	width: 18px;
	height: 18px;
}
.bh-social:hover {
	transform: translateY(-2px);
	background: var(--bh-accent);
	color: var(--bh-bg);
}

/* ---------- LINKS ---------- */

.bh-links {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 40px;
}

.bh-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 20px;
	text-decoration: none;
	color: var(--bh-fg);
	border-radius: var(--bh-radius);
	font-weight: 500;
	font-size: 15px;
	position: relative;
	transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease, background .25s ease;
	animation: bh-fade-up 0.6s ease var(--bh-delay, 0s) both;
	overflow: hidden;
	/* iOS: explicitly enable the native long-press context menu */
	-webkit-touch-callout: default;
	-webkit-user-select: none;
	user-select: none;
	/* Prevent iOS from showing the highlight rectangle on tap */
	-webkit-tap-highlight-color: transparent;
}

.bh-link-icon {
	font-size: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
}
.bh-link-label {
	flex: 1;
	text-align: center;
	letter-spacing: 0.01em;
}
.bh-link-arrow {
	font-family: 'Fraunces', serif;
	opacity: 0;
	transform: translateX(-6px);
	transition: all .25s ease;
	font-size: 18px;
}
.bh-link:hover .bh-link-arrow {
	opacity: 1;
	transform: translateX(0);
}

/* Button styles */

.bh-style-solid .bh-link {
	background: var(--bh-accent);
	color: var(--bh-bg);
}
.bh-style-solid .bh-link:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px -8px var(--bh-accent);
}

.bh-style-outline .bh-link {
	background: transparent;
	border: 1.5px solid var(--bh-fg-line);
}
.bh-style-outline .bh-link:hover {
	border-color: var(--bh-accent);
	transform: translateY(-2px);
}
.bh-style-outline .bh-link::before {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--bh-accent);
	opacity: 0;
	transition: opacity .25s ease;
	z-index: -1;
}
.bh-style-outline .bh-link:hover::before { opacity: 0.06; }

.bh-style-glass .bh-link {
	background: var(--bh-fg-faint);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid var(--bh-fg-line);
}
.bh-style-glass .bh-link:hover {
	background: var(--bh-fg-line);
	transform: translateY(-2px);
}

.bh-style-shadow .bh-link {
	background: var(--bh-fg);
	color: var(--bh-bg);
	box-shadow: 0 4px 14px -4px rgba(0,0,0,.25);
}
.bh-style-shadow .bh-link:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px -6px rgba(0,0,0,.35);
}

/* ---------- FOOTER ---------- */

.bh-footer {
	margin-top: auto;
	text-align: center;
	padding-top: 32px;
	animation: bh-fade-up 0.6s ease 0.6s both;
}
.bh-footer-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: 'IBM Plex Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.12em;
	color: var(--bh-fg-soft);
	text-decoration: none;
	text-transform: uppercase;
	padding: 8px 14px;
	border: 1px solid var(--bh-fg-line);
	border-radius: 999px;
	transition: all .2s ease;
}
.bh-footer-link:hover {
	border-color: var(--bh-accent);
	color: var(--bh-accent);
}
.bh-footer-mark {
	color: var(--bh-accent);
}

/* ---------- ANIMATIONS ---------- */

@keyframes bh-fade-down {
	from { opacity: 0; transform: translateY(-8px); }
	to   { opacity: 1; transform: translateY(0); }
}
@keyframes bh-fade-up {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: translateY(0); }
}
@keyframes bh-pulse {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.3; }
}
@keyframes bh-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.001s !important;
		transition-duration: 0.001s !important;
	}
}

/* Small phones */
@media (max-width: 380px) {
	.bh-wrap { padding: 32px 18px 24px; }
	.bh-avatar-wrap { width: 96px; height: 96px; }
}

/* ============================================
   IN-APP BROWSER HINTS & POPUP (v1.2.7)
   ============================================ */

/* Per-button hint shown under each link when in-app browser detected.
   Hidden by default; JS adds .bh-show-hints to body when an in-app browser
   is detected client-side. This way detection works even on cached pages. */
.bh-link-hint {
	display: none;
	font-family: 'IBM Plex Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--bh-fg-soft);
	text-align: center;
	margin-top: -4px;
	margin-bottom: 4px;
	align-items: center;
	justify-content: center;
	gap: 5px;
	opacity: 0.7;
}
body.bh-show-hints .bh-link-hint { display: flex; }
.bh-hint-icon {
	color: var(--bh-accent);
	font-size: 12px;
	transform: rotate(180deg);
	display: inline-block;
}

/* Popup modal shown after a tap inside an in-app browser */
.bh-popup {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: flex-end; /* mobile-first: slide up from bottom */
	justify-content: center;
	pointer-events: none;
}
.bh-popup[hidden] { display: none; }
.bh-popup-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 0.25s ease;
	pointer-events: auto;
}
.bh-popup.open .bh-popup-backdrop { opacity: 1; }
.bh-popup-card {
	position: relative;
	background: var(--bh-bg);
	color: var(--bh-fg);
	border-top: 1px solid var(--bh-fg-line);
	border-radius: 24px 24px 0 0;
	padding: 28px 24px 32px;
	width: 100%;
	max-width: 520px;
	transform: translateY(100%);
	transition: transform 0.3s cubic-bezier(.2,.7,.2,1);
	pointer-events: auto;
	box-shadow: 0 -10px 40px -10px rgba(0,0,0,0.5);
	text-align: center;
}
.bh-popup.open .bh-popup-card { transform: translateY(0); }

.bh-popup-close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: var(--bh-fg-faint);
	color: var(--bh-fg);
	border: 0;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: inherit;
}

.bh-popup-eyebrow {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 10px;
	letter-spacing: 0.14em;
	color: var(--bh-fg-soft);
	text-transform: uppercase;
	margin-bottom: 14px;
}

.bh-popup-card h2 {
	font-family: 'Fraunces', Georgia, serif;
	font-weight: 800;
	font-size: clamp(22px, 5.5vw, 28px);
	line-height: 1.15;
	letter-spacing: -0.02em;
	margin: 0 0 12px;
	font-variation-settings: "opsz" 144;
}
.bh-popup-target { color: var(--bh-accent); }

.bh-popup-lead {
	font-size: 14px;
	line-height: 1.5;
	color: var(--bh-fg-soft);
	margin: 0 0 22px;
}

.bh-popup-steps {
	background: var(--bh-fg-faint);
	border: 1px solid var(--bh-fg-line);
	border-radius: 14px;
	padding: 14px 16px;
	margin-bottom: 18px;
	text-align: left;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.bh-popup-step {
	display: flex;
	align-items: center;
	gap: 12px;
}
.bh-popup-step-num {
	flex: 0 0 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--bh-accent);
	color: var(--bh-bg);
	font-family: 'IBM Plex Mono', monospace;
	font-weight: 700;
	font-size: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.bh-popup-step-text { font-size: 14px; line-height: 1.4; }
.bh-popup-step-text strong { color: var(--bh-accent); }
.bh-popup-menu-icon {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: var(--bh-fg-line);
	padding: 1px 8px;
	border-radius: 999px;
	font-family: 'IBM Plex Mono', monospace;
	font-size: 13px;
	margin: 0 2px;
	vertical-align: middle;
	color: var(--bh-fg);
}
.bh-popup-menu-where {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 12px;
	color: var(--bh-accent);
}

.bh-popup-alt {
	font-size: 12px;
	color: var(--bh-fg-soft);
	margin: 0 0 18px;
	line-height: 1.4;
	text-align: center;
}
.bh-popup-alt strong { color: var(--bh-fg); }

.bh-popup-copy {
	background: transparent;
	color: var(--bh-fg);
	border: 1px solid var(--bh-fg-line);
	padding: 12px 16px;
	border-radius: 12px;
	font-family: 'DM Sans', sans-serif;
	font-weight: 500;
	font-size: 14px;
	cursor: pointer;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: all 0.15s ease;
}
.bh-popup-copy:active { transform: scale(0.98); }
.bh-popup-copy.copied {
	background: #00a86b;
	color: #fff;
	border-color: #00a86b;
	font-weight: 700;
}

/* Desktop: center the popup instead of bottom-sheet */
@media (min-width: 640px) {
	.bh-popup { align-items: center; }
	.bh-popup-card {
		border-radius: 24px;
		max-width: 440px;
		margin: 0 24px;
		transform: translateY(20px) scale(0.97);
	}
	.bh-popup.open .bh-popup-card { transform: translateY(0) scale(1); }
}

/* ============================================
   TAP DROPDOWN — long-press instructions (v1.2.17)
   Appears under the tapped link inside in-app browsers.
   ============================================ */
.bh-dropdown {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 2px 0 10px;
	padding: 10px 14px;
	border: 1px solid var(--bh-accent);
	border-radius: 12px;
	background: color-mix(in srgb, var(--bh-accent) 12%, transparent);
	font-family: 'IBM Plex Mono', monospace;
	font-size: 12px;
	line-height: 1.45;
	color: var(--bh-fg, inherit);
	text-align: left;
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity 0.22s ease, transform 0.22s ease;
	pointer-events: none;
}
.bh-dropdown.open {
	opacity: 1;
	transform: translateY(0);
}
.bh-dropdown-arrow {
	position: absolute;
	top: -6px;
	left: 50%;
	width: 10px;
	height: 10px;
	margin-left: -5px;
	background: inherit;
	border-left: 1px solid var(--bh-accent);
	border-top: 1px solid var(--bh-accent);
	transform: rotate(45deg);
	background: color-mix(in srgb, var(--bh-accent) 12%, var(--bh-bg, #111));
}
.bh-dropdown-finger {
	font-size: 16px;
	animation: bh-nudge 1.2s ease-in-out infinite;
}
@keyframes bh-nudge {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-4px); }
}
.bh-dropdown-text strong { color: var(--bh-accent); }
