/* --- General Body & Typography --- */
.markdown-body > h1:first-child {
  display: none !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

h1, h2, h3 {
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
}

h2 {
  font-size: 1.75rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

a {
  color: #007bff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- Header & Navigation --- */
/* Hide default site/repo title */
.site-title, .project-name {
  display: none !important;
}

/* Custom header for name and title */
.header-intro {
  text-align: left;
  margin-bottom: 2rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1.5rem;
}
.header-intro p {
  font-size: 1.15rem;
  color: #666;
  margin: 0;
}

/* Top navigation bar */
.topnav {
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}
.topnav a {
  color: #333;
  margin-right: 1.5rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}
.topnav a:hover {
  color: #007bff;
  text-decoration: none;
}


/* --- Profile Section --- */
.profile {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.profile-img {
  flex: 0 0 200px;
}

.profile-img img {
  width: 100%;
  height: auto;
  border-radius: 8px; /* Rounded corners */
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: block;
}

.profile-text {
  flex: 1 1 320px;
  min-width: 220px;
}
.profile-text p {
  margin-bottom: 1em;
}
.profile-text h2 {
  margin-top: 0; /* No top margin for the first heading in this block */
  border: none;
  padding-bottom: 0.25rem;
}


/* --- News Section --- */
.news ul {
  list-style-type: none;
  padding-left: 0;
}
.news li {
  margin-bottom: 0.75rem;
}
.news .date {
  font-weight: 600;
  color: #555;
  display: inline-block;
  width: 80px; /* Aligns the dates nicely */
}


/* --- Links Section --- */
.links p {
  font-size: 1.1rem;
}


/* --- Lists --- */
ul {
  padding-left: 20px;
}
li {
  margin-bottom: 0.5rem;
}


/* --- Responsive Design --- */
@media (max-width: 700px) {
  h1 {
    font-size: 2rem;
  }
  .header-intro p {
    font-size: 1.1rem;
  }
  
  .profile {
    flex-direction: column;
  }
  .profile-img {
    margin: 0 auto 1rem auto;
    width: 160px; /* Smaller image on mobile */
  }
  
  .news .date {
    display: block; /* Stack date above news item on small screens */
    width: auto;
    margin-bottom: 0.25rem;
  }
}


/* --- Projects Page Styling --- */

/* Individual project container */
.project-entry {
  border-top: 1px solid #e0e0e0;
  padding-top: 2.5rem;
  margin-top: 2.5rem;
}

/* Remove top border/margin from the very first project */
.projects-list .project-entry:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 1rem;
}

.project-entry h3 {
  margin-top: 0;
  font-size: 1.4rem;
  color: #333;
}

/* Flexbox container for the image gallery */
.project-gallery {
  display: flex;
  gap: 1.5rem; /* Space between gallery items */
  flex-wrap: wrap; /* Allows items to wrap onto the next line on smaller screens */
  align-items: flex-start;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Individual gallery item (image + caption) */
.gallery-item {
  flex: 1 1 280px; /* Grow, shrink, and base width. Makes it responsive. */
  text-align: left;
}

.gallery-img {
  width: 100%;
  height: auto;
  max-height: 220px; /* Controls image height */
  object-fit: contain; /* Ensures image scales properly without distortion */
  border-radius: 6px;
  background-color: #f9f9f9;
  border: 1px solid #eee;
  padding: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  margin-bottom: 0.75rem;
}

.gallery-caption {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
  margin-top: 0;
}

/* Style for the publication link to make it stand out */
.publication-link {
  display: inline-block;
  background-color: #007bff;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 5px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease-in-out;
}

.publication-link:hover {
  background-color: #0056b3;
  text-decoration: none;
  color: #ffffff;
}
