@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary-dark: #0B0F19;
    --primary-navy: #0F172A;
    --card-dark: #1E293B;
    --accent-indigo: #6366F1;
    --accent-violet: #8B5CF6;
    --accent-cyan: #06B6D4;
    --accent-gold: #F59E0B;
    --accent-emerald: #10B981;
    
    --bg-light: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-dark: #0F172A;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --border-color: #E2E8F0;
    
    --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

a {
    color: var(--accent-indigo);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    max-width: 1280px;
    margin: 0 auto;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.brand-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-indigo);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
    transition: transform 0.3s ease;
}

.header-brand:hover .brand-avatar {
    transform: scale(1.06);
}

.brand-info h1 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-navy);
    line-height: 1.2;
}

.brand-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
}

.main-nav a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.08);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    min-width: 220px;
    padding: 8px;
    z-index: 1100;
}

.dropdown:hover .dropdown-menu {
    display: flex;
    animation: dropdownFade 0.2s ease;
}

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

.dropdown-menu li a {
    display: block;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
}

.lang-switch-btn {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    color: var(--text-muted);
}

.lang-switch-btn.active {
    background: var(--primary-navy);
    color: #ffffff;
    border-color: var(--primary-navy);
}

/* ==========================================================================
   Hero Section (Next-Gen Glassmorphism Banner)
   ========================================================================== */
.hero-wrapper {
    position: relative;
    margin: 28px 0 48px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, #090D16 0%, #111827 50%, #1E1B4B 100%);
    box-shadow: var(--shadow-lg);
    color: #ffffff;
}

.hero-banner-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background-image: url('../images/hero_banner.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.25;
    mask-image: linear-gradient(to right, transparent 0%, black 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 100%);
}

.hero-content-grid {
    position: relative;
    z-index: 2;
    padding: 56px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
    align-items: center;
}

.hero-portrait-card {
    position: relative;
    text-align: center;
}

.hero-portrait-img {
    width: 220px;
    height: 220px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.hero-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 16px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #34D399;
    border-radius: 50%;
    box-shadow: 0 0 8px #34D399;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero-text-block h1 {
    font-size: 2.75rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 8px;
}

.hero-title-sub {
    font-size: 1.2rem;
    color: #818CF8;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.05rem;
    color: #CBD5E1;
    margin-bottom: 32px;
    max-width: 720px;
    line-height: 1.7;
}

/* Stat Grid Inside Hero */
.hero-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item {
    text-align: left;
}

.stat-val {
    font-size: 2rem;
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #6366F1 0%, #38BDF8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-lbl {
    font-size: 0.775rem;
    color: #94A3B8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   Section Headers & Cards
   ========================================================================== */
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
}

.section-title-text {
    font-size: 1.85rem;
    color: var(--primary-navy);
    position: relative;
}

.section-title-text::after {
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-indigo), var(--accent-cyan));
    border-radius: 2px;
    margin-top: 8px;
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #ffffff;
    color: var(--primary-navy);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.btn-view-all:hover {
    background: var(--primary-navy);
    color: #ffffff;
    border-color: var(--primary-navy);
    box-shadow: var(--shadow-md);
}

/* Publications Grid Cards */
.pub-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.pub-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #CBD5E1;
}

.pub-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tag-badge {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tag-ieee { background: #EEF2FF; color: #4F46E5; }
.tag-nature { background: #ECFDF5; color: #059669; }
.tag-acm { background: #FEF3C7; color: #D97706; }

.pub-card h3 {
    font-size: 1.2rem;
    color: var(--primary-navy);
    margin-bottom: 10px;
    line-height: 1.35;
}

.pub-authors {
    font-size: 0.925rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.pub-journal-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-indigo);
    margin-bottom: 16px;
}

.pub-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-doi-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-light);
    color: var(--primary-navy);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
}

.btn-doi-link:hover {
    background: var(--accent-indigo);
    color: #ffffff;
    border-color: var(--accent-indigo);
}

/* Books Modern Grid */
.books-container-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 28px;
    margin-bottom: 48px;
}

.book-card-epic {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: 160px 1fr;
    transition: all 0.3s ease;
}

.book-card-epic:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

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

.book-details-wrap {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.book-details-wrap h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.book-pub-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 12px;
}

.btn-buy-book {
    display: inline-block;
    padding: 10px 18px;
    background: var(--primary-navy);
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 8px;
    text-align: center;
}

.btn-buy-book:hover {
    background: var(--accent-indigo);
    color: #ffffff;
}

/* Timeline Modern Section */
.timeline-card-wrapper {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 56px;
}

.timeline-nav-tabs {
    display: flex;
    gap: 12px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 28px;
}

.timeline-nav-tabs button {
    background: none;
    border: none;
    padding: 10px 24px;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.timeline-nav-tabs button.active, .timeline-nav-tabs button:hover {
    color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.1);
}

.timeline-node-body h3 {
    font-size: 1.4rem;
    color: var(--accent-indigo);
    margin-bottom: 10px;
}

.timeline-node-body p {
    font-size: 1.05rem;
    color: var(--text-dark);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background: var(--primary-dark);
    color: #94A3B8;
    padding: 48px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer p {
    font-size: 0.925rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-content-grid {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 32px 20px;
    }
    .hero-portrait-img {
        margin: 0 auto;
    }
    .hero-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-text-block h1 {
        font-size: 2rem;
    }
    .main-nav {
        display: none;
    }
    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}