/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

/* Header styles */
header {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

nav li {
  margin: 0 0.5rem;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  transition: all 0.3s ease;
  font-weight: 500;
  display: block;
}

nav a:hover,
nav a.active {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Main content */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

section {
  background: white;
  padding: 2.5rem;
  margin-bottom: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #e5e7eb;
}

h2 {
  color: #1e3a8a;
  margin-bottom: 1.5rem;
  font-size: 2.25rem;
  font-weight: 700;
  border-bottom: 3px solid #3b82f6;
  padding-bottom: 0.5rem;
}

h3 {
  color: #1e40af;
  margin: 1.5rem 0 1rem 0;
  font-size: 1.5rem;
  font-weight: 600;
}

h4 {
  color: #1e40af;
  margin: 1.25rem 0 0.75rem 0;
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* Team member styles */
.team-member {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.team-member:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.team-member img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #3b82f6;
  flex-shrink: 0;
}

.member-info {
  flex: 1;
}

.member-info h3,
.member-info h4 {
  margin-top: 0;
}

.title {
  font-weight: 600;
  color: #3b82f6;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.affiliation {
  color: #6b7280;
  font-style: italic;
  margin-bottom: 1rem;
}

/* Principal investigator specific styles */
.principal-investigator {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 2px solid #3b82f6;
  flex-direction: column;
  text-align: left;
}

.principal-investigator img {
  width: 200px;
  height: 200px;
  align-self: center;
  margin-bottom: 1.5rem;
}

.about-section {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  border-left: 4px solid #3b82f6;
}

.contact-info {
  margin-top: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  border-left: 4px solid #10b981;
}

.contact-info p {
  margin-bottom: 0.75rem;
}

.social-links {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #3b82f6;
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: #1e40af;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.other-team-members {
  margin-top: 3rem;
}

.other-team-members h3 {
  color: #1e3a8a;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #3b82f6;
  padding-bottom: 0.5rem;
}

.other-team-members .team-member {
  background: white;
  border: 1px solid #e5e7eb;
}

.other-team-members .team-member img {
  width: 120px;
  height: 120px;
}

/* Links */
a {
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #1e40af;
  text-decoration: underline;
}

/* Lists */
ul, ol {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Gallery styles */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Schematic styles */
.schematic {
  text-align: center;
  margin: 2rem 0;
  padding: 2rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.schematic img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.caption {
  margin-top: 1rem;
  font-style: italic;
  color: #6b7280;
  font-size: 0.95rem;
}

/* Footer */
footer {
  background: #1f2937;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
}

/* Responsive design */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  nav ul {
    flex-direction: column;
    align-items: center;
  }
  
  nav li {
    margin: 0.25rem 0;
  }
  
  main {
    padding: 0 1rem;
  }
  
  section {
    padding: 1.5rem;
  }
  
  .team-member {
    flex-direction: column;
    text-align: center;
  }
  
  .team-member img {
    align-self: center;
  }
  
  .principal-investigator {
    text-align: center;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .team-member img {
    width: 120px;
    height: 120px;
  }
  
  .principal-investigator img {
    width: 150px;
    height: 150px;
  }
}

/* Print styles */
@media print {
  header {
    background: white;
    color: black;
    box-shadow: none;
  }
  
  nav {
    display: none;
  }
  
  section {
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .team-member:hover {
    transform: none;
    box-shadow: none;
  }
}