/* ===== CSS Custom Properties ===== */
:root {
  --accent: #c62828;
  --accent-light: #ef5350;
  --accent-dark: #8e0000;
  --bg: #fafafa;
  --bg-alt: #f0f0f0;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-muted: #666;
  --nav-bg: #ffffff;
  --nav-text: #333;
  --footer-bg: #1a1a1a;
  --footer-text: #ccc;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.14);
  --border: #e0e0e0;
  --radius: 10px;
  --transition: 0.3s ease;
}

/* ===== Base Reset & Typography ===== */
*, *::before, *::after { box-sizing: border-box; }

body, html {
  height: 100%;
  margin: 0;
  line-height: 1.7;
}

body {
  font-family: 'Raleway', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Raleway', sans-serif;
  color: var(--text);
  font-weight: 700;
}

p { color: var(--text); }

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

/* ===== Skip Link (Accessibility) ===== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10001;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 0 0 6px 0;
}
.skip-link:focus {
  position: fixed;
  left: 0;
  top: 0;
}

/* ===== Navigation ===== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  box-shadow: var(--shadow);
}

.site-nav .nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 60px;
}

.site-nav .nav-brand {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.site-nav .nav-brand:hover { color: var(--accent); }

.site-nav .nav-links { display: flex; gap: 4px; align-items: center; }

.site-nav .nav-links a {
  color: var(--nav-text);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.site-nav .nav-links a:hover {
  background: var(--accent);
  color: #fff;
}

.site-nav .nav-links i { margin-right: 6px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

/* Mobile sidebar */
.mobile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100%;
  background: var(--card-bg);
  z-index: 2000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-shadow: 4px 0 20px rgba(0,0,0,0.2);
  padding-top: 20px;
}
.mobile-sidebar.open { transform: translateX(0); }

.mobile-sidebar a {
  display: block;
  padding: 14px 24px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.mobile-sidebar a:hover { background: var(--bg-alt); }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1999;
  display: none;
}
.sidebar-overlay.open { display: block; }

@media (max-width: 768px) {
  .site-nav .nav-links { display: none; }
  .nav-toggle { display: block; }
}

/* ===== Hero Header ===== */
.hero {
  position: relative;
  background-position: center;
  background-size: cover;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-top: 60px;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 30%, rgba(0,0,0,0.65));
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 20px;
  color: #fff;
}

.hero-content h1 {
  color: #fff;
  font-size: 2.8rem;
  margin: 0 0 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero-content p {
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
  margin: 0;
}

.hero-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 28px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  text-decoration: none;
  border-radius: 30px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.3);
  font-weight: 600;
  transition: background 0.3s;
}
.hero-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== Sections ===== */
.section {
  padding: 60px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ===== Team Members ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.team-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 20px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.team-card .headshot {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  display: block;
  border: 3px solid var(--accent);
}

.team-card h4 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.team-card .email {
  color: var(--accent);
  font-size: 0.85rem;
  margin: 0 0 10px;
}

.team-card .bio {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== About / Feature Cards ===== */
.about-section {
  background: var(--bg-alt);
}

/* ===== Labs Grid ===== */
.labs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.lab-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.lab-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

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

.lab-card-body {
  padding: 24px;
}

.lab-card-body h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.lab-card-body p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background var(--transition);
  border: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-dark); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; }

/* ===== Lab Report Content ===== */
.lab-content {
  max-width: 960px;
  margin: 80px auto 0;
  padding: 40px 24px;
}

.lab-content h1 {
  font-size: 1.8rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
  margin-top: 40px;
}

.lab-content iframe,
.lab-content object {
  border-radius: var(--radius);
  margin: 20px 0;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  text-align: center;
  padding: 40px 24px;
}

.site-footer a {
  color: var(--footer-text);
  text-decoration: none;
  transition: color var(--transition);
}
.site-footer a:hover { color: var(--accent-light); }

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.footer-nav .btn {
  background: rgba(255,255,255,0.1);
  color: var(--footer-text);
}
.footer-nav .btn:hover { background: var(--accent); color: #fff; }

.site-footer .credit {
  font-size: 0.8rem;
  margin-top: 16px;
  opacity: 0.6;
}

/* ===== Placeholder Headshot ===== */
.placeholder-headshot {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 3px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.placeholder-headshot i,
.placeholder-headshot::before {
  font-size: 3rem;
  color: var(--accent);
}

/* FontAwesome fallback if no <i> child */
.placeholder-headshot:empty::before {
  font-family: 'FontAwesome';
  content: '\f007';
}

/* ===== Placeholder Lab Image ===== */
.placeholder-lab-img {
  width: 100%;
  height: 220px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.placeholder-lab-img::after {
  content: attr(data-lab-number);
  font-family: 'Raleway', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-muted);
  opacity: 0.4;
}

/* ===== Coming Soon Card ===== */
.coming-soon {
  opacity: 0.6;
  cursor: default;
}

.coming-soon:hover {
  transform: none;
  box-shadow: var(--shadow);
}
