/* ── Variables ── */
:root {
    --sp-navy: #2b4b63;
    --sp-navy-deep: #20394e;
    --sp-blue-mid: #437799;
    --bg-primary: #f4f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8eef4;
    --text-primary: #152839;
    --text-secondary: #5b7285;
    --text-muted: #8aa0b3;
    --border-color: #d7e2eb;
    --primary: #437799;
    --primary-dark: #2b4b63;
    --shadow-soft: 0 10px 28px -18px rgba(21, 40, 57, 0.45);
    --radius-sm: 10px;
    --radius-md: 16px;
}

/* ── Reset ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

/* ── Header ── */
.pub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}
.pub-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}
.pub-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 14px;
}
.pub-logo-text { font-weight: 700; font-size: 18px; }
.pub-logo-text span { color: #06b6d4; }
.pub-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.2s;
}
.pub-login-btn:hover { filter: brightness(0.9); }

/* ── Content ── */
.pub-content {
    max-width: 800px;
    margin: 24px auto;
    padding: 0 16px 100px;
}

/* ── Cover ── */
.pub-cover {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #0a1628 0%, #1a2a4a 50%, #0d1f3c 100%);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    overflow: hidden;
}
.pub-cover img { width: 100%; height: 100%; object-fit: cover; }

/* ── Header Card ── */
.pub-header-card {
    background: var(--bg-secondary);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 0 24px 24px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 16px;
}
.pub-avatar-row {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-top: -50px;
}
.pub-avatar-container { position: relative; flex-shrink: 0; }
.pub-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--bg-secondary);
    object-fit: cover;
    background: var(--bg-tertiary);
}
.pub-avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--bg-secondary);
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
}
.pub-online-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid var(--bg-secondary);
}
.pub-online-badge.online { background: #22c55e; }
.pub-online-badge.offline { background: #9ca3af; }

.pub-name-section { flex: 1; padding-bottom: 4px; }
.pub-name { font-size: 1.5rem; font-weight: 700; margin: 0; line-height: 1.3; }
.pub-headline { font-size: 0.95rem; color: var(--text-secondary); margin: 2px 0 0; }
.pub-location { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; display: flex; align-items: center; gap: 4px; }

/* ── Stats ── */
.pub-stats {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}
.pub-stat { text-align: center; }
.pub-stat-value { font-size: 1.2rem; font-weight: 700; }
.pub-stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* ── Share Bar ── */
.pub-share-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}
.pub-share-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; display: flex; align-items: center; gap: 6px; margin-right: 4px; }
.pub-share-btn {
    width: 34px; height: 34px; border-radius: 50%; border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 0.9rem; color: #fff; transition: transform 0.15s;
}
.pub-share-btn:hover { transform: scale(1.1); }
.pub-share-btn.whatsapp { background: #25D366; }
.pub-share-btn.facebook { background: #1877F2; }
.pub-share-btn.twitter { background: #1DA1F2; }
.pub-share-btn.linkedin { background: #0A66C2; }
.pub-share-btn.telegram { background: #0088cc; }
.pub-share-btn.copy { background: #6b7280; }

/* ── Sections ── */
.pub-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-soft);
}
.pub-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pub-section-title i { color: var(--primary); font-size: 1rem; }
.pub-empty { text-align: center; padding: 16px; color: var(--text-muted); font-size: 0.9rem; }

/* ── School Items ── */
.pub-school-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.pub-school-item:last-child { border-bottom: none; }
.pub-school-icon { width: 40px; height: 40px; border-radius: 8px; background: linear-gradient(135deg, var(--primary), #3b82f6); display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.pub-school-name { font-weight: 600; font-size: 0.95rem; }
.pub-school-role { font-size: 0.8rem; color: var(--text-muted); }

/* ── Experience Items ── */
.pub-exp-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border-color); }
.pub-exp-item:last-child { border-bottom: none; }
.pub-exp-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); margin-top: 5px; flex-shrink: 0; }
.pub-exp-position { font-weight: 600; font-size: 0.95rem; }
.pub-exp-institution { font-size: 0.9rem; color: var(--text-secondary); }
.pub-exp-dates { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.pub-exp-desc { font-size: 0.85rem; color: var(--text-secondary); margin-top: 6px; line-height: 1.5; }

/* ── Education Items ── */
.pub-edu-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border-color); }
.pub-edu-item:last-child { border-bottom: none; }
.pub-edu-icon { width: 44px; height: 44px; border-radius: 8px; background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.1rem; flex-shrink: 0; }
.pub-edu-degree { font-weight: 600; font-size: 0.95rem; }
.pub-edu-institution { font-size: 0.9rem; color: var(--text-secondary); }
.pub-edu-years { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

/* ── Skills ── */
.pub-skill-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 24px; background: var(--bg-tertiary); font-size: 0.9rem; margin: 0 6px 6px 0; }
.pub-skill-count { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }

/* ── Posts ── */
.pub-post-mini { padding: 14px 0; border-bottom: 1px solid var(--border-color); }
.pub-post-mini-link { display: block; color: inherit; text-decoration: none; }
.pub-post-mini-link:hover .pub-post-content { color: var(--sp-navy); }
.pub-post-mini:last-child { border-bottom: none; }
.pub-post-content { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pub-post-meta { display: flex; gap: 16px; margin-top: 8px; font-size: 0.8rem; color: var(--text-muted); }

/* ── Bottom Banner ── */
.pub-banner {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: linear-gradient(135deg, #0a1628 0%, #1a2a4a 50%, #0d1f3c 100%);
    color: white; padding: 16px 24px;
    display: flex; align-items: center; justify-content: center; gap: 16px;
    z-index: 100; box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
}
.pub-banner-text { font-size: 15px; font-weight: 500; }
.pub-banner-text strong { font-weight: 700; }
.pub-cta {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 24px;
    background: var(--primary); color: #000; border: none; border-radius: var(--radius-sm);
    font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform 0.2s;
}
.pub-cta:hover { transform: scale(1.05); }

/* ── States ── */
.pub-loading { text-align: center; padding: 60px; color: var(--text-muted); }

/* ── Responsive ── */
@media (max-width: 768px) {
    .pub-cover { height: 140px; }
    .pub-avatar, .pub-avatar-placeholder { width: 90px; height: 90px; }
    .pub-avatar-row { flex-direction: column; align-items: flex-start; gap: 10px; margin-top: -40px; }
    .pub-name { font-size: 1.2rem; }
    .pub-header-card { padding: 0 16px 16px; }
    .pub-section { padding: 16px; }
    .pub-stats { gap: 16px; flex-wrap: wrap; }
    .pub-banner { flex-direction: column; text-align: center; gap: 12px; padding: 12px 16px; }
    .pub-banner-text { font-size: 13px; }
    .pub-share-bar { justify-content: center; }
}
