:root {
  --primary-color: #0b1d3a;
  --accent-color: #2d7a4f;
  --text-color: #333;
  --bg-color: #f5f5f5;
  --card-bg: #ffffff;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  margin: 0; padding: 0;
  font-family: var(--font-body);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
}

header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1a365d 100%);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo { font-size: 1.5rem; font-weight: bold; color: white; text-decoration: none; }

.nav-links a {
  color: white; text-decoration: none; margin-left: 1.5rem; font-weight: 500;
  transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--accent-color); }

.hero {
  background: linear-gradient(rgba(11, 29, 58, 0.8), rgba(11, 29, 58, 0.8)), url('../images/hero-bg.jpg') center/cover;
  color: white;
  text-align: center;
  padding: 4rem 1rem;
}

.hero h1 { margin: 0; font-size: 2.5rem; }
.hero p { font-size: 1.2rem; margin-top: 1rem; opacity: 0.9; }

.container { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }

.card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

h2 { color: var(--primary-color); border-bottom: 2px solid var(--accent-color); padding-bottom: 0.5rem; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }

.icon-card { text-align: center; padding: 1.5rem; background: var(--card-bg); border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); border-top: 4px solid var(--accent-color); }

.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 8px; background: #000; }
.video-container video, .video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

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

.badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 999px; background: var(--accent-color); color: white; font-size: 0.875rem; margin: 0.25rem; }

table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
th, td { padding: 0.75rem; text-align: left; border-bottom: 1px solid #ddd; }
th { background-color: var(--primary-color); color: white; }

footer { background: var(--primary-color); color: white; text-align: center; padding: 2rem 1rem; margin-top: 4rem; }
footer a { color: #fff; text-decoration: underline; }

#scroll-top-btn {
  display: none; position: fixed; bottom: 20px; right: 20px;
  background: var(--accent-color); color: white;
  border: none; border-radius: 50%; width: 40px; height: 40px;
  cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

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

/* Enhanced Scientific Showcase UI */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 2.5rem 0;
}

.metric-card {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  border-left: 5px solid var(--accent-color);
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.metric-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.metric-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4a5568;
}

.metric-sub {
  font-size: 0.75rem;
  color: #718096;
  margin-top: 4px;
}

.deep-dive-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 900px) {
  .deep-dive-card {
    grid-template-columns: 1fr;
  }
}

.deep-dive-reverse {
  grid-template-columns: 1fr 1fr;
}

.deep-dive-reverse > :first-child {
  order: 2;
}
.deep-dive-reverse > :last-child {
  order: 1;
}

@media (max-width: 900px) {
  .deep-dive-reverse > :first-child { order: 1; }
  .deep-dive-reverse > :last-child { order: 2; }
}

.figure-preview-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  text-align: center;
  position: relative;
}

.figure-preview-box img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.figure-preview-box img:hover {
  transform: scale(1.02);
}

.figure-caption {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: #64748b;
  text-align: left;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.gene-pill {
  display: inline-block;
  background: #e6fffa;
  color: #234e52;
  border: 1px solid #b2f5ea;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85rem;
  margin: 2px 4px 2px 0;
  font-weight: 600;
}

.gene-pill-up {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.gene-pill-down {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

.figure-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.gallery-item {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.07);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #fafafa;
  cursor: pointer;
}

.gallery-item-body {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.gallery-item-title {
  font-weight: bold;
  font-size: 0.95rem;
  color: var(--primary-color);
  margin-bottom: 0.4rem;
}

.gallery-item-desc {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.8rem;
}

.gallery-item-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-sm {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
}

.btn-primary { background: var(--accent-color); color: white; border: none; cursor: pointer; }
.btn-primary:hover { background: #22633f; text-decoration: none; }
.btn-secondary { background: #e2e8f0; color: #334155; border: none; cursor: pointer; }
.btn-secondary:hover { background: #cbd5e1; text-decoration: none; }

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(11, 29, 58, 0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-sizing: border-box;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  background: #000;
}

.lightbox-caption {
  padding: 1rem 1.5rem;
  background: white;
  color: #333;
  font-size: 0.9rem;
}

