/*
 * Stylesheet for the AIPO Lab website.
 *
 * This file defines the typography, color palette and layout rules
 * for the entire site. Care has been taken to ensure a modern look
 * and responsive behaviour across a variety of screen sizes. Feel free
 * to adjust the CSS custom properties below to fine tune the theme.
 */

/* CSS custom properties provide a convenient way to theme the site. */
:root {
  --primary: #2563eb; /* professional blue */
  --secondary: #3b82f6; /* lighter blue for gradient accents */
  --accent: #60a5fa; /* soft blue accent */
  --bg-light: #f8fafc; /* clean light gray background */
  --text-dark: #1e293b; /* dark slate text */
  --text-light: #64748b; /* muted slate text */
  --nav-bg: #ffffff; /* navigation bar background */
  --footer-bg: #f1f5f9; /* light slate footer background */
  --nav-height: 72px; /* consistent navigation height */
}

/* Base styling */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

/* Navigation bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  height: var(--nav-height);
  background-color: var(--nav-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.navbar .logo img {
  height: 42px;
  width: auto;
}

.navbar .logo span {
  /* Adjust font size for long lab name in the logo */
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.3;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  font-weight: 500;
  color: var(--text-dark);
  font-size: 1rem;
}

.nav-links li a:hover {
  color: var(--primary);
}

/* Hamburger menu toggle for small screens */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  width: 32px;
  height: 32px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background-color: var(--text-dark);
  margin: 4px 0;
  transition: all 0.3s ease;
}

/* Mobile menu visibility */
.nav-links.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background-color: var(--nav-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  padding: 1rem 2rem;
}

/* Hero section */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 70vh;
  color: #ffffff;
  padding: 0 2rem;
  background-image: url('./assets/hero_bg.png');
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.55);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-content h1 {
  margin: 0 0 1rem 0;
  font-size: 2.8rem;
  line-height: 1.2;
  font-weight: 700;
}

.hero-content p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  max-width: 600px;
}

.cta-btn {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  background-image: linear-gradient(45deg, var(--primary), var(--secondary));
  color: #ffffff;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.cta-btn:hover {
  background-image: linear-gradient(45deg, var(--secondary), var(--primary));
  text-decoration: none;
}

/* Features section on home page */
.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 4rem 2rem;
  background-color: #ffffff;
}

.feature {
  width: 300px;
  text-align: center;
  padding: 1.5rem;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.feature img {
  /* Enlarge feature icons for better visibility */
  height: 80px;
  margin-bottom: 1rem;
  /* place icon on a subtle circular background for contrast */
  padding: 16px;
  background-color: rgba(37, 99, 235, 0.08);
  border-radius: 50%;
}

.feature h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  color: var(--primary);
}

.feature p {
  font-size: 0.95rem;
  color: var(--text-light);
}

/* Team preview section on home page */
.team-preview {
  padding: 4rem 2rem;
  background-color: var(--bg-light);
}

.team-preview h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
}

.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.member-card {
  /* Increase card width slightly to provide more breathing room for names */
  /* Widen member cards on the home page for improved readability */
  width: 250px;
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.member-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.member-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.member-card h4 {
  margin: 1rem 0 0.25rem;
  font-size: 1.1rem;
  color: var(--primary);
}

.member-card span {
  display: block;
  margin-bottom: 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Prospective preview section on home page */
.prospective-preview {
  background-image: url('./assets/background_wave.png');
  background-size: cover;
  background-position: center;
  padding: 4rem 2rem;
  text-align: center;
}

.prospective-preview h2 {
  margin-bottom: 1rem;
  font-size: 2rem;
  color: var(--primary);
}

.prospective-preview p {
  max-width: 700px;
  margin: 0 auto 2rem;
  font-size: 1rem;
  color: var(--text-dark);
}

.prospective-preview .cta-btn {
  margin-top: 1rem;
}

/* Footer */
.footer {
  background-color: var(--footer-bg);
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.footer a {
  color: var(--primary);
}

/* Generic section styles for sub pages */
.section {
  padding: 4rem 2rem;
}

.section:nth-child(even) {
  background-color: #ffffff;
}

.section:nth-child(odd) {
  background-color: var(--bg-light);
}

.section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2.2rem;
  color: var(--primary);
}

.section-content {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1rem;
  color: var(--text-dark);
}

.section-content p {
  margin-bottom: 1rem;
}

/* Research area cards */
.research-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.research-card {
  width: 300px;
  background-color: #ffffff;
  border-radius: 8px;
  padding: 2rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.research-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.research-card img {
  height: 60px;
  margin-bottom: 1rem;
  padding: 12px;
  background-color: rgba(37, 99, 235, 0.08);
  border-radius: 50%;
}

.research-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  color: var(--primary);
}

.research-card ul {
  list-style: disc;
  text-align: left;
  padding-left: 1.2rem;
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Team page layout */
.team-page-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 2rem;
}

.team-page-card {
  width: 260px;
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-page-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.team-page-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.team-page-card h4 {
  margin: 1rem 0 0.5rem;
  font-size: 1.2rem;
  color: var(--primary);
}

.team-page-card span {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: block;
}

.team-page-card p {
  padding: 0 1rem 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Alumni section styles */
.alumni-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.alumni-category {
  margin-bottom: 2rem;
}

.alumni-category h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.alumni-category ul {
  list-style: disc;
  padding-left: 1.5rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-top: 0;
}

/* News section styles */
.news-section {
  padding: 4rem 2rem;
  background-color: var(--bg-light);
}

.news-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: var(--primary);
}

.news-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.news-item {
  width: 300px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  text-align: left;
}

.news-item h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: var(--primary);
}

.news-item p {
  font-size: 0.95rem;
  color: var(--text-light);
}

/* News list styling on the home page */
.news-list {
  max-width: 800px;
  margin: 0 auto;
  padding-left: 1.5rem;
  color: var(--text-dark);
  font-size: 1rem;
  line-height: 1.6;
}

.news-list li {
  margin-bottom: 1rem;
}

.news-list li strong {
  color: var(--primary);
}

/* Publications list styling on research page */
.publications {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.publications li {
  margin-bottom: 1.5rem;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.publications a {
  color: var(--primary);
  text-decoration: underline;
}

.publications a:hover {
  color: var(--secondary);
}

/* Prospective page styles */
.prospective-call {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.prospective-call ul {
  margin-top: 1rem;
  margin-bottom: 2rem;
  list-style: disc;
  text-align: left;
  padding-left: 1.8rem;
  color: var(--text-light);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 1rem;
  }
  .menu-toggle {
    display: flex;
  }
  .hero-content h1 {
    font-size: 2.2rem;
  }
  .feature {
    width: 280px;
  }
  .member-card {
    width: 200px;
  }
  .research-card {
    width: 280px;
  }
  .team-page-card {
    width: 90%;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 60vh;
  }
  .hero-content h1 {
    font-size: 1.8rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .feature {
    width: 100%;
  }
}