/* Import modern Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

:root {
  /* Color System */
  --bg-darkest: #090a0f;
  --bg-darker: #0f111a;
  --bg-dark: #151824;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(0, 242, 254, 0.3);
  
  --primary: #00f2fe; /* Glowing Cyan */
  --primary-glow: rgba(0, 242, 254, 0.15);
  --secondary: #a154f2; /* Cosmic Violet */
  --secondary-glow: rgba(161, 84, 242, 0.15);
  --accent-red: #ff4b5c; /* Pivot/Warning Red */
  --accent-green: #00e676; /* Success/Sorted Green */
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --font-sans: 'Inter', sans-serif;
  --font-tech: 'Space Grotesk', sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

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

body {
  background-color: var(--bg-darkest);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(161, 84, 242, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 242, 254, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-darkest);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-dark);
  border-radius: 5px;
  border: 2px solid var(--bg-darkest);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Disclaimer Banner */
.disclaimer-banner {
  background: linear-gradient(90deg, rgba(161, 84, 242, 0.15) 0%, rgba(0, 242, 254, 0.15) 100%);
  border-bottom: 1px solid var(--card-border);
  color: var(--text-primary);
  text-align: center;
  padding: 10px 20px;
  font-family: var(--font-tech);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1000;
  backdrop-filter: blur(10px);
}
.disclaimer-banner strong {
  color: var(--primary);
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 8%;
  background: rgba(9, 10, 15, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 999;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-tech);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 8px;
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-family: var(--font-tech);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-fast);
}
.nav-links a:hover {
  color: var(--primary);
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

/* Hero Section */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 8% 80px;
  position: relative;
}
.hero-badge {
  background: rgba(161, 84, 242, 0.1);
  border: 1px solid rgba(161, 84, 242, 0.3);
  padding: 6px 16px;
  border-radius: 30px;
  font-family: var(--font-tech);
  font-size: 0.85rem;
  color: var(--secondary);
  margin-bottom: 25px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  box-shadow: 0 0 15px rgba(161, 84, 242, 0.1) inset;
}
.hero h1 {
  font-family: var(--font-tech);
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 25px;
  max-width: 900px;
}
.hero h1 span.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.hero p.tagline {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin-bottom: 40px;
  font-weight: 300;
}
.hero-ctas {
  display: flex;
  gap: 20px;
}
.btn {
  font-family: var(--font-tech);
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-normal);
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--bg-darkest);
  border: none;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.5);
}
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--card-border);
}
.btn-secondary:hover {
  border-color: var(--primary);
  background: rgba(0, 242, 254, 0.03);
}

/* Glass Card Global Styles */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 40px;
  transition: border-color var(--transition-normal), transform var(--transition-normal);
}
.glass-card:hover {
  border-color: var(--card-hover-border);
}

/* Sections General */
section {
  padding: 80px 8%;
}
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-header h2 {
  font-family: var(--font-tech);
  font-size: 2.5rem;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Interactive Simulator Section */
.simulator-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  align-items: stretch;
}
@media (max-width: 968px) {
  .simulator-container {
    grid-template-columns: 1fr;
  }
}
.sim-viewport {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(6, 7, 10, 0.6);
  border-radius: 12px;
  border: 1px solid var(--card-border);
  padding: 24px;
  min-height: 400px;
  position: relative;
}
.sim-header-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 15px;
  margin-bottom: 20px;
}
.sim-title-group h3 {
  font-family: var(--font-tech);
  font-size: 1.2rem;
  color: #fff;
}
.sim-title-group span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.sim-telemetry {
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.telemetry-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.telemetry-val {
  color: var(--primary);
  font-weight: bold;
}
.sim-canvas {
  flex-grow: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-evenly;
  height: 220px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}
/* Visual Bar styles */
.sim-bar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 8%;
  transition: transform 0.25s ease-in-out;
}
.sim-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: rgba(255, 255, 255, 0.2);
  transition: background-color 0.25s, height 0.25s;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}
.sim-bar.default {
  background: rgba(255, 255, 255, 0.3);
}
.sim-bar.comparing {
  background: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}
.sim-bar.pivot {
  background: var(--accent-red);
  box-shadow: 0 0 15px rgba(255, 75, 92, 0.3);
}
.sim-bar.sorted {
  background: var(--accent-green);
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.3);
}
.sim-bar-val {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-top: 8px;
  color: var(--text-secondary);
}

.sim-footer-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  flex-wrap: wrap;
  gap: 15px;
}
.sim-controls {
  display: flex;
  gap: 10px;
}
.control-btn {
  background: var(--bg-dark);
  border: 1px solid var(--card-border);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}
.control-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0, 242, 254, 0.05);
}
.control-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.control-btn.play-btn {
  background: var(--primary);
  color: var(--bg-darkest);
  border: none;
}
.control-btn.play-btn:hover {
  box-shadow: 0 0 10px var(--primary);
  transform: scale(1.05);
  color: var(--bg-darkest);
}

.sim-selector {
  background: var(--bg-dark);
  border: 1px solid var(--card-border);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: var(--font-tech);
  cursor: pointer;
  outline: none;
}
.sim-selector:focus {
  border-color: var(--primary);
}

.sim-details {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}
.tracer-hud {
  flex-grow: 1;
  background: rgba(6, 7, 10, 0.6);
  border-radius: 12px;
  border: 1px solid var(--card-border);
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.tracer-title {
  font-family: var(--font-tech);
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 8px;
}
.code-block {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  white-space: pre;
  color: var(--text-secondary);
  line-height: 1.7;
}
.code-line {
  padding: 2px 8px;
  border-radius: 4px;
}
.code-line.active {
  background: rgba(0, 242, 254, 0.1);
  color: var(--primary);
  border-left: 3px solid var(--primary);
  font-weight: 500;
}
.info-hud {
  background: rgba(6, 7, 10, 0.4);
  border-radius: 12px;
  border: 1px solid var(--card-border);
  padding: 20px;
}
.info-title {
  font-family: var(--font-tech);
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.info-text {
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}
.feature-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.1) 0%, rgba(161, 84, 242, 0.1) 100%);
  border: 1px solid rgba(0, 242, 254, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.feature-card h3 {
  font-family: var(--font-tech);
  font-size: 1.3rem;
  margin-bottom: 12px;
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Architecture Explorer Section */
.arch-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.arch-tab-btn {
  background: var(--bg-darker);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  font-family: var(--font-tech);
  font-size: 1rem;
  padding: 12px 24px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition-normal);
}
.arch-tab-btn:hover {
  border-color: var(--primary);
  color: #fff;
}
.arch-tab-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--bg-darkest);
  border: none;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
  font-weight: 600;
}
.arch-content {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}
.arch-content.active {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 768px) {
  .arch-content.active {
    grid-template-columns: 1fr;
  }
}
.arch-details h3 {
  font-family: var(--font-tech);
  font-size: 1.8rem;
  margin-bottom: 15px;
}
.arch-details p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.arch-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin-top: 15px;
}
.arch-tech-list li {
  background: var(--bg-dark);
  border: 1px solid var(--card-border);
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--font-tech);
  font-size: 0.85rem;
  color: var(--primary);
}
.arch-code-preview {
  background: rgba(6, 7, 10, 0.6);
  border-radius: 12px;
  border: 1px solid var(--card-border);
  padding: 24px;
  overflow-x: auto;
  max-height: 350px;
}
.arch-code-preview pre {
  margin: 0;
}

/* Algorithm Database Section */
.search-bar-container {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}
.search-input {
  width: 100%;
  max-width: 500px;
  background: var(--bg-darker);
  border: 1px solid var(--card-border);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 14px 20px;
  border-radius: 8px;
  outline: none;
  transition: var(--transition-fast);
}
.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
}
table.algo-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}
table.algo-table th, table.algo-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
}
table.algo-table th {
  background: rgba(6, 7, 10, 0.5);
  font-family: var(--font-tech);
  font-weight: 600;
  color: #fff;
}
table.algo-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}
table.algo-table tr:last-child td {
  border-bottom: none;
}
.complexity-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-dark);
  border: 1px solid var(--card-border);
}
.complexity-tag.linear { color: var(--accent-green); }
.complexity-tag.log { color: #00e5ff; }
.complexity-tag.quadratic { color: #ffab00; }
.complexity-tag.exponential { color: var(--accent-red); }

/* Developer Story Timeline */
.story-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}
.story-timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background: var(--card-border);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}
@media (max-width: 768px) {
  .story-timeline::after {
    left: 31px;
  }
}
.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
}
.timeline-item.left {
  left: 0;
  text-align: right;
}
.timeline-item.right {
  left: 50%;
}
@media (max-width: 768px) {
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 20px;
    text-align: left !important;
  }
  .timeline-item.right {
    left: 0;
  }
}
.timeline-item::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  right: -8px;
  background: var(--bg-darkest);
  border: 2px solid var(--primary);
  border-radius: 50%;
  top: 15px;
  z-index: 1;
}
.timeline-item.right::after {
  left: -8px;
}
@media (max-width: 768px) {
  .timeline-item::after {
    left: 23px !important;
  }
}
.timeline-date {
  font-family: var(--font-tech);
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}
.timeline-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px;
}
.timeline-content h3 {
  font-family: var(--font-tech);
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.timeline-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Mentor Spotlight Card */
.mentor-spotlight {
  border-color: rgba(161, 84, 242, 0.45);
  background: linear-gradient(135deg, rgba(161, 84, 242, 0.07) 0%, rgba(0, 242, 254, 0.04) 100%);
  box-shadow: 0 0 20px rgba(161, 84, 242, 0.1), inset 0 0 20px rgba(161, 84, 242, 0.03);
}
.mentor-spotlight-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.mentor-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.mentor-spotlight-header h3 {
  margin-bottom: 0;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.mentor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.mentor-tag {
  background: rgba(161, 84, 242, 0.1);
  border: 1px solid rgba(161, 84, 242, 0.3);
  color: var(--secondary);
  font-family: var(--font-tech);
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

/* Team Grid styling */
.team-section {
  background: rgba(15, 17, 26, 0.5);
}
.team-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.team-subgroup h3 {
  font-family: var(--font-tech);
  font-size: 1.5rem;
  margin-bottom: 20px;
  border-left: 4px solid var(--secondary);
  padding-left: 12px;
  color: #fff;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.team-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: var(--transition-normal);
}
.team-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}
.avatar-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.1) 0%, rgba(161, 84, 242, 0.1) 100%);
  border: 1px solid rgba(0, 242, 254, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-tech);
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--primary);
  margin: 0 auto 15px;
}
.team-name {
  font-family: var(--font-tech);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.team-role {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.team-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* FAQ Accordion */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.faq-item {
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--card-bg);
  overflow: hidden;
  transition: var(--transition-normal);
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: #fff;
  text-align: left;
  padding: 20px 24px;
  font-family: var(--font-tech);
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--primary);
  transition: transform var(--transition-normal);
}
.faq-item.active {
  border-color: var(--primary);
}
.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal) ease-out, padding var(--transition-normal);
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.faq-item.active .faq-answer {
  max-height: 200px; /* arbitrary large enough height */
  padding: 0 24px 20px;
}

/* Footer */
footer {
  background: var(--bg-darkest);
  border-top: 1px solid var(--card-border);
  padding: 40px 8% 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}
.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
}
.footer-links a:hover {
  color: var(--primary);
}
.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* CSS Keyframe Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll Fade In Animation Classes */
.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Mobile Responsiveness Overrides
   ========================================================================== */

@media (max-width: 768px) {
  /* Global adjustments */
  html {
    font-size: 15px; /* Scale down base typography */
  }
  
  section {
    padding: 50px 5%; /* Reduce whitespace padding */
  }
  
  /* Navbar */
  .navbar {
    padding: 15px 5%;
  }
  .nav-logo {
    font-size: 1.3rem;
  }
  .nav-logo-img {
    width: 28px;
    height: 28px;
  }

  /* Hero Section */
  .hero {
    padding: 60px 5% 50px;
  }
  .hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
  }
  .hero p.tagline {
    font-size: 1.1rem;
    margin-bottom: 30px;
  }
  
  /* Glass Cards padding */
  .glass-card {
    padding: 24px;
  }

  /* Simulator Section */
  .sim-viewport {
    padding: 16px;
    min-height: auto;
  }
  .sim-canvas {
    height: 180px;
  }
  .sim-bar-val {
    font-size: 0.75rem;
    margin-top: 4px;
  }
  .tracer-hud, .info-hud {
    padding: 16px;
  }
  
  /* Table styling */
  table.algo-table th, table.algo-table td {
    padding: 12px 14px;
    font-size: 0.85rem;
  }
  
  /* FAQs Accordion styling */
  .faq-question {
    padding: 16px 20px;
    font-size: 1rem;
  }
  .faq-item.active .faq-answer {
    padding: 0 20px 16px;
    font-size: 0.9rem;
  }
  
  /* Team container updates */
  .team-container {
    gap: 30px;
  }
  
  /* Footer details */
  footer {
    padding: 30px 5% 15px;
  }
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 25px;
  }
}

@media (max-width: 480px) {
  /* Disclaimer banner */
  .disclaimer-banner {
    font-size: 0.8rem;
    padding: 8px 15px;
  }

  /* Hero Section CTAs */
  .hero h1 {
    font-size: 2rem;
  }
  .hero-ctas {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .btn {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
  }

  /* Simulator HUD spacing */
  .sim-header-hud {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .sim-telemetry {
    width: 100%;
    justify-content: space-between;
  }
  .sim-footer-hud {
    flex-direction: column;
    align-items: stretch;
  }
  .sim-controls {
    justify-content: center;
  }
  .sim-selector {
    width: 100%;
    text-align: center;
  }
  
  /* Tab toggles */
  .arch-tab-btn {
    width: 100%;
    text-align: center;
    padding: 10px 20px;
  }
  
  /* Portfolio table scroll behavior */
  table.algo-table th, table.algo-table td {
    white-space: nowrap;
  }
}

/* ==========================================================================
   Horizontal Snake Roadmap — Developer Story
   ========================================================================== */

.roadmap-scroll-wrap {
  overflow-x: auto;
  overflow-y: visible;
  padding: 20px 0 40px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}
.roadmap-scroll-wrap::-webkit-scrollbar { height: 6px; }
.roadmap-scroll-wrap::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

.roadmap-track {
  display: flex;
  align-items: stretch;
  min-width: max-content;
  position: relative;
  padding: 0 40px;
}

.rm-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 180px;
  flex-shrink: 0;
  position: relative;
}

/* TOP step order */
.rm-step.rm-top .rm-content   { order: 1; margin-bottom: 12px; }
.rm-step.rm-top .rm-icon-box  { order: 2; }
.rm-step.rm-top .rm-vline     { order: 3; }
.rm-step.rm-top .rm-dot       { order: 4; }
.rm-step.rm-top .rm-connector { order: 5; }

/* BOTTOM step order */
.rm-step.rm-bottom .rm-connector { order: 1; }
.rm-step.rm-bottom .rm-dot       { order: 2; }
.rm-step.rm-bottom .rm-vline     { order: 3; }
.rm-step.rm-bottom .rm-icon-box  { order: 4; }
.rm-step.rm-bottom .rm-content   { order: 5; margin-top: 12px; }

/* Content text */
.rm-content {
  text-align: center;
  width: 160px;
}
.rm-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--primary);
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}
.rm-title {
  font-family: var(--font-tech);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}
.rm-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Icon box */
.rm-icon-box {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  flex-shrink: 0;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.rm-icon-box:hover {
  transform: scale(1.08) translateY(-3px);
}
/* Dark variant — deep navy/cyan (TOP items) */
.rm-icon-box.rm-dark {
  background: linear-gradient(145deg, #0d1e3a 0%, #0a2850 100%);
  border: 2px solid rgba(0, 242, 254, 0.35);
  box-shadow: 0 4px 18px rgba(0, 242, 254, 0.12), inset 0 0 12px rgba(0, 242, 254, 0.06);
}
/* Light variant — olive/sage green (BOTTOM items) */
.rm-icon-box.rm-light {
  background: linear-gradient(145deg, #1e2a0e 0%, #2a3d12 100%);
  border: 2px solid rgba(160, 210, 60, 0.35);
  box-shadow: 0 4px 18px rgba(160, 210, 60, 0.10), inset 0 0 12px rgba(160, 210, 60, 0.05);
}
/* Launch glow — final step */
.rm-icon-box.rm-glow {
  border-color: var(--primary);
  animation: rm-pulse 2.2s ease-in-out infinite;
}
@keyframes rm-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(0,242,254,0.15), 0 0 24px rgba(0,242,254,0.25); }
  50%       { box-shadow: 0 0 0 8px rgba(0,242,254,0.08), 0 0 40px rgba(0,242,254,0.45); }
}

/* Vertical stem */
.rm-vline {
  width: 2px;
  height: 36px;
  background: linear-gradient(to bottom, rgba(0,242,254,0.5), rgba(0,242,254,0.15));
  flex-shrink: 0;
}

/* Center rail dot */
.rm-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-darkest);
  border: 2.5px solid var(--primary);
  box-shadow: 0 0 8px rgba(0,242,254,0.4);
  flex-shrink: 0;
  z-index: 2;
}
.rm-dot.rm-dot-final {
  background: var(--primary);
  box-shadow: 0 0 14px rgba(0,242,254,0.7);
  width: 18px;
  height: 18px;
}

/* Horizontal connector rail */
.rm-connector {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg,
    rgba(0,242,254,0.5),
    rgba(161,84,242,0.3),
    rgba(0,242,254,0.5)
  );
  flex-shrink: 0;
  align-self: center;
}
.rm-step.rm-last .rm-connector { display: none; }

/* Mobile: collapse to vertical list */
@media (max-width: 768px) {
  .roadmap-track {
    flex-direction: column;
    min-width: unset;
    padding: 0;
    align-items: flex-start;
  }
  .rm-step,
  .rm-step.rm-top,
  .rm-step.rm-bottom {
    flex-direction: row;
    width: 100%;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0 16px 20px;
    border-left: 2px solid rgba(0,242,254,0.2);
  }
  .rm-step .rm-icon-box { order: 1 !important; flex-shrink: 0; width: 52px; height: 52px; font-size: 1.3rem; border-radius: 12px; }
  .rm-step .rm-content  { order: 2 !important; text-align: left; margin: 0 !important; }
  .rm-vline, .rm-dot, .rm-connector { display: none !important; }
}

