/* Minimal Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  background: #fff;
  color: #222;
  line-height: 1.6;
  padding: 20px;
}

/* Page Container with Minimal Border (for main/content only) */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid #eee;
  border-radius: 4px;
}

/* --- Header Overrides --- */
header {
  /* Remove any box or bottom border */
  border: none;
  background: url('images/header-background.jpg') no-repeat center center;
  background-size: cover;   /* maintain aspect ratio */
  /* ✱ FIX: use 100% (or omit the line entirely) so header obeys body padding */
  /* width: 100vw;   <-- remove this */
  width: 100%;          /* ← or just leave it out */
}
header .container {
  /* Override container border inside header only */
  border: none;
  border-radius: 0;
  max-width: 100%;
  padding: 40px 1.5rem; /* 40 px top/bottom, 1.5 rem left/right */
}
header h1 {
  font-weight: 700;             /* bold page title */
  color: #fff;                  /* ensure contrast over image */
  text-align: center;
  margin-bottom: 12px;
}

/* Navigation */
nav {
  text-align: center;
}
nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}
nav ul li a {
  text-decoration: none;
  color: #fff;                  /* white over header image */
  font-weight: 500;
  padding: 6px 12px;
  transition: color 0.2s ease;
}
nav ul li a:hover {
  color: #ffd700;               /* a light accent on hover*/
  font-weight: 900;
  background: rgba(255,255,255,0.2);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 10px;
}
@media (max-width: 768px) {
  .hamburger {
    display: block;
    margin: 0 auto 10px;
  }
  #nav-menu { display: none; }
  #nav-menu.active { display: block; }
  #nav-menu ul {
    flex-direction: column;
    gap: 12px;
    padding: 10px 0;
  }
}

/* Language Toggle */
.lang-toggle {
  text-align: center;
  margin-top: 10px;
}
.lang-toggle button {
  background: rgba(255,255,255,0.7);
  border: none;
  padding: 6px 14px;
  margin: 0 4px;
  cursor: pointer;
  border-radius: 4px;
  font-weight: 700;
}
.lang-toggle button:hover {
  background: rgba(255,255,255,1);
}

/* Main Sections */
main { margin: 30px 0; }
section + section { margin-top: 40px; }

.welcome-visual img {
  display: block;
  margin-left: auto;   /* pushes the image away from the left edge */
  margin-right: auto;  /* pushes it away from the right edge  */
  height: auto;
  width: auto;        /* don’t stretch beyond its real size */
  max-width: 100%;    /* but scale down to fit small screens */
  object-fit: cover;  /* optional – keeps the crop tidy */
}

/* --- Index: Recent News --- */
#recent-news {
  list-style: disc outside;
  padding-left: 20px;    /* increased padding (40px -> 20px) */
  margin-top: 12px;
}
.news-item { margin-bottom: 15px; }
.news-date {
  font-weight: 600;
  color: #000; /* original blue color #007acc */
}
.news-title {
  margin-top: 4px;
}

/* --- Grants --- */
.grant-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}
.grant-logos img {
  height: 40px;
  object-fit: contain;
}

/* --- Publications Page --- */
#publication-list {
  list-style: disc outside;
  padding-left: 20px;    /* increased padding */
  margin-top: 12px;
}
#publication-list li {
  margin-bottom: 8px;
  text-indent: 0px;    /* hanging indent */
  padding-left: 0px;
}

/* --- Members --- */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 20px;
}
.member {
  padding: 15px 0;
}
.member img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 8px;
}
.member h3 {
  font-weight: 500;
  margin-bottom: 6px;
}
.member .role {
  font-style: italic;
  margin-bottom: 6px;
}

/* --- Alumni --- */
.alumni-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
.alumni-table th,
.alumni-table td {
  padding: 8px;
  border-bottom: 1px solid #eee;
  text-align: left;
}
.alumni-table th { font-weight: 500; }

/* Utilities */
.hidden { display: none !important; }
.grouped { white-space: nowrap; }

/* Profile Pages: Hanging-indent for bullet lists */
.profile-content ul {
  list-style: disc outside;
  padding-left: 20px;   /* space for the bullet */
  margin-top: 0px;
}
.profile-content ul li {
  margin-bottom: 0px;
  text-indent: -8px;    /* pull first line back to align bullet */
  padding-left: 8px;    /* push wrapped lines under text, not the bullet */
}

/* Profile Picture Sizing & Alignment */
.profile-pic {
  display: block;
  width: 100%;
  max-width: 25%;       /* up to one-fourth of desktop width */
  height: auto;
  margin: 0 0 20px 0;    /* bottom spacing to separate from text */
}
@media (max-width: 768px) {
  .profile-pic {
    max-width: 50%;     /* up to half of smartphone width */
    margin: 0 0 16px 0;
  }
}

/* Footer */
footer {
  border-top: 1px solid #eee;
  padding: 12px 0;
  text-align: center;
  font-size: 0.9em;
  color: #555;
}

/* Utilities */
.hidden { display: none !important; }
.grouped { white-space: nowrap; }
