* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

/* Header */
.header {
  background-color: #c41e3a;
  color: white;
  padding: 15px 0;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  transition: opacity 0.3s;
}

.nav-menu a:hover {
  opacity: 0.8;
}

.nav-menu a.active,
.nav-menu a[aria-current="page"] {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.logo {
  font-size: 18px;
  font-weight: bold;
}

/* Page Container */
.page {
  display: block;
  min-height: calc(100vh - 60px);
}

/* Home Page */
.hero-section {
  position: relative;
  width: 100%;
  height: 600px; /* set fixed height for banner */
  overflow: hidden;
}

.hero-section img.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* keeps proportions but crops edges if needed */
  display: block;
}

.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.85);
  padding: 25px 40px;
  border-radius: 10px;
  text-align: center;
}





.hero-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: #333;
}

.hero-subtitle {
  font-size: 1.3rem;
  font-style: italic;
  color: #666;
  margin-bottom: 0;
}

/* Content sections */
.content-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.welcome-text {
  margin-bottom: 30px;
}

.welcome-text h2 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #333;
}

.welcome-text p {
  line-height: 1.7;
  color: #555;
  text-align: justify;
}

/* Lab News */
.lab-news {
  margin-top: 50px;
}

.lab-news h2 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: #333;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.news-box {
  background-color: #c0c0c0;
  height: 120px;
  border: 2px solid #999;
}

/* Footer */
.footer {
  background-color: #666;
  color: white;
  padding: 20px 0;
  margin-top: 50px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ntu-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ntu-logo-img {
  width: 60px;
  height: 60px;
  background: #c41e3a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 12px;
  text-align: center;
  line-height: 1.2;
}

.copyright {
  font-size: 14px;
}

.back-to-top {
  background: #c41e3a;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: filter 0.2s, transform 0.1s;
}

.back-to-top:hover { filter: brightness(0.95); }
.back-to-top:active { transform: translateY(1px); }

/* Research Page */
.research-hero {
  text-align: center;
  padding: 50px 20px;
  background: #f8f9fa;
}

.research-hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #333;
}

.research-hero p {
  font-size: 1.1rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto 40px;
}

.research-diagram {
  background: #333;
  color: white;
  padding: 30px;
  margin: 40px 0;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}

.diagram-step {
  flex: 1;
  padding: 20px;
}

.diagram-step h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.arrow {
  font-size: 2rem;
  color: #ccc;
}

.research-items {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  align-items: start;
  margin: 30px 0;
}

.research-item {
  margin-bottom: 30px;
}

.research-item h2 {
  font-size: 1.3rem;
  color: #333;
  margin-bottom: 10px;
}

.research-item p {
  color: #666;
  line-height: 1.6;
}

.research-image {
  background-color: #c0c0c0;
  height: 120px;
  border: 2px solid #999;
  margin-bottom: 20px;
}

/* Publications Page */
.publications-hero {
  text-align: center;
  padding: 50px 20px;
  background: #f8f9fa;
}

.publications-hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #333;
}

.highly-cited {
  color: #c41e3a;
  font-weight: bold;
  float: right;
  margin-bottom: 20px;
}

.pub-intro {
  max-width: 900px;
  margin: 0 auto 40px;
  color: #666;
  line-height: 1.6;
}

.pub-theme {
  margin-bottom: 40px;
}

.pub-theme h2 {
  color: #333;
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.pub-list {
  list-style: none;
}

.pub-list li {
  margin-bottom: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #555;
}

/* PI Page */
.pi-hero {
  text-align: center;
  padding: 50px 20px;
  background: #f8f9fa;
}

.pi-hero h1 {
  font-size: 3rem;
  margin-bottom: 40px;
  color: #333;
}

.pi-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 50px;
  align-items: start;
}

.pi-photo {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto;
}

.pi-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pi-info h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #333;
}

.chinese-quote {
  font-style: italic;
  margin: 20px 0;
  padding: 20px;
  background: #f0f0f0;
  border-left: 4px solid #333;
  color: #666;
}

.biography-note {
  color: #c41e3a;
  font-weight: bold;
  float: right;
  margin-top: 20px;
}

.career-section, .education-section, .awards-section {
  margin-top: 30px;
}

.career-section h3, .education-section h3, .awards-section h3 {
  color: #333;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.career-section ul, .education-section ul, .awards-section ul {
  list-style: none;
}

.career-section li, .education-section li, .awards-section li {
  margin-bottom: 5px;
  color: #555;
  font-size: 0.95rem;
}

/* Members Page */
.members-hero {
  text-align: center;
  padding: 50px 20px;
  background: #f8f9fa;
}

.members-hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #333;
}

.members-quote {
  font-style: italic;
  color: #666;
  margin-bottom: 40px;
  font-size: 1.1rem;
}

.member-profile {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 50px;
  max-width: 600px;
}

.member-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-info h2 {
  font-size: 1.5rem;
  margin-bottom: 5px;
  color: #333;
}

.member-info p {
  color: #666;
  margin-bottom: 3px;
}

.future-members {
  margin-top: 60px;
}

.future-members h2 {
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: #333;
}

.flower-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.flower-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

/* Join Us Page */
.join-hero {
  background: #f8f9fa;
  color: #333;
  text-align: center;
  padding: 50px 20px;
}

.join-hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.join-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.join-intro {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
  text-align: center;
}

.positions {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin: 40px 0;
  flex-wrap: wrap;
}

.position-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px 24px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.contact-info {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 10px;
  margin-top: 40px;
}

.contact-info h2 {
  color: #333;
  margin-bottom: 15px;
}

.contact-info p {
  color: #666;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-menu {
      display: none;
  }

  .hero-title {
      font-size: 1.8rem;
  }

  .news-grid {
      grid-template-columns: 1fr;
  }

  .research-items {
      grid-template-columns: 1fr;
  }

  .pi-content {
      grid-template-columns: 1fr;
      text-align: center;
  }

  .positions {
      flex-direction: column;
      align-items: center;
  }

  .flower-grid {
      grid-template-columns: repeat(2, 1fr);
  }

  .join-hero h1,
  .pi-hero h1,
  .members-hero h1,
  .publications-hero h1,
  .research-hero h1 {
    font-size: 2.2rem;
  }
}


/* Research main hero image */
.research-main {
  width: 100%;
  max-width: 1000px;   /* limit width */
  margin: 0 auto 40px; /* center & spacing */
  display: block;
  border-radius: 10px; /* optional, makes edges smooth */
}

/* Right column research images */
.research-image {
  width: 100%;
  max-width: 300px;   /* controls image size */
  height: auto;       /* keeps correct aspect ratio */
  margin: 0 auto 20px;
  border: 2px solid #ddd;
  border-radius: 8px;
  display: block;
  object-fit: cover;  /* prevents distortion */
}

/* MAIN research hero image (smaller + centered) */
.research-main {
  max-width: 1500px;          /* adjust this down to 800/700 if you want even smaller */
  margin: 0 auto 40px;
  padding: 0 20px;           /* keeps some side breathing room on small screens */
}
.research-main img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

/* Rows that align each text section with its image */
.research-rows {
  display: grid;
  gap: 32px;                 /* space between the three rows */
}

.research-row {
  display: grid;
  grid-template-columns: 2fr 1fr;   /* text left, image right */
  gap: 30px;
  align-items: start;
}

.research-thumb {
  width: 100%;
  max-width: 260px;          /* final image size on desktop */
  height: auto;
  justify-self: end;         /* hugs the right edge neatly */
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

/* Mobile: stack image under its text and make it a bit smaller */
@media (max-width: 768px) {
  .research-row {
    grid-template-columns: 1fr;
  }
  .research-thumb {
    max-width: 220px;
    justify-self: start;     /* sits under the text, left-aligned */
  }
}


/* ===================
   JOIN PAGE STYLING
=================== */

.join-section {
  max-width: 800px;
  margin: 60px auto;
  padding: 40px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.join-section h2 {
  font-size: 28px;
  color: #c41e3a;
  margin-bottom: 20px;
  text-align: center;
}

.join-section form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.join-section label {
  font-weight: bold;
}

.join-section input[type="text"],
.join-section input[type="email"],
.join-section textarea,
.join-section input[type="file"] {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
}

.join-section button[type="submit"] {
  background-color: #c41e3a;
  color: white;
  border: none;
  padding: 12px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.join-section button[type="submit"]:hover {
  background-color: #a3182e;
}

#joinThankYou {
  text-align: center;
  margin-top: 30px;
}

#joinThankYou h3 {
  color: #c41e3a;
}

.application-form {
  background: #fff;
  border-radius: 10px;
  padding: 40px;
  max-width: 700px;
  margin: 50px auto;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.application-form h2 {
  font-size: 24px;
  margin-bottom: 20px;
  text-align: center;
}

.application-form p {
  text-align: center;
  margin-bottom: 30px;
  font-size: 16px;
}

.application-form form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.application-form label {
  font-weight: 600;
}

.application-form input[type="text"],
.application-form input[type="email"],
.application-form textarea,
.application-form input[type="file"] {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.application-form button {
  background: #c51f3e;
  color: #fff;
  font-weight: bold;
  padding: 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.application-form button:hover {
  background: #a81833;
}
