/* ============================================================
   1. GLOBAL THEME VARIABLES
=============================================================== */
:root {
    --primary: #1a4cff;
    --primary-dark: #002fa2;
    --accent: #00b894;
    --text-dark: #222;
    --text-light: #fff;
    --bg-light: #f4f7ff;
    --bg-white: #ffffff;

    --radius: 18px;
    --shadow: 0 6px 20px rgba(0,0,0,0.1);
    --shadow-sm: 0 3px 10px rgba(0,0,0,0.1);

    --transition: 0.35s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.7;
    
    /* --- SECURITY PREVENTIONS --- */
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax: disables text highlighting */
    -webkit-touch-callout: none; /* Disables long-press "Save" on iOS */
}

/* Prevent image dragging on desktop */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: none; /* Stops all clicking/saving of images */
}


/* Re-enable pointer events for specific images so hover animations and links still work */
.hero-photo img, .social-icon img, .portfolio-visitor-counter img {
    pointer-events: auto; 
}

/* Allow users to type in the contact form */
input, textarea {
    -webkit-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* ============================================================
   2. LAYOUT UTILITIES
=============================================================== */
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

.section {
    padding: 30px 0 !important;
}

.section-title {
    text-align: center;
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 50px;
}

html {
  scroll-behavior: smooth;
}

/* Fix for Fixed Header overlap during navigation */
section {
    scroll-margin-top: 80px; /* Adjust this value to match your header height */
}

/* ============================================================
   3. FIXED HEADER + NAVBAR
=============================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    padding: 18px 0;
    z-index: 2000;
}

.nav-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
    
    /* --- PREMIUM SEAMLESS FLAG GRADIENT --- */
    /* Softly blended color stops so the transition feels expensive and smooth */
    background: linear-gradient(
        110deg, 
        #FF9933 0%,    /* Saffron */
        #ffbf80 15%,   /* Soft Saffron blend */
        #FFFFFF 30%,   /* White */
        #000080 50%,   /* Navy Blue (Chakra) */
        #FFFFFF 70%,   /* White */
        #138808 85%,   /* Green */
        #FF9933 100%   /* Back to Saffron for a perfect invisible loop */
    );
    
    /* Makes the gradient wide enough to slide gracefully */
    background-size: 200% auto; 
    
    /* Clips the vibrant colors directly to the text */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    
    /* A slow, elegant, infinite sweep */
    -webkit-animation: premiumFlow 8s linear infinite;
    animation: premiumFlow 8s linear infinite;
    
    /* NEW: A subtle, professional shadow to make it pop off the white header */
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.1));
}

/* --- ELEGANT SWEEP KEYFRAMES --- */
@-webkit-keyframes premiumFlow {
    0% { background-position: 0% center; }
    100% { background-position: -200% center; }
}

@keyframes premiumFlow {
    0% { background-position: 0% center; }
    100% { background-position: -200% center; }
}

/* Desktop Menu */
.nav-menu {
    display: flex;
    gap: 25px;
}

.nav-link {
    text-decoration: none;
    font-weight: 600;
    color: var(--text-dark);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
}

/* Hamburger (Mobile) */
.hamburger {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    color: var(--primary-dark);
}

/* ============================================================
   4. HERO SECTION
=============================================================== */
.hero-section {
    min-height: auto !important;
    padding-top: 120px !important;
    padding-bottom: 20px !important;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.hero-subtitle {
    font-size: 1.6rem;
    margin: 10px 0 20px;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 550px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.hero-photo img {
    width: 70%;
    border-radius: 30%;
    box-shadow: var(--shadow);
}

/* Push hero image more to the right (desktop only) */
@media (min-width: 900px) {
    .hero-photo {
        display: flex;
        justify-content: flex-end;   
        padding-right: 122px;        
    }

    .hero-photo img {
        width: 80%;
        border-radius: 30%;
        box-shadow: var(--shadow);
        transform: translateX(20px); 
    }
}

/* HERO PHOTO — SPIN ANIMATION ON HOVER */
.hero-photo img {
    transition: transform 0.6s ease-in-out;
    transform-style: preserve-3d;
}

/* Spin effect triggered by the container instead of the image */
.hero-photo:hover img {
    transform: rotate(0deg) scale(1.03);
}

/* Optional: mobile friendly softer spin */
@media (max-width: 768px) {
    .hero-photo:hover img {
        transform: rotate(0deg) scale(1.02);
        transition: transform 0.7s ease;
    }
}

/* ============================================================
   5. CUSTOM ICONS (Research & Academic Profiles)
=============================================================== */
.hero-social {
    display: flex;
    flex-wrap: wrap;            
    align-items: center;
    justify-content: flex-start;
    gap: 12px;                  
    margin-top: 25px;
}

.social-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none !important;
    border-bottom: none !important;
}

.social-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Hover effect (desktop only) */
.social-icon:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

/* MOBILE FIX — Smaller size + center + compact spacing */
@media (max-width: 768px) {
    .hero-social {
        justify-content: center;     
        gap: 10px;                  
    }

    .social-icon {
        width: 40px;
        height: 40px;
        padding: 5px;
    }
}

/* VERY SMALL SCREEN FIX */
@media (max-width: 480px) {
    .social-icon {
        width: 36px;
        height: 36px;
        padding: 4px;
    }

    .hero-social {
        gap: 6px;
    }
}

/* ============================================================
   6. ABOUT
=============================================================== */
.about-card {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* ============================================================
   7. PREMIUM FEATURE CARDS (Empirical Research & Teaching)
=============================================================== */
.feature-box {
    background: #f5f8ff;
    padding: 35px;
    border-radius: 22px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    margin-bottom: 25px;
    cursor: pointer;
}

.feature-box i {
    font-size: 2.4rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.feature-box:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 12px 25px rgba(0, 80, 255, 0.20),
        0 0 20px rgba(0, 80, 255, 0.15);
    background: #ffffff;
}

.feature-box h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 10px;
}

.feature-box p {
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .feature-box {
        padding: 25px;
    }
}

/* ============================================================
   8. EDUCATION CARDS — CLEAN PREMIUM VERSION
=============================================================== */
.edu-card {
    background: #ffffff;
    padding: 22px 28px;           
    border-radius: 16px;          
    margin-bottom: 25px;
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
    transition: all 0.35s ease;
}

.edu-card:hover {
    transform: translateY(-8px);
    background: #ffffff;
    box-shadow:
        0 12px 26px rgba(0, 80, 255, 0.20),
        0 0 20px rgba(0, 80, 255, 0.18);
}

.edu-left h3 {
    font-size: 1.00rem;           
    font-weight: 700;
    color: #0c1e52;               
    margin-bottom: 6px;
    text-align: center !important;
}

.edu-left p {
    margin: 3px 0;
    font-size: 1rem;
    color: #333;
    line-height: 1.5;
}

.edu-left p:nth-child(2) {
    font-size: 0.7rem !important;
    font-weight: 500 !important;
    color: #444 !important;
    text-align: center !important;
    width: 100%;
}

.edu-left p:nth-child(3) {
    font-size: 0.9rem !important;
    font-weight: 600;
    color: #0052cc;               
    text-align: center !important;
    width: 100%;
}

.edu-right p {
    margin: 6px 0;
    color: #333;
    font-size: 1rem;
    line-height: 1.55;
}

.edu-right strong {
    font-weight: 700;
}

.edu-right a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 500;
}

@media (max-width: 768px) {
    .edu-card {
        grid-template-columns: 1fr;   
        padding: 18px 22px;
    }

    .edu-left, 
    .edu-right {
        text-align: left;
    }

    .edu-left h3 {
        font-size: 1.2rem;
    }
}

/* ============================================================
   9. AWARDS — 3-Card Glossy Hover Animation
=============================================================== */
.award-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.award-card {
    padding: 35px;
    background: var(--bg-white);
    text-align: center;
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: transform .35s ease, box-shadow .35s ease, background .35s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.award-card i {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.award-card h4 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    font-weight: 700;
    color: #111;
}

.award-card span {
    font-size: 1rem;
    color: #333;
    font-weight: 600;
}

/* UNIVERSAL GLOSSY ANIMATION EFFECT */
.award-card.glossy, 
.stat-card.glossy, 
.interest-box.glossy {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform .35s ease, box-shadow .35s ease, background .35s ease;
}

.award-card.glossy::after,
.stat-card.glossy::after,
.interest-box.glossy::after {
    content: "";
    position: absolute;
    top: -120%;
    left: -120%;
    width: 250%;
    height: 250%;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.0) 40%,
        rgba(255,255,255,0.45) 50%,
        rgba(255,255,255,0.0) 60%
    );
    transform: rotate(25deg);
    transition: 0.6s ease;
    pointer-events: none;
    z-index: 10;
}

.award-card.glossy:hover,
.stat-card.glossy:hover,
.interest-box.glossy:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 12px 28px rgba(0, 80, 255, 0.20),
        0 0 22px rgba(0, 80, 255, 0.12);
}

.award-card.glossy:hover::after,
.stat-card.glossy:hover::after,
.interest-box.glossy:hover::after {
    top: 120%;
    left: 120%;
}

@media (max-width: 768px) {
    .award-card.glossy,
    .stat-card.glossy,
    .interest-box.glossy {
        transition: transform .25s ease, box-shadow .25s ease;
    }

    .award-card.glossy:active,
    .stat-card.glossy:active,
    .interest-box.glossy:active {
        transform: scale(0.97);
        box-shadow: 0 8px 22px rgba(0, 80, 255, 0.15);
    }

    .award-card.glossy:active::after,
    .stat-card.glossy:active::after,
    .interest-box.glossy:active::after {
        top: 80%;
        left: 80%;
    }
}

/* ============================================================
   10. RESEARCH STATS
=============================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--bg-white);
    padding: 22px 15px; 
    text-align: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-card i {
    font-size: 2rem; 
    color: var(--primary);
    margin-bottom: 10px;
}

.stat-card h3 {
    font-size: 1.8rem; 
    margin-bottom: 5px;
}

.stat-card p {
    font-size: 0.9rem; 
    line-height: 1.3;
    margin: 0;
}

/* ============================================================
   11. INTERESTS
=============================================================== */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
    gap: 20px;
    margin-top: 40px;
}

.interest-box {
    padding: 25px;
    background: var(--bg-white);
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

/* ============================================================
   12. PUBLICATIONS — ACCORDION
=============================================================== */
.accordion {
    max-width: 100%;
    margin: auto;
    margin-top: 5px !important;
}

.accordion-item {
    background: var(--bg-white);
    border-radius: var(--radius);
    margin-bottom: 10px !important;
    box-shadow: var(--shadow-sm);
}

.accordion-header {
    width: 100%;
    padding: 20px 25px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    background: none;
    border: none;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.35s ease;
}

/* ============================================================
   13. CONTACT FORM
=============================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
}

.contact-info,
.contact-form {
    background: var(--bg-white);
    padding: 35px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    border-radius: var(--radius);
    border: 1px solid #ccc;
    outline: none;
}

.contact-info h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--text-dark);
    font-size: 22px;
    font-weight: 700;
}

.contact-info ul {
    list-style: none; 
    padding: 0;       
    margin: 0;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.6;
}

.contact-info i {
    color: var(--text-dark); 
    font-size: 16px;
    margin-right: 12px; 
    margin-top: 5px;   
    width: 20px;       
    text-align: center;
}

.contact-info a {
    color: var(--primary); 
    text-decoration: underline;
    word-break: break-all; 
}

.contact-info a:hover {
    color: var(--primary-dark); 
}

/* ============================================================
   14. BUTTONS
=============================================================== */
.btn {
    padding: 12px 28px;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: var(--text-light);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary-dark);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-light);
}

/* ============================================================
   15. RETURN TO TOP BUTTON
=============================================================== */
.back-to-top {
    position: fixed;
    bottom: 35px;
    right: 25px;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 15px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    box-shadow: var(--shadow);
    z-index: 2100;
}

.back-to-top:hover {
    background: var(--primary-dark);
}

/* ============================================================
   16. RESEARCH DROPDOWN
=============================================================== */
.nav-dropdown {
    position: relative;
}

/* NEW: Invisible bridge to prevent the dropdown from disappearing */
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 35px; /* Covers the exact gap distance */
    background: transparent;
    z-index: 3000;
}

.dropdown-btn {
    background: none;
    border: none;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-dark);
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: var(--bg-white);
    padding: 10px 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    top: 35px;
    min-width: 240px;
    z-index: 3000;
    
    /* --- NEW: Scrollable Dropdown Protection --- */
    max-height: 350px; 
    overflow-y: auto;  
}

/* --- NEW: Custom Scrollbar for the Dropdown --- */
.dropdown-content::-webkit-scrollbar {
    width: 6px;
}
.dropdown-content::-webkit-scrollbar-track {
    background: transparent; 
    margin: 10px 0;
}
.dropdown-content::-webkit-scrollbar-thumb {
    background: #d1d8ec; 
    border-radius: 10px;
}
.dropdown-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.dropdown-content.active {
    display: block !important;
}

.dropdown-content a {
    display: block;
    padding: 12px 18px;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.nav-dropdown:hover .dropdown-content {
    display: block;
}

/* MOBILE DROPDOWN */
@media(max-width: 768px) {
    .nav-dropdown {
        width: 100%;
    }

    /* NEW: Kills the sticky hover bug on mobile touch screens */
    .nav-dropdown:hover .dropdown-content {
        display: none; 
    }

    .dropdown-content {
        position: relative;
        box-shadow: none;
        background: var(--bg-light);
        top: 0;
        display: none;
        max-height: none; 
        overflow-y: visible;
    }

    /* NEW: Forces the menu to open ONLY when JavaScript allows it */
    .dropdown-content.active,
    .nav-dropdown:hover .dropdown-content.active,
    #researchDropdown.active,
    #webProjectDropdown.active {
        display: block !important;
    }
}

/* ============================================================
   17. OVERLAY (Mobile Menu Backdrop)
=============================================================== */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 1500;
}

/* ============================================================
   18. MOBILE RESPONSIVE DESIGN & MOBILE MENU
=============================================================== */
@media(max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-photo {
        order: -1;
        text-align: center;
    }
}

@media(max-width: 768px) {
    .hamburger {
        display: block;
        z-index: 2500;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        padding-top: 120px;
        gap: 15px;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
        transition: right 0.35s ease-in-out;
        overflow-y: auto;
        z-index: 2400;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        padding: 15px 25px;
        font-size: 1.2rem;
        border-bottom: 1px solid #f0f0f0;
    }

    .hero-photo img {
        width: 65%;
        margin: auto;
        display: block;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   19. FOOTER
=============================================================== */
.footer {
    background: var(--primary-dark);
    padding: 25px;
    text-align: center;
    color: var(--text-light);
}

/* ============================================================
   20. PREMIUM HEADING CARD — Light Blue Version
=============================================================== */
.section-heading-box {
    background: #a8b6fa; 
    padding: 15px 0;
    border-radius: 26px;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}

.section-heading-box:hover {
    transform: translateY(-6px);
    background: #f0f2ea; 
    box-shadow:
        0 18px 40px rgba(30, 90, 255, 0.20),
        0 0 22px rgba(30, 90, 255, 0.15);
}

.section-heading-box h2.section-title {
    margin: 0 !important;
    font-size: 2.8rem;
    font-weight: 800;
    color: #0037c9;
    letter-spacing: -0.5px;
}

/* Combined Mobile Queries for Heading Box & Scroll Margin */
@media (max-width: 768px) {
    .section-heading-box {
        padding: 30px 0;
        margin-bottom: 35px;
    }

    .section-heading-box h2.section-title {
        font-size: 2.2rem;
    }
    
    section {
        scroll-margin-top: 110px; 
    }
}

/* ============================================================
   21. SUB-SECTION CARD
=============================================================== */
.subsection-card {
    max-width: 100%;
    width: 100%;
    margin: 40px auto 20px auto;
    background: #a8b6fa;                
    padding: 18px 25px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(171, 15, 15, 0.06);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    cursor: pointer;
    scroll-margin-top: 100px; /* Included for targeted link navigation */
}

.subsection-card h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.subsection-card:hover {
    transform: translateY(-6px);
    background: #c4d298; 
    box-shadow:
        0 18px 40px rgba(30, 90, 255, 0.20),
        0 0 22px rgba(30, 90, 255, 0.15);
}

@media (max-width: 768px) {
    .subsection-card {
        max-width: 90%;
        padding: 14px 20px;
    }

    .subsection-card h2 {
        font-size: 1.5rem;
    }
}

/* ============================================================
   22. RESEARCH SUBSECTIONS SPACING
=============================================================== */
.section {
    padding: 18px 0 !important;  
}

.subsection-card {
    margin: 25px auto 12px auto !important; 
}

@media (max-width: 768px) {
    .section {
        padding: 12px 0 !important;
    }

    .subsection-card {
        margin: 18px auto 10px auto !important;
    }
}

/* ============================================================
   23. DYNAMIC PUBLICATIONS TABLE
=============================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto; 
    margin-top: 25px;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 10px;
}

.pub-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px; 
    text-align: left;
    background: #fff;
}

.pub-table th, .pub-table td {
    padding: 16px 14px;
    border-bottom: 1px solid #edf2f9;
    font-size: 0.95rem;
    vertical-align: middle;
}

.pub-table th {
    background-color: var(--primary-dark);
    color: var(--text-light);
    font-weight: 600;
    white-space: nowrap;
}

.pub-table th:first-child { border-top-left-radius: 12px; }
.pub-table th:last-child { border-top-right-radius: 12px; }

.pub-table tr:hover {
    background-color: #f4f7ff;
}

.pub-table td:nth-child(2) {
    min-width: 250px;
    color: var(--primary-dark);
    font-weight: 600;
}

.btn-download {
    display: inline-block;
    background: #ff4757;
    color: #fff !important;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.3s ease;
    white-space: nowrap;
}

.btn-download:hover {
    background: #ff6b81;
    transform: translateY(-2px);
}

.badge-indexed {
    display: inline-block;
    background: #eccc68;
    color: #2f3542;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

/* ============================================================
   24. PORTFOLIO VISITOR COUNTER
=============================================================== */
.portfolio-visitor-counter {
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px; 
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05); 
}

.textured-visitor-text {
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    background: linear-gradient(45deg, #2c3e50, #3498db, #e74c3c, #2c3e50);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    -webkit-animation: texturePulse 3s ease-in-out infinite alternate;
    animation: texturePulse 3s ease-in-out infinite alternate;
    
    -webkit-transform: translateZ(0);
}

.portfolio-visitor-counter img {
    display: block;
    min-width: 70px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

@-webkit-keyframes texturePulse {
    0% { 
        -webkit-transform: scale(1);
        background-position: 0% 50%;
    }
    100% { 
        -webkit-transform: scale(1.05);
        background-position: 100% 50%;
    }
}

@keyframes texturePulse {
    0% { 
        transform: scale(1);
        background-position: 0% 50%;
    }
    100% { 
        transform: scale(1.05);
        background-position: 100% 50%;
    }
}

/* ============================================================
   25. ULTIMATE MOBILE & DESKTOP SECURITY
=============================================================== */

/* 1. Completely disable text highlighting and iOS callout menus globally */
body, html {
    -webkit-touch-callout: none !important; /* Kills long-press "Save" menu on iPhones */
    -webkit-user-select: none !important;   /* Safari */
    -khtml-user-select: none !important;    /* Konqueror HTML */
    -moz-user-select: none !important;      /* Old Firefox */
    -ms-user-select: none !important;       /* Internet Explorer/Edge */
    user-select: none !important;           /* Standard syntax */
    -webkit-tap-highlight-color: transparent; /* Removes blue box when tapping on mobile */
}

/* 2. Re-enable selection ONLY for contact form so users can type */
input, textarea {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* 3. Make ALL images completely untouchable by the device */
img {
    pointer-events: none !important; /* The image cannot be touched or long-pressed */
    -webkit-user-drag: none !important; /* Cannot drag to desktop */
}

/* 4. Ensure links (social icons & counter) remain clickable even though the image is untouchable */
a.social-icon, .portfolio-visitor-counter a {
    pointer-events: auto !important; 
    display: inline-block;
}


/* ============================================================
   26. INTERACTIVE 3D FLIPBOOK
=============================================================== */
.flipbook-wrapper {
    /* Premium Subtle Paper/Canvas Texture */
    background-color: #ebf0fb; 
    background-image: 
        radial-gradient(circle at center, rgba(0, 47, 162, 0.02) 0, rgba(0, 47, 162, 0.06) 100%),
        url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
    padding: 40px 20px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 25px;
    overflow: hidden; 
}

#flipbook {
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    background: linear-gradient(to right, #e0e0e0 0%, #ffffff 5%, #ffffff 95%, #e0e0e0 100%);
}

.flipbook-page {
    background-color: white;
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

.flipbook-page.--left {
    box-shadow: inset -5px 0 10px rgba(0,0,0,0.1);
}
.flipbook-page.--right {
    box-shadow: inset 5px 0 10px rgba(0,0,0,0.1);
}

.flipbook-page canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Updated Controls Styling */
.flipbook-controls {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.85);
    padding: 12px 25px;
    border-radius: 30px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(4px);
}

#page-info {
    font-weight: 700;
    color: var(--primary-dark);
    min-width: 120px;
    text-align: center;
}

/* Jump to Page Box */
.flipbook-jump {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.85);
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    font-weight: 600;
    color: var(--text-dark);
}

.page-input {
    width: 60px;
    padding: 6px 10px;
    border: 2px solid #ccc;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    outline: none;
    transition: var(--transition);
}

.page-input:focus {
    border-color: var(--primary);
}

.btn-sm {
    padding: 6px 18px;
    font-size: 0.95rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .flipbook-wrapper { padding: 20px 10px; }
    .flipbook-controls { flex-direction: column; gap: 15px; border-radius: 15px; }
    .flipbook-jump { flex-direction: column; width: 100%; max-width: 250px;}
}

/* ============================================================
   27. TABLE PAGINATION BUTTONS
=============================================================== */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
    flex-wrap: wrap; /* Allows buttons to wrap to a new line on mobile if there are many pages */
}

.page-btn {
    padding: 1px 6px; /* Reduced padding to make the box smaller */
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary-dark);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.page-btn:hover {
    background: #e2e8fa;
    transform: translateY(-2px);
}

.page-btn.active {
    background: var(--primary);
    color: var(--text-light);
    box-shadow: 0 4px 10px rgba(26, 76, 255, 0.3);
    border-color: var(--primary);
    pointer-events: none; /* Prevents clicking the page you are already on */
}


/* ============================================================
   28. 3D MODERN TEACHING CARDS (DRAGGABLE CAROUSEL)
=============================================================== */
.carousel-scene {
    position: relative;
    width: 100%;
    height: 480px; /* REDUCED: Ultra-safe height for all laptops to clear the taskbar */
    perspective: 1200px; 
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 20px;
    border-radius: var(--radius);
    background: radial-gradient(circle at center, #ffffff 0%, #eef1f8 100%);
    box-shadow: inset 0 0 30px rgba(0,0,0,0.05);
    cursor: grab;
}

.carousel-scene:active {
    cursor: grabbing;
}

.carousel-rotator {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
}

.teaching-card-wrapper {
    position: absolute;
    width: 280px; /* SHRUNK: Width reduced */
    height: 380px; /* SHRUNK: Height reduced to comfortably fit */
    left: calc(50% - 140px); /* Centers the new width */
    top: calc(50% - 190px);  /* Centers the new height */
}

.teaching-card-inner {
    width: 100%;
    height: 100%;
    
    /* Default clean white color while rotating */
    background-color: rgba(255, 255, 255, 0.95); 
    background-image: none;
    
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 15px 35px rgba(0, 47, 162, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    
    /* Smoothly animates the color change */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
    
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.teaching-card-wrapper:hover .teaching-card-inner {
    box-shadow: 0 25px 50px rgba(26, 76, 255, 0.2);
}

/* --- FOCUS & BLUR LOGIC --- */
.carousel-rotator.has-focus .teaching-card-inner {
    filter: blur(6px);
    opacity: 0.4;
    transform: scale(0.9);
    pointer-events: none;
}

/* THE ACTIVATED / CLICKED CARD (Stronger Color Change & Animated Border) */
.carousel-rotator.has-focus .teaching-card-wrapper.focused .teaching-card-inner {
    filter: blur(0px);
    opacity: 1;
    transform: scale(1.05); 
    pointer-events: auto;
    background-color: #d0e0ff; 
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.18'/%3E%3C/svg%3E");
    
    /* NEW: Animated Glowing Border! */
    border: 2px solid var(--primary);
    animation: borderPulse 3s infinite alternate ease-in-out;
}

/* KEYFRAMES FOR THE BORDER ANIMATION */
@keyframes borderPulse {
    0% {
        border-color: #1a4cff; /* Primary Blue */
        box-shadow: 0 30px 60px rgba(0,0,0,0.25), 0 0 12px rgba(26, 76, 255, 0.5);
    }
    33% {
        border-color: #00b894; /* Accent Green */
        box-shadow: 0 30px 60px rgba(0,0,0,0.25), 0 0 12px rgba(0, 184, 148, 0.5);
    }
    66% {
        border-color: #ff4757; /* Bright Red/Pink */
        box-shadow: 0 30px 60px rgba(0,0,0,0.25), 0 0 12px rgba(255, 71, 87, 0.5);
    }
    100% {
        border-color: #1a4cff; /* Back to Blue */
        box-shadow: 0 30px 60px rgba(0,0,0,0.25), 0 0 16px rgba(26, 76, 255, 0.7);
    }
}



/* --- PREMIUM CARD LAYOUT --- */

/* NEW: Upper-Left Card Number Badge */
.t-card-number-badge {
    position: absolute;
    top: 8px;
    left: 15px;
    background: var(--primary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 5;
}

.t-card-header-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary-dark);
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 5;
    
    /* Layout positioning */
    max-width: calc(100% - 65px);
    text-align: right;
    
    /* --- THE ULTIMATE FIX: PHYSICAL HEIGHT LIMIT --- */
    line-height: 1.4em !important;
    /* 2 lines of text (2.8em) + 10px padding (5px top, 5px bottom) */
    max-height: calc(2.6em + 10px) !important;
    overflow: hidden !important;
    
    /* Retain clamp for the '...' effect */
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    word-break: break-word !important;
}

.t-card-course {
    padding: 50px 20px 15px 20px; /* Increased top padding so multi-line badges don't cover text */
    background: linear-gradient(135deg, #f8faff 0%, #e2e8fa 100%);
    color: var(--primary-dark);
    text-align: left;
    min-height: 110px;
    display: flex;
    align-items: flex-end;
}

.t-card-course h3 {
    /* NEW: 'clamp' dynamically shrinks the font size if the word is massive */
    font-size: clamp(1rem, 5vw, 1.25rem); 
    font-weight: 800;
    line-height: 1.25;
    margin: 0;
    
    /* NEW: Forces extremely long text to cut off gracefully after 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.t-card-details {
    flex: 1;
    padding: 15px 20px;
    overflow-y: auto;
    background: transparent;
    color: #444;
}

.t-card-details ul {
    padding-left: 20px;
    margin: 0;
    font-size: 0.90rem;
    line-height: 1.5;
}

.t-card-details li {
    margin-bottom: 8px;
}

.t-card-footer {
    padding: 12px 20px;
    background: transparent;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.t-card-link {
    display: inline-block;
    width: 100%;
    padding: 10px 0;
    background: var(--primary);
    color: white !important;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.t-card-link:hover {
    background: var(--primary-dark);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .carousel-scene {
        height: 450px; 
    }
    .teaching-card-wrapper {
        width: 250px;
        height: 350px;
        left: calc(50% - 125px);
        top: calc(50% - 175px);
    }
    .t-card-course h3 {
        font-size: clamp(0.95rem, 4vw, 1.1rem); /* Dynamic shrink for phones */
    }
    .carousel-rotator.has-focus .teaching-card-wrapper.focused .teaching-card-inner {
        transform: scale(1.03); 
    }
}

/* ============================================================
   29. FLOATING WHATSAPP BUTTON
=============================================================== */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 100px; /* Aligns perfectly above your Back-to-Top button */
    right: 25px;
    background-color: #25D366; /* Official WhatsApp Green */
    color: #FFF !important;
    border-radius: 50%;
    text-align: center;
    font-size: 34px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

/* Premium Hover Animation */
.whatsapp-float:hover {
    background-color: #20b858;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45);
}

/* Mobile Adjustments (Slightly smaller, adjusts to 95px/20px offsets) */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 95px; 
        right: 20px;
        font-size: 30px;
    }
}

