* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: #f8f9fa;
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    margin-right: 0;
    margin-left: 25px;
}

.nav-links a {
    position: relative;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 1rem;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #228be6;
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Dark mode adjustment */
body.dark-mode .nav-links a::after {
    background-color: #66b3ff;
}

main {
    padding: 32px 0;
}

h1 {
    font-size: 2rem;
    margin-bottom: 16px;
}

h2 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: #228be6;
}

.publication, .research-item {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.profile-image-container {
    width: 200px;  /* adjust to your desired size */
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    background: transparent;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: transparent;
}

/* For light mode */
.light-mode .profile-image-container {
    background: transparent;
}

/* For dark mode */
.dark-mode .profile-image-container {
    background: transparent;
}

.profile-image:hover {
    transform: scale(1.02);
}

footer {
    background-color: #f8f9fa;
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
}

.publication-links {
    margin-top: 10px;
}

.pub-button {
    display: inline-block;
    padding: 4px 12px;
    margin-right: 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85em;
    transition: all 0.3s ease;
}

.pub-website {
    background-color: #228be6;
    color: white;
    border: 1px solid #228be6;
}

.pub-website:hover {
    background-color: #1c7ed6;
}

.pub-details {
    background-color: white;
    color: #228be6;
    border: 1px solid #228be6;
}

.pub-details:hover {
    background-color: #e7f5ff;
}

.publication-item {
    padding: 16px;
    margin-bottom: 16px;
    border-left: 4px solid #228be6;
    background-color: rgba(248, 249, 250, 0.7);
    transition: all 0.3s ease;
}

.publication-item:hover {
    border-left-width: 6px;
    background-color: rgba(248, 249, 250, 0.9);
}

body.dark-mode .publication-item {
    border-left-color: #66b3ff;
    background-color: rgba(45, 45, 45, 0.7);
}

body.dark-mode .publication-item:hover {
    background-color: rgba(45, 45, 45, 0.9);
}

/* Dark mode styles */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

body.dark-mode header,
body.dark-mode footer {
    background-color: #2d2d2d;
    border-color: #404040;
}

body.dark-mode .nav-links a {
    color: #e0e0e0;
}

body.dark-mode .nav-links a:hover {
    color: #66b3ff;
}

body.dark-mode h2 {
    color: #66b3ff;
}

body.dark-mode .publication,
body.dark-mode .research-item {
    background-color: #2d2d2d;
}

body.dark-mode .pub-details {
    background-color: transparent;
    color: #66b3ff;
    border-color: #66b3ff;
}

body.dark-mode .pub-details:hover {
    background-color: rgba(102, 179, 255, 0.1);
}

body.dark-mode .pub-website {
    background-color: #66b3ff;
    border-color: #66b3ff;
}

body.dark-mode .pub-website:hover {
    background-color: #4d9fff;
}

/* Theme toggle button styles */
.theme-toggle {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 0.9em;
    color: inherit;
    gap: 5px;
    margin-left: 0;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.theme-toggle:hover {
    opacity: 0.8;
}

/* Add these new styles for the two-column layout */
.about-container {
    display: flex;
    gap: 40px;
    position: relative;
}

.left-column {
    flex: 0 0 250px;
    position: sticky;
    top: 20px;
    /* height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto; */
}

.right-column {
    flex: 1; /* Takes remaining space */
}

/* Style for contact info */
.contact-info {
    background-color: transparent;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

body.dark-mode .contact-info {
    background-color: transparent;
}

/* Responsive design */
@media (max-width: 768px) {
    .about-container {
        flex-direction: column;
    }
    
    .left-column {
        position: static;
        width: 100%;
        margin-bottom: 20px;
    }

    .quick-nav {
        position: static;
    }
} 

/* Add these styles for the contact info icons */
.contact-info i {
    width: 20px;
    margin-right: 10px;
    color: #228be6;
}

.contact-info a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: #228be6;
}

/* Dark mode adjustments for icons */
body.dark-mode .contact-info i {
    color: #66b3ff;
}

body.dark-mode .contact-info a:hover {
    color: #66b3ff;
} 

/* Style for sections */
.contact-info, .publication-item, .research-item {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 20px;
}

/* Dark mode adjustments */
body.dark-mode .contact-info,
body.dark-mode .publication-item,
body.dark-mode .research-item {
    background-color: #2d2d2d;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.about-container, .publication-item, .research-item {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Stagger animations for multiple items */
.publication-item:nth-child(1) { animation-delay: 0.1s; }
.publication-item:nth-child(2) { animation-delay: 0.2s; }
.publication-item:nth-child(3) { animation-delay: 0.3s; } 

.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #228be6;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(100px);
}

.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
} 

.container img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.container img:hover {
    transform: scale(1.02);
    cursor: zoom-in;
} 

/* Add decorative section dividers */
h2:not(:first-child):not(h1 + h2) {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 2px solid rgba(34, 139, 230, 0.1);
}

body.dark-mode h2:not(:first-child):not(h1 + h2) {
    border-top-color: rgba(102, 179, 255, 0.1);
} 

/* Link highlight effect */
a:not(.pub-button) {
    text-decoration: none;
    color: #228be6;
    background: linear-gradient(to bottom, transparent 62%, rgba(34, 139, 230, 0.1) 0) center/0% 75% no-repeat;
    transition: background-size 0.3s ease;
}

a:not(.pub-button):hover {
    background-size: 100% 75%;
}

body.dark-mode a:not(.pub-button) {
    color: #66b3ff;
    background: linear-gradient(to bottom, transparent 62%, rgba(102, 179, 255, 0.1) 0) center/0% 75% no-repeat;
} 

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
} 

/* Research images layout */
.research-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.research-images img {
    width: 100%;
    height: auto;
    object-fit: cover;
} 

.loading-spinner {
    text-align: center;
    padding: 20px;
    display: none;
}

.loading-spinner.active {
    display: block;
} 

/* Style for the title link */
nav h1 a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 5px 10px;
    background: linear-gradient(120deg, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.05) 50%, rgba(0, 0, 0, 0.05) 100%);
    background-size: 240% 100%;
    display: inline-block;
}

nav h1 a:hover {
    color: #333;
    background-position: 100% 0;
}

/* Dark mode adjustments */
body.dark-mode nav h1 a {
    background: linear-gradient(120deg, transparent 0%, transparent 50%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.1) 100%);
    background-size: 240% 100%;
}

body.dark-mode nav h1 a:hover {
    color: #fff;
}

/* Adjust the header title size */
nav h1 {
    font-size: 1.5rem;
    position: relative;
}

/* Optional: Add subtle text shadow for depth */
nav h1 a {
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.05);
}

body.dark-mode nav h1 a {
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
}

/* Adjust nav layout */
nav.container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
}

/* Move nav links to the right */
.nav-links {
    margin-left: auto; /* Push to right */
    margin-right: 20px; /* Add space between nav links and dark mode toggle */
    display: flex;
    align-items: center;
}

/* Adjust spacing between nav items */
.nav-links li {
    margin-left: 25px; /* Increase space between items */
}

/* Optional: adjust theme toggle button position */
.theme-toggle {
    margin-left: 10px; /* Space between nav links and toggle */
} 

/* Dark mode adjustment */
body.dark-mode .profile-image {
    /* Removed the dark mode border */
} 

nav h1 a .first-name {
    font-weight: 700;  /* Bold */
    letter-spacing: 0.5px;
}

nav h1 a .last-name {
    font-weight: 400;  /* Normal */
    letter-spacing: 0.3px;
}

/* Keep the existing hover effect for the whole name */
nav h1 a:hover .first-name,
nav h1 a:hover .last-name {
    color: #333;
}

body.dark-mode nav h1 a:hover .first-name,
body.dark-mode nav h1 a:hover .last-name {
    color: #fff;
}

/* GitHub icon styling */
.fa-github {
    font-size: 1.2em;
    color: #333;
    transition: color 0.3s ease;
}

.fa-github:hover {
    color: #2b3137;
}

/* Dark mode adjustment */
body.dark-mode .fa-github {
    color: #e0e0e0;
}

body.dark-mode .fa-github:hover {
    color: #ffffff;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #333;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s, background-color 0.3s;
    z-index: 1000;
}

.back-to-top:hover {
    opacity: 1;
}

body.dark-mode .back-to-top {
    background-color: #666;
}

.back-to-top.show {
    display: flex;
}

/* Download buttons */
.download-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #333;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s, transform 0.2s;
}

.download-button:hover {
    background-color: #444;
    transform: translateY(-2px);
}

body.dark-mode .download-button {
    background-color: #666;
}

body.dark-mode .download-button:hover {
    background-color: #777;
}

.download-button i {
    font-size: 1.1em;
}

/* Adjust download buttons for left panel */
.contact-info .download-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 1rem;
}

.contact-info .download-button {
    font-size: 0.9em;
    padding: 0.5rem 1rem;
    justify-content: center;
    background-color: #228be6;
}

.contact-info .download-button:hover {
    background-color: #1c7ed6;
}

body.dark-mode .contact-info .download-button {
    background-color: #66b3ff;
}

body.dark-mode .contact-info .download-button:hover {
    background-color: #4d9fff;
}

/* Style for download links */
.contact-info a[href$=".pdf"],
.contact-info a[href*="Research_Statement"] {
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-info a[href$=".pdf"]:hover,
.contact-info a[href*="Research_Statement"]:hover {
    color: #228be6;
}

body.dark-mode .contact-info a[href$=".pdf"]:hover,
body.dark-mode .contact-info a[href*="Research_Statement"]:hover {
    color: #66b3ff;
}

.contact-info a[href$=".pdf"] i,
.contact-info a[href*="Research_Statement"] i {
    margin-right: 8px;
}

/* Last updated text style */
[style*="color: #666"] {
    transition: color 0.3s;
}

body.dark-mode [style*="color: #666"] {
    color: #999 !important;
}

/* Page title styling */
.page-title {
    margin-bottom: 40px;
}

.page-title h1 {
    margin-bottom: 0;
}

/* Section dividers - modified */
h2:not(:first-child) {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 2px solid rgba(34, 139, 230, 0.1);
}

/* First h2 after page-title should not have divider */
.page-title + h2,
.page-title + div + h2 {
    border-top: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Research content styling */
.figure-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

.figure-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.figure-container .caption {
    margin-top: 10px;
    font-style: italic;
    color: #666;
    text-align: center;
}

body.dark-mode .figure-container .caption {
    color: #999;
}

.research-content p {
    line-height: 1.6;
    margin: 1em 0;
}

/* Quick navigation styling */
.quick-nav {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 20px;
}

.quick-nav h2 {
    font-size: 1.2rem;
    margin: 0 0 15px 0;
    padding: 0;
    border: none;
}

.quick-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-nav li {
    margin-bottom: 12px;
    display: block;
}

.quick-nav a {
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    margin: -8px -12px;
    background: none;
}

.quick-nav a:not(.pub-button) {
    background: none;
}

.quick-nav a:not(.pub-button):hover {
    background-size: 0;
}

.quick-nav a:hover {
    color: #228be6;
    padding-left: 17px;
    background-color: rgba(34, 139, 230, 0.05);
}

/* Dark mode adjustments */
body.dark-mode .quick-nav {
    background-color: #2d2d2d;
}

body.dark-mode .quick-nav a {
    color: #e0e0e0;
}

body.dark-mode .quick-nav a:hover {
    color: #66b3ff;
    background-color: rgba(102, 179, 255, 0.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .quick-nav {
        margin-bottom: 30px;
    }
    
    .quick-nav li {
        margin-bottom: 10px;
    }
    
    .quick-nav a {
        padding: 10px 15px;
    }
}

/* Responsive layout */
@media (max-width: 1024px) {
    .research-container {
        flex-direction: column;
    }
    
    .sidebar {
        position: static;
        flex: none;
        width: 100%;
        margin-bottom: 30px;
    }
    
    .main-content {
        width: 100%;
    }
}

/* Research page two-column layout */
.research-container {
    display: flex;
    gap: 40px;
    margin-top: 30px;
}

.sidebar {
    flex: 0 0 250px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}
.main-content {
    flex: 1;
    max-width: 900px;
}

