body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  color: #222;
  margin: 0;
  padding: 0;
}

.head {
  text-align: center;
  background-color: #f5f5f5; /* Light gray shade */
  padding-top: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #ddd;
  box-sizing: border-box;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* soft shadow below header */
  /* border-radius: 3%;  */
}

.profile-pic {
  width: 12%;
  height: 12%;
  border-radius: 50%; /* Makes it circular */
  object-fit: cover;
  display: block;
  margin: 0 auto 15px auto; /* Center horizontally, space below */
}

.subtitle {
  font-style: italic;
  color: #555;
  margin-top: -5px;
  margin-bottom: 15px;
}

.social {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.social a {
  color: #0366d6;
  text-decoration: none;
  margin: 0 6px;
  font-weight: 500;
}

.social a:hover {
  text-decoration: underline;
}

.navbar {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  background-color: #ffffff; /* optional: white background */
  margin-top: 2px;
  padding: 10px 0;
  /* border-radius: 12px; */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 0 4px rgba(0, 0, 0, 0.08);
  margin: 2px auto; /* centers the 40%-wide navbar */
}

.navbar a {
  text-decoration: none;
  font-weight: 500;
}

.navbar a:hover {
  text-decoration: underline;
}

#cvPage section {
  margin-left: 2%;
  margin-right: 2%;
}

.edu-entry {
  margin-bottom: 14px; /* small gap between entries */
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.school,
.degree {
  display: flex;
  justify-content: space-between; /* put name on left, location/year on right */
  align-items: baseline;
  flex-wrap: wrap; /* allows wrapping on small screens */
}

.school-name,
.school-location {
  margin: 0;
  font-size: 1rem;
}

.degree p {
  margin: 2px 0;
}

.degree .year {
  color: #555;
  font-style: italic;
}

.edu-entry p {
  margin: 3px 0;
  line-height: 1.4;
}

/* On mobile, make vertical and remove dots */
@media (min-width: 600px) {
  .social {
    flex-direction: row;
    align-items: center;
  }
  .navbar {
    flex-direction: row;
    justify-content: space-evenly;
  }
}

#awards-honors h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

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

.award-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #eee; /* optional separator */
  padding: 6px 0;
  gap: 16px; /* spacing between name and year */
}

.award-name {
  flex: 1;
  max-width: 80%; /* prevents overlap */
  line-height: 1.35;
  font-weight: 600;
}

.award-year {
  white-space: nowrap;
  font-weight: 400;
  color: #555;
  font-style: italic;
}

/* ===== Research Experience ===== */
#research-exp h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.research-entry {
  padding: 6px 0;
  margin-bottom: 14px;
  border-bottom: 1px solid #eee;
}

/* Left title — right year */
.research-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.research-header h3 {
  margin: 0;
  flex: 1;
  max-width: 80%;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.3;
}

.research-year {
  white-space: nowrap;
  font-weight: 400;
  color: #555;
  font-style: italic;
}

.research-entry p,
.research-entry ul {
  margin: 6px 0;
  line-height: 1.35;
}

.research-entry ul {
  padding-left: 20px;
}

.navbar .nav-link {
  color: #1f2d3d;
  padding-bottom: 0.25rem;
}

.navbar .nav-link:hover {
  color: #0d6efd;
}

.navbar .nav-link.active {
  border-bottom: 2px solid #0d6efd;
}

/* ===== Research section ===== */
#research {
  margin: 1rem auto;
}

/* Each research item */
.research-item {
  width: 100%; /* 🔑 makes it full width */
  background-color: #ffffff;
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;

  border-radius: 10px;

  /* subtle academic shadow */
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* Text readability */
.research-item h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.research-item p {
  line-height: 1.65;
  margin-bottom: 0;
  color: #444;
}

/* Hover effect */
.research-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

#research h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  padding-bottom: 0.5rem;

  border-bottom: 3px solid #0d6efd;
  display: inline-block;
}

/* Research title row — soft fade into content */
.research-item h3 {
  margin: -1.75rem -2rem 1.25rem -2rem;
  padding: 0.9rem 2rem;

  background: linear-gradient(to bottom, #edf6ff 0%, #edf6ff 70%, #ffffff 100%);

  font-size: 1.15rem;
  font-weight: 600;
  color: #1f2d3d;
}

@media print {
  header {
    display: none;
  }
}

/* cover strip */
.cover-strip {
  height: 140px;
  background: url("img/header-bg.jpeg") center / cover no-repeat;
}

/* make avatar overlap the cover */
.profile-avatar {
  margin-top: -160px;
  border: 6px solid #fff;
  background: #fff;
}

/* ===== Mobile first (default) ===== */
.social-row {
  flex-direction: column; /* stack on mobile */
  align-items: center;
}

nav div div {
  flex-direction: column; /* stack nav on mobile */
  align-items: center;
}

/* ===== Desktop ===== */
@media (min-width: 768px) {
  .social-row {
    flex-direction: row; /* row on desktop */
  }

  nav div div {
    flex-direction: row; /* row on desktop */
  }
}

#about h2,
#education h2,
#publications h2,
#news h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  padding-bottom: 0.5rem;

  border-bottom: 3px solid #0d6efd;
  display: inline-block;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

#about,
#education,
#publications,
#news {
  margin: 1rem auto;
}

main {
  margin-left: 2%;
  margin-right: 2%;
}
