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

/* Define color palette */
:root {
  /* Brand colors */
  --color-primary: #333333;
  --color-secondary: #4ca1af;
  --color-accent: #cc3333;  /* Dark red */

  /* Neutrals */
  --color-dark: #336699;
  --color-mid: #666666;
  --color-light: #f4f4f4;

  /* Text */
  --text-main: #333333;
  --text-inverse: #ffffff;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.45;
  color: #333;
}

/* Header with image branding */
.site-header {
  background: var(--color-primary);
  color: var(--color-primary);
  padding: 0.5rem 1rem;
  text-align: center;
}

.header-logo {
  max-width: 1100px;   /* controls logo size on desktop */
  width: 100%;
  height: auto;
}

/* Navigation */
.main-nav {
  background-color: var(--color-primary);
  position: relative;
  margin-bottom: 20px;
}

/* Hide checkbox */
#menu-toggle {
  display: none;
}

/* Menu */
.menu {
  list-style: none;
  display: flex;
  justify-content: center;
}

.menu li a {
  display: block;
  padding: 1rem 1.25rem;
  color: var(--text-inverse);
  text-decoration: none;
}

.menu li a:hover,
.menu li a:focus {
  background-color: var(--color-dark);
}

/* Active / selected menu item */
.menu a.active {
  background-color: var(--color-mid);
  color: #fff;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  width: 50px;
  cursor: pointer;
  padding: 1rem;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: white;
  margin: 5px 0;
  border-radius: 2px;
}

/* Content */
.content {
  max-width: 1100px;
  margin: 1rem auto;
  margin: auto;

}

p {
    max-width: 1100px;
    margin: 1rem auto;
    padding: 0 1rem;
}

.main-headings {
    color: var(--text-inverse);
    background-color: var(--color-primary);
    padding: 0 1rem;
    margin-top: 5px;
    margin-bottom: 5px;
}
/* Footer layout */
.site-footer {
  background-color: var(--color-light);
  padding: 1rem;
  margin-top: 5px;
}

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

/* Footer image */
.footer-logo {
  height: 55px;
  width: auto;
}

/* Footer text */
.footer-copy {
  font-size: 0.9rem;
  color: var(--text-main);
  margin-left: auto;
}

/* By default, hide the mobile header image */
.header-logo-mobile {
  display: none;
}

/* Mobile styles */
@media (max-width: 1100px) {
  .hamburger {
    display: flex;
  }

  .menu {
    flex-direction: column;
    display: none;
    width: 100%;
  }

  .header-logo {
    max-width: 468px;
  }

  .menu li a {
    text-align: center;
    border-top: 1px solid #333;
  }

  .header-logo {
    display: none; /* Hide the desktop image */
  }
  .header-logo-mobile {
    display: block; /* Show the mobile image */
    margin: auto;
    max-width: 468px;
  }

  /* Show menu when checkbox is checked */
  #menu-toggle:checked + .hamburger + .menu {
    display: flex;
  }

  .footer-content {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

.carousel {
  max-width: 1100px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.slides {
  display: flex;
  width: 100%;
  animation: slide 12s infinite;
}

.slide {
  flex: 0 0 100%;
  min-height: 340px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.slide1 { background-image: url("images/carousel/HTCB_spinnaker_cropped_sm.jpg"); }
.slide2 { background-image: url("images/carousel/Integra_robots_cropped.jpg"); }
.slide3 { background-image: url("images/carousel/Cell_painting_cropped.jpg"); }

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1rem;
}

.carousel .overlay-heading {
    font-size: 48px;
}

.carousel .overlay-text {
    font-size: 28px;
}

.carousel .carousel-button {
  width: 300px;
  height: 50px;
  background-color: #777;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1.5rem;
  font-weight: 500;
  cursor: pointer;

  /* Center text */
  display: inline-flex;
  align-items: center;
  justify-content: center;

  text-decoration: none; /* for <a> */
}

@keyframes slide {
  0%, 33%   { transform: translateX(0); }
  36%, 66%  { transform: translateX(-100%); }
  69%, 100% { transform: translateX(-200%); }
}

/* Research page styling */
.research {
  border-collapse: collapse;
  width: 100%;
}

.research td {
  border-top: 6px solid white;
  padding: 10px;
  background-color: var(--color-light);
  text-align: left;
}

.research-logo {
  max-width: 200px;
}

.style1 {
  padding: 10px;
  max-width: 30%;
}
/* People page styling */
.people {
  border-collapse: collapse;
  width: 100%;
}

.people td {
  padding: 5px;
}

.people-image {
  max-width: 250px;
  max-height: 250px;
  border-radius: 50%;
  object-fit: cover;
  border: 8px solid var(--color-accent);
}

.style3 {
  text-align: center;
}

.style4 {
  valign: top;
  text-align: center;
  background-color: var(--color-light);
}

/* Publications page styling */
.publications {
  padding: 5px;
}

.publications-years {
  background-color: var(--color-mid);
  color: var(--text-inverse);
  font-size: 24px;
  margin-top: 10px;
  margin-bottom: 10px;
  padding-left: 10px;
}

.style5 {
  padding-right: 10px;
}

/* Equipment page styling */
.equipment {
  border-collapse: collapse;
  width: 100%;
}

.equipment td {
  padding: 5px;
}

.equipment-image {
  max-width: 200px:
}

/* Contact page styling */
.contact td{
  padding: 10px;
}

.contact-logo {
  max-width: 350px;
}