:root {
    /* Color variables */
    --primary-color: #3a506b;      /* Deep blue */
    --secondary-color: #5bc0be;    /* Teal */
    --accent-color: #6fffe9;       /* Light teal */
    --background-color: #f5f7fa;   /* Light gray-blue */
    --text-color: #2d3748;
    --light-gray: #e9ecef;         /* Medium gray */
    --white: #ffffff;
    --font-heading: 'Merriweather', Georgia, serif;
    --font-body: 'Open Sans', Arial, sans-serif;
    --transition-speed: 0.3s;
    
    /* Design variables */
    --dark-bg: #1c2541;            /* Dark blue */
    --gradient-start: #3a506b;     /* Gradient start color */
    --gradient-end: #1c2541;       /* Gradient end color */
    --card-bg: #ffffff;
    --section-bg: #ffffff;
    --footer-bg: var(--dark-bg);   /* Updated to dark blue */
    --border-color: var(--light-gray);
    --timeline-bg: rgba(91, 192, 190, 0.1); /* Very light teal */
}

body {
    font-family: var(--font-body);
    line-height: 1.8;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    position: relative; /* Enable absolute positioning for child elements */
    overflow-y: scroll; /* Always show vertical scrollbar to prevent layout shift */
}

/* New header styles */
.site-header {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1050; /* Higher z-index to stay above all content */
    width: 100%;
}

.header-wrapper {
    height: 60px;
    display: flex;
    /* Modified to create space between title and navigation */
    justify-content: space-between;
    align-items: center;
}

/* Position the navigation menu in the middle */
.main-navigation {
    margin-right: auto;
    margin-left: 20px;
}

/* Site title link styles */
.site-title {
    color: white;
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer; /* Make sure cursor changes to pointer */
    display: inline-block; /* Ensure the link has proper display */
    padding: 5px; /* Add some padding to increase clickable area */
    position: relative; /* Ensure proper stacking context */
    z-index: 10; /* Ensure it's above other elements */
}

.site-title:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.site-branding {
    position: relative; /* Ensure proper stacking context */
    z-index: 10; /* Ensure it's above other elements */
    flex: 0 0 auto; /* Don't grow, don't shrink, use auto basis */
}

/* Site title hover effect */
.site-title:hover {
    color: var(--accent-color);
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-title {
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-title:hover {
    color: var(--accent-color);
    text-decoration: none;
}

/* Main navigation styles */
.main-navigation {
    padding-right: 15px; /* Add some padding to the right side */
    margin-left: auto; /* This pushes the navigation to the right */
    flex: 0 1 auto; /* Don't grow, can shrink, use auto basis */
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end; /* Align menu items to the right */
}

.main-navigation li {
    margin-left: 5px; /* Add some space between menu items */
    margin: 0 0.25rem;
}

.main-navigation a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    /* Fix for navigation shifting - ensure consistent width */
    display: inline-block;
    text-align: center;
    min-width: 95px; /* Accommodate the longest item "Publications" */
    white-space: nowrap; /* Prevent text wrapping */
}

.main-navigation a:hover, 
.main-navigation a.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
    text-decoration: none;
    /* Keep same font-weight to prevent shifting */
    font-weight: 600;
}

/* Mobile menu toggle */
.mobile-nav-toggle {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Add background pattern to header */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.2;
    z-index: 0;
}

/* Header text styling */
header h1 {
    margin: 0;
    font-size: 2.8em;
    font-family: var(--font-heading);
    font-weight: 700;
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
}

/* Header subtitle styling */
.subtitle {
    color: var(--white);
    font-size: 1.2em;
    margin: 5px 0 15px;
    opacity: 0.9;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

/* Header content container */
.header-content {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 0 20px;
    margin-bottom: 15px;
}

nav {
    margin: 20px 0;
    position: relative;
    z-index: 1;
    width: 100%;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav li {
    margin: 0 2px;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 15px;
    border-radius: 4px;
    transition: all var(--transition-speed);
    display: inline-block;
    position: relative;
}

nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--white);
    transition: all var(--transition-speed);
    transform: translateX(-50%);
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

nav a:hover::after {
    width: 80%;
}

.container {
    width: 85%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
    padding: 0 15px;
}

/* Removed redundant profile-photo styling that was conflicting with the one inside profile-container */

section {
    background: var(--white);
    padding: 30px;
    margin: 30px 0;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

h2 {
    color: var(--secondary-color);
    font-family: var(--font-heading);
    font-size: 1.8em;
    margin-top: 0;
    position: relative;
    padding-bottom: 12px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 3px;
}

h1 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    letter-spacing: -0.5px;
    font-weight: 700;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s forwards;
    animation-delay: 0.2s;
}

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

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.8;
    color: #555;
    max-width: 700px;
    margin: 0 auto 3rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s forwards;
    animation-delay: 0.4s;
}

h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.4em;
}

p {
    margin-bottom: 1.5em;
    line-height: 1.8;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all var(--transition-speed);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Card styles */
.card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform var(--transition-speed);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.card-title {
    font-size: 1.4em;
    margin-top: 0;
    color: var(--secondary-color);
    font-family: var(--font-heading);
    margin-bottom: 1.25rem;
}

/* Add space between card headings and content */
.card h4, .card h5 {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

/* Card header padding consistency */
.card-header {
    padding: 1.25rem 1.85rem;
}

/* Ensure headings have proper spacing */
.section-title {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
}

/* Fix for headings that start without initial space */
h3.section-title, h4.card-title {
    padding-left: 0.25rem;
}

/* Grid system */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* Homepage Hero styles - New Layout */
/* Hero Background Section (Top One-Third) */
.hero-background-section {
    height: 33vh; /* One-third of viewport height */
    position: relative;
    overflow: hidden;
}

/* Background container for single image */
.hero-background-section .background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Lower than profile photo */
}

/* Single background image */
.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 1;
}

/* Overlay for text readability */
.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Dark overlay for better text readability */
    z-index: 2; /* Above background but below navigation and profile */
}

/* Slideshow container for background section (keep for backward compatibility) */
.hero-background-section .slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Lower than profile photo */
}

/* Slideshow images */
.slideshow-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

/* Active slide */
.slideshow-image.active {
    opacity: 1;
}

/* Overlay for text readability */
.slideshow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Dark overlay for better text readability */
    z-index: 2; /* Above slideshow but below navigation and profile */
}

/* Hero Header Styles */
.hero-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 10; /* Above slideshow and overlay but below profile photo */
}

.hero-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-branding {
    flex: 1;
}

.hero-title {
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.hero-title:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.hero-navigation {
    flex: 2;
}

.hero-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
}

.hero-nav-menu li {
    margin-left: 5px;
    margin: 0 0.25rem;
}

.hero-nav-menu a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-nav-menu a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
    text-decoration: none;
}

/* Mobile Hero Navigation */
@media (max-width: 767.98px) {
    .hero-navigation.d-block {
        position: absolute;
        top: 70px;
        right: 0;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.9);
        padding: 20px;
        border-radius: 5px;
    }
    
    .hero-nav-menu {
        flex-direction: column;
    }
    
    .hero-nav-menu li {
        margin: 10px 0;
    }
    
    .hero-nav-menu a {
        display: block;
        padding: 10px 15px;
    }
}

/* Hero Content Section */
.hero-content-section {
    background-color: var(--background-color);
    min-height: 67vh; /* Remaining two-thirds of viewport height */
    position: relative;
    padding-top: 120px; /* Space for overlapping profile photo */
    padding-bottom: 50px;
}

/* Profile Photo Wrapper for Overlapping Effect */
.profile-photo-wrapper {
    position: absolute; /* Absolute positioning relative to body */
    top: calc(33vh - 100px); /* Position at the bottom of background section minus half photo height */
    left: 50%;
    transform: translateX(-50%);
    z-index: 15; /* Higher z-index to ensure it's above everything */
}

.profile-photo-container {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    background-color: white; /* White background for the border */
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

.profile-photo-container:hover .profile-photo {
    transform: scale(1.05);
}

/* Profile Details */
.profile-details {
    padding-top: 20px;
    color: var(--text-color);
}

.profile-details h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.designation {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.affiliation {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    opacity: 0.8;
}

.research-focus {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    opacity: 0.7;
    font-style: italic;
}

.profile-details .social-icons {
    margin: 2rem 0;
}

.profile-details .social-icons a {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.profile-details .social-icons a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.action-buttons {
    margin-top: 2rem;
}

.action-buttons .btn {
    margin: 0.25rem;
}

/* Mobile navigation */
@media (max-width: 767.98px) {
    .main-navigation.show {
        display: block !important;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: var(--gradient-start);
        padding: 1rem;
        z-index: 1000;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    }
    
    .main-navigation.show ul {
        flex-direction: column;
        padding: 0;
        margin: 0;
    }
    
    .main-navigation.show li {
        margin: 0.5rem 0;
    }
    
    .main-navigation.show a {
        display: block;
        padding: 0.75rem 1rem;
        text-align: center;
    }
}

/* Hero section for About page */
.hero {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 30px;
}

.hero h2 {
    font-size: 2.2em;
    margin-bottom: 20px;
}

.hero h2::after {
    left: 50%;
    transform: translateX(-50%);
}

.hero p {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* Math visualization */
#math-visualization {
    width: 100%;
    height: 300px;
    margin: 30px 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

/* Theme toggle */
/* Theme toggle removed */

/* Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
    margin: 40px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    width: 2px;
    background-color: var(--light-gray);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    background-color: var(--timeline-bg);
    border-left: 4px solid var(--secondary-color);
}

.timeline-item::after {
    content: '';
    display: table;
    clear: both;
}

.timeline-content {
    position: relative;
    width: calc(50% - 40px);
    padding: 20px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.timeline-item:nth-child(odd) .timeline-content {
    float: left;
}

.timeline-item:nth-child(even) .timeline-content {
    float: right;
}

.timeline-date {
    position: absolute;
    top: 20px;
    font-weight: bold;
    color: var(--accent-color);
}

.timeline-item:nth-child(odd) .timeline-date {
    right: -100px;
}

.timeline-item:nth-child(even) .timeline-date {
    left: -100px;
}

.timeline-item:nth-child(odd)::before,
.timeline-item:nth-child(even)::before {
    content: '';
    position: absolute;
    top: 25px;
    width: 15px;
    height: 15px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--light-gray);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

/* LaTeX Styles */
.equation-container {
    padding: 15px;
    background-color: rgba(0,0,0,0.02);
    border-radius: 6px;
    overflow-x: auto;
    margin: 20px 0;
}

/* Mobile navigation */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mobile-nav-toggle.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.mobile-nav-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

footer {
    text-align: center;
    padding: 30px 0;
    background: linear-gradient(135deg, var(--gradient-end), var(--gradient-start));
    color: var(--white);
    position: relative;
    width: 100%;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    margin-top: 3rem;
}

.social-icons {
    margin: 15px 0;
}

.social-icons a {
    display: inline-block;
    margin: 0 10px;
    color: var(--white);
    font-size: 1.5em;
    transition: transform var(--transition-speed);
}

.social-icons a:hover {
    transform: scale(1.2);
}

@media (max-width: 992px) {
    .container {
        width: 90%;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .timeline::before {
        left: 40px;
    }
    
    .timeline-content {
        width: calc(100% - 90px);
        float: right;
    }
    
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        float: right;
    }
    
    .timeline-item:nth-child(odd) .timeline-date,
    .timeline-item:nth-child(even) .timeline-date {
        left: 0;
        top: -30px;
        width: 100%;
        text-align: left;
    }
    
    .timeline-item:nth-child(odd)::before,
    .timeline-item:nth-child(even)::before {
        left: 40px;
    }
}

@media (max-width: 768px) {
    .container {
        width: 95%;
    }

    header h1 {
        font-size: 2.2em;
    }
    
    .mobile-nav-toggle {
        display: block;
    }
    
    nav ul {
        display: none;
        flex-direction: column;
        background-color: var(--primary-color);
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        padding: 80px 0 20px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        z-index: 90;
    }
    
    nav ul.active {
        display: flex;
        animation: fadeIn 0.3s ease-out forwards;
    }
    
    nav li {
        margin: 0;
        width: 100%;
        text-align: center;
    }
    
    nav a {
        width: 100%;
        padding: 15px 0;
        border-radius: 0;
        opacity: 0;
        animation: slideUp 0.3s ease-out forwards;
        animation-delay: calc(0.05s * var(--item-index, 0));
    }
    
    nav a.active {
        background-color: rgba(255, 255, 255, 0.2);
    }
    
    nav a::after {
        display: none;
    }
    
    /* Add animation delays based on item position */
    nav ul.active li:nth-child(1) a { --item-index: 1; }
    nav ul.active li:nth-child(2) a { --item-index: 2; }
    nav ul.active li:nth-child(3) a { --item-index: 3; }
    nav ul.active li:nth-child(4) a { --item-index: 4; }
    nav ul.active li:nth-child(5) a { --item-index: 5; }
    nav ul.active li:nth-child(6) a { --item-index: 6; }
    
    .grid {
        grid-template-columns: 1fr;
    }
    /* Theme toggle container removed */
}

/* Interests Page Specific Styles */
.card-icon {
    text-align: center;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.book-list {
    margin-top: 30px;
}

.book-item {
    display: flex;
    margin-bottom: 25px;
    background-color: var(--white);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform var(--transition-speed);
}

.book-item:hover {
    transform: translateX(5px);
}

.book-cover {
    font-size: 3em;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-gray);
    width: 80px;
    height: 100px;
    border-radius: 4px;
}

.book-details {
    flex: 1;
}

.book-details h4 {
    margin-top: 0;
    color: var(--secondary-color);
    font-family: var(--font-heading);
}

.author {
    font-style: italic;
    margin-bottom: 10px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header p {
    max-width: 800px;
    margin: 0 auto;
}

/* Make page headers consistent with about page */
.page-header h2 {
    text-align: center;
    margin-bottom: 20px;
}

.page-header h2::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Header styles for profile and subtitle */
.subtitle {
    color: var(--white);
    font-size: 1.2em;
    margin-top: 5px;
    opacity: 0.9;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

/* Section and card styles */
section {
    background-color: var(--section-bg);
    padding: 3rem 0;
    margin-bottom: 2rem;
    border-radius: 8px;
}

/* Section specific backgrounds */
section#about {
    background-color: var(--card-bg);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

section#research-interests {
    background-color: var(--light-gray);
}

section#latest-updates {
    background-color: var(--card-bg);
}

/* Math visualization background */
#math-visualization {
    background-color: var(--dark-bg);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    min-height: 300px;
}

.card {
    background-color: var(--card-bg);
    border-left: 4px solid var(--secondary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

footer {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.book-item,
.timeline-content {
    background-color: var(--card-bg);
}

/* Book cover styling */
.book-cover {
    background-color: var(--light-gray);
    color: var(--text-color);
}

/* Hero section background styling */

/* Academic styling improvements */
.publication-item .card {
    transition: all 0.3s ease;
    border-left: 4px solid var(--accent-color);
}

.publication-item .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.publication-meta {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

pre.bibtex {
    font-family: monospace;
    font-size: 0.8rem;
    white-space: pre-wrap;
    background: var(--light-gray);
    padding: 15px;
    border-radius: 5px;
    color: var(--text-color);
    overflow-x: auto;
}

/* Academic content improvements */
.paper-abstract {
    background-color: rgba(91, 192, 190, 0.05);
    border-left: 3px solid var(--secondary-color);
    padding: 15px;
    margin: 25px 0;
    font-style: italic;
}

/* Improved table styling for academic content */
table.academic-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
}

table.academic-table th {
    background-color: var(--secondary-color);
    color: white;
    font-weight: 600;
    text-align: left;
}

table.academic-table th, 
table.academic-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--light-gray);
}

table.academic-table tr:nth-child(even) {
    background-color: rgba(91, 192, 190, 0.05);
}

/* Citation box */
.citation-box {
    background-color: var(--light-gray);
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
    font-family: monospace;
    white-space: pre-wrap;
}

/* Fix header overlap issue */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1050; /* Higher z-index to stay above all content */
    width: 100%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Fix any potentially overflowing content */
main {
    position: relative;
    z-index: 1; /* Lower than header */
    overflow-x: hidden; /* Prevent horizontal overflow */
}

/* Ensure container doesn't overflow */
.container {
    max-width: 100%;
    overflow-x: hidden;
}

/* Fix for specific sections that might be causing issues */
section {
    position: relative;
    width: 100%;
    overflow-x: hidden;
}

/* Fix for sidebar sticky elements */
.sticky-top {
    z-index: 10; /* Lower than header */
}

/* Fix for activities page specifically */
#activities .sticky-top,
.activities .sticky-top,
#resources .sticky-top,
.resources .sticky-top,
#publications .sticky-top,
.publications .sticky-top,
#interests .sticky-top,
.interests .sticky-top {
    z-index: 10;
}

/* Card Padding Standardization */
.card {
    margin-bottom: 1.5rem;
}

.card-body {
    padding: 1.85rem;
}

.activity-card .card-body, 
.resource-card .card-body,
.interest-card .card-body,
.book-card .card-body,
.sidebar .card-body {
    padding: 1.85rem;
}

/* Ensure list items in cards have consistent spacing */
.card-body ul {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.card-body li {
    margin-bottom: 0.75rem;
    padding-right: 0.5rem;
}

.card-body li:last-child {
    margin-bottom: 0;
}

/* Activities Page Styles */

/* Filter Buttons */
.filter-buttons .btn {
    margin: 0 5px;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-buttons .btn.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* Activity Cards */
.activity-card {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.activity-card.card-hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Standardized activity card styling */
.activity-card {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.activity-card .card-body {
    padding: 1.85rem;
}

.activity-card .card-title,
.activity-card h4 {
    margin-bottom: 1.25rem;
}

/* Give more breathing room to icon boxes */
.activity-card .icon-box {
    margin-right: 1.25rem;
}

.timeline-item {
    position: relative;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.timeline-marker {
    background-color: rgba(91, 192, 190, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background-color: var(--light-gray);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.8rem;
    display: inline-block;
}

/* Statistics */
.stats-container {
    margin-bottom: 2rem;
}

.stat-item {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem 1rem;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

/* Progress Section Styling */
.progress-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    border-left: 4px solid var(--primary-color);
}

.progress-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.bg-gradient {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)) !important;
}

/* Enhanced Timeline Styles */
.timeline-marker {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    color: white;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

/* Enhanced Filter Buttons */
.filter-buttons .btn {
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    margin: 0.25rem;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
}

.filter-buttons .btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.filter-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Enhanced Card Styles */
.activity-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.icon-box {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color)) !important;
}

/* Tags Styling */
.tag {
    display: inline-block;
    background: var(--light-gray);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin: 0.1rem;
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
}

/* Badge Enhancements */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .stats-container .stat-item {
        padding: 1.5rem 0.75rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .progress-section {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .timeline-content {
        padding: 1rem;
    }
}

/* Simplified Activities Page Override */
.stats-container .stat-item {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
    border: 2px solid var(--primary-color) !important;
}

.stat-number {
    color: var(--primary-color) !important;
}

.stat-label {
    color: var(--text-color) !important;
    opacity: 0.8 !important;
}

.timeline-marker {
    background: var(--primary-color) !important;
}

.filter-buttons .btn.active {
    background: var(--primary-color) !important;
    transform: none !important;
}

.filter-buttons .btn:hover {
    background: var(--secondary-color) !important;
    transform: none !important;
}

/* Compact Activities Page Styling */
.activities-page .activity-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    height: auto !important;
    min-height: auto !important;
}

.activities-page .activity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.activities-page .activity-card .card-body {
    padding: 0.75rem !important;
}

.activities-page .badge-sm {
    font-size: 0.7em;
    padding: 0.25em 0.5em;
}

.activities-page .row {
    margin-bottom: 1rem;
}

.activities-page .content-section {
    margin-bottom: 1.5rem !important;
}

.activities-page .section-title {
    font-size: 1.25rem;
    margin-bottom: 1rem !important;
}

/* Interests Page Styling */
.interests-page .activity-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    height: auto !important;
    min-height: auto !important;
}

.interests-page .activity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.interests-page .book-card,
.interests-page .travel-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.interests-page .book-card:hover,
.interests-page .travel-card:hover {
    background-color: #e9ecef;
    transform: translateY(-1px);
}

.interests-page .sidebar {
    position: sticky;
    top: 80px;
}

.interests-page .badge {
    font-size: 0.8em;
}

.interests-page .list-group-item {
    border: none;
    padding: 0.5rem 0;
}

/* Enhanced Interests Page Header */
.interests-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
}

.interests-header .display-4 {
    color: #2c3e50;
    font-weight: 700;
}

.interests-stats .stat-item {
    text-align: center;
    padding: 1rem;
}

.interests-stats h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Interactive Navigation */
.interest-nav {
    background-color: #fff;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.interest-nav .nav-pills .nav-link {
    background-color: transparent;
    border: 2px solid #e9ecef;
    color: #6c757d;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0.25rem;
}

.interest-nav .nav-pills .nav-link:hover {
    border-color: #3a506b;
    color: #3a506b;
    transform: translateY(-2px);
}

.interest-nav .nav-pills .nav-link.active {
    background-color: #3a506b;
    border-color: #3a506b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 80, 107, 0.3);
}

/* Interest Section Animations */
.interest-section {
    transition: all 0.3s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .interests-header {
        padding: 2rem 1rem;
    }
    
    .interests-stats .col-md-3 {
        margin-bottom: 1rem;
    }
    
    .interest-nav .nav-pills .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Interests Page Internal Uniformity Styles */

/* Remove any Bootstrap container styling for interests page */
.interests-page main {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.interests-page section {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Consistent Content Layout */
.minimal-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Consistent Navigation */
.minimal-nav {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    padding: 0 2rem;
}

.nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.minimal-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    border-radius: 4px;
}

.minimal-btn:hover,
.minimal-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(58, 80, 107, 0.05);
}

/* Consistent Section Layout */
.minimal-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

/* Consistent Typography Hierarchy */
.interests-page h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.interests-page h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.interests-page h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.interests-page p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 1rem;
}

/* Consistent List Styling */
.simple-list {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.simple-list li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.simple-list li:before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Consistent Gallery Layout */
.simple-gallery {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.gallery-img {
    flex: 1;
    min-width: 200px;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

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

/* Consistent Button Styling */
.interests-page .btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border-radius: 4px;
    font-weight: 600;
}

/* Responsive Design for Internal Uniformity */
@media (max-width: 768px) {
    .minimal-content,
    .minimal-nav,
    .minimal-section {
        padding: 0 1rem;
    }
    
    .nav-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .minimal-btn {
        width: 200px;
        padding: 0.5rem 1rem;
    }
    
    .simple-gallery {
        flex-direction: column;
    }
    
    .interests-page h1 {
        font-size: 2rem;
    }
    
    .interests-page h3 {
        font-size: 1.5rem;
    }
}

/* Custom text justification for better browser support */
.text-justify {
    text-align: justify !important;
    text-justify: inter-word;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    /* Hide overflow-x to prevent horizontal scrolling */
    body {
        overflow-x: hidden;
    }
    
    /* Better mobile navigation spacing */
    .main-navigation a {
        min-width: auto; /* Remove fixed width on mobile */
        padding: 0.75rem 1rem;
    }
    
    /* Improve form elements on mobile */
    .form-control, .form-select {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.75rem;
    }
    
    /* Better button sizes for touch */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        min-height: 44px;
    }
    
    /* Social icons spacing */
    .social-icons a {
        margin: 0 0.75rem;
        font-size: 1.25rem;
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Better table responsiveness */
    .table-responsive {
        font-size: 0.875rem;
    }
    
    /* Improve card layouts */
    .card {
        margin-bottom: 1rem;
    }
    
    /* Better footer layout */
    footer {
        text-align: center;
        padding: 2rem 1rem;
    }
    
    footer .social-icons {
        margin-bottom: 1rem;
    }
    
    /* Better spacing for contact page */
    .d-flex.gap-4 {
        gap: 1rem !important;
        flex-direction: column;
        align-items: center;
    }
    
    .d-flex.gap-4 a {
        margin-bottom: 0.5rem;
    }
}
