* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: #f4f7fb;
    color: #222;
    transition: background 0.4s, color 0.4s;
}

/* ── Top Nav ── */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: rgba(20,33,61,0.96);
    color: white;
    padding: 14px 24px;
    backdrop-filter: blur(10px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.brand-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.brand-tagline {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.brand-tagline em {
    font-style: italic;
    font-size: 10.5px;
    font-family: Georgia, 'Times New Roman', serif;
    color: #a8c4f5;
    font-weight: 400;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.nav-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}

.nav-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-links > a {
    color: #e8eefc;
    text-decoration: none;
    font-weight: 600;
}

.nav-links > a:hover { color: #7eb6ff; }

.nav-dropdown { position: relative; }

.nav-dropdown-toggle {
    color: #e8eefc;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.nav-dropdown-toggle:hover { color: #7eb6ff; }

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: #14213d;
    border-radius: 10px;
    min-width: 210px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    overflow: hidden;
    z-index: 2000;
    flex-direction: column;
}

.nav-dropdown:hover .nav-dropdown-menu { display: flex; }

.nav-dropdown-menu a {
    display: block;
    padding: 11px 18px;
    color: #e8eefc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover { background: #1f3c88; color: #fff; }

.nav-actions { display: flex; gap: 10px; align-items: center; }

.dark-btn {
    border: none;
    cursor: pointer;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 700;
    background: rgba(255,255,255,0.12);
    color: white;
}

/* ── Sidebar ── */
.sidebar {
    width: 320px;
    background: linear-gradient(180deg, #14213d, #1f3c88);
    color: white;
    min-height: calc(100vh - 64px);
    padding: 40px 25px;
    position: fixed;
    top: 64px;
    overflow-y: auto;
}

.profile-photo {
    width: 170px; height: 170px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    margin-bottom: 20px;
}

.sidebar h1 { font-size: 28px; margin-bottom: 10px; }
.designation { color: #d7d7d7; line-height: 1.6; margin-bottom: 25px; }
.sidebar-buttons { margin-top: 25px; margin-bottom: 25px; }

.cv-btn {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    background: #4da6ff;
    color: white;
}

/* ── Profile Buttons ── */
.profile-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.profile-btn {
    display: inline-block;
    padding: 11px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    color: white;
    transition: 0.3s;
    font-size: 14px;
}

.profile-btn:hover { transform: translateY(-2px); opacity: 0.92; }
.profile-btn.scholar      { background: #4285f4; }
.profile-btn.linkedin     { background: #0a66c2; }
.profile-btn.x            { background: #111111; }
.profile-btn.orcid        { background: #a6ce39; color: #111; }
.profile-btn.scopus       { background: #f36f21; }
.profile-btn.researcherid { background: #6a1b9a; }
.profile-btn.blogs        { background: #00897b; }
.profile-btn.git          { background: #455a64;}

/* ── Main Content ── */
.main-content {
    margin-left: 320px;
    padding: 30px 50px 50px;
    width: calc(100% - 320px);
}

.hero { margin-bottom: 40px; }

.hero h1 {
    font-size: 52px;
    line-height: 1.2;
    color: #1f3c88;
    margin-bottom: 25px;
}

.hero p {
    font-size: 18px;
    line-height: 1.9;
    max-width: 950px;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.06);
    transition: transform 0.3s;
}

.card:hover { transform: translateY(-4px); }
.card h2 { margin-bottom: 20px; color: #1f3c88; }

/* Profile Summary */
.profile-summary p { line-height: 1.8; color: #333; }

.summary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.summary-tags span {
    background: #1f3c88;
    color: white;
    padding: 10px 16px;
    border-radius: 25px;
    font-size: 14px;
}

/* Timeline inside tab panels */
.tab-panel .timeline { margin-top: 10px; }
.tab-panel .timeline-item { margin-bottom: 16px; }
.tab-panel .timeline-item h3 { font-size: 15px; margin-bottom: 4px; color: #14213d; }
.tab-panel .timeline-item p  { color: #555; font-size: 14px; }

.dark-mode .tab-panel .timeline-item h3 { color: #7eb6ff; }
.dark-mode .tab-panel .timeline-item p  { color: #aaa; }

/* Timeline */
.timeline-item { margin-bottom: 20px; }
.timeline-item h3 { margin-bottom: 5px; }

/* ── Tab controls (pill buttons) ── */
.tab-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.tab-btn {
    border: none;
    background: #eef3ff;
    color: #1f3c88;
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s, color 0.2s;
}

.tab-btn:hover  { background: #d0deff; }
.tab-btn.active { background: #1f3c88; color: white; }

/* ── Tab panels ── */
.tab-panel {
    display: none;
    padding: 22px;
    background: #f8faff;
    border-radius: 12px;
    border: 1.5px solid #dce6ff;
    margin-bottom: 4px;
    animation: fadeIn 0.3s ease;
}

.tab-panel.open { display: block; }

.tab-panel h3 {
    font-size: 17px;
    color: #14213d;
    margin-bottom: 12px;
}

.tab-panel > p {
    line-height: 1.8;
    color: #444;
    margin-bottom: 14px;
}

/* Publication list inside tab panels */
.tab-pubs h4 {
    font-size: 13px;
    font-weight: 700;
    color: #1f3c88;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tab-pubs ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tab-pubs ul li {
    padding-left: 16px;
    position: relative;
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}

.tab-pubs ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: #1f3c88;
    font-weight: 700;
}

/* ── Inner tabs (year buttons inside Conferences) ── */
.inner-tab-controls {
    margin-top: 4px;
    margin-bottom: 14px;
}

.inner-tab-btn {
    padding: 8px 14px;
    font-size: 13px;
}

.inner-tab-panel {
    display: none;
    padding: 16px 18px;
    background: white;
    border-radius: 10px;
    border: 1.5px solid #c8d8f8;
    animation: fadeIn 0.25s ease;
}

.inner-tab-panel.open { display: block; }

.inner-tab-panel p {
    line-height: 1.8;
    color: #444;
    font-size: 14px;
}

/* ── Academic Journey ── */
.journey-block {
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1.5px solid #e4ebfa;
}

.journey-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.journey-sub-heading {
    font-size: 17px;
    font-weight: 700;
    color: #1f3c88;
    margin-bottom: 14px;
    padding-left: 12px;
    border-left: 4px solid #1f3c88;
}

.dark-mode .journey-block     { border-bottom-color: #2a2a2a; }
.dark-mode .journey-sub-heading { color: #7eb6ff; border-left-color: #7eb6ff; }

/* ── Research two-column layout ── */
.res-two-col {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: start;
}

/* Summary column: exactly half width minus gap */
.res-content {
    flex: 0 0 calc(50% - 12px);
    min-width: 0;
}

/* Media column: exactly half width minus gap */
.res-media {
    flex: 0 0 calc(50% - 12px);
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* Publications: break out of .res-content to span full width.
   Width = 200% of parent + the gap between the two columns.
   This works because .res-content is 50% of .res-two-col. */
.res-two-col .tab-pubs {
    width: calc(200% + 24px);
    border-top: 1.5px solid #dce6ff;
    padding-top: 18px;
    margin-top: 10px;
}

.res-content h3 {
    font-size: 17px;
    color: #14213d;
    margin-bottom: 12px;
}

.res-content > p {
    line-height: 1.8;
    color: #444;
    margin-bottom: 14px;
    font-size: 14px;
}

.res-media img,
.res-media video {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    display: block;
}

.res-media-placeholder {
    width: 100%;
    min-height: 200px;
    border: 2px dashed #b0c4ef;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f0f5ff;
    padding: 20px;
    text-align: center;
}

.res-media-placeholder span {
    font-size: 36px;
    line-height: 1;
}

.res-media-placeholder p {
    color: #6680aa;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.res-media-placeholder code {
    font-size: 12px;
    background: #dce8ff;
    color: #1f3c88;
    padding: 4px 8px;
    border-radius: 5px;
    font-family: monospace;
}

.dark-mode .res-content h3  { color: #7eb6ff; }
.dark-mode .res-content > p { color: #ccc; }

.dark-mode .res-two-col .tab-pubs { border-top-color: #2a3d6b; }

.dark-mode .res-media-placeholder {
    background: #1a2340;
    border-color: #2a3d6b;
}

.dark-mode .res-media-placeholder p    { color: #7a99cc; }
.dark-mode .res-media-placeholder code { background: #1f3c88; color: #b0cfff; }

@media (max-width: 860px) {
    .res-content,
    .res-media { flex: 0 0 100%; }
    .res-two-col .tab-pubs { width: 100%; }
}

/* ── Academics tab-controls: all pills in one row ── */
#academics .tab-controls {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: #c8d8f8 transparent;
}

#academics .tab-controls::-webkit-scrollbar { height: 4px; }
#academics .tab-controls::-webkit-scrollbar-thumb {
    background: #c8d8f8;
    border-radius: 4px;
}

#academics .tab-btn {
    white-space: nowrap;
    padding: 9px 13px;
    font-size: 13px;
    flex-shrink: 0;
}

#academics .tab-btn:hover  { background: #d0deff; }
#academics .tab-btn.active { background: #1f3c88; color: white; }

/* ── Publications ── */
.pub-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    border: none;
    background: #eef3ff;
    color: #1f3c88;
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s, color 0.2s;
}

.filter-btn.active, .filter-btn:hover { background: #1f3c88; color: white; }

.pub-year-block { display: none; }

.pub-year {
    font-size: 20px;
    font-weight: 700;
    margin: 25px 0 15px;
    color: #1f3c88;
}

.publication {
    border-left: 4px solid #1f3c88;
    padding-left: 18px;
    margin-bottom: 25px;
}

.publication h3 { margin-bottom: 8px; line-height: 1.5; font-size: 16px; }
.publication p  { color: #666; margin-bottom: 6px; }
.publication a  { color: #1f3c88; text-decoration: none; font-weight: 600; }

.download-btn {
    display: inline-block;
    margin-top: 10px;
    background: #eef3ff;
    padding: 12px 16px;
    border-radius: 10px;
    color: #1f3c88;
    text-decoration: none;
    font-weight: 600;
}

/* ── Sources ── */
.source-grid { display: flex; flex-wrap: wrap; gap: 14px; }

.source-btn {
    display: inline-block;
    padding: 12px 16px;
    border-radius: 10px;
    background: #eef3ff;
    color: #1f3c88;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.source-btn:hover { background: #1f3c88; color: white; }

/* ── Contact ── */
.contact-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; }

.contact-btn {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 10px;
    background: #1f3c88;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.contact-btn:hover { background: #14213d; }

/* ── Moments ── */
.moments-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    margin-top: 16px;
}

.moments-col-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1f3c88;
    margin-bottom: 12px;
}

.carousel {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.carousel-track {
    display: flex;
    transition: transform 0.45s ease;
}

.carousel-slide { min-width: 100%; position: relative; }

.carousel-slide img {
    width: 100%;
    display: block;
    height: 220px;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 18px 14px 10px;
    font-size: 13px;
    font-weight: 500;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.85);
    border: none;
    border-radius: 50%;
    width: 34px; height: 34px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.carousel-btn:hover { background: white; }
.carousel-btn.prev  { left: 8px; }
.carousel-btn.next  { right: 8px; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    padding: 8px 0;
    background: rgba(0,0,0,0.5);
}

.carousel-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.2s;
}

.carousel-dot.active { background: white; }

.moments-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 2px;
}

.moments-gallery img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    transition: transform 0.25s;
}

.moments-gallery img:hover { transform: scale(1.04); }

/* ── Animations ── */
.fade { animation: fadeIn 0.8s ease; }

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

/* ── Dark Mode ── */
.dark-mode { background: #111; color: #eee; }

.dark-mode .card { background: #1d1d1d; color: #eee; }
.dark-mode .hero h1 { color: #7eb6ff; }
.dark-mode .profile-summary p { color: #ccc; }

.dark-mode .summary-tags span { background: #2a2a2a; color: #eee; }

.dark-mode .tab-btn { background: #2a2a2a; color: #7eb6ff; }
.dark-mode .tab-btn:hover  { background: #333; }
.dark-mode .tab-btn.active { background: #1f3c88; color: white; }

.dark-mode .tab-panel {
    background: #1a1a2e;
    border-color: #333;
}

.dark-mode .tab-panel h3 { color: #7eb6ff; }
.dark-mode .tab-panel > p { color: #ccc; }

.dark-mode .tab-pubs h4 { color: #7eb6ff; }
.dark-mode .tab-pubs ul li { color: #ccc; }
.dark-mode .tab-pubs ul li::before { color: #7eb6ff; }

.dark-mode .inner-tab-panel {
    background: #1d1d1d;
    border-color: #444;
}

.dark-mode .inner-tab-panel p { color: #ccc; }

.dark-mode .filter-btn { background: #2a2a2a; color: #7eb6ff; }
.dark-mode .filter-btn.active,
.dark-mode .filter-btn:hover { background: #1f3c88; color: white; }

.dark-mode .pub-year { color: #7eb6ff; }
.dark-mode .publication { border-left-color: #7eb6ff; }
.dark-mode .publication p { color: #aaa; }
.dark-mode .publication a { color: #7eb6ff; }
.dark-mode .download-btn { background: #2a2a2a; color: #7eb6ff; }

.dark-mode .source-btn { background: #2a2a2a; color: #eee; }
.dark-mode .source-btn:hover { background: #7eb6ff; color: #111; }

.dark-mode .moments-col-title { color: #7eb6ff; }

.dark-mode .nav-dropdown-menu { background: #0d1829; }

/* ── Responsive ── */
@media (max-width: 1100px) {
    .top-nav { flex-wrap: wrap; }
    .sidebar { position: relative; top: 0; width: 100%; min-height: auto; }
    .main-content { margin-left: 0; width: 100%; padding: 25px; }
}

@media (max-width: 900px) {
    .nav-links { gap: 10px; }
    .hero h1 { font-size: 36px; }
    .contact-buttons, .source-grid { flex-direction: column; }
    .moments-layout { grid-template-columns: 1fr; }
}

/* ── Gallery image cursor ── */
.moments-gallery img { cursor: zoom-in; }

/* ── Gallery Lightbox ── */
#galleryLightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    animation: lbFadeIn 0.2s ease;
}
#galleryLightbox.active { display: flex; }

#galleryLightbox #lightboxImg {
    max-width: 88vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
    object-fit: contain;
    cursor: default;
    animation: lbZoomIn 0.25s ease;
}

#lightboxClose {
    position: fixed;
    top: 18px;
    right: 22px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 30px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: background 0.2s, transform 0.2s;
    z-index: 10000;
    line-height: 1;
}
#lightboxClose:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.12);
}

@keyframes lbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes lbZoomIn {
    from { transform: scale(0.88); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
/* ─────────────────────────────
   Research Full Width Image
   ───────────────────────────── */

.research-banner {
    width: 100%;
}

.research-banner img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
}

.dark-mode .research-banner img {
    box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}