/* ==========================================================================
   SuleimanRosalindBioinformatics - Design System & Modern Stylesheet
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Color Palette - Dark Mode Default */
  --bg-main: #030712;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-card-border: rgba(56, 189, 248, 0.15);
  --bg-input: #0b1120;
  --bg-modal: rgba(15, 23, 42, 0.95);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --cyan-primary: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.35);
  --green-primary: #10b981;
  --green-glow: rgba(16, 185, 129, 0.35);
  --amber-primary: #f59e0b;
  --rose-primary: #f43f5e;
  --purple-primary: #a855f7;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 25px var(--cyan-glow);

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(241, 245, 249, 0.95);
  --bg-card-border: rgba(14, 165, 233, 0.2);
  --bg-input: #ffffff;
  --bg-modal: rgba(255, 255, 255, 0.98);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #94a3b8;

  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 0 1px 1px rgba(0, 0, 0, 0.05);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ambient Atmosphere */
.bg-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  will-change: transform;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #06b6d4, #3b82f6);
  top: -150px;
  right: -100px;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #a855f7, #ec4899);
  bottom: 10%;
  left: -150px;
  animation: floatOrb 22s ease-in-out infinite alternate-reverse;
}

.orb-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #10b981, #06b6d4);
  top: 50%;
  left: 45%;
  opacity: 0.15;
}

@keyframes floatOrb {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(60px) scale(1.08); }
  100% { transform: translateY(-40px) scale(0.95); }
}

/* Typography & Layout */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header & Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(3, 7, 18, 0.7);
  border-bottom: 1px solid var(--bg-card-border);
  transition: var(--transition);
}

[data-theme="light"] .navbar {
  background: rgba(248, 250, 252, 0.85);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.brand-logo-img {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
}

.brand-accent {
  color: var(--cyan-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--cyan-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  color: var(--text-main);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon:hover {
  border-color: var(--cyan-primary);
  color: var(--cyan-primary);
}

/* Hero Section */
.hero-section {
  padding: 5rem 0 3.5rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--cyan-primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-title-gradient {
  background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 50%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 2.25rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.35);
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  border-color: var(--cyan-primary);
  background: var(--bg-card-hover);
}

/* Stats Counter Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan-primary);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, #38bdf8, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Section Header */
.section {
  padding: 4.5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan-primary);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 650px;
  margin: 0 auto;
}

/* Explorer Section */
.explorer-controls {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
}

.search-box-wrapper {
  position: relative;
  margin-bottom: 1.25rem;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.85rem;
  background: var(--bg-input);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--cyan-primary);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-btn {
  background: var(--bg-input);
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  font-size: 0.825rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  color: var(--text-main);
  border-color: var(--cyan-primary);
}

.filter-btn.active {
  background: var(--cyan-primary);
  color: #030712;
  border-color: var(--cyan-primary);
  font-weight: 700;
}

.filter-select {
  background: var(--bg-input);
  border: 1px solid var(--bg-card-border);
  color: var(--text-main);
  font-size: 0.825rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
}

.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Problems Grid */
.problems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.problem-card:hover {
  transform: translateY(-3px);
  border-color: var(--cyan-primary);
  box-shadow: 0 10px 25px -5px rgba(6, 182, 212, 0.15);
}

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

.problem-id {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.2rem 0.55rem;
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan-primary);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.badge-tier {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.tier-Beginner {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tier-Intermediate {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tier-Advanced {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.problem-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  line-height: 1.35;
}

.problem-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.tag-pill {
  font-size: 0.725rem;
  padding: 0.2rem 0.5rem;
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.card-btn {
  flex: 1;
  text-align: center;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.card-btn-primary {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan-primary);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.card-btn-primary:hover {
  background: var(--cyan-primary);
  color: #030712;
}

.card-btn-code {
  background: var(--bg-input);
  color: var(--text-muted);
  border: 1px solid var(--bg-card-border);
}

.card-btn-code:hover {
  color: var(--text-main);
  border-color: var(--cyan-primary);
}

/* Pagination / Load More */
.load-more-wrapper {
  text-align: center;
  margin-top: 2.5rem;
}

/* Studio Section */
.studio-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.studio-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--bg-card-border);
  padding-bottom: 1rem;
  margin-bottom: 1.75rem;
  overflow-x: auto;
}

.studio-tab-btn {
  padding: 0.6rem 1.25rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.studio-tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-input);
}

.studio-tab-btn.active {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan-primary);
  border-color: rgba(6, 182, 212, 0.3);
}

.studio-pane {
  display: none;
}

.studio-pane.active {
  display: block;
}

.input-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.studio-textarea {
  width: 100%;
  min-height: 110px;
  background: var(--bg-input);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  resize: vertical;
  margin-bottom: 1rem;
}

.studio-textarea:focus {
  outline: none;
  border-color: var(--cyan-primary);
}

.studio-btn-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.output-panel {
  background: var(--bg-input);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.output-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cyan-primary);
  margin-bottom: 0.75rem;
}

/* Roadmap Grid */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

.roadmap-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.roadmap-tier-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.roadmap-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.roadmap-desc {
  color: var(--text-muted);
  font-size: 0.925rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.roadmap-list {
  list-style: none;
  font-size: 0.875rem;
}

.roadmap-list li {
  padding: 0.4rem 0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.roadmap-list li::before {
  content: "•";
  color: var(--cyan-primary);
  font-weight: bold;
}

/* Modal Drawer */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-modal);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--bg-input);
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: var(--text-main);
  border-color: var(--cyan-primary);
}

/* Ecosystem Table */
.ecosystem-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--bg-card-border);
}

.ecosystem-table th, .ecosystem-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--bg-card-border);
}

.ecosystem-table th {
  background: var(--bg-input);
  font-weight: 700;
  color: var(--cyan-primary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Footer */
.footer {
  border-top: 1px solid var(--bg-card-border);
  background: rgba(3, 7, 18, 0.95);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  max-width: 400px;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--cyan-primary);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding-top: 2rem;
  color: var(--text-subtle);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-title { font-size: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

@media (max-width: 640px) {
  .hero-title { font-size: 2rem; }
  .problems-grid { grid-template-columns: 1fr; }
  .studio-card { padding: 1.25rem; }
}
