/* Public profile layouts and the matching profile editor. */
.profile-custom-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    background: #070b14;
}
.profile-custom-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-custom-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 9, 18, .42), rgba(5, 9, 18, .78) 62%, rgba(5, 9, 18, .92));
    backdrop-filter: blur(1.5px);
}
body.has-profile-custom-background #reactbits-bg,
body.has-profile-custom-background #solar-system-bg,
body.has-profile-custom-background #blackhole-bg,
body.has-profile-custom-background #portal-bg { opacity: 0 !important; }
.profile-page { max-width: 800px; margin: 0 auto; position: relative; z-index: 10; }
.profile-page.profile-layout-cv { max-width: 980px; }
.profile-page.profile-layout-portfolio { max-width: 1120px; }
.profile-layout-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, .14);
    color: #7dd3fc;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.profile-label-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 9px; }
.profile-label-row .profile-layout-pill { margin: 0; }
.profile-developer-headline { margin-top: 8px; color: #e2e8f0; font-size: 16px; font-weight: 650; line-height: 1.45; }
.profile-availability-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid rgba(148, 163, 184, .18); border-radius: 999px; background: rgba(15, 23, 42, .42); color: #94a3b8; font-size: 11px; font-weight: 750; }
.profile-availability-pill > span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 9px currentColor; }
.profile-availability-open_to_work { color: #86efac; background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .22); }
.profile-availability-open_to_collaboration { color: #7dd3fc; background: rgba(14, 165, 233, .1); border-color: rgba(14, 165, 233, .22); }
.profile-availability-available_for_freelance { color: #c4b5fd; background: rgba(139, 92, 246, .11); border-color: rgba(139, 92, 246, .24); }
.profile-developer-snapshot { overflow: hidden; background: radial-gradient(circle at 90% -30%, rgba(59, 130, 246, .18), transparent 42%), rgba(8, 15, 29, .74); }
.profile-developer-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 21px; }
.profile-developer-card-heading span { display: block; margin-bottom: 3px; color: #7dd3fc; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.profile-developer-card-heading h2 { margin: 0; font-size: 21px; }
.profile-vault-link { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 8px 11px; border: 1px solid rgba(125, 211, 252, .18); border-radius: 11px; color: #7dd3fc; background: rgba(14, 165, 233, .07); font-size: 11.5px; font-weight: 750; text-decoration: none; }
.profile-vault-link:hover { border-color: rgba(125, 211, 252, .38); background: rgba(14, 165, 233, .13); }
.profile-engineering-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.profile-engineering-stats > div { position: relative; min-width: 0; padding: 17px; border: 1px solid rgba(148, 163, 184, .11); border-radius: 16px; background: rgba(2, 8, 23, .3); }
.profile-engineering-stats i { position: absolute; top: 16px; right: 15px; color: rgba(125, 211, 252, .46); font-size: 15px; }
.profile-engineering-stats strong, .profile-engineering-stats span { display: block; }
.profile-engineering-stats strong { margin-bottom: 3px; color: #f8fafc; font-size: 24px; line-height: 1; }
.profile-engineering-stats span { overflow: hidden; color: var(--text-tertiary); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.profile-developer-context { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(245px, .75fr); gap: 12px; margin-top: 12px; }
.profile-currently-building { display: flex; gap: 13px; padding: 17px; border: 1px solid rgba(99, 102, 241, .17); border-radius: 16px; background: linear-gradient(135deg, rgba(59, 130, 246, .09), rgba(99, 102, 241, .06)); }
.profile-currently-building > i { display: grid; place-items: center; flex: 0 0 auto; width: 35px; height: 35px; border-radius: 11px; color: #a5b4fc; background: rgba(99, 102, 241, .15); }
.profile-currently-building span, .profile-work-preferences span { display: block; margin-bottom: 4px; color: var(--text-tertiary); font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.profile-currently-building p { margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 1.55; }
.profile-work-preferences { display: grid; gap: 1px; overflow: hidden; border: 1px solid rgba(148, 163, 184, .11); border-radius: 16px; background: rgba(148, 163, 184, .1); }
.profile-work-preferences > div { padding: 12px 14px; background: rgba(2, 8, 23, .55); }
.profile-work-preferences strong { display: block; color: #e2e8f0; font-size: 12px; line-height: 1.4; }
.profile-developer-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 9px; margin-top: 12px; }
.profile-developer-links a { display: grid; grid-template-columns: 29px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 9px; align-items: center; min-width: 0; padding: 11px; border: 1px solid rgba(148, 163, 184, .11); border-radius: 13px; color: #e2e8f0; background: rgba(2, 8, 23, .25); text-decoration: none; transition: .2s ease; }
.profile-developer-links a:hover { border-color: rgba(125, 211, 252, .3); background: rgba(14, 165, 233, .08); transform: translateY(-1px); }
.profile-developer-links i { grid-row: 1 / 3; width: 29px; color: #7dd3fc; font-size: 17px; text-align: center; }
.profile-developer-links span, .profile-developer-links small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-developer-links span { font-size: 12px; font-weight: 750; }
.profile-developer-links small { color: var(--text-tertiary); font-size: 9.5px; }
.profile-skill-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.profile-skill-card { padding: 16px; border: 1px solid rgba(148, 163, 184, .11); border-radius: 16px; background: rgba(2, 8, 23, .28); }
.profile-skill-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.profile-skill-heading span { display: block; color: #64748b; font-size: 8.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.profile-skill-heading h3 { margin: 3px 0 0; color: #e2e8f0; font-size: 14px; }
.profile-skill-heading > strong { padding: 4px 7px; border-radius: 999px; color: #93c5fd; background: rgba(59, 130, 246, .11); font-size: 9px; }
.profile-skill-level { height: 5px; overflow: hidden; margin: 14px 0 8px; border-radius: 999px; background: rgba(148, 163, 184, .12); }
.profile-skill-level span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0ea5e9, #8b5cf6); box-shadow: 0 0 10px rgba(14, 165, 233, .45); }
.profile-skill-card > small { color: var(--text-tertiary); font-size: 10px; }
.profile-professional-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(250px, .8fr); gap: 22px; margin-bottom: 26px; }
.profile-section-card { padding: 25px; margin-bottom: 20px; }
.profile-section-title { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; font-size: 18px; }
.profile-section-title i { color: var(--ios-blue, #3b82f6); }
.profile-timeline { display: grid; gap: 0; }
.profile-timeline-item { position: relative; padding: 0 0 24px 28px; }
.profile-timeline-item:last-child { padding-bottom: 0; }
.profile-timeline-item::before { content: ''; position: absolute; left: 6px; top: 7px; bottom: -7px; width: 2px; background: rgba(125, 211, 252, .22); }
.profile-timeline-item:last-child::before { bottom: calc(100% - 14px); }
.profile-timeline-item::after { content: ''; position: absolute; left: 1px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--ios-blue, #3b82f6); box-shadow: 0 0 14px rgba(59, 130, 246, .8); }
.profile-entry-heading { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.profile-entry-heading h3, .profile-entry-heading h4 { margin: 0; font-size: 16px; }
.profile-entry-subtitle { color: #7dd3fc; font-weight: 650; margin-top: 4px; }
.profile-entry-date { color: var(--text-tertiary); font-size: 12px; white-space: nowrap; }
.profile-entry-description { color: var(--text-secondary); font-size: 13.5px; line-height: 1.65; margin: 10px 0 0; white-space: pre-line; }
.profile-sidebar-list { display: grid; gap: 12px; }
.profile-sidebar-item { padding: 14px; border-radius: 14px; background: rgba(15, 23, 42, .34); }
.profile-sidebar-item strong { display: block; margin-bottom: 4px; }
.profile-sidebar-item span { color: var(--text-tertiary); font-size: 12.5px; }
.profile-certificate-grid, .profile-project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.profile-certificate, .profile-project { overflow: hidden; text-decoration: none; color: inherit; border-radius: 20px; background: rgba(15, 23, 42, .38); }
.profile-certificate-image, .profile-project-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: rgba(15, 23, 42, .5); }
.profile-project-body, .profile-certificate-body { padding: 18px; }
.profile-project-body h3, .profile-certificate-body h3 { margin: 0 0 7px; font-size: 17px; }
.profile-project-body p { color: var(--text-secondary); font-size: 13.5px; line-height: 1.6; margin: 0 0 12px; white-space: pre-line; }
.profile-tech-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.profile-tech-tag { padding: 5px 9px; border-radius: 999px; background: rgba(59, 130, 246, .14); color: #93c5fd; font-size: 11.5px; font-weight: 650; }
.profile-project-links { display: flex; flex-wrap: wrap; gap: 10px; }
.profile-project-links a, a.profile-credential-link { color: #7dd3fc; font-size: 12.5px; font-weight: 700; text-decoration: none; }
.profile-layout-portfolio .profile-header { min-height: 0; display: block; }
.profile-layout-portfolio .profile-cover {
    position: relative;
    inset: auto;
    height: 230px;
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.profile-layout-portfolio .profile-header::after {
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    height: 230px;
    z-index: 1;
    background: linear-gradient(180deg, rgba(5, 9, 18, .04), rgba(5, 9, 18, .22) 55%, rgba(5, 9, 18, .92));
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    -webkit-filter: none !important;
}
.profile-layout-portfolio .profile-info-bar { margin-top: -58px; align-items: flex-end; padding: 0 30px; }
.profile-layout-portfolio .profile-avatar-main { width: 112px; height: 112px; }
.profile-layout-portfolio .profile-name { font-size: 28px; }
.profile-layout-portfolio .profile-actions, .profile-layout-portfolio .profile-stats-bar { position: relative; z-index: 2; }

/* Independent visual themes. All texture is generated in CSS to avoid asset bandwidth. */
.profile-page {
    --profile-accent: #38bdf8;
    --profile-accent-rgb: 56, 189, 248;
    --profile-secondary: #818cf8;
    --profile-glass: rgba(8, 18, 34, .28);
    --profile-glass-soft: rgba(15, 29, 49, .17);
    --profile-glass-image: radial-gradient(circle at 92% -10%, rgba(56, 189, 248, .13), transparent 36%), linear-gradient(145deg, rgba(255, 255, 255, .055), transparent 46%);
    --profile-border: rgba(125, 211, 252, .22);
    --profile-border-soft: rgba(148, 163, 184, .14);
    --profile-text: #f8fafc;
    --profile-muted: #a8b7cc;
    --profile-shadow: 0 28px 90px rgba(2, 8, 23, .42), inset 0 1px 0 rgba(255, 255, 255, .045);
    color: var(--profile-text);
}
.profile-theme-lovely {
    --profile-accent: #fb7185;
    --profile-accent-rgb: 251, 113, 133;
    --profile-secondary: #f0abfc;
    --profile-glass: rgba(42, 13, 34, .3);
    --profile-glass-soft: rgba(68, 21, 52, .18);
    --profile-glass-image: radial-gradient(circle at 90% -10%, rgba(251, 113, 133, .18), transparent 38%), linear-gradient(145deg, rgba(255, 228, 230, .075), transparent 48%);
    --profile-border: rgba(251, 113, 133, .29);
    --profile-border-soft: rgba(244, 114, 182, .16);
    --profile-muted: #e7bdcf;
    --profile-shadow: 0 28px 90px rgba(42, 8, 30, .48), inset 0 1px 0 rgba(255, 255, 255, .055);
}
.profile-theme-cute {
    --profile-accent: #f9a8d4;
    --profile-accent-rgb: 249, 168, 212;
    --profile-secondary: #c4b5fd;
    --profile-glass: rgba(34, 22, 58, .29);
    --profile-glass-soft: rgba(61, 39, 84, .18);
    --profile-glass-image: radial-gradient(circle at 88% 0%, rgba(253, 186, 116, .17), transparent 35%), radial-gradient(circle at 8% 110%, rgba(196, 181, 253, .14), transparent 42%), linear-gradient(145deg, rgba(255, 255, 255, .07), transparent 48%);
    --profile-border: rgba(249, 168, 212, .27);
    --profile-border-soft: rgba(196, 181, 253, .17);
    --profile-muted: #d8cae8;
    --profile-shadow: 0 28px 90px rgba(24, 12, 47, .44), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.profile-theme-neko {
    --profile-accent: #c084fc;
    --profile-accent-rgb: 192, 132, 252;
    --profile-secondary: #f472b6;
    --profile-glass: rgba(25, 15, 47, .31);
    --profile-glass-soft: rgba(48, 27, 75, .19);
    --profile-glass-image: radial-gradient(circle at 90% -8%, rgba(244, 114, 182, .16), transparent 37%), linear-gradient(145deg, rgba(216, 180, 254, .075), transparent 48%);
    --profile-border: rgba(192, 132, 252, .29);
    --profile-border-soft: rgba(244, 114, 182, .16);
    --profile-muted: #d8c7ea;
    --profile-shadow: 0 28px 90px rgba(18, 9, 38, .5), inset 0 1px 0 rgba(255, 255, 255, .055);
}
.profile-theme-hacker {
    --profile-accent: #4ade80;
    --profile-accent-rgb: 74, 222, 128;
    --profile-secondary: #22d3ee;
    --profile-glass: rgba(1, 15, 9, .36);
    --profile-glass-soft: rgba(2, 29, 16, .22);
    --profile-glass-image: repeating-linear-gradient(0deg, rgba(74, 222, 128, .025) 0 1px, transparent 1px 4px), radial-gradient(circle at 88% -10%, rgba(34, 197, 94, .14), transparent 37%);
    --profile-border: rgba(74, 222, 128, .3);
    --profile-border-soft: rgba(74, 222, 128, .14);
    --profile-muted: #8fb9a0;
    --profile-shadow: 0 28px 90px rgba(0, 10, 4, .56), inset 0 1px 0 rgba(134, 239, 172, .045);
}

.profile-page .profile-header {
    border-color: var(--profile-border) !important;
    background: transparent !important;
    box-shadow: var(--profile-shadow) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.profile-page .card,
.profile-page .post-card {
    --glass-tint-layer: var(--profile-glass);
    --glass-tint-image: var(--profile-glass-image);
    --glass-rim: var(--profile-border);
    border-color: var(--profile-border) !important;
    background: transparent !important;
    box-shadow: var(--profile-shadow) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.profile-page .empty-state,
.profile-page .profile-tabs {
    border: 1px solid var(--profile-border-soft) !important;
    border-radius: 16px;
    background: rgba(4, 10, 22, .14) !important;
    backdrop-filter: blur(18px) saturate(145%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(145%) !important;
    box-shadow: inset 0 1px rgba(255, 255, 255, .04);
}
.profile-page .profile-tabs { padding: 6px !important; }
.profile-page .profile-stats-bar {
    --glass-tint-layer: var(--profile-glass-soft);
    --glass-tint-image: var(--profile-glass-image);
    --glass-rim: var(--profile-border-soft);
}
.profile-page .profile-header:hover,
.profile-page .card:hover { transform: none !important; }
.profile-page .profile-header::before,
.profile-page .card::before,
.profile-page .post-card::before { border-color: rgba(var(--profile-accent-rgb), .2); box-shadow: inset 0 1px rgba(255, 255, 255, .055); }
.profile-page .profile-cover,
.profile-page .profile-header::after {
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.profile-page .profile-cover { position: relative; z-index: 0; }
.profile-page .profile-header::after { z-index: 1; }
.profile-page .profile-developer-headline { color: var(--profile-text); }
.profile-page .profile-handle,
.profile-page .profile-bio { color: var(--profile-muted); }
.profile-page .profile-layout-pill,
.profile-page .profile-tech-tag { color: var(--profile-accent); background: rgba(var(--profile-accent-rgb), .12); }
.profile-page .profile-layout-pill { border: 1px solid rgba(var(--profile-accent-rgb), .2); }
.profile-page .profile-section-title i,
.profile-page .profile-entry-subtitle,
.profile-page .profile-project-links a,
.profile-page a.profile-credential-link,
.profile-page .profile-developer-card-heading span,
.profile-page .profile-vault-link,
.profile-page .profile-developer-links i { color: var(--profile-accent); }
.profile-page .profile-vault-link,
.profile-page .profile-developer-links a,
.profile-page .profile-skill-card,
.profile-page .profile-sidebar-item,
.profile-page .profile-certificate,
.profile-page .profile-project,
.profile-page .profile-engineering-stats > div,
.profile-page .profile-currently-building,
.profile-page .profile-work-preferences,
.profile-page .profile-default-meta > div,
.profile-page .profile-default-links a {
    border-color: var(--profile-border-soft);
    background: rgba(4, 10, 22, .14);
    background: color-mix(in srgb, var(--profile-glass-soft) 72%, transparent);
    backdrop-filter: blur(16px) saturate(145%);
    -webkit-backdrop-filter: blur(16px) saturate(145%);
    box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 12px 34px rgba(2, 8, 23, .12);
}
.profile-page .profile-work-preferences > div { background: rgba(2, 8, 23, .12); }
.profile-page .profile-skill-level span { background: linear-gradient(90deg, var(--profile-accent), var(--profile-secondary)); box-shadow: 0 0 12px rgba(var(--profile-accent-rgb), .48); }
.profile-page .profile-timeline-item::after { background: var(--profile-accent); box-shadow: 0 0 14px rgba(var(--profile-accent-rgb), .72); }
.profile-page .profile-timeline-item::before { background: rgba(var(--profile-accent-rgb), .25); }

/* The redesigned Default layout: sharp cover art over a professional glass shell. */
.profile-page.profile-layout-default { max-width: 960px; }
.profile-layout-default .profile-header { margin-bottom: 18px; border-radius: 30px; overflow: hidden; }
.profile-layout-default .profile-cover { height: 285px; }
.profile-layout-default .profile-header::after {
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    height: 285px;
    background: linear-gradient(180deg, rgba(3, 7, 18, .04) 5%, rgba(5, 12, 24, .18) 48%, var(--profile-glass) 100%);
}
.profile-layout-default .profile-info-bar { align-items: flex-end; gap: 24px; margin-top: -72px; padding: 0 34px; }
.profile-layout-default .profile-avatar-main {
    width: 132px;
    height: 132px;
    border: 4px solid rgba(var(--profile-accent-rgb), .72) !important;
    box-shadow: 0 16px 42px rgba(2, 8, 23, .64), 0 0 0 7px rgba(var(--profile-accent-rgb), .1) !important;
}
.profile-layout-default .profile-details {
    margin-bottom: 1px;
    padding: 17px 19px;
    border: 1px solid var(--profile-border-soft);
    border-radius: 19px;
    background: rgba(4, 10, 22, .25);
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    box-shadow: inset 0 1px rgba(255, 255, 255, .045);
}
.profile-layout-default .profile-name { margin-bottom: 3px; font-size: clamp(25px, 4vw, 32px); }
.profile-layout-default .profile-handle { margin-bottom: 5px; font-size: 12.5px; }
.profile-layout-default .profile-developer-headline { margin-top: 7px; font-size: 14.5px; }
.profile-layout-default .profile-bio { margin-top: 7px; font-size: 13.5px; }
.profile-layout-default .profile-actions { padding: 19px 34px 0; }
.profile-layout-default .profile-actions .btn { border-color: var(--profile-border-soft); backdrop-filter: blur(12px); }
.profile-layout-default .profile-actions .btn-primary { border-color: rgba(var(--profile-accent-rgb), .48); background: linear-gradient(135deg, rgba(var(--profile-accent-rgb), .88), rgba(var(--profile-accent-rgb), .55)); }
.profile-layout-default .profile-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 22px 25px 25px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--profile-border-soft) !important;
    border-radius: 18px;
    --glass-tint-layer: var(--profile-glass-soft);
    --glass-tint-image: var(--profile-glass-image);
    --glass-rim: var(--profile-border-soft);
    background: transparent !important;
    box-shadow: inset 0 1px rgba(255, 255, 255, .035) !important;
    position: relative;
    z-index: 2;
}
.profile-layout-default .profile-stat { padding: 15px 18px; background: transparent; border-left: 1px solid var(--profile-border-soft); }
.profile-layout-default .profile-stat:first-child { border-left: 0; }
.profile-layout-default .profile-stat-value { color: var(--profile-text); font-size: 22px; }
.profile-layout-default .profile-stat-label { color: var(--profile-muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }

.profile-default-overview { position: relative; overflow: hidden; margin-bottom: 20px; padding: 26px; }
.profile-default-overview > * { position: relative; z-index: 1; }
.profile-default-overview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.profile-default-overview-copy { min-width: 0; }
.profile-default-eyebrow { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; color: var(--profile-accent); font-size: 9.5px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.profile-default-overview h2 { max-width: 720px; margin: 0; color: var(--profile-text); font-size: clamp(18px, 3vw, 24px); line-height: 1.3; letter-spacing: -.025em; }
.profile-default-overview-copy > p { display: flex; align-items: flex-start; gap: 10px; max-width: 720px; margin: 13px 0 0; color: var(--profile-muted); font-size: 12.5px; line-height: 1.55; }
.profile-default-overview-copy > p > i { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; color: var(--profile-accent); background: rgba(var(--profile-accent-rgb), .1); }
.profile-default-overview-copy > p span, .profile-default-overview-copy > p strong { display: block; }
.profile-default-overview-copy > p strong { margin-bottom: 2px; color: var(--profile-text); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.profile-default-overview-head > .profile-availability-pill { flex: 0 0 auto; margin-top: 2px; }
.profile-default-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 9px; margin-top: 20px; }
.profile-default-meta > div { display: grid; grid-template-columns: 32px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; min-width: 0; padding: 12px; border: 1px solid var(--profile-border-soft); border-radius: 13px; background: rgba(2, 8, 20, .25); }
.profile-default-meta i { grid-row: 1 / 3; width: 32px; color: var(--profile-accent); text-align: center; }
.profile-default-meta span, .profile-default-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-default-meta span { color: var(--profile-muted); font-size: 8.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.profile-default-meta strong { color: var(--profile-text); font-size: 11.5px; }
.profile-default-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--profile-border-soft); }
.profile-default-links a { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 8px 11px; border: 1px solid var(--profile-border-soft); border-radius: 11px; color: var(--profile-muted); background: rgba(2, 8, 20, .24); font-size: 11px; font-weight: 750; text-decoration: none; transition: .2s ease; }
.profile-default-links a i { color: var(--profile-accent); font-size: 13px; }
.profile-default-links a:hover { border-color: rgba(var(--profile-accent-rgb), .42); color: var(--profile-text); background: rgba(var(--profile-accent-rgb), .1); transform: translateY(-1px); }

/* Small signatures make the expressive themes feel intentional without covering user art. */
.profile-theme-lovely .profile-name::after,
.profile-theme-cute .profile-name::after,
.profile-theme-neko .profile-name::after,
.profile-theme-hacker .profile-name::after { align-self: center; padding: 4px 8px; border: 1px solid rgba(var(--profile-accent-rgb), .3); border-radius: 999px; color: var(--profile-accent); background: rgba(var(--profile-accent-rgb), .1); font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.profile-theme-lovely .profile-name::after { content: '\2661  lovely'; }
.profile-theme-cute .profile-name::after { content: '\2726  cute'; }
.profile-theme-neko .profile-name::after { content: 'neko mode'; }
.profile-theme-hacker .profile-name::after { content: 'root // online'; border-radius: 4px; }
.profile-theme-hacker .profile-name,
.profile-theme-hacker .profile-stat-value,
.profile-theme-hacker .profile-section-title,
.profile-theme-hacker .profile-default-overview h2,
.profile-theme-hacker .profile-default-links,
.profile-theme-hacker .profile-handle { font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); }
.profile-theme-hacker .profile-handle::before { content: '$ whoami  '; color: var(--profile-accent); }
.profile-theme-hacker .profile-default-eyebrow::before { content: '> '; }
.profile-theme-hacker .profile-avatar-main { border-radius: 13px; }
.profile-theme-neko .profile-avatar-main { box-shadow: 0 16px 42px rgba(12, 5, 32, .7), 0 0 0 7px rgba(var(--profile-accent-rgb), .11), 14px -13px 0 -8px rgba(244, 114, 182, .72), -14px -13px 0 -8px rgba(192, 132, 252, .72) !important; }

.profile-layout-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.profile-layout-option { position: relative; cursor: pointer; }
.profile-layout-option input { position: absolute; opacity: 0; pointer-events: none; }
.profile-layout-option span { display: grid; gap: 5px; min-height: 92px; padding: 16px; border: 1px solid rgba(148, 163, 184, .18); border-radius: 16px; background: rgba(15, 23, 42, .28); transition: .2s ease; }
.profile-layout-option i { color: #7dd3fc; font-size: 20px; }
.profile-layout-option small { color: var(--text-tertiary); line-height: 1.35; }
.profile-layout-option input:checked + span { border-color: rgba(59, 130, 246, .75); background: rgba(59, 130, 246, .14); box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }
.profile-theme-field { margin-top: 24px; padding-top: 22px; border-top: 1px solid rgba(148, 163, 184, .11); }
.profile-theme-picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.profile-theme-option { position: relative; min-width: 0; cursor: pointer; }
.profile-theme-option input { position: absolute; opacity: 0; pointer-events: none; }
.profile-theme-choice { display: flex; flex-direction: column; min-height: 153px; padding: 10px; overflow: hidden; border: 1px solid rgba(148, 163, 184, .14); border-radius: 15px; background: rgba(7, 14, 28, .38); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.profile-theme-swatch { display: grid; place-items: center; height: 56px; margin-bottom: 10px; overflow: hidden; border-radius: 10px; color: #fff; font-size: 18px; box-shadow: inset 0 1px rgba(255,255,255,.12); }
.profile-theme-choice strong { margin-bottom: 3px; color: var(--text-primary); font-size: 11.5px; }
.profile-theme-choice small { color: var(--text-tertiary); font-size: 9.5px; line-height: 1.4; }
.profile-theme-choice-professional .profile-theme-swatch { background: radial-gradient(circle at 75% 20%, rgba(56,189,248,.7), transparent 38%), linear-gradient(145deg, #0f2747, #111827); }
.profile-theme-choice-lovely .profile-theme-swatch { background: radial-gradient(circle at 75% 15%, rgba(240,171,252,.8), transparent 36%), linear-gradient(145deg, #be185d, #4a1433); }
.profile-theme-choice-cute .profile-theme-swatch { background: radial-gradient(circle at 20% 25%, #fdba74 0 5px, transparent 6px), radial-gradient(circle at 80% 68%, #c4b5fd 0 7px, transparent 8px), linear-gradient(145deg, #db79ad, #574080); }
.profile-theme-choice-neko .profile-theme-swatch { background: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 1px, transparent 1px 12px), linear-gradient(145deg, #6d28d9, #30184c); }
.profile-theme-choice-hacker .profile-theme-swatch { color: #4ade80; background: repeating-linear-gradient(0deg, rgba(74,222,128,.07) 0 1px, transparent 1px 4px), #01150b; font-family: var(--font-mono); }
.profile-theme-option:hover .profile-theme-choice { border-color: rgba(125, 211, 252, .3); transform: translateY(-2px); }
.profile-theme-option input:checked + .profile-theme-choice { border-color: rgba(56, 189, 248, .78); background: rgba(14, 165, 233, .1); box-shadow: 0 0 0 3px rgba(56, 189, 248, .12), 0 14px 34px rgba(2, 8, 23, .25); }
.profile-theme-option input:focus-visible + .profile-theme-choice { outline: 2px solid #7dd3fc; outline-offset: 3px; }
.profile-background-preview { width: 100%; height: 180px; object-fit: cover; border-radius: 16px; background: rgba(15, 23, 42, .5); }
.cover-position-stage { position: relative; height: 190px; overflow: hidden; border: 1px solid rgba(125, 211, 252, .2); border-radius: 16px; background: rgba(2, 8, 23, .45); cursor: grab; touch-action: none; user-select: none; box-shadow: inset 0 1px rgba(255,255,255,.04); }
.cover-position-stage:focus-visible { outline: 2px solid #38bdf8; outline-offset: 3px; }
.cover-position-stage.is-dragging { cursor: grabbing; }
.cover-position-stage .cover-preview { width: 100%; height: 100%; margin: 0; border: 0; border-radius: inherit; object-fit: cover; pointer-events: none; transition: object-position .08s ease-out; }
.cover-position-stage.is-dragging .cover-preview { transition: none; }
.cover-position-hint { position: absolute; bottom: 12px; left: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; color: #fff; background: rgba(2, 8, 23, .68); backdrop-filter: blur(12px); font-size: 10.5px; font-weight: 750; pointer-events: none; }
.cover-position-stage .float-btn { z-index: 2; }
.cover-position-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; margin-top: 13px; padding: 13px; border: 1px solid rgba(148, 163, 184, .11); border-radius: 14px; background: rgba(4, 10, 22, .25); }
.cover-position-controls label { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text-secondary); font-size: 10.5px; font-weight: 700; }
.cover-position-controls label span { display: inline-flex; align-items: center; gap: 7px; }
.cover-position-controls label i { width: 15px; color: #7dd3fc; text-align: center; }
.cover-position-controls output { color: #7dd3fc; font-family: var(--font-mono); font-size: 10px; }
.cover-position-controls input[type="range"] { grid-column: 1 / -1; width: 100%; margin: 0 0 5px; accent-color: #38bdf8; cursor: pointer; }
.cover-position-reset { grid-column: 1 / -1; justify-self: start; padding: 0; border: 0; color: var(--text-tertiary); background: none; font: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer; }
.cover-position-reset:hover { color: #7dd3fc; }
.profile-editor-group { margin-top: 24px; padding: 20px; border-radius: 20px; background: rgba(15, 23, 42, .25); border: 1px solid rgba(148, 163, 184, .13); }
.profile-editor-group-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.profile-editor-group-header h3 { margin: 0; font-size: 16px; }
.profile-repeatable-list { display: grid; gap: 14px; }
.profile-repeatable-row { position: relative; padding: 18px; border-radius: 16px; background: rgba(8, 15, 29, .45); border: 1px solid rgba(148, 163, 184, .12); }
.profile-repeatable-row .grid { margin-bottom: 0; }
.profile-row-remove { position: absolute; z-index: 2; top: 10px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(239, 68, 68, .14); color: #fca5a5; cursor: pointer; }
.profile-existing-image { width: 100%; max-height: 150px; object-fit: cover; border-radius: 10px; margin: 8px 0; }
.profile-editor-empty { color: var(--text-tertiary); text-align: center; padding: 12px; font-size: 13px; }
.profile-skill-editor-grid { display: grid; grid-template-columns: minmax(170px, 1.35fr) repeat(3, minmax(110px, 1fr)); gap: 12px; padding-right: 30px; }
.profile-skill-editor-grid .form-group { margin-bottom: 0; }

/* Professional profile editor workspace */
.profile-editor-page { max-width: 1240px; margin: 0 auto; padding-bottom: 64px; position: relative; z-index: 10; }
.profile-editor-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    min-height: 190px;
    margin-bottom: 24px;
    padding: 34px 38px;
    border: 1px solid rgba(125, 211, 252, .18);
    border-radius: 28px;
    background:
        radial-gradient(circle at 82% 15%, rgba(99, 102, 241, .32), transparent 34%),
        radial-gradient(circle at 8% 110%, rgba(14, 165, 233, .22), transparent 38%),
        linear-gradient(135deg, rgba(10, 18, 35, .92), rgba(15, 23, 42, .72));
    box-shadow: 0 24px 80px rgba(2, 8, 23, .3);
}
.profile-editor-hero::after { content: ''; position: absolute; width: 270px; height: 270px; top: -165px; right: 14%; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 42px rgba(255,255,255,.025), 0 0 0 84px rgba(255,255,255,.018); pointer-events: none; }
.profile-editor-hero-copy { position: relative; z-index: 1; max-width: 710px; }
.profile-editor-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; color: #7dd3fc; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.profile-editor-hero h1 { margin: 0 0 9px; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.045em; }
.profile-editor-hero p { margin: 0; max-width: 640px; color: var(--text-secondary); font-size: 15px; }
.profile-editor-hero > .btn { position: relative; z-index: 1; flex: 0 0 auto; }
.profile-editor-alert { margin-bottom: 22px; }
.profile-editor-workspace { display: grid; grid-template-columns: 246px minmax(0, 1fr); gap: 24px; align-items: start; }
.profile-editor-sidebar {
    position: sticky;
    top: 88px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, .13);
    border-radius: 22px;
    background: rgba(8, 15, 29, .7);
    backdrop-filter: blur(20px);
    box-shadow: 0 18px 55px rgba(2, 8, 23, .24);
}
.profile-editor-owner { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 4px 4px 17px; border-bottom: 1px solid rgba(148, 163, 184, .12); }
.profile-editor-owner-avatar { width: 43px; height: 43px; object-fit: cover; flex: 0 0 auto; border-radius: 13px; box-shadow: 0 0 0 2px rgba(125, 211, 252, .26); }
.profile-editor-owner > div { min-width: 0; }
.profile-editor-owner strong, .profile-editor-owner span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-editor-owner strong { font-size: 13.5px; }
.profile-editor-owner span { color: var(--text-tertiary); font-size: 11.5px; }
.profile-completion { padding: 17px 4px; border-bottom: 1px solid rgba(148, 163, 184, .12); }
.profile-completion-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; color: var(--text-secondary); font-size: 11.5px; }
.profile-completion-label strong { color: #7dd3fc; font-size: 12px; }
.profile-completion-track { height: 6px; overflow: hidden; border-radius: 999px; background: rgba(148, 163, 184, .13); }
.profile-completion-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0ea5e9, #6366f1); box-shadow: 0 0 14px rgba(14, 165, 233, .62); transition: width .3s ease; }
.profile-editor-nav { display: grid; gap: 5px; padding: 14px 0; }
.profile-editor-nav a { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 42px; padding: 8px 10px; border-radius: 12px; color: var(--text-tertiary); font-size: 12.5px; font-weight: 650; text-decoration: none; transition: .2s ease; }
.profile-editor-nav a i { width: 20px; text-align: center; color: #64748b; transition: .2s ease; }
.profile-editor-nav a small { color: #475569; font-family: var(--font-mono); font-size: 9px; }
.profile-editor-nav a:hover { color: var(--text-primary); background: rgba(148, 163, 184, .08); transform: translateX(2px); }
.profile-editor-nav a.active { color: #fff; background: linear-gradient(90deg, rgba(14,165,233,.18), rgba(99,102,241,.11)); box-shadow: inset 2px 0 #38bdf8; }
.profile-editor-nav a.active i, .profile-editor-nav a.active small { color: #7dd3fc; }
.profile-editor-sidebar-note { display: flex; gap: 9px; padding: 13px; border-radius: 13px; background: rgba(14, 165, 233, .07); color: var(--text-tertiary); font-size: 10.5px; line-height: 1.45; }
.profile-editor-sidebar-note i { color: #38bdf8; margin-top: 2px; }
.profile-editor-surface { overflow: visible; transform: none !important; }
.profile-editor-surface:hover { transform: none !important; }
.profile-editor-surface-header { position: sticky; top: 74px; z-index: 20; border-radius: 22px 22px 0 0; background: rgba(8, 15, 29, .88); backdrop-filter: blur(20px); }
.profile-save-state { display: inline-flex; align-items: center; gap: 7px; color: var(--text-tertiary); font-size: 11.5px; font-weight: 650; }
.profile-save-state > span { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 9px rgba(34, 197, 94, .75); }
.profile-save-state.unsaved { color: #fbbf24; }
.profile-save-state.unsaved > span { background: #f59e0b; box-shadow: 0 0 9px rgba(245, 158, 11, .75); }
.profile-editor-surface > .card-body { padding: 24px; }
.profile-editor-panel {
    scroll-margin-top: 140px;
    margin-bottom: 22px;
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, .12);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(15, 23, 42, .37), rgba(8, 15, 29, .2));
}
.profile-editor-section-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 25px; padding-bottom: 20px; border-bottom: 1px solid rgba(148, 163, 184, .12); }
.profile-editor-section-heading > div:last-child { min-width: 0; }
.profile-editor-section-icon { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px; color: #7dd3fc; background: linear-gradient(145deg, rgba(14,165,233,.18), rgba(99,102,241,.12)); box-shadow: inset 0 0 0 1px rgba(125,211,252,.13); }
.profile-editor-section-heading span { display: block; margin-bottom: 2px; color: #64748b; font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.profile-editor-section-heading h2 { margin: 0 0 5px; font-size: 21px; }
.profile-editor-section-heading p { margin: 0; color: var(--text-tertiary); font-size: 12.5px; line-height: 1.5; }
.profile-editor-media-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(230px, .7fr); gap: 20px; align-items: stretch; }
.profile-editor-media-grid > .form-group { margin: 0; padding: 17px; border-radius: 17px; background: rgba(4, 10, 22, .28); border: 1px solid rgba(148,163,184,.1); }
.profile-editor-media-grid .cover-preview { height: 190px; }
.profile-editor-media-grid .avatar-preview { width: 96px; height: 96px; }
.profile-editor-panel > .profile-editor-group { background: rgba(4, 10, 22, .27); border-color: rgba(148, 163, 184, .1); }
.profile-editor-panel > .profile-editor-group:first-of-type { margin-top: 0; }
.profile-editor-group-header h3 { font-size: 15px; }
.profile-repeatable-row { transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.profile-repeatable-row:hover { border-color: rgba(125, 211, 252, .22); background: rgba(8, 15, 29, .62); }
.profile-row-remove:hover { background: rgba(239, 68, 68, .25); color: #fff; transform: scale(1.05); }
.profile-editor-panel .form-input, .profile-editor-panel .form-textarea, .profile-editor-panel .form-select { background-color: rgba(2, 8, 23, .32); border-color: rgba(148, 163, 184, .14); }
.profile-editor-panel .form-input:hover, .profile-editor-panel .form-textarea:hover, .profile-editor-panel .form-select:hover { border-color: rgba(148, 163, 184, .28); }
.profile-editor-panel input[type="checkbox"] { accent-color: #3b82f6; }
.profile-preference-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.profile-preference-list > .form-label { grid-column: 1 / -1; margin-bottom: 2px; }
.profile-preference-option { min-height: 68px; margin: 0 !important; padding: 13px; border: 1px solid rgba(148,163,184,.11); border-radius: 14px; background: rgba(4,10,22,.25); color: var(--text-secondary); font-size: 12px; line-height: 1.35; cursor: pointer; transition: .2s ease; }
.profile-preference-option:hover { border-color: rgba(125,211,252,.22); background: rgba(14,165,233,.06); }
.profile-preference-option input[type="checkbox"] { flex: 0 0 auto; width: 17px; height: 17px; }
.profile-community-settings, .profile-privacy-setting { box-shadow: inset 0 0 0 1px rgba(255,255,255,.015); }
.profile-editor-savebar { position: sticky; bottom: 12px; z-index: 18; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 8px; padding: 16px 18px; border: 1px solid rgba(125, 211, 252, .2); border-radius: 18px; background: rgba(7, 14, 28, .9); backdrop-filter: blur(24px); box-shadow: 0 18px 55px rgba(2, 8, 23, .5); }
.profile-editor-savebar > div:first-child strong, .profile-editor-savebar > div:first-child span { display: block; }
.profile-editor-savebar > div:first-child strong { font-size: 13.5px; }
.profile-editor-savebar > div:first-child span { color: var(--text-tertiary); font-size: 11.5px; }
.profile-editor-save-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.profile-editor-save-actions .btn { min-height: 40px; justify-content: center; }

@media (max-width: 1020px) {
    .profile-skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-skill-editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-editor-workspace { grid-template-columns: 1fr; }
    .profile-editor-sidebar { top: 70px; z-index: 30; padding: 9px; border-radius: 16px; }
    .profile-editor-owner, .profile-completion, .profile-editor-sidebar-note { display: none; }
    .profile-editor-nav { display: flex; gap: 5px; padding: 0; overflow-x: auto; scrollbar-width: none; }
    .profile-editor-nav::-webkit-scrollbar { display: none; }
    .profile-editor-nav a { display: flex; flex: 0 0 auto; min-height: 38px; padding: 8px 12px; }
    .profile-editor-nav a small { display: none; }
    .profile-editor-nav a:hover { transform: none; }
    .profile-editor-nav a.active { box-shadow: inset 0 -2px #38bdf8; }
    .profile-editor-surface-header { top: 126px; }
    .profile-editor-panel { scroll-margin-top: 190px; }
    .profile-theme-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .profile-professional-grid, .profile-certificate-grid, .profile-project-grid, .profile-layout-picker, .profile-developer-context, .profile-skill-grid { grid-template-columns: 1fr; }
    .profile-engineering-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-developer-card-heading { align-items: flex-start; flex-direction: column; }
    .profile-skill-editor-grid { grid-template-columns: 1fr; padding-right: 25px; }
    .profile-entry-heading { display: block; }
    .profile-entry-date { margin-top: 5px; }
    .profile-layout-portfolio .profile-header { min-height: 0; }
    .profile-layout-portfolio .profile-cover,
    .profile-layout-portfolio .profile-header::after { height: 165px; }
    .profile-layout-portfolio .profile-header::after { background: linear-gradient(180deg, rgba(5, 9, 18, .03), rgba(5, 9, 18, .94)); }
    .profile-layout-portfolio .profile-info-bar { margin-top: -46px; padding: 0 16px; align-items: center; }
    .profile-layout-portfolio .profile-avatar-main { width: 88px; height: 88px; }
    .profile-layout-portfolio .profile-name { font-size: 23px; }
    .profile-layout-default .profile-cover,
    .profile-layout-default .profile-header::after { height: 210px; }
    .profile-layout-default .profile-info-bar { gap: 14px; margin-top: -58px; padding: 0 16px; }
    .profile-layout-default .profile-avatar-main { width: 108px; height: 108px; }
    .profile-layout-default .profile-details { width: 100%; margin-bottom: 0; padding: 15px; text-align: center; }
    .profile-layout-default .profile-name { justify-content: center; }
    .profile-layout-default .profile-actions { justify-content: center; padding: 15px 16px 0; }
    .profile-layout-default .profile-stats-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 15px 15px; }
    .profile-layout-default .profile-stat { text-align: center; }
    .profile-layout-default .profile-stat:nth-child(odd) { border-left: 0; }
    .profile-layout-default .profile-stat:nth-child(n + 3) { border-top: 1px solid var(--profile-border-soft); }
    .profile-default-overview { padding: 20px 17px; }
    .profile-default-overview-head { flex-direction: column; gap: 13px; }
    .profile-default-overview-head > .profile-availability-pill { margin: 0; }
    .profile-default-meta { grid-template-columns: 1fr; }
    .profile-theme-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-editor-page { padding-bottom: 28px; }
    .profile-editor-hero { min-height: 0; align-items: flex-start; flex-direction: column; padding: 25px 22px; border-radius: 22px; }
    .profile-editor-hero h1 { font-size: 29px; }
    .profile-editor-hero > .btn { width: 100%; justify-content: center; }
    .profile-editor-surface-header { position: static; border-radius: 22px 22px 0 0; }
    .profile-editor-surface > .card-body { padding: 14px; }
    .profile-editor-panel { scroll-margin-top: 128px; margin-bottom: 14px; padding: 19px 16px; border-radius: 18px; }
    .profile-editor-section-heading { margin-bottom: 20px; padding-bottom: 16px; }
    .profile-editor-section-heading h2 { font-size: 19px; }
    .profile-editor-media-grid { grid-template-columns: 1fr; }
    .profile-preference-list { grid-template-columns: 1fr; }
    .profile-editor-media-grid .cover-preview { height: 165px; }
    .profile-editor-group { padding: 15px; border-radius: 16px; }
    .profile-repeatable-row { padding: 16px 13px; }
    .profile-editor-savebar { bottom: 8px; align-items: stretch; flex-direction: column; }
    .profile-editor-save-actions { width: 100%; }
    .profile-editor-save-actions .btn { flex: 1; }
}

@media (max-width: 460px) {
    .profile-theme-picker { grid-template-columns: 1fr; }
    .profile-theme-choice { min-height: 0; display: grid; grid-template-columns: 58px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 11px; align-items: center; }
    .profile-theme-swatch { grid-row: 1 / 3; width: 58px; height: 58px; margin: 0; }
    .profile-theme-choice strong { align-self: end; }
    .profile-theme-choice small { align-self: start; }
}

/* Profile post galleries keep the same breathing room as the post copy/actions. */
.profile-page .post-card > .post-media-grid {
    width: auto;
    max-width: none;
    margin: 12px 20px 16px;
    box-sizing: border-box;
    border-color: rgba(148, 163, 184, .14);
    box-shadow: 0 14px 38px rgba(2, 8, 23, .26);
}
.profile-page .post-card > .post-media-grid .media-item { min-width: 0; overflow: hidden; }
.profile-page .post-card > .post-media-grid img { user-select: none; -webkit-user-drag: none; }

/* Immersive custom profile media viewer. Large variants load only after opening. */
.profile-media-viewer {
    position: fixed;
    inset: 0;
    z-index: 100000;
    place-items: center;
    padding: 18px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s ease;
}
.profile-media-viewer.active { opacity: 1; visibility: visible; }
.profile-media-viewer-scrim {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 20%, rgba(30, 64, 175, .2), transparent 36%),
        rgba(1, 4, 12, .9);
    backdrop-filter: blur(28px) saturate(125%);
}
.profile-media-viewer-shell {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(1480px, 100%);
    height: min(920px, calc(100vh - 36px));
    overflow: hidden;
    border: 1px solid rgba(148, 203, 255, .2);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(8, 15, 29, .96), rgba(2, 6, 18, .93));
    box-shadow: 0 36px 120px rgba(0, 0, 0, .72), inset 0 1px rgba(255,255,255,.04);
    transform: translateY(12px) scale(.985);
    transition: transform .24s cubic-bezier(.2,.8,.2,1);
}
.profile-media-viewer.active .profile-media-viewer-shell { transform: translateY(0) scale(1); }
.profile-media-viewer-shell::before {
    content: '';
    position: absolute;
    z-index: -1;
    width: 320px;
    height: 320px;
    top: -230px;
    left: 25%;
    border-radius: 50%;
    background: #2563eb;
    filter: blur(90px);
    opacity: .2;
    pointer-events: none;
}
.profile-media-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 70px;
    padding: 12px 14px 12px 20px;
    border-bottom: 1px solid rgba(148, 163, 184, .12);
    background: rgba(7, 13, 26, .78);
    backdrop-filter: blur(18px);
}
.profile-media-viewer-heading { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 2px 10px; min-width: 0; }
.profile-media-viewer-heading strong { overflow: hidden; color: #f8fafc; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.profile-media-viewer-heading > span:last-child { color: #94a3b8; font-family: var(--font-mono); font-size: 10px; }
.profile-media-viewer-kicker { grid-column: 1 / -1; color: #60a5fa; font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.profile-media-viewer-tools { display: flex; align-items: center; gap: 5px; }
.profile-media-viewer-tools button,
.profile-media-viewer-nav,
.profile-media-viewer-strip button {
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, .13);
    color: #cbd5e1;
    background: rgba(148, 163, 184, .07);
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}
.profile-media-viewer-tools button { width: 38px; height: 38px; border-radius: 11px; font-size: 12px; }
.profile-media-viewer-tools #postLightboxZoom { width: 58px; color: #93c5fd; font-family: var(--font-mono); font-size: 9.5px; }
.profile-media-viewer-tools button:hover,
.profile-media-viewer-tools button:focus-visible { color: #fff; border-color: rgba(96, 165, 250, .4); background: rgba(37, 99, 235, .2); outline: none; }
.profile-media-viewer-tools .profile-media-viewer-close { margin-left: 6px; color: #fecaca; background: rgba(239, 68, 68, .1); }
.profile-media-viewer-tools .profile-media-viewer-close:hover { border-color: rgba(248, 113, 113, .38); background: rgba(239, 68, 68, .22); transform: rotate(4deg); }
.profile-media-viewer-stage {
    position: relative;
    min-height: 0;
    overflow: hidden;
    background:
        linear-gradient(45deg, rgba(255,255,255,.018) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.018) 75%),
        linear-gradient(45deg, rgba(255,255,255,.018) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.018) 75%),
        #020611;
    background-position: 0 0, 14px 14px;
    background-size: 28px 28px;
    touch-action: none;
}
.profile-media-viewer-canvas {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 28px 76px;
    cursor: grab;
    touch-action: none;
}
.profile-media-viewer-canvas.is-dragging { cursor: grabbing; }
.profile-media-viewer-canvas img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 24px 72px rgba(0,0,0,.48);
    opacity: 1;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
    transition: opacity .16s ease, transform .16s ease;
}
.profile-media-viewer-canvas.is-dragging img { transition: opacity .16s ease; }
.profile-media-viewer-canvas img.is-loading { opacity: 0; }
.profile-media-viewer-canvas img.is-zoomed { cursor: inherit; }
.profile-media-viewer-loader {
    position: absolute;
    z-index: 2;
    display: none;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    border: 1px solid rgba(148,163,184,.15);
    border-radius: 999px;
    background: rgba(5, 11, 23, .75);
    backdrop-filter: blur(12px);
}
.profile-media-viewer-loader.active { display: flex; }
.profile-media-viewer-loader span { width: 6px; height: 6px; border-radius: 50%; background: #60a5fa; animation: profileViewerPulse .9s infinite ease-in-out; }
.profile-media-viewer-loader span:nth-child(2) { animation-delay: .12s; }
.profile-media-viewer-loader span:nth-child(3) { animation-delay: .24s; }
@keyframes profileViewerPulse { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }
.profile-media-viewer-nav {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 46px;
    height: 64px;
    border-radius: 15px;
    font-size: 15px;
    transform: translateY(-50%);
    backdrop-filter: blur(14px);
}
.profile-media-viewer-nav:hover { color: #fff; border-color: rgba(96,165,250,.42); background: rgba(37,99,235,.24); }
.profile-media-viewer-prev { left: 16px; }
.profile-media-viewer-next { right: 16px; }
.profile-media-viewer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 66px;
    padding: 10px 18px;
    border-top: 1px solid rgba(148, 163, 184, .11);
    color: #64748b;
    background: rgba(7, 13, 26, .82);
    font-size: 10px;
}
.profile-media-viewer-strip { display: flex; align-items: center; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.profile-media-viewer-strip.is-single { visibility: hidden; }
.profile-media-viewer-strip button { grid-template-columns: auto auto; gap: 6px; min-width: 45px; height: 38px; padding: 0 10px; border-radius: 10px; font-size: 10px; }
.profile-media-viewer-strip button span { font-family: var(--font-mono); }
.profile-media-viewer-strip button:hover { color: #fff; }
.profile-media-viewer-strip button.active { color: #dbeafe; border-color: rgba(96,165,250,.55); background: linear-gradient(145deg, rgba(37,99,235,.28), rgba(14,165,233,.14)); box-shadow: 0 0 18px rgba(37,99,235,.14); }
.profile-media-viewer:fullscreen { padding: 0; background: #01040c; }
.profile-media-viewer:fullscreen .profile-media-viewer-shell { width: 100%; height: 100%; border: 0; border-radius: 0; }

@media (max-width: 760px) {
    .profile-page .post-card > .post-media-grid { margin-right: 13px; margin-left: 13px; }
    .profile-media-viewer { padding: 0; }
    .profile-media-viewer-shell { width: 100%; height: 100%; border-width: 0; border-radius: 0; }
    .profile-media-viewer-header { min-height: 62px; padding: 9px 10px 9px 14px; }
    .profile-media-viewer-heading strong { font-size: 12px; }
    .profile-media-viewer-tools { gap: 3px; }
    .profile-media-viewer-tools button { width: 34px; height: 34px; border-radius: 9px; }
    .profile-media-viewer-tools #postLightboxZoom { display: none; }
    .profile-media-viewer-tools button:nth-child(1),
    .profile-media-viewer-tools button:nth-child(3) { display: none; }
    .profile-media-viewer-canvas { padding: 18px 48px; }
    .profile-media-viewer-nav { width: 38px; height: 52px; border-radius: 12px; }
    .profile-media-viewer-prev { left: 7px; }
    .profile-media-viewer-next { right: 7px; }
    .profile-media-viewer-footer { min-height: 58px; padding: 8px 11px; }
    .profile-media-viewer-footer > span { display: none; }
    .profile-media-viewer-strip { width: 100%; justify-content: center; }
}
