/* --- 1. Variables & Global Styles --- */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --accent: #f1f5f9;
  --badge-bg: #dbeafe;
  --badge-text: #1e40af;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
}

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

/* --- 2. Header & Navigation --- */
header {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: white;
  padding: 2rem 0 4rem 0;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

nav a:hover {
  color: white;
}

/* --- 3. Hero Section --- */
.header-hero {
  text-align: center;
}

.header-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
}

.tagline {
  font-size: 1.25rem;
  color: #94a3b8;
  max-width: 600px;
  margin: 0 auto 2rem auto;
}

.cta-button {
  display: inline-block;
  background-color: var(--primary);
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.cta-button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

/* --- 4. Labs Grid Section --- */
.labs-section {
  margin-top: -3rem; /* Overlaps hero slightly */
  padding-bottom: 5rem;
}

.section-header {
  margin-top: 60px;
  margin-bottom: 3rem;
  text-align: left;
}

.section-header h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.labs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

/* --- 5. Lab Cards --- */
.lab-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.lab-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

.lab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.lab-number {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.2rem;
}

.lab-badge {
  background: var(--badge-bg);
  color: var(--badge-text);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.lab-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.lab-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1; /* Pushes button to bottom */
}

/* --- 6. Tags & Meta --- */
.tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  font-size: 0.7rem;
  background: var(--accent);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
  color: var(--text-muted);
}

.lab-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.lab-button {
  display: block;
  text-align: center;
  padding: 0.75rem;
  background: var(--accent);
  color: var(--text-main);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: var(--transition);
}

.lab-button:hover {
  background: var(--primary);
  color: white;
}

/* --- 7. Footer --- */
footer {
  background: white;
  padding: 3rem 0;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.footer-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- 8. Mobile Adjustments --- */
@media (max-width: 640px) {
  .header-hero h1 {
      font-size: 2rem;
  }
  .header-top {
      flex-direction: column;
      gap: 1.5rem;
  }
}