/* Minimal, clean styles for the HCV mAb demo site */
:root {
  --bg: #f8f9fa;
  --panel: #ffffff;
  --text: #2c3e50;
  --muted: #6c757d;
  --accent: #2563eb;
  --accent-weak: #dbeafe;
  --border: #e2e8f0;
  --link: #3b82f6;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.site-header {
  padding: 24px 16px 20px;
  max-width: 1100px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}
.site-header-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}
.site-header-main {
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-logo {
  width: 120px;
  flex-shrink: 0;
}
.site-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.site-header-content {
  flex: 1;
}
.site-header h1 { margin: 0 0 8px; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }
.subtitle { color: var(--muted); margin: 0; font-size: 15px; line-height: 1.6; }
.back-link { color: var(--link); text-decoration: none; }
.back-link:hover { text-decoration: underline; }

.site-nav {
  display: flex;
  gap: 20px;
}
.site-nav a {
  color: var(--link);
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s ease;
  position: relative;
}
.site-nav a:hover {
  color: var(--accent);
}
.site-nav a.active {
  color: var(--accent);
  font-weight: 600;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 16px 40px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}
.panel-title { margin: 0 0 16px; font-size: 20px; font-weight: 600; color: var(--text); }
.panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

.collapsible {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}
.collapsible:hover {
  color: var(--accent);
}
.toggle-icon {
  font-size: 14px;
  transition: transform 0.2s ease;
  display: inline-block;
  color: var(--muted);
}
.toggle-icon.expanded {
  transform: rotate(90deg);
}
.collapsible-content {
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 12px; }
.filter label {
  display: block;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 6px;
  font-weight: 500;
}
.filter input, .filter select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  transition: all 0.2s ease;
  font-size: 14px;
}
.filter input:focus, .filter select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.filter input:hover, .filter select:hover {
  border-color: #cbd5e1;
}

.align-end { align-self: end; }
.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f1f5f9;
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}
.btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.btn:active {
  background: #cbd5e1;
  transform: translateY(0);
}
.btn:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border-bottom: 1px solid var(--border); padding: 12px 14px; text-align: left; }
.table th {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f8fafc;
}
.table tbody tr {
  transition: background-color 0.15s ease;
}
.table tbody tr:hover {
  background: #f1f5f9;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-weak);
  color: var(--accent);
  border: 1px solid #93c5fd;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.badge:hover {
  background: #bfdbfe;
  border-color: #60a5fa;
}
.muted { color: var(--muted); }
.small { font-size: 12px; }
.warning { background: #fef2f2; color: #991b1b; padding: 12px; border: 1px solid #fca5a5; border-radius: 8px; }

.code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)); gap: 12px; }
.summary-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  transition: all 0.2s ease;
}
.summary-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}
.summary-item .label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  margin-bottom: 4px;
}
.summary-item .value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.ortholog-group {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  width: 100%;
}
.ortholog-group h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ortholog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}
.pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: var(--muted);
}

.seq {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #f8fafc;
  padding: 12px;
  border-radius: 10px;
  overflow: auto;
  border: 1px solid var(--border);
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
}
.seq strong {
  color: var(--accent);
  font-weight: 600;
}

a {
  color: var(--link);
  transition: color 0.2s ease;
}
a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.site-footer a {
  color: var(--link);
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}

/* About page specific styles */
.hero-text {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.highlight {
  background: #dbeafe;
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.feature {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  transition: all 0.2s ease;
}

.feature:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.feature h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
}

.stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0;
}

.stat {
  background: #dbeafe;
  border: 1px solid #93c5fd;
  border-radius: 10px;
  padding: 16px 24px;
  flex: 1;
  min-width: 150px;
  transition: all 0.2s ease;
}

.stat:hover {
  border-color: #60a5fa;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.team {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.team-member {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  transition: all 0.2s ease;
}

.team-member:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.team-member .name {
  font-weight: 600;
  margin-bottom: 4px;
}

.team-member .name a {
  color: var(--accent);
  text-decoration: none;
}

.team-member .name a:hover {
  text-decoration: underline;
}

.team-member .role {
  font-size: 13px;
  color: var(--muted);
}

.cta {
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 10px;
  text-align: center;
  margin: 32px 0;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .site-header {
    padding: 16px 12px;
  }

  .site-header-top {
    margin-bottom: 12px;
  }

  .site-header-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .site-logo {
    width: 80px;
  }

  .site-header h1 {
    font-size: 24px;
  }

  .subtitle {
    font-size: 14px;
  }

  .site-nav {
    gap: 16px;
  }

  .site-nav a {
    font-size: 16px;
  }

  .container {
    padding: 8px 12px 32px;
  }

  .panel {
    padding: 16px;
    margin: 12px 0;
    border-radius: 10px;
  }

  .panel-title {
    font-size: 18px;
  }

  /* Make filters stack vertically on mobile */
  .filters {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Make summary grid single column on mobile */
  .summary-grid {
    grid-template-columns: 1fr;
  }

  /* Make feature grid single column on mobile */
  .feature-grid {
    grid-template-columns: 1fr;
  }

  /* Stack stats vertically on mobile */
  .stats {
    flex-direction: column;
  }

  .stat {
    min-width: 100%;
  }

  /* Make team grid single column on mobile */
  .team {
    grid-template-columns: 1fr;
  }

  /* Convert table to card view on mobile */
  .table-wrap {
    overflow-x: visible;
  }

  .table thead {
    display: none;
  }

  .table,
  .table tbody {
    display: block;
  }

  .table tbody tr {
    display: block;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .table tbody tr:hover {
    background: var(--panel);
    border-color: #cbd5e1;
  }

  .table td {
    display: block;
    border: none;
    padding: 6px 0;
    text-align: left;
  }

  .table td::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    display: inline;
    margin-right: 4px;
  }

  .table td:first-child {
    font-weight: 600;
    font-size: 16px;
    color: var(--accent);
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }

  /* Make ortholog grid single column */
  .ortholog-grid {
    grid-template-columns: 1fr;
  }

  /* Adjust sequence blocks for mobile */
  .seq {
    font-size: 12px;
    padding: 10px;
  }

  /* Adjust footer for mobile */
  .site-footer {
    font-size: 13px;
    padding: 20px 12px;
  }
}

/* Tablet breakpoint */
@media (min-width: 769px) and (max-width: 1024px) {
  .filters {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ortholog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
