/* Base Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-bg: #f9f9f9;
    --dark-text: #333;
    --light-text: #777;
    --border-color: #eaeaea;
    --hover-color: #2980b9;
    --font-main: 'Times New Roman', Times, serif;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
   
    --arxiv-color: #b31b1b;
}

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

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--light-bg);
    margin: 0;
    padding: 0;
}
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
    color: var(--primary-color);
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.8rem;
    margin-top: 1rem !important;  /* Force override */
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.4rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

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



header {
    padding: 20px 0;
    margin-bottom: 30px;
    position: relative;
    border-bottom: 1px solid #e0e0e0;
}

.nav {
    position: relative; /* Changed from absolute for better mobile layout */
    text-align: right; /* Align text to the right */
    margin-top: 10px; /* Add some spacing */
    font-family: "Times New Roman", Times, serif;
    font-size: 18px;
}

.nav a {
    color: black;
    text-decoration: none;
    padding: 5px; /* Add padding for better touch targets */
}

/* Main Content Section */
.main-content {
    padding: 20px 0 0;
}

/* Profile Section */
.profile {
    display: flex;
    flex-direction: row; /* Default to row layout */
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.profile-content {
    flex: 3;
    min-width: 300px; /* Ensure minimum width on small screens */
}

.profile-image-container {
    flex: 1;
    text-align: center;
    max-width: 300px;
    margin: 0 auto;
    min-width: 200px; /* Ensure minimum width on small screens */
}

.profile-image img {
    width: 100%;
    max-width: 250px;
    border-radius: 50%;
    margin-bottom: 15px;
}
.social-links {
  margin-top: 1rem;
  text-align: center; /* Center align social links */
}

.social-links a {
  display: inline-block;
  font-size: 28px; /* Increased from 24px to 28px */
  margin: 0 15px; /* Increased from 10px to 15px for better spacing */
  transition: transform 0.3s ease;
  text-decoration: none;
}

.social-links a:hover {
  transform: scale(1.15); /* Slightly increased hover effect */
}

.social-links .x {
  color: #000000; /* X's branding uses black */
  transition: color 0.3s ease;
}

.social-links .x:hover {
  color: #808080; /* Optional: gray hover effect */
}


.social-links .github {
  color: #333333; /* GitHub dark */
}

.social-links .google {
  color: #4285F4; /* Google blue */
}

.social-links .linkedin {
  color: #0077B5; /* LinkedIn blue */
}

.social-links .email {
  color: #D44638; /* Gmail red */
}

.bold-name {
    font-weight: 700;
}

.location {
    margin: 5px 0 15px;
    color: var(--light-text);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.location i {
    color: var(--accent-color);
}

/* Logo Styling */
.logo-container {
    margin-top: 10px;
}

.initials-logo {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    background-color: var(--primary-color);
    width: 70px;
    height: 70px;
    line-height: 70px;
    text-align: center;
    border-radius: 50%;
    box-shadow: var(--shadow);
    position: relative;
}

.initials-logo::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    opacity: 0.3;
}

/* News Section */
.news-items {
    margin-top: 20px;
}

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

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-list li {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.6;
}

.news-date {
    display: inline-block;
    width: 110px;
    font-weight: 600;
    color: #555;
}


.news-content {
    flex-grow: 1;
}

.news-content i {
    color: var(--secondary-color);
    margin-right: 8px;
}




.publication {
    min-height: 320px; /* Increased from 250px to 320px to accommodate buttons */
    display: flex;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
    gap: 20px;
    position: relative; /* Added for preprint badge positioning */
}

.pub-image {
    flex: 0 0 40%; /* Fixed width for the pub-image class */
    display: flex;
    align-items: flex-start; /* Changed from center to flex-start to align with content */
    justify-content: center;
    padding-top: 10px; /* Add some top padding to align with title */
}

.pub-image img {
    width: 100%;
    height: auto; /* Changed from 100% to auto for better aspect ratio */
    max-height: 200px; /* Added max-height to prevent oversized images */
    object-fit: scale-down; /* Ensure the image fits within the space */
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pub-content {
    flex: 1 1 60%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Change from space-between to flex-start */
}

/* Preprint Badge Styling */
.preprint-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--preprint-color), #ff8c65);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3); }
    50% { box-shadow: 0 2px 15px rgba(255, 107, 53, 0.5); }
    100% { box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3); }
}

.preprint-item {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.02), rgba(255, 140, 101, 0.02));
    border-left: 4px solid var(--preprint-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    min-height: 320px; /* Match the publication min-height */
}

/* Placeholder image for preprints without images */
.placeholder-image {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 5px;
    border: 2px dashed var(--border-color);
    color: var(--light-text);
    font-size: 3rem;
}

/* Media Coverage Styling */
.media-coverage {
    margin: 8px 0;
    color: #666;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.media-coverage i {
    color: var(--accent-color);
    flex-shrink: 0;
}

.media-coverage a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.media-coverage a:hover {
    background-color: rgba(0, 123, 255, 0.1);
    text-decoration: none;
}

/* Submitted to and Manuscript ID styling */
.submitted-to, .manuscript-id {
    margin: 6px 0;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.submitted-to {
    color: #565961; /* Orange color for submitted to */
}

.submitted-to i {
    color: #565961;
    width: 16px;
    text-align: center;
}

.manuscript-id {
    color: #565961; /* Purple color for manuscript ID */
}

.manuscript-id i {
    color: #565961;
    width: 16px;
    text-align: center;
}

/* Button Styling - Enhanced but without colorful buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--dark-text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    gap: 8px;
    text-align: center;
    font-weight: 500;
    margin: 2px 4px 2px 0;
}

.btn:hover:not(.disabled) {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-1px);
}

.btn:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.btn i {
    font-size: 1rem;
}

.download-btn {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.download-btn:hover:not(.disabled) {
    background-color: var(--hover-color);
}

/* All buttons have the same styling now */
.abstract-btn, .bib-btn, .code-btn, .arxiv-btn {
    /* Use default btn styling - no special colors */
}

.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--disabled-bg);
    color: var(--disabled-text);
    border-color: var(--border-color);
    pointer-events: none;
}

/* Always display all buttons, even if disabled */
.pub-links .btn {
    display: inline-flex !important;
}

/* Ensure buttons are positioned at the bottom of the content area */
.pub-links {
    margin-top: 12px;   /* Small gap only */
    padding-top: 0;
}

/* BibTeX Popup - Enhanced */
.bib-popup, .abstract-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    backdrop-filter: blur(3px); /* Add subtle blur effect */
    animation: fadeIn 0.2s ease;
}

.bib-content {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.bib-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    padding-right: 30px; /* Make room for close button */
}

.bib-content pre {
    white-space: pre-wrap;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: auto;
    background-color: var(--light-bg);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--light-text);
    transition: var(--transition);
    z-index: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    color: var(--accent-color);
    background-color: rgba(0,0,0,0.05);
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.copy-btn:hover {
    background-color: var(--hover-color);
}

.copy-btn i {
    font-size: 1rem;
}

/* Abstract Popup - Ensure consistent with BibTeX popup */
.abstract-popup .bib-content {
    max-width: 700px; /* Slightly wider for abstracts */
}

.abstract-text {
    line-height: 1.6;
    text-align: justify;
    margin-top: 15px;
    color: var(--dark-text);
    font-size: 1rem;
}

/* Authors styling */
.authors {
    margin-bottom: 8px;
    color: var(--dark-text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.authors sup {
    color: var(--accent-color);
    font-weight: 500;
}

/* Improve modal for publications */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 25px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

/* Author note */
.author-note {
    font-style: italic;
    color: var(--light-text);
    margin-top: 5px;
    font-size: 0.9rem;
}

/* Improve venue display */
.venue {
    color: var(--secondary-color);
    font-style: italic;
    margin-bottom: 12px;
    display: block;
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
    .pub-links {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .pub-links .btn {
        flex: 0 0 calc(50% - 8px); /* Two buttons per row on small screens */
        min-width: unset;
        margin: 2px;
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .publication {
        flex-direction: column;
        min-height: auto; /* Remove fixed height on mobile */
        gap: 15px;
    }
    
    .pub-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px; /* Limit maximum width */
        margin: 0 auto;
        align-items: center; /* Center align on mobile */
        padding-top: 0;
    }
    
   .pub-content {
    flex: 1 1 60%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Change from space-between to flex-start */
}

    .preprint-badge {
        top: 5px;
        right: 5px;
        font-size: 0.7em;
        padding: 4px 8px;
    }

    .preprint-item {
        min-height: auto; /* Remove fixed height on mobile */
    }

    .media-coverage {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .pub-links .btn {
        flex: 1 1 100%; /* Full width on very small screens */
    }
    
    .modal-content, .bib-content {
        width: 95%;
        padding: 20px 15px;
        margin: 10% auto;
    }

    .preprint-badge {
        position: static;
        display: inline-block;
        margin-bottom: 10px;
    }
}

/* Timeline styles for more.html */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-item {
    display: flex;
    margin-bottom: 15px;
}

.timeline-date {
    width: 90px;
    background-color: #579772;
    color: white;
    text-align: center;
    padding: 10px 0;
    font-weight: 500;
    border-radius: 4px;
    margin-right: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.timeline-content {
    flex: 1;
}

.job-title, .degree-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.institution {
    color: #444;
    margin-bottom: 5px;
}

.major-label, .major-courses-label {
    font-weight: bold;
    margin-top: 15px;
    margin-bottom: 5px;
}

/* Course list styling */
.courses-list {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 5px;
}

.courses-list li {
    margin-bottom: 5px;
}

/* Footer Styling */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    border-top: 3px solid var(--secondary-color);
}

footer p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: white;
    text-decoration: underline;
}

/* Footer social links styling for better appearance */
footer .social-links {
    margin-top: 20px;
}

footer .social-links a {
    font-size: 32px; /* Larger social icons in footer */
    margin: 0 20px;
    color: white;
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    color: var(--secondary-color);
    transform: scale(1.2);
}
/* Academic Services Section Styles */
#services {
    background-color: #f0f0f0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-top: 20px;
}

#services h2 {
    text-align: center;
    color: #333;
    font-size: 28px;
    margin-bottom: 30px;
    font-weight: 500;
}

/* Using the same timeline styles as Experience and Education */
.service-item {
    display: flex;
    margin-bottom: 15px;
}

.service-badge {
    width: 90px;
    background-color: #579772;
    color: white;
    text-align: center;
    padding: 10px 0;
    font-weight: 500;
    border-radius: 4px;
    margin-right: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-list {
    list-style-type: none;
    padding-left: 0;
    margin-top: 5px;
}

.service-list li {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
}

.certificate-link {
    color: #3498db;
    text-decoration: none;
    margin-left: 5px;
    font-weight: 500;
}

.certificate-link:hover {
    text-decoration: underline;
}

.reviewer-info {
    margin-bottom: 12px;
    font-weight: 500;
}

.underline {
    text-decoration: underline;
}

.assistant-list li {
    margin-bottom: 6px;
  font-size: 0.7rem;
}


