/* --- General Body Styles --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    color: #333;
    margin: 0;
    padding: 0;
}

/* --- Centered Main Content Area --- */
.content-wrapper {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 20px;
}

/* --- Sticky Top Container --- */
.sticky-top-container {
    position: sticky;
    top: 0;
    z-index: 100;
}

/* --- Header Banner --- */
header {
    background-color: #343a40;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* --- Navigation Bar Styles --- */
nav {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

nav ul li a {
    display: block;
    color: #333;
    text-align: center;
    padding: 14px 20px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
}

nav ul li a:hover {
    background-color: #f2f2f2;
    color: #007bff;
}

nav ul li a.active {
    color: #007bff;
    border-bottom: 2px solid #007bff;
}

/* --- Section Layouts for Homepage --- */
.top-half, .bottom-half {
    display: flex;
    gap: 40px;
    align-items: flex-start; /* Changed to flex-start for better alignment */
    padding: 40px 0;
    border-bottom: 1px solid #e0e0e0;
}

/* --- Profile Picture Styling --- */
.profile-picture-container {
    flex: 1;
    text-align: center;
}

.profile-picture-container img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* --- About Me Container Styling --- */
.about-me-container {
    flex: 5;
}

/* --- Bottom Half Containers --- */
.links-container {
    flex: 1;
}

.updates-container {
    flex: 5;
}

/* --- Links List Styling --- */
.links-container ul {
    list-style-type: none;
    padding: 0;
}

.links-container a {
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
}

.links-container a:hover {
    text-decoration: underline;
}

/* --- About Page Specific Styles --- */
.page-banner img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 30px;
}

.page-content {
    padding: 20px 0;
}

.page-content h2 {
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* --- Publication Page Styles --- */
.publication-entry {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    padding: 30px 0;
    border-bottom: 1px solid #e0e0e0;
}

.publication-image {
    flex-basis: 300px;
    flex-shrink: 0;
}

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

.publication-details {
    flex: 1;
}

.publication-details h3 {
    margin-top: 0;
}

.publication-link {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.publication-link:hover {
    background-color: #0056b3;
}

/* --- Homepage Updates Section Styles (NEW!) --- */
.update-entry {
    display: flex;
    gap: 20px; /* A little less space than publications */
    align-items: center; /* Vertically center image with text */
    padding-top: 20px;
    padding-bottom: 24px; /* Add bottom padding to prevent overlap */
}
/* Add a border to all but the first update entry for separation */
.update-entry + .update-entry {
    border-top: 1px solid #e0e0e0;
}

.update-image {
    flex-basis: 150px; /* Smaller images for updates */
    flex-shrink: 0;
}

.update-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.update-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-bottom: 24px; /* Ensure space below button */
}

.update-details h4 {
    margin: 0 0 5px 0; /* Adjust spacing around the heading */
}

.update-details p {
    margin: 0;
}

/* --- Publication Link Button Sizing Fix --- */
.update-details .publication-link {
    display: inline-block !important;
    /*width: auto !important;---*/
    align-self: flex-start !important;
    margin-right: 0;
    margin-bottom: 8px;
}

/* --- Social Icon Styling (All Icons) --- */
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 8px 0;
  border-radius: 50%;
  background: #eaf4fd;
  transition: box-shadow 0.2s, transform 0.2s, background 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.social-icon-img {
  width: 20px;
  height: 20px;
}
.social-icon:hover {
  background: #1da1f2;
  box-shadow: 0 4px 16px rgba(29,161,242,0.15);
  transform: scale(1.08);
}

/* --- Centered and Enlarged Updates Heading --- */
.updates-heading {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  margin-top: 0.5em;
  margin-bottom: 1em;
  letter-spacing: 0.5px;
}
