/* Immunogenomics.io Custom Styles
   Professional, research-focused design with subtle color accents
*/

:root {
  --ig-primary: #2563eb;      /* A refined blue */
  --ig-primary-dark: #1d4ed8;
  --ig-hero-text: #1e3a5f;    /* Deep blue for hero text */
  --ig-text: #1f2937;         /* Near black for readability */
  --ig-text-muted: #6b7280;   /* Softer gray for secondary text */
  --ig-bg-light: #f9fafb;     /* Very subtle gray background */
  --ig-border: #e5e7eb;       /* Light border color */
}

/* Typography */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ig-text);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ig-text);
  font-weight: 600;
}

/* Links */
a {
  color: var(--ig-primary);
  text-decoration: none;
}

a:hover {
  color: var(--ig-primary-dark);
  text-decoration: underline;
}

/* Navbar */
.navbar {
  padding: 0.75rem 0;
}

.navbar > .container {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.navbar-brand {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  color: var(--ig-hero-text) !important;
}

.navbar-brand:hover {
  text-decoration: none;
}

.navbar-dot {
  color: #2563eb;
}

/* Primary button styling */
.btn-primary {
  background-color: var(--ig-primary);
  border-color: var(--ig-primary);
  font-weight: 500;
}

.btn-primary:hover {
  background-color: var(--ig-primary-dark);
  border-color: var(--ig-primary-dark);
}

/* Hero sections */
.hero-section {
  background: linear-gradient(160deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

.hero-logo {
  display: inline-block;
  padding: 0.75rem;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(30, 64, 175, 0.3);
}

.hero-logo img {
  height: 56px;
  filter: brightness(0) invert(1);
}

.hero-title {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--ig-hero-text);
  letter-spacing: -0.02em;
}

.hero-dot {
  color: #2563eb;
}

.hero-tagline {
  color: #334155;
  font-weight: 400;
  font-size: 1.25rem;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-logo img {
    height: 48px;
  }
}

/* Cards and panels */
.card, .panel {
  border: 1px solid var(--ig-border);
  border-radius: 8px;
}

/* Project grid on homepage */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .project-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* Project cards on homepage */
.project-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card-link:hover {
  text-decoration: none;
}

.project-card {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  height: 100%;
}

.project-card:hover {
  border-color: var(--ig-primary);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.project-card-image {
  height: 180px;
  overflow: hidden;
  background: var(--ig-bg-light);
  position: relative;
}

.project-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 -20px 20px -15px rgba(0, 0, 0, 0.08),
              inset 0 2px 4px rgba(0, 0, 0, 0.03);
  pointer-events: none;
  transition: background-color 0.3s ease;
}

.project-card:hover .project-card-image::after {
  background-color: rgba(255, 255, 255, 0);
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.3s ease;
}

.project-card:hover .project-card-image img {
  transform: scale(1.02);
}

.project-card-body {
  padding: 1.25rem;
}

.project-card-title {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ig-text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.project-card-text {
  font-size: 0.9rem;
  color: var(--ig-text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-cta {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ig-primary);
}

.project-card:hover .project-card-cta {
  text-decoration: underline;
}

/* No preview placeholder */
.no-preview {
  background: var(--ig-bg-light);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ig-text-muted);
  font-size: 0.85rem;
}

/* Landing page styles */
.landing-title {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0;
  color: var(--ig-hero-text);
}

.landing-description {
  font-size: 1.15rem;
  color: #475569;
  max-width: 700px;
}

@media (max-width: 768px) {
  .landing-title {
    font-size: 1.75rem;
  }
  .landing-description {
    font-size: 1rem;
  }
}

/* Paper citation */
.paper-citation {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--ig-border);
}

.paper-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ig-primary);
  margin-bottom: 0.5rem;
}

.paper-title {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ig-text);
  margin-bottom: 0.75rem;
}

.paper-authors {
  font-size: 0.85rem;
  color: var(--ig-text-muted);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.paper-journal {
  font-size: 0.9rem;
  color: var(--ig-text-muted);
  margin-bottom: 0;
}

.paper-journal a {
  font-weight: 500;
}

/* Abstract box */
.abstract-box {
  background: var(--ig-bg-light);
  border-left: 4px solid var(--ig-primary);
  padding: 1.5rem;
  border-radius: 0 8px 8px 0;
}

.abstract-box h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--ig-text);
}

.abstract-box p {
  font-size: 0.95rem;
  color: var(--ig-text-muted);
  margin-bottom: 0;
}

/* Figure images */
.figure-container {
  margin: 2rem 0;
}

.figure-container img {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Featured data viewer card */
.viewer-card-featured {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1);
}

.viewer-card-featured .row {
  align-items: center;
}

.viewer-card-featured .screenshot-link {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  max-height: 280px;
}

.viewer-card-featured .screenshot-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.viewer-card-featured .screenshot-link img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: cover;
  object-position: top left;
}

.viewer-card-content {
  padding-left: 0.5rem;
}

.viewer-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ig-primary);
  background: rgba(37, 99, 235, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.viewer-title {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ig-hero-text);
  margin-bottom: 0.5rem;
}

.viewer-description {
  color: #475569;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

@media (max-width: 991px) {
  .viewer-card-featured .screenshot-link {
    max-height: 240px;
  }
  .viewer-card-featured .screenshot-link img {
    max-height: 240px;
  }
}

@media (max-width: 768px) {
  .viewer-card-featured {
    padding: 1.25rem;
  }
  .viewer-card-content {
    padding-left: 0;
    padding-top: 1rem;
  }
  .viewer-card-featured .screenshot-link {
    max-height: 200px;
  }
  .viewer-card-featured .screenshot-link img {
    max-height: 200px;
  }
}

/* Legacy viewer card (if needed elsewhere) */
.viewer-card {
  background: #ffffff;
  border: 1px solid var(--ig-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.viewer-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.viewer-card p {
  color: var(--ig-text-muted);
  font-size: 0.9rem;
}

.viewer-card .screenshot {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Section headings */
.section-heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ig-text);
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ig-border);
}

.section-heading-styled {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ig-hero-text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-icon {
  font-size: 1.25rem;
}

/* Resources section */
.resources-section {
  padding-top: 1.5rem;
  border-top: 1px solid var(--ig-border);
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.resource-card {
  background: var(--ig-bg-light);
  border-radius: 10px;
  padding: 1.25rem;
}

.resource-card h3 {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ig-text);
  margin-bottom: 0.75rem;
}

.resource-card p {
  font-size: 0.9rem;
  color: var(--ig-text-muted);
  margin-bottom: 0.5rem;
}

.resource-card p:last-child {
  margin-bottom: 0;
}

.resource-card a {
  font-weight: 500;
}

.immport-guide-link {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--ig-border);
}

.immport-guide-link a {
  font-size: 0.85rem;
  color: #059669;
}

.immport-guide-link a::before {
  content: "→ ";
}

/* Contact section */
.contact-section {
  padding-top: 1.5rem;
  border-top: 1px solid var(--ig-border);
}

.contact-section p {
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  background: var(--ig-bg-light);
  border-top: 1px solid var(--ig-border);
}

footer a {
  color: var(--ig-primary);
}

footer a:hover {
  color: var(--ig-primary-dark);
}

/* Utility classes */
.text-muted {
  color: var(--ig-text-muted) !important;
}

.bg-subtle {
  background-color: var(--ig-bg-light);
}

/* ===========================================
   Guide Pages - Step-by-step tutorial styles
   =========================================== */

.guide-hero {
  background: linear-gradient(160deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
  border-bottom: 1px solid rgba(16, 185, 129, 0.15);
  padding: 3rem 0;
}

.guide-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #059669;
  background: rgba(16, 185, 129, 0.15);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.guide-title {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: #064e3b;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.guide-subtitle {
  font-size: 1.1rem;
  color: #065f46;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.guide-overview {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: #047857;
}

.guide-overview span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.overview-label::before {
  content: "📋";
}

.overview-time::before {
  content: "⏱️";
}

@media (max-width: 768px) {
  .guide-title {
    font-size: 1.75rem;
  }
  .guide-subtitle {
    font-size: 1rem;
  }
}

/* Guide container */
.guide-container {
  padding: 2.5rem 0 4rem;
}

/* Progress tracker */
.guide-progress {
  background: var(--ig-bg-light);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}

.progress-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.progress-step {
  display: flex;
}

.progress-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--ig-text-muted);
  text-decoration: none;
  transition: all 0.15s ease;
}

.progress-link:hover {
  background: #e5e7eb;
  color: var(--ig-text);
  text-decoration: none;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: #d1d5db;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  color: #4b5563;
}

.progress-link:hover .step-number {
  background: var(--ig-primary);
  color: white;
}

.step-label {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .progress-steps {
    flex-direction: column;
    gap: 0.25rem;
  }
  .step-label {
    white-space: normal;
  }
}

/* Guide content */
.guide-content {
  font-size: 1.05rem;
  line-height: 1.7;
}

.guide-content h2 {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ig-hero-text);
  margin-top: 0;
  margin-bottom: 1rem;
  padding-top: 1rem;
}

.guide-content hr {
  border: none;
  border-top: 1px solid var(--ig-border);
  margin: 2.5rem 0;
}

.guide-content p {
  margin-bottom: 1rem;
}

.guide-content ul, .guide-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.guide-content li {
  margin-bottom: 0.35rem;
}

/* Guide intro box */
.guide-intro {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.guide-intro p {
  margin-bottom: 0.75rem;
  color: #1e40af;
}

.guide-intro p:last-child {
  margin-bottom: 0;
}

/* Guide steps */
.guide-step {
  scroll-margin-top: 2rem;
}

/* Action buttons */
.guide-action {
  margin: 1.5rem 0;
}

.guide-action .btn {
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
}

/* Figures */
.guide-figure {
  margin: 1.5rem 0;
  padding: 0;
}

.guide-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--ig-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.guide-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--ig-text-muted);
  font-style: italic;
}

/* Tips */
.guide-tip {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 4px solid #f59e0b;
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.guide-tip strong {
  color: #92400e;
}

.guide-tip ul {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* Path breadcrumb */
.guide-path {
  background: #1f2937;
  color: #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  margin: 1rem 0;
  overflow-x: auto;
}

/* Success box */
.guide-success {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 1.75rem;
  margin-top: 2rem;
}

.guide-success h3 {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #065f46;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.guide-success h3::before {
  content: "✓ ";
  color: #059669;
}

.guide-success p {
  color: #047857;
  margin-bottom: 1rem;
}

.guide-success blockquote {
  background: rgba(255, 255, 255, 0.6);
  border-left: 3px solid #10b981;
  margin: 0;
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  color: var(--ig-text);
}

/* Help section */
.guide-help {
  background: var(--ig-bg-light);
  border-radius: 10px;
  padding: 1.5rem;
  margin-top: 3rem;
}

.guide-help h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.guide-help p {
  margin-bottom: 0;
  color: var(--ig-text-muted);
}

/* Footer */
.guide-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ig-border);
}

.back-link {
  font-weight: 500;
  color: var(--ig-text-muted);
}

.back-link:hover {
  color: var(--ig-primary);
}
