/* ===== DESIGN SYSTEM (Light/Blue Theme) ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

:root {
    /* Color Palette */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-sidebar: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.95);

    --accent-primary: #2563eb;
    /* Blue */
    --accent-secondary: #3b82f6;
    /* Lighter Blue */
    --accent-warm: #ef4444;
    --accent-gold: #f59e0b;

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-heading: #0f172a;

    --border-color: #e2e8f0;
    --border-active: #bfdbfe;

    --gradient-hero: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    --gradient-card: linear-gradient(145deg, #ffffff, #f8fafc);
    --gradient-accent: linear-gradient(135deg, #2563eb, #3b82f6);
    --gradient-download: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(37, 99, 235, 0.08);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.1);
    --shadow-glow-accent: 0 0 20px rgba(59, 130, 246, 0.2);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Subtle background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(37, 99, 235, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(59, 130, 246, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

/* ===== HEADER ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-header);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
}

.header-logo {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    object-fit: contain;
    flex-shrink: 0;
    background: #ffffff;
    padding: 4px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.header-text h1 {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.header-text h2 {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

/* ===== LAYOUT ===== */
.layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 24px 60px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    position: relative;
    z-index: 1;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--shadow-md);
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.sidebar-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.nav-btn .nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: all var(--transition-normal);
}

.nav-btn .nav-count {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
}

.nav-btn:hover {
    background: #f8fafc;
    color: var(--text-primary);
}

.nav-btn:hover .nav-icon {
    color: var(--accent-primary);
}

.nav-btn.active {
    background: #eff6ff;
    color: var(--accent-primary);
    font-weight: 600;
}

.nav-btn.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent-primary);
    border-radius: 0 3px 3px 0;
}

.nav-btn.active .nav-icon {
    color: var(--accent-primary);
}

.nav-btn.active .nav-count {
    background: #dbeafe;
    color: var(--accent-primary);
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 10px;
}

/* Download resume button in sidebar */
.download-resume-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--gradient-download);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-top: 8px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
}

.download-resume-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(37, 99, 235, 0.35);
    filter: brightness(1.1);
}

.download-resume-btn:active {
    transform: translateY(0);
}

.download-resume-btn svg {
    width: 16px;
    height: 16px;
}

/* ===== MAIN AREA ===== */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

/* ===== PROFILE HERO CARD ===== */
.profile-hero {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
}

.profile-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 110px;
    background: var(--gradient-hero);
    border-bottom: 1px solid var(--border-active);
}

.profile-hero-inner {
    position: relative;
    padding: 32px;
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.profile-photo-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-photo {
    width: 130px;
    height: 130px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: var(--shadow-md);
    background: var(--bg-card);
}

.profile-photo-wrapper::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    background: #10b981;
    /* Green dot for active/online feel */
    border-radius: var(--radius-full);
    border: 3px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-info {
    flex: 1;
    min-width: 0;
    margin-top: 10px;
    /* Adjusting alignment with border */
}

.profile-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.2;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.profile-designation {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 4px;
}

.profile-department {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.profile-university {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

.profile-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.profile-meta-item svg {
    width: 15px;
    height: 15px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    transition: all var(--transition-normal);
}

.social-link:hover {
    background: #eff6ff;
    border-color: var(--border-active);
    color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.social-link svg {
    width: 16px;
    height: 16px;
}

/* ===== QUICK STATS ===== */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    text-align: center;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    cursor: default;
}

.stat-card:hover {
    border-color: var(--border-active);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* ===== SECTION PANELS ===== */
.section-panel {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    animation: fadeSlideIn 0.35s ease forwards;
}

.section-panel.active {
    display: block;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

.section-header {
    padding: 24px 28px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
}

.section-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    flex-shrink: 0;
    border: 1px solid var(--border-active);
}

.section-icon svg {
    width: 18px;
    height: 18px;
}

.section-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.section-body {
    padding: 24px 28px 28px;
}

/* About section */
.about-text {
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--text-secondary);
}

.about-text p {
    margin-bottom: 16px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Research area & Qualification */
.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 24px;
}

.info-block {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
}

.info-block-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-primary);
    margin-bottom: 8px;
}

.info-block-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.6;
}

/* ===== LIST ITEMS (Research papers, etc.) ===== */
.item-card {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.item-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.item-card:first-child {
    padding-top: 0;
}

.item-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-full);
    background: #eff6ff;
    color: var(--accent-primary);
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-right: 12px;
}

.item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-heading);
    line-height: 1.5;
    margin-bottom: 8px;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.item-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    background: #f1f5f9;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.item-tag.tag-year {
    color: var(--accent-primary);
    background: #eff6ff;
    border-color: #bfdbfe;
}

.item-tag.tag-status {
    color: #10b981;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.item-tag.tag-badge {
    color: var(--accent-gold);
    background: #fffbeb;
    border-color: #fde68a;
}

.item-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 4px;
}

.item-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 32px 24px;
    font-size: 0.78rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        background: #fff;
        color: #000;
    }

    body::before {
        display: none;
    }

    .header {
        position: static;
        background: #fff;
        border-bottom: 2px solid #000;
        box-shadow: none;
    }

    .sidebar {
        display: none !important;
    }

    .layout {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .section-panel {
        display: block !important;
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #ccc;
        margin-bottom: 16px;
        box-shadow: none;
    }

    .profile-hero {
        border: 1px solid #ccc;
        box-shadow: none;
    }

    .btn-download,
    .download-resume-btn {
        display: none !important;
    }

    .stat-card {
        border: 1px solid #ccc;
        box-shadow: none;
    }

    .profile-hero::before {
        display: none;
    }

    .nav-btn.active::before {
        display: none;
    }
}

/* ===== MOBILE MENU (Hidden on Desktop) ===== */
.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.mobile-menu-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
}

.mobile-menu-toggle .chevron {
    margin-left: auto;
    color: var(--text-muted);
}

.mobile-menu-toggle:active {
    background: var(--bg-card-hover);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .layout {
        grid-template-columns: 220px 1fr;
        gap: 20px;
    }
}

@media (max-width: 860px) {
    .layout {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .sidebar {
        display: none;
        /* hidden by default on mobile */
        position: static;
        flex-direction: column;
        padding: 14px;
        margin-top: 10px;
    }

    .sidebar.active-mobile {
        display: flex;
    }

    .sidebar-title {
        display: none;
        /* hide standard title on mobile inside dropdown */
    }

    .nav-btn {
        padding: 12px 14px;
        font-size: 0.9rem;
        margin-bottom: 4px;
    }

    .nav-btn.active::before {
        display: block;
        /* show indicator inside dropdown */
    }

    .download-resume-btn {
        margin-top: 8px;
    }

    .profile-hero-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px;
    }

    .social-links {
        justify-content: center;
    }

    .profile-actions {
        justify-content: center;
    }

    .profile-meta {
        justify-content: center;
    }

    .quick-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 500px) {
    .profile-name {
        font-size: 1.5rem;
    }

    .profile-photo {
        width: 100px;
        height: 100px;
    }

    .section-body {
        padding: 16px 18px 20px;
    }

    .section-header {
        padding: 18px;
    }

    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-text h1 {
        font-size: 0.88rem;
    }

    .header-text h2 {
        font-size: 0.72rem;
    }

    .header-logo {
        width: 40px;
        height: 40px;
    }

    .btn-download {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
}