/* ─── Theme-independent ─── */
:root {
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 9px;
    --sidebar-width: 280px;
    --content-gap: 1.25rem;
    --font-base: 'Plus Jakarta Sans', sans-serif;
}

/* ─── Theme: dark (default) ─── */
:root {
    /* brand */
    --brand-rgb: 59, 111, 212;
    --accent-rgb: 91, 143, 232;
    --navy-600: #1a2b7a;
    --blue-400: #3b6fd4;
    --blue-300: #5b8fe8;
    --blue-200: #89b3f5;
    --teal-400: #89b3f5a8;

    /* page */
    --bg-base: #0a0f2e;
    --page-bg:
        radial-gradient(ellipse 120% 80% at 15% 0%, #89abefe0 0%, rgb(99 156 255 / 10%) 60%),
        radial-gradient(ellipse 80% 60% at 85% 20%, rgb(69 135 248 / 15%) 0%, transparent 50%),
        radial-gradient(ellipse 100% 80% at 50% 100%, rgba(17, 29, 94, 0.9) 0%, transparent 70%),
        linear-gradient(160deg, var(--bg-base) 0%, rgba(59, 130, 246, .3) 40%, #0d1545 70%, #161c42 100%);
    --navbar-bg: #131d33b8;
    --navbar-border: #2041a0;

    /* surface */
    --glass-bg: rgb(23 37 65 / 64%);
    --glass-border: rgba(255, 255, 255, 0.10);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
    --avatar-bg: linear-gradient(145deg, #1a2b5a, #0f1a45);
    --overlay-rgb: 255, 255, 255;
    /* fill & border tipis di atas surface */

    /* text */
    --text-primary: #f0f4ff;
    --text-secondary: #a8b8d8;
    --text-muted: #6b80a8;

    /* quartile widget */
    --slate-rgb: 148, 163, 184;
    --sky-rgb: 56, 189, 248;
}

/* ─── Theme: light ─── */
:root[data-theme="light"] {
    --brand-rgb: 59, 111, 212;
    --accent-rgb: 59, 111, 212;
    --navy-900: #0a0f2e;
    --navy-800: #111d45;
    --navy-700: #1b2a5e;
    --navy-600: #223a7a;
    --navy-500: #2b4aa0;
    --blue-400: #2f6fd4;
    --blue-300: #4f86e0;
    --blue-200: #7ea6ec;
    --gold-500: #c9a24b;
    --gold-400: #d9b968;
    --gold-100: #f7ecd2;

    /* dipakai sebagai teks: harus gelap di atas putih */
    --teal-400: #3b6fd4a8;

    --bg-base: #f5f7fb;
    --page-bg:
        radial-gradient(ellipse 120% 80% at 15% 0%, rgba(137, 171, 239, .35) 0%, transparent 60%),
        linear-gradient(160deg, var(--bg-base) 0%, #e8eefb 100%);
    --navbar-bg: rgba(255, 255, 255, .8);
    --navbar-border: #c9d6f2;

    --glass-bg: #ffffff;
    --glass-border: #e6e9f2;
    --glass-hover: #f0f3fa;
    --card-shadow: 0 4px 24px rgba(20, 30, 60, 0.06);
    --avatar-bg: linear-gradient(145deg, #dbe5fa, #c3d3f5);
    --overlay-rgb: 15, 27, 61;

    --text-primary: #0f1b3d;
    --text-secondary: #44527a;
    --text-muted: #667599;

    --slate-rgb: 71, 85, 105;
    --sky-rgb: 2, 132, 199;
}

/* light: teks semua pill otomatis digelapkan dari warna dasarnya (tidak perlu per-varian) */
:root[data-theme="light"] .pill {
    --pill-color: color-mix(in srgb, rgb(var(--pill-rgb, 131, 157, 218)) 65%, black);
}


/* ==========================================================================
   02. BASE
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-base);
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
}

button,
input {
    font-family: inherit;
}

/* page background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background: var(--page-bg);
}


/* ==========================================================================
   03. LAYOUT
   ========================================================================== */

/* ─── Navbar ─── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 62px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--navbar-bg);
    border-bottom: 1px solid var(--navbar-border);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
}

.nav-brand img {
    width: 72px;
}

/* ─── Content wrapper ─── */
.content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 3rem;
}

/* ─── Main grid: tabs (kiri) + sidebar (kanan) ─── */
.pub-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: var(--content-gap);
    margin-bottom: var(--content-gap);
    align-items: start;
}

.pub-main {
    min-width: 0;
}

.pub-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--content-gap);
}

/* ─── professional summary & education ─── */
.row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--content-gap);
    margin-bottom: var(--content-gap);
}

.row-2col .card {
    height: 100%;
}

/* ─── Footer ─── */
.site-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.76rem;
    color: var(--text-muted);
}

/* ─── Scroll to top (display di-toggle JS) ─── */
#scrollTop {
    position: fixed;
    bottom: 4rem;
    right: 2rem;
    z-index: 99;
    width: 30px;
    height: 30px;
    display: none;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-400), var(--navy-600));
    box-shadow: 0 4px 16px rgba(var(--brand-rgb), .4);
    color: #fff;
    font-size: 0.75rem;
    cursor: pointer;
}


/* ==========================================================================
   04. SHARED COMPONENTS
   ========================================================================== */

/* ─── Card ─── */
.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
    animation: fadeUp 0.5s ease both;
}

.card:hover {
    border-color: rgba(var(--accent-rgb), 0.2);
}

.card-header {
    padding: 1.1rem 1.25rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.card-body {
    padding: 0.9rem 1.25rem 1.25rem;
}

/* ─── Tag ─── */
.tag {
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tag-primary {
    background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.3), rgba(var(--accent-rgb), 0.2));
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    color: var(--blue-200);
}

/* ─── Tab navigation (main tabs + sub tabs) ─── */
.tab-nav,
.sub-tab-nav {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid var(--glass-border);
}

.tab-nav::-webkit-scrollbar,
.sub-tab-nav::-webkit-scrollbar {
    display: none;
}

.sub-tab-nav {
    margin-bottom: 1rem;
}

.tab-btn,
.sub-tab-btn {
    position: relative;
    bottom: -1px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}

.tab-btn:hover,
.sub-tab-btn:hover {
    color: var(--text-secondary);
}

.tab-btn {
    gap: 0.35rem;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    letter-spacing: 0.01em;
}

.tab-btn.active {
    color: var(--blue-200);
    border-bottom-color: var(--blue-200);
}

.sub-tab-btn {
    gap: 0.3rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.73rem;
}

.sub-tab-btn.active {
    color: var(--blue-300);
    border-bottom-color: var(--blue-300);
}

.tab-badge,
.sub-badge {
    border-radius: 4px;
    font-weight: 700;
}

.tab-badge {
    padding: 0.1rem 0.4rem;
    font-size: 0.65rem;
    background: rgba(var(--overlay-rgb), 0.1);
}

.tab-badge.active-badge {
    background: rgba(var(--accent-rgb), 0.2);
    color: var(--blue-200);
}

.sub-badge {
    padding: 0.1rem 0.35rem;
    font-size: 0.63rem;
    background: rgba(var(--overlay-rgb), 0.1);
}

.sub-badge.active-badge {
    background: rgba(var(--accent-rgb), 0.2);
    color: var(--blue-200);
}

.sub-tab-btn.active .sub-badge {
    background: rgba(var(--accent-rgb), 0.3);
}

/* ─── Tab panes ─── */
.tab-content-area {
    padding: 1.1rem 1.25rem 1.25rem;
}

.tab-pane,
.sub-tab-pane {
    display: none;
}

.tab-pane.active,
.sub-tab-pane.active {
    display: block;
    animation: expandCenter 0.3s ease-out both;
}

/* ─── DataTable: search bar ─── */
.dt-top-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
}

.dt-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.dt-search-icon {
    position: absolute;
    left: 0.6rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    pointer-events: none;
}

.dt-search-input {
    width: 170px;
    max-width: 100%;
    padding: 0.38rem 0.7rem 0.38rem 1.9rem;
    background: rgba(var(--overlay-rgb), 0.01);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    outline: none;
    font-size: 0.73rem;
    color: var(--text-secondary);
    transition: border-color 0.2s;
}

.dt-search-input:focus {
    border-color: rgba(var(--accent-rgb), 0.5);
    color: var(--text-primary);
}

.dt-search-input::placeholder {
    color: var(--text-muted);
}

/* ─── DataTable: footer & pagination ─── */
.dt-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}

.dt-page-info {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.dt-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
}

.dt-page-dots {
    color: var(--text-muted);
    padding: 0.25rem;
    font-size: 0.8rem;
}

.dt-page-btn {
    width: 27px;
    height: 27px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    background: none;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.dt-page-btn:hover {
    border-color: rgba(var(--accent-rgb), 0.4);
    color: var(--text-primary);
}

.dt-page-btn.active {
    background: linear-gradient(135deg, var(--blue-400), var(--navy-600));
    border-color: var(--blue-400);
    box-shadow: 0 2px 10px rgba(var(--brand-rgb), 0.4);
    color: #fff;
}

.dt-page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* UI bawaan DataTables disembunyikan */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    display: none !important;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.45rem;
}

.data-table thead {
    display: none;
}

/* Aksen kiri: default cyan, jurnal/prosiding ikut warna quartile (class pill-q1..pill-noq di <tr>) */
.data-table tr {
    --row-accent: var(--pill-color, #5b8fe8);
}

.data-table td {
    padding: 0.3rem 1rem;
    vertical-align: top;
    font-size: 0.80rem;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.01);
    border: 1px solid var(--glass-border);
    border-left: 4px solid color-mix(in srgb, var(--row-accent) 55%, transparent);
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.data-table tr:hover td {
    background: rgba(0, 0, 0, 0.20);
}

:root[data-theme="light"] .data-table tr:hover td {
    background: rgba(0, 0, 0, 0.10);
}

.item-sub+.meta-pills {
    margin-top: 0.3rem;
}

.item-title {
    display: block;
    margin-bottom: 0.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a.item-title:hover {
    color: var(--blue-400);
}

.item-sub,
.meta-text {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.item-sub {
    margin-top: 0;
}

.mono-text {
    font-family: monospace;
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* ─── Pill (all) ─── */
.pill {
    --pill-rgb: 131, 157, 218;
    --pill-color: var(--text-primary);
    --pill-bg-a: .16;
    --pill-border-a: .35;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
    background: rgba(var(--pill-rgb), var(--pill-bg-a));
    border: 1px solid rgba(var(--pill-rgb), var(--pill-border-a));
    color: var(--pill-color);
}

/* ─── Empty table if count publications/award/patent/workshop is zero ───
   --icon-rgb (diset class varian di section tab masing-masing) */
.empty-table {
    margin-top: 0.25rem;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    border: 1px dashed rgba(var(--overlay-rgb), 0.08);
    border-radius: var(--radius-md);
    background: rgba(var(--overlay-rgb), 0.02);
}

.empty-table.compact {
    padding: 1.5rem 1rem;
    border-color: rgba(var(--overlay-rgb), 0.1);
}

.empty-table-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(var(--icon-rgb), .12);
}

.empty-table-icon.compact {
    width: 32px;
    height: 32px;
}

.empty-table-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.empty-table-title.sm {
    font-size: 0.78rem;
}

.empty-table-sub {
    max-width: 220px;
    font-size: 0.7rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* ─── Keyframes ─── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes expandCenter {
    from {
        opacity: 0;
        transform: scaleX(0.97);
    }

    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* ==========================================================================
   05. PROFILE HEADER
   ========================================================================== */
.profile-card {
    position: relative;
    margin-bottom: var(--content-gap);
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    height: 3px;
    background: linear-gradient(90deg, var(--blue-400), var(--blue-200), var(--teal-400));
}

.profile-card-body {
    padding: 2rem 1.5rem 1.5rem;
}

.profile-grid {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

/* ─── Avatar ─── */
.profile-avatar {
    flex-shrink: 0;
}

.avatar-ring {
    width: 120px;
    aspect-ratio: 2/3;
    padding: 3px;
    display: flex;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--navy-600), var(--blue-400), var(--blue-200));
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.2), 0 8px 32px rgba(var(--brand-rgb), 0.4);
}

.avatar-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: var(--avatar-bg);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Identity ─── */
.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.profile-meta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0.5rem 0 1rem;
}

.meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.meta-item i {
    width: 14px;
    margin-top: 0.1rem;
    flex-shrink: 0;
    text-align: center;
    font-size: 0.75rem;
    color: var(--blue-300);
}

.meta-link {
    color: var(--text-muted);
    text-decoration: none;
    word-break: break-all;
}

.meta-link:hover {
    color: var(--text-primary);
}

/* ─── Stats strip (idScopus, idScholar, ...) ─── */
.stats-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--glass-border);
}

.stat-card {
    position: relative;
    min-width: 90px;
    padding: 0.75rem 0.9rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border: 1px solid rgba(var(--accent-rgb), 0.15);
    border-radius: var(--radius-sm);
    background: rgba(var(--brand-rgb), 0.1);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--accent-rgb), 0.35);
    background: rgba(var(--brand-rgb), 0.15);
}

/* garis bawah menyapu saat hover */
.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--blue-400), var(--blue-200));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}

.stat-card:hover::after {
    transform: scaleX(1);
}

.stat-icon {
    font-size: 0.85rem;
    opacity: 0.9;
}

.stat-name {
    margin-top: 0.65rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-muted);
}

.stat-arrow {
    position: absolute;
    top: 12px;
    right: 10px;
    font-size: 0.75rem;
    opacity: 0.7;
}


/* ==========================================================================
   06. BIO & EDUCATION
   ========================================================================== */

/* ─── Bio ───
   JS juga mengisi inline max-height; dua class state ini cadangan/penanda. */
.bio-text {
    overflow: hidden;
    font-size: 0.80rem;
    line-height: 1.75;
    text-align: justify;
    color: var(--text-secondary);
    transition: max-height 0.4s ease;
}

.bio-text.is-collapsed {
    max-height: 112px;
}

.bio-text.is-expanded {
    max-height: 9999px;
}

.bio-text a {
    color: var(--blue-300);
    text-decoration: none;
}

.bio-text a:hover {
    text-decoration: underline;
}

.btn-link {
    margin-top: 0.4rem;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    border: none;
    background: none;
    color: var(--blue-300);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-link:hover {
    color: var(--blue-200);
}

/* ─── Education timeline ─── */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.timeline-item {
    position: relative;
    display: flex;
    gap: 0.9rem;
}

/* garis penghubung: lebar tahun (64px) + gap + tengah titik (4px) */
.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: calc(64px + 0.9rem + 4px);
    top: 24px;
    bottom: -1.1rem;
    width: 1px;
    background: linear-gradient(to bottom, rgba(var(--brand-rgb), 0.4), transparent);
}

.timeline-year {
    width: 64px;
    flex-shrink: 0;
    padding-top: 0.1rem;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
    color: var(--blue-300);
}

.timeline-dot {
    width: 10px;
    height: 10px;
    margin-top: 0.25rem;
    flex-shrink: 0;
    border: 2px solid var(--bg-base);
    border-radius: 50%;
    background: var(--blue-400);
    box-shadow: 0 0 8px rgba(var(--brand-rgb), 0.5);
}

.timeline-content {
    flex: 1;
    min-width: 0;
}

.timeline-title {
    margin-bottom: 0.15rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-sub {
    margin-bottom: 0.25rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}


/* ==========================================================================
   07. TAB: PUBLICATIONS
   ========================================================================== */
/* Wrapper judul + pill year (float kanan). Pill harus elemen pertama di dalam wrapper.
   Dipakai: Journals, Proceedings, Books, atau tab lain. */
.empty-table-icon.blue {
    --icon-rgb: 99, 102, 241;
}

.item-title-wrap {
    overflow: hidden;
}

.item-title-wrap>.pill {
    float: right;
    margin: 0.05rem 0 0 0.5rem;
}

.item-title-wrap .item-title {
    text-align: justify;
}

/* ─── 07.1 Pill variants (kuartil/status: #tblJurnal & #tblProsiding; netral: tahun jurnal & buku) ─── */
.pill-q1,
.pill-granted,
.pill-published {
    --pill-rgb: 16, 185, 129;
    --pill-color: #10b981;
}

.pill-q2 {
    --pill-rgb: 59, 130, 246;
    --pill-color: #60a5fa;
}

.pill-q3 {
    --pill-rgb: 245, 158, 11;
    --pill-color: #fbbf24;
}

.pill-q4 {
    --pill-rgb: 248, 113, 113;
    --pill-color: #f87171;
}

.pill-noq {
    --pill-rgb: 71, 85, 105;
    --pill-color: #94a3b8;
    --pill-bg-a: .3;
    --pill-border-a: .4;
}

.pill-wos {
    --pill-rgb: 139, 92, 246;
    --pill-color: #a78bfa;
}

/* ─── 07.2 Journals (#tblJurnal) & Proceeding (tblProceeding) ─── */
.row-label {
    display: block;
    min-height: 1.35rem;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.35rem;
    margin-bottom: 0.2rem;
    color: var(--row-accent);
}

.data-table td.td-badges {
    width: 110px;
    white-space: nowrap;
    padding-left: 0.75rem;
    vertical-align: top;
}

.badge-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

/* ─── 07.4 Books (#tblBuku) ─── */
#tblBuku .meta-text {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.35rem;
    min-width: 0;
    font-size: 0.7rem;
    color: var(--text-muted);
}

#tblBuku .meta-text i {
    flex: 0 0 1rem;
    text-align: center;
}

#tblBuku .isbn-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    width: fit-content;
    max-width: 100%;
    margin-top: 0.4rem;
    margin-bottom: 0.1rem;
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    background: rgba(var(--overlay-rgb), 0.05);
    font-family: monospace;
    font-size: 0.65rem;
    letter-spacing: 0.02em;
    overflow-wrap: break-word;
    white-space: normal;
    color: var(--text-muted);
}

/* ==========================================================================
   08. TAB: PATENTS (#tblPaten)
   ========================================================================== */
.empty-table-icon.indigo {
    --icon-rgb: 99, 102, 241;
}

#tblPaten .nmrpaten-badge {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    width: fit-content;
    max-width: 100%;
    margin-top: 0.5rem;
    margin-bottom: 0.1rem;
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    background: rgba(var(--overlay-rgb), 0.05);
    font-family: monospace;
    font-size: 0.65rem;
    letter-spacing: 0.02em;
    overflow-wrap: break-word;
    white-space: normal;
    color: var(--text-muted);
}

/* ==========================================================================
   09. TAB: AWARDS (#tblAward)
   ========================================================================== */
.empty-table-icon.yellow {
    --icon-rgb: 245, 200, 66;
}

#tblAward .award-heading {
    display: flex;
    justify-content: flex-end;
}

#tblAward .item-title {
    display: block;
    margin-bottom: 0.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    text-align: justify;
    transition: color 0.2s;
}

.bullet-separator {
    display: inline-block;
    margin: 0 5px;
    vertical-align: middle;
}

/* ==========================================================================
   10. TAB: WORKSHOPS (#tblWorkshop)
   ========================================================================== */
.empty-table-icon.purple {
    --icon-rgb: 192, 132, 252;
}

#tblWorkshop .workshop-heading {
    display: flex;
    justify-content: flex-end;
}

#tblWorkshop .item-title {
    display: block;
    margin-bottom: 0.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    text-align: justify;
    transition: color 0.2s;
}

/* ==========================================================================
   11. SIDEBAR
   ========================================================================== */
/* sidebar meluncur masuk saat ganti tab (class .sidebar-slide ditambahkan JS) */
.sidebar-slide .card {
    animation: slideInRight 1000ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sidebar-slide .card:nth-child(2) {
    animation-delay: 0.06s;
}

/* ─── Academic overview (donut) ─── */
.empty-table-icon.blue-sm {
    --icon-rgb: var(--brand-rgb);
}

.donut-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.donut-container {
    position: relative;
    width: 100%;
    max-width: 160px;
    aspect-ratio: 1/1;
}

.donut-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.donut-label-val {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.donut-label-sub {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-muted);
}

.legend-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-radius: 50%;
}

.legend-val {
    margin-left: auto;
    font-weight: 700;
    color: var(--text-primary);
}

/* ─── Quartile distribution ─── */
.qtab-row {
    display: flex;
    gap: 6px;
    padding: 0 1.25rem 0.5rem;
}

.qtab-btn {
    margin-top: 0.75rem;
    padding: 4px 12px;
    border: 0.5px solid rgba(var(--overlay-rgb), 0.1);
    border-radius: 8px;
    background: transparent;
    color: rgba(var(--slate-rgb), 0.6);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.qtab-btn.active {
    border-color: rgba(var(--sky-rgb), 0.35);
    background: rgba(var(--sky-rgb), 0.12);
    color: rgb(var(--sky-rgb));
}

.q-legend-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0.75rem 0 0.6rem;
    padding: 0 1.25rem;
}

.q-leg {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: rgba(var(--slate-rgb), 0.7);
}

.q-dot {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
}

.q-section {
    padding: 0 1.25rem 1.25rem;
}

.q-chart-wrap {
    position: relative;
    width: 100%;
    height: 160px;
}

.q-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    margin-top: 12px;
}

.q-stat-cell {
    padding: 6px 3px;
    text-align: center;
    border: 0.5px solid rgba(var(--overlay-rgb), 0.07);
    border-radius: 7px;
    background: rgba(var(--overlay-rgb), 0.03);
}

.q-stat-label {
    margin-bottom: 3px;
    font-size: 8px;
    color: rgba(var(--slate-rgb), 0.45);
}

.q-stat-value {
    font-size: 15px;
    font-weight: 600;
}

/* ==========================================================================
   12. RESPONSIVE
   Breakpoint: ≤960 (tablet ke bawah) · 701–960 (tablet saja) · ≤700 (mobile) · ≤400 (kecil)
   Komentar "NN." menunjuk section asal aturannya.
   ========================================================================== */

/* ─── ≤ 960px ─── */
@media (max-width: 960px) {

    /* 03. Layout */
    .pub-layout {
        grid-template-columns: 1fr;
    }
}

/* ─── 701px – 960px: kartu sidebar berdampingan ─── */
@media (min-width: 701px) and (max-width: 960px) {

    /* 03. Layout */
    .pub-sidebar {
        flex-direction: row;
    }

    .pub-sidebar .card {
        flex: 1;
    }

    /* 11. Sidebar */
    .donut-wrap {
        flex-direction: row;
    }

    .donut-container {
        max-width: 120px;
    }

    .legend-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── ≤ 700px ─── */
@media (max-width: 700px) {
    :root {
        --content-gap: 1rem;
    }

    /* 03. Layout */
    .content {
        padding: 0.75rem 0.5rem 3rem;
    }

    .row-2col {
        grid-template-columns: 1fr;
    }

    /* 04. Shared */
    .card-header {
        padding: 1rem 1rem 0;
    }

    .card-body {
        padding: 0.85rem 1rem 1rem;
    }

    .tab-content-area {
        padding: 0.75rem 0.5rem;
    }

    .tab-btn {
        padding: 0.6rem 0.65rem;
        font-size: 0.7rem;
        gap: 0.25rem;
    }

    .sub-tab-btn {
        padding: 0.42rem 0.6rem;
        font-size: 0.68rem;
    }

    .dt-search-input {
        width: 100%;
    }

    /* 05. Profile header */
    .profile-grid {
        flex-direction: column;
    }

    .avatar-ring {
        width: 80px;
    }

    .profile-name {
        font-size: 1.1rem;
    }

    /* 11. Sidebar */
    .pub-sidebar .card {
        flex: unset;
    }

    .qtab-row {
        padding: 0 1rem 0.5rem;
    }

    .q-legend-bar {
        gap: 6px;
        padding: 0 1rem;
    }

    .q-section {
        padding: 0 1rem 1rem;
    }

    .q-chart-wrap {
        height: 130px;
    }

    .q-stat-value {
        font-size: 13px;
    }

    .q-stat-label {
        font-size: 7px;
    }
}

/* ─── ≤ 400px ─── */
@media (max-width: 400px) {

    /* 04. Shared */
    .tab-btn {
        padding: 0.55rem 0.45rem;
        font-size: 0.68rem;
    }

    .tab-badge {
        padding: 0.1rem 0.3rem;
        font-size: 0.6rem;
    }

    /* 05. Profile header */
    .profile-name {
        font-size: 1rem;
    }

    .stats-strip {
        gap: 0.4rem;
    }

    .stat-card {
        min-width: 80px;
    }

    /* 11. Sidebar */
    .q-stat-value {
        font-size: 12px;
    }
}
