/* Inclawbate — Profile + Skill Page */

/* ── Profile Hero ── */
.profile-hero {
    margin-top: var(--nav-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--space-4xl) var(--space-xl) var(--space-3xl);
    position: relative;
    overflow: hidden;
}
.profile-hero::before {
    content: '';
    position: absolute; top: -50%; left: 50%; transform: translateX(-50%);
    width: 600px; height: 500px;
    background: radial-gradient(ellipse, hsla(9, 60%, 54%, 0.06) 0%, transparent 70%);
    pointer-events: none;
}
.profile-hero-inner {
    max-width: var(--max-width-narrow);
    margin: 0 auto; text-align: center;
    position: relative;
}
.profile-avatar {
    width: 104px; height: 104px;
    border-radius: 50%;
    border: 3px solid var(--lobster-400);
    margin: 0 auto var(--space-lg);
    object-fit: cover;
    box-shadow: 0 0 24px hsla(9, 60%, 54%, 0.15);
    transition: box-shadow 0.3s;
}
.profile-avatar:hover {
    box-shadow: 0 0 36px hsla(9, 60%, 54%, 0.25);
}
.profile-avatar-fallback {
    width: 104px; height: 104px;
    border-radius: 50%;
    border: 3px solid var(--lobster-400);
    margin: 0 auto var(--space-lg);
    background: linear-gradient(135deg, var(--bg-card), var(--bg-card-hover));
    display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem; font-weight: 800; color: var(--lobster-400);
    box-shadow: 0 0 24px hsla(9, 60%, 54%, 0.15);
}
.profile-name {
    font-family: var(--font-display);
    font-size: 2rem; font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}
.profile-handle {
    font-family: var(--font-mono);
    font-size: 0.88rem; color: var(--text-dim);
    margin-bottom: var(--space-lg);
    letter-spacing: 0.01em;
}
.profile-handle a { color: var(--text-dim); }
.profile-handle a:hover { color: var(--lobster-300); }
.profile-tagline {
    color: var(--text-secondary);
    font-size: 1.08rem; line-height: 1.6;
    margin-bottom: var(--space-xl);
    max-width: 440px; margin-left: auto; margin-right: auto;
}
.profile-actions {
    display: flex; justify-content: center; gap: var(--space-md);
}

/* ── Tier Badge ── */
.profile-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 5px 14px 5px 10px;
    background: hsla(172, 32%, 48%, 0.08);
    border: 1px solid hsla(172, 32%, 48%, 0.18);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-lg);
    position: relative;
}
.tier-icon {
    font-size: 0.95rem;
    line-height: 1;
}
.tier-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--seafoam-300);
}
.tier-info-btn {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 1px solid hsla(172, 32%, 48%, 0.3);
    background: transparent;
    color: var(--seafoam-300);
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-mono);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
    line-height: 1;
}
.tier-info-btn:hover {
    background: hsla(172, 32%, 48%, 0.12);
    border-color: var(--seafoam-400);
}
.tier-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    padding: var(--space-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.55;
    text-align: left;
    z-index: 10;
    animation: tierTipIn 0.15s ease-out;
}
.tier-tooltip a {
    color: var(--seafoam-300);
    text-decoration: underline;
}
.tier-tooltip a:hover {
    color: var(--seafoam-200, hsl(172, 30%, 70%));
}
@keyframes tierTipIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Hero Mini Allocation ── */
.hero-alloc {
    display: inline-flex; align-items: center; gap: var(--space-md);
    padding: 10px 20px 10px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-xl);
    transition: border-color 0.2s;
}
.hero-alloc:hover {
    border-color: var(--border-default);
}
.hero-alloc-pie {
    width: 36px; height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}
.hero-alloc-empty {
    background: var(--bg-surface);
    border: 2px dashed var(--border-default);
}
.hero-alloc-info {
    display: flex; flex-direction: column;
    text-align: left;
}
.hero-alloc-total {
    font-family: var(--font-mono);
    font-size: 0.85rem; font-weight: 700;
    color: var(--lobster-300);
    line-height: 1.2;
}
.hero-alloc-sub {
    font-size: 0.7rem;
    color: var(--text-dim);
    line-height: 1.3;
}

/* ── Profile Body ── */
.profile-body {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-xl);
}

.profile-section {
    margin-bottom: var(--space-2xl);
}
.profile-section h2 {
    font-family: var(--font-display);
    font-size: 1.05rem; font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-subtle);
    letter-spacing: 0.01em;
}

.profile-bio {
    color: var(--text-secondary);
    line-height: 1.75;
    white-space: pre-line;
    font-size: 0.95rem;
}

/* ── Skills ── */
.profile-skills {
    display: flex; flex-wrap: wrap; gap: var(--space-sm);
}

/* ── Details grid ── */
.profile-details {
    display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md);
}
.profile-detail {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    transition: border-color 0.2s;
}
.profile-detail:hover { border-color: var(--border-default); }
.profile-detail-label {
    font-family: var(--font-mono);
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-dim);
    margin-bottom: 4px;
}
.profile-detail-value {
    font-weight: 600; font-size: 0.92rem;
}

/* ── Allocation pie chart ── */
.profile-allocation {
    display: flex; flex-direction: column;
    gap: var(--space-md);
}

/* ── Loading / Not Found ── */
.profile-loading, .profile-not-found {
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; padding: var(--space-xl);
}
.profile-loading .spinner { margin-bottom: var(--space-lg); }
.profile-not-found h2 {
    font-size: 1.5rem; margin-bottom: var(--space-md);
    font-weight: 800;
}
.profile-not-found p {
    color: var(--text-secondary); margin-bottom: var(--space-xl);
}

/* ── Skill Page (JSON spec) ── */
.skill-page {
    margin-top: var(--nav-height);
    padding: var(--space-2xl) var(--space-xl);
    max-width: 720px; margin-left: auto; margin-right: auto;
}
.skill-page h1 {
    font-family: var(--font-display);
    font-size: 1.5rem; font-weight: 800;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.01em;
}
.skill-page .skill-meta {
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    margin-bottom: var(--space-xl);
    letter-spacing: 0.02em;
}
.skill-json {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-primary);
    overflow-x: auto;
    box-shadow: var(--shadow-md);
}
.skill-copy-btn {
    margin-top: var(--space-md);
}

/* ── Payment Modal ── */
.modal-overlay {
    position: fixed; inset: 0;
    background: hsla(230, 20%, 6%, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: var(--space-xl);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden { display: none; }
.modal-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    width: 100%; max-width: 420px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 80px hsla(0,0%,0%,0.5);
    animation: slideUp 0.25s ease;
}
.modal-close {
    position: absolute; top: var(--space-md); right: var(--space-lg);
    background: none; border: none; color: var(--text-dim);
    font-size: 1.5rem; cursor: pointer;
    line-height: 1; padding: 4px;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--text-primary); }

.pay-step { text-align: center; }
.pay-step.hidden { display: none; }
.pay-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-lg);
}
.pay-step h3 {
    font-family: var(--font-display);
    font-size: 1.3rem; font-weight: 800;
    margin-bottom: var(--space-sm);
}
.pay-sub {
    color: var(--text-secondary);
    font-size: 0.9rem; line-height: 1.5;
    margin-bottom: var(--space-xl);
}
.pay-hint {
    color: var(--text-dim);
    font-size: 0.78rem;
    margin-top: var(--space-md);
}

.pay-amount-group {
    display: flex; align-items: center; gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}
.pay-amount-input {
    flex: 1;
    font-size: 1.5rem; font-weight: 700;
    text-align: center;
    font-family: var(--font-mono);
    min-width: 0;
}
.pay-currency-prefix {
    font-size: 1.5rem; font-weight: 700;
    color: var(--text-dim);
    font-family: var(--font-mono);
}
.pay-amount-input::placeholder { color: var(--text-dim); }
.pay-currency {
    font-family: var(--font-mono);
    font-size: 0.85rem; font-weight: 700;
    color: var(--lobster-300);
    white-space: nowrap;
}

.pay-breakdown {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-xl);
}
.pay-row {
    display: flex; justify-content: space-between;
    padding: var(--space-xs) 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
}
.pay-value {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-primary);
}
.pay-free { color: var(--seafoam-400); }

.pay-success-icon {
    width: 56px; height: 56px;
    background: hsla(172, 40%, 48%, 0.12);
    border: 2px solid var(--seafoam-400);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--seafoam-400);
    margin-bottom: var(--space-lg);
}

/* ── Allocation List ── */
.allocation-list {
    display: flex; flex-direction: column;
    gap: var(--space-sm);
}
.alloc-row {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    position: relative;
    overflow: hidden;
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--space-md);
    transition: border-color 0.2s;
}
.alloc-row:hover { border-color: var(--border-default); }
.alloc-bar {
    position: absolute; left: 0; top: 0; bottom: 0;
    opacity: 0.1;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    pointer-events: none;
}
.alloc-info {
    display: flex; flex-direction: column; gap: 2px;
    position: relative; z-index: 1;
    min-width: 0;
}
.alloc-name {
    font-weight: 700; font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.alloc-addr {
    font-family: var(--font-mono);
    font-size: 0.72rem; color: var(--text-dim);
    text-decoration: none;
    letter-spacing: 0.02em;
}
.alloc-addr:hover { color: var(--lobster-300); }
.alloc-stats {
    display: flex; flex-direction: column; align-items: flex-end;
    gap: 2px; position: relative; z-index: 1;
    flex-shrink: 0;
}
.alloc-amount {
    font-family: var(--font-mono);
    font-size: 0.82rem; font-weight: 700;
    color: var(--lobster-300);
}
.alloc-share {
    font-family: var(--font-mono);
    font-size: 0.72rem; font-weight: 700;
    color: var(--text-dim);
}

/* ── Wallet Picker (EIP-6963) ── */
.wallet-picker {
    display: flex; flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}
.wallet-picker.hidden { display: none; }
.wallet-option {
    display: flex; align-items: center; gap: var(--space-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-size: 0.92rem; font-weight: 600;
    color: var(--text-primary);
    width: 100%;
    text-align: left;
}
.wallet-option:hover {
    border-color: var(--lobster-400);
    background: var(--bg-elevated);
}
.wallet-option img {
    width: 28px; height: 28px;
    border-radius: 6px;
    flex-shrink: 0;
}
.wallet-option .wallet-icon-fallback {
    width: 28px; height: 28px;
    border-radius: 6px;
    background: var(--bg-elevated);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) {
    .profile-hero { padding: var(--space-2xl) var(--space-lg) var(--space-xl); }
    .profile-avatar, .profile-avatar-fallback { width: 80px; height: 80px; }
    .profile-avatar-fallback { font-size: 1.6rem; }
    .profile-name { font-size: 1.4rem; }
    .profile-details { grid-template-columns: 1fr; }
    .profile-actions { flex-direction: column; }
    .profile-actions .btn { width: 100%; }
    .profile-body { padding: var(--space-xl) var(--space-lg); }

    .modal-overlay { padding: 0; align-items: flex-start; }
    .modal-card {
        max-height: 100vh;
        max-width: 100%;
        border-radius: 0;
        padding: var(--space-xl) var(--space-lg) var(--space-2xl);
    }
}
