/* === Variables & Reset === */
:root {
  --gold: #a8892e;
  --gold-light: #c4a43a;
  --heading: #333333;
  --body-text: #555555;
  --secondary: #888888;
  --bg: #f8f8f8;
  --white: #ffffff;
  --max-width: 720px;
  --padding: 32px;
  --section-gap: 24px;
}

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

html {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--body-text);
  background: var(--bg);
}

body {
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--gold-light);
}

/* === Layout === */
.content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--padding);
  background: var(--white);
}

.content > p,
.content section p {
  margin-bottom: 16px;
  font-size: 15px;
}

/* === Nav (subpages) === */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px var(--padding);
  border-bottom: 2px solid var(--gold);
  background: var(--white);
}

.site-nav .logo {
  text-decoration: none;
}

.site-nav .logo-name {
  font-weight: 700;
  color: var(--heading);
  font-size: 20px;
  letter-spacing: 1px;
  text-decoration: none;
}

.site-nav .logo-sub {
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.5px;
  display: block;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  font-size: 16px;
  color: var(--body-text);
  text-decoration: none;
}

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

.nav-links a.active {
  color: var(--gold);
  font-weight: 600;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* === Hero (homepage only) === */
.hero {
  position: relative;
  height: 350px;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero .site-nav {
  background: transparent;
  border-bottom: none;
}

.hero .site-nav .logo-name {
  color: var(--gold-light);
}

.hero .site-nav .logo-sub {
  color: rgba(255, 255, 255, 0.7);
}

@media (min-width: 769px) {
  .hero .nav-links a {
    color: rgba(255, 255, 255, 0.85);
  }

  .hero .nav-links a:hover,
  .hero .nav-links a.active {
    color: var(--gold-light);
  }
}

.hero-text {
  padding: var(--padding);
}

.hero-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.2;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin-top: 8px;
  letter-spacing: 0.5px;
}

/* === Typography === */
.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 6px;
}

.page-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin-top: 8px;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  margin-top: var(--section-gap);
}

.section-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--heading);
}

.section-heading::after {
  content: "";
  display: block;
  width: 30px;
  height: 2px;
  background: var(--gold);
  margin-top: 6px;
  margin-bottom: 12px;
}

.subtitle {
  font-size: 13px;
  color: var(--gold);
}

/* === Footer === */
.site-footer {
  border-top: 1px solid #e5e5e5;
  padding: 20px var(--padding);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--secondary);
  margin-top: var(--section-gap);
}

/* === Team profiles === */
.profile {
  display: flex;
  gap: 20px;
  padding-bottom: var(--section-gap);
  margin-bottom: var(--section-gap);
  border-bottom: 1px solid #eee;
}

.profile:last-child {
  border-bottom: none;
}

.profile-photo {
  width: 180px;
  max-height: 240px;
  border-radius: 4px;
  flex-shrink: 0;
  object-fit: cover;
}

.profile-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--heading);
}

.profile-title {
  font-size: 13px;
  color: var(--gold);
  margin: 2px 0 8px;
}

.profile-bio {
  font-size: 15px;
  line-height: 1.7;
}

.profile-bio p {
  margin-bottom: 12px;
}

.profile-bio a {
  color: var(--gold);
}

/* === Facilities === */
.content ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.content ul li {
  margin-bottom: 6px;
}

.facility-figure {
  margin-top: 16px;
}

.facility-figure figcaption {
  font-size: 13px;
  color: var(--secondary);
  margin-top: 6px;
}

/* === Facilities equipment grid === */
.equipment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: var(--section-gap);
}

.equipment-item h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 4px;
}

.equipment-item p {
  font-size: 14px;
  color: var(--body-text);
}

/* === Funding logos === */
.funding-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  margin-top: 12px;
}

.funding-logos img {
  height: 50px;
  width: auto;
}

/* === Software list === */
.software-list {
  font-size: 15px;
  color: var(--body-text);
  line-height: 2;
}

/* === Contact === */
.contact-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.contact-photo {
  width: 270px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* === Policies sections === */
.policy-section {
  margin-bottom: var(--section-gap);
}

.policy-section p {
  margin-bottom: 12px;
}

/* === Mobile (≤768px) === */
@media (max-width: 768px) {
  :root {
    --padding: 16px;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 0 8px;
    padding: 8px 0;
    gap: 0;
    z-index: 1000;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
    color: var(--body-text);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .nav-links a:hover {
    background: var(--bg);
  }

  .site-nav {
    flex-wrap: nowrap;
    position: relative;
    z-index: 100;
  }

  .hero {
    height: 200px;
  }

  .hero-title {
    font-size: 24px;
  }

  .page-title {
    font-size: 22px;
  }

  .profile {
    flex-direction: column;
  }

  .profile-photo {
    width: 120px;
  }

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

  .contact-card {
    flex-direction: column;
  }

  .contact-photo {
    width: 210px;
  }

  .site-footer {
    flex-direction: column;
    text-align: center;
    gap: 4px;
  }

  .funding-logos img {
    height: 40px;
  }
}
