/* --- General Styling --- */
html { scroll-behavior: smooth; }

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #fff;
}

header {
    background: #f4f4f4;
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: center;
    gap: 25px;
    max-width: 600px; 
    margin: 0 auto;
}

nav a {
    text-decoration: none;
    color: #0056b3;
    font-weight: bold;
    font-size: 1rem;
}

nav a:hover {
    color: #003d82;
    text-decoration: underline;
}

.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* --- Sidebar Styling --- */
.sidebar {
    flex: 1;
    max-width: 280px;
    background: #fafafa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #eee;
    position: sticky;
    top: 80px; 
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px auto;
    display: block; 
    border: 3px solid #ddd;
}

.profile-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ddd;
    text-align: center;
}

.profile-header h1 { margin: 0 0 5px 0; font-size: 1.8rem; color: #222; }
.profile-header p { margin: 0; font-size: 0.95rem; color: #666; font-style: italic; }

.sidebar h3 { margin-top: 0; color: #222; }
.sidebar p { margin: 10px 0; font-size: 0.95rem; }

/* --- Main Content Styling --- */
.main-content { flex: 2; }

section { margin-bottom: 50px; scroll-margin-top: 70px; }
section h2 { border-bottom: 2px solid #0056b3; padding-bottom: 8px; color: #222; margin-top: 0; }

.news-item { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px dashed #ccc; }
.date { font-weight: bold; color: #0056b3; margin-bottom: 5px; }

/* --- Education Section --- */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.education-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.institute-logo {
    width: 80px;       /* Increased the overall box size */
    height: 80px;
    object-fit: contain; /* Ensures the logo scales to fit the box without distorting the aspect ratio */
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0;        /* Removed padding so the image can touch the edges if needed */
}

.education-details {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.degree {
    font-size: 1.15rem;
    font-weight: 600;
    color: #222222;
    line-height: 1.2;
}

.institute-name {
    font-size: 1rem;
    color: #0056b3;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.institute-name:hover {
    color: #003d82;
    text-decoration: underline;
}

.education-meta {
    font-size: 0.9rem;
    color: #666666;
}

/* --- Footer & Links --- */
.footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background: #222;
    color: #fff;
    font-size: 0.9rem;
}

a { color: #0056b3; text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Home Page --- */
#about_me p { text-align: justify; }

/* --- Research Publications --- */
.journal_publication { margin-bottom: 25px; }
.pub-title { font-weight: bold; font-size: 1.1rem; margin-bottom: 5px; }
.pub-authors { color: #444; margin-bottom: 5px; font-style: italic; }
.pub-venue { color: #0056b3; font-weight: bold; }

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        gap: 20px;
        margin: 20px auto;
    }
    
    .sidebar {
        max-width: 100%;
        position: static; /* Allows the sidebar to scroll normally instead of overlapping content */
        text-align: center;
    }
    
    nav {
        flex-wrap: wrap; /* Lets navigation links wrap to the next line on very small screens */
        gap: 15px;
        padding: 0 10px;
    }

    .education-item {
        gap: 1rem; /* Slightly tightens the gap between the logo and text on mobile */
    }
}
