html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Merriweather', 'Georgia', serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    font-weight: 300;
    letter-spacing: 0.02em;
    font-size: 16px; /* Reduced from default */
}

h1, h2 {
    font-family: 'Lora', 'Times New Roman', serif;
    font-weight: 500;
    color: #2c3e50;
}

h1 {
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-top: 0;
    font-size: 2.2rem; /* Slightly smaller heading */
    margin-bottom: 1rem;
}

h2 {
    color: #2980b9;
    margin-top: 20px;
    font-size: 1.6rem; /* Slightly smaller section headers */
    margin-bottom: 0.75rem;
}

a {
    text-decoration: none;
    color: #0366d6;
    transition: color 0.3s ease;
}

a:hover {
    color: #024b8d;  /* Slightly darker blue on hover */
}

section {
    margin-bottom: 2rem;
}

hr {
    border: none;
    height: 1px;
    background-color: #e1e4e8;
    margin: 2rem 0;
}

.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    display: flex;
    gap: 30px;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: flex-start;  /* Change from center to start */
    padding: 1.5rem;
    box-sizing: border-box;
}

.sidebar-links a,
.social-links a {
    text-decoration: none;
    color: #0066cc;
    transition: color 0.3s ease;
    align-self: center;
    width: 100%;
    text-align: center;
}

.profile-image-container {
    width: 150px;
    height: 150px;
    margin-bottom: 1rem;
    border-radius: 50%;
    overflow: hidden;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-links,
.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.sidebar-links a,
.social-links a {
    text-decoration: none;
    color: #0066cc;
    transition: color 0.3s ease;
}

.sidebar-links a:hover,
.social-links a:hover {
    color: #004080;
}

.main-content p {
    margin-bottom: 1rem;
    font-size: 0.95em; /* Slightly smaller paragraphs */
    text-align: justify;
    hyphens: auto; /* Optional: helps with better justification */
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
}

.intro p,
.publications li,
.projects li {
    margin-bottom: 15px;
}

.publications ul,
.projects ul {
    list-style: none;
    padding: 0;
}

.publications li,
.projects li {
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.paper-links a {
    text-decoration: none;
    color: #27ae60;
    margin-right: 10px;
    font-size: 0.9em;
}

.publications ul li.publication-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.publication-thumbnail {
    width: 100px;  /* Adjust size as needed */
    height: 100px;  /* Make it square */
    object-fit: cover;  /* Ensures image covers the area without distortion */
    border-radius: 8px;  /* Optional: adds rounded corners */
}

.publication-details {
    flex-grow: 1;
}

.publication-details {
    flex-grow: 1;
}

.publication-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.publication-authors {
    font-style: italic;
}

.publication-venue {
    color: #666;
}

.publication-venue-links {
    display: flex;
    align-items: center;
    gap: 15px; /* Increased gap between venue and links */
    margin-top: 3px; /* Optional: add a bit of vertical spacing */
}

.projects .project-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project-item {
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 10px;
}

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

.project-title {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 5px 0;
}

.project-title:hover {
    color: #007bff; /* A nice blue color for hover, adjust as needed */
}

.project-title .toggle-icon {
    transition: transform 0.3s ease;
}

.project-description {
    transition: max-height 0.5s ease, opacity 0.5s ease;
    overflow: hidden;
}

.toggle-icon {
    font-size: 0.7em;
    color: #666;
}

.project-description {
    display: none;
    margin-top: 10px;
    color: #666;
    line-height: 1.6;
}

.project-description p {
    margin: 0;
}

.project-description.active {
    display: block;
}
.project-title {
    cursor: pointer;
    user-select: none;
}

.project-description img.project-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.project-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
}

.video-text-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.project-video {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
}

.project-video-small {
    width: 500px;  /* Adjust size as needed */
    flex-shrink: 0;
}

.project-meta {
    color: #666;
    font-size: 0.9em;
}

.platform-image {
    color: #0066cc;
    cursor: pointer;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

.story-container p {
    line-height: 1.6;
    position: relative;
}

.inline-text-image {
    float: right;
    margin-left: 10px;
    margin-top: 30px;
    margin-bottom: 10px;
    width: 400px;
    max-width: 40%;
    border-radius: 0px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    shape-outside: circle(90%);
}

.story-image {
    text-align: center;
    margin: 20px 0;
}

.story-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.story-image figcaption {
    margin-top: 10px;
    font-style: italic;
    color: #666;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        align-items: center;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .main-content {
        padding: 20px;
    }
}

.image-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 0;
}

.responsive-image {
    max-height: 40vh;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    cursor: pointer;
}