/* Data Science & ML Master Roadmap Styling — Responsive & Styled */
:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: #1f293d;
  --bg-glass: rgba(17, 24, 39, 0.92);
  --border-color: rgba(255, 255, 255, 0.1);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent-cyan: #06b6d4;
  --accent-indigo: #6366f1;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --nav-height: 64px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header Navigation Bar */
.navbar {
  min-height: var(--nav-height);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  position: relative;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}

.navbar::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1rem;
  transition: opacity 0.2s;
}

.brand-link:hover {
  opacity: 0.85;
}

.brand-logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.author-badge {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.phase-badge {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.nav-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select: none;
}

.nav-btn:hover:not(.disabled) {
  background: #2d3748;
  border-color: var(--accent-indigo);
  color: #fff;
  transform: translateY(-1px);
}

.nav-btn:active:not(.disabled) {
  transform: translateY(0);
}

.nav-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.nav-btn-primary {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  border: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-btn-primary:hover {
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
  filter: brightness(1.1);
}

/* Zoom Control Toolbar */
.zoom-controls {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.zoom-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 6px 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}

.zoom-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.zoom-display {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-cyan);
  padding: 0 6px;
  min-width: 42px;
  text-align: center;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  flex-shrink: 0;
}

.icon-btn:hover {
  color: var(--text-primary);
  background: #2d3748;
}

/* Main Viewport & Dynamic Zoom Frame Wrapper */
.content-viewport {
  flex: 1;
  width: 100%;
  position: relative;
  background: #0d1117;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.iframe-zoom-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: auto;
  display: flex;
  justify-content: center;
}

iframe.phase-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  transition: transform 0.2s ease-out;
  transform-origin: top center;
}

/* Roadmap Drawer / Slide-Over Modal */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 380px;
  max-width: 88vw;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  z-index: 210;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 10px 0 30px rgba(0,0,0,0.5);
}

.drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}

.drawer-close:hover {
  color: var(--text-primary);
}

.drawer-search {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.search-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent-cyan);
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.module-group {
  margin-bottom: 20px;
}

.module-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
  margin-bottom: 10px;
  padding-left: 4px;
}

.phase-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  transition: all 0.2s;
  margin-bottom: 4px;
  border: 1px solid transparent;
}

.phase-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.phase-item.current {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  font-weight: 600;
}

.phase-item-icon {
  font-size: 1.2rem;
}

.phase-item-info {
  flex: 1;
  min-width: 0;
}

.phase-item-num {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.phase-item-title {
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phase-type-tag {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-weight: 600;
}

.drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  background: var(--bg-primary);
}

.drawer-footer strong {
  color: var(--accent-cyan);
}

/* Landing Page Styles */
body.landing-page {
  overflow: auto;
  height: auto;
  min-height: 100vh;
}

.hero-section {
  padding: 50px 20px 30px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-creator-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 28px;
}

.stats-bar {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 12px 20px;
  border-radius: 12px;
  text-align: center;
  min-width: 130px;
}

.stat-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.landing-container {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.modules-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.module-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
}

.module-card-header {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.phases-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.phase-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.phase-card:hover {
  border-color: var(--accent-indigo);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.card-icon {
  font-size: 1.8rem;
  background: rgba(255, 255, 255, 0.05);
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-purple);
  text-transform: uppercase;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.site-footer {
  text-align: center;
  padding: 30px 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer strong {
  color: var(--accent-cyan);
}

/* Mobile Responsiveness Optimizations */
@media (max-width: 768px) {
  .hero-title { font-size: 1.9rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .navbar { padding: 0 8px; gap: 6px; }
  .brand-text { display: none; }
  .author-badge { font-size: 0.65rem; padding: 2px 6px; }
  .phase-badge { display: none; }
  .nav-btn { padding: 6px 10px; font-size: 0.78rem; }
  .btn-text { font-size: 0.78rem; }
  .zoom-display { font-size: 0.72rem; min-width: 34px; padding: 0 2px; }
  .zoom-btn { padding: 4px 6px; font-size: 0.8rem; }
  .phases-cards-grid { grid-template-columns: 1fr; }
  .module-card { padding: 16px; }
  .stat-item { flex: 1 1 40%; }
}

@media (max-width: 480px) {
  .btn-text-full { display: none; }
  .btn-text-short { display: inline; }
}
