/* DevOps Learning Portal - Modern High-Contrast Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:ital,wght@0,400;0,500;0,700;1,400&display=swap');

:root {
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Light Mode Palette (Default Root) */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --bg-surface-hover: #e2e8f0;
  
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #6366f1;
  
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --nav-bg: rgba(255, 255, 255, 0.92);
  --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
}

.dark {
  /* Dark Mode Palette */
  --bg-page: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-subtle: #1e293b;
  --bg-surface-hover: #1f2937;
  
  --border-subtle: #1f2937;
  --border-strong: #374151;
  --border-focus: #818cf8;
  
  --text-main: #f8fafc;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;
  
  --nav-bg: rgba(11, 15, 25, 0.92);
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 4px 10px -2px rgba(0, 0, 0, 0.3);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
}

body {
  min-height: 100vh;
  background-color: var(--bg-page);
  color: var(--text-body);
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Glassmorphism & Panel Surface */
.glass-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  box-shadow: var(--card-shadow);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
  border-color: var(--border-focus);
}

.glass-nav {
  background-color: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-page);
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #6366f1;
}

/* Monospace & Code */
code, pre, .font-mono {
  font-family: var(--font-mono);
}

/* Terminal Window (Always high contrast & dark CLI style in both modes) */
.terminal-window {
  background: #090d16;
  border: 1px solid #1f2937;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.3);
}

.terminal-header {
  background: #111827;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1f2937;
}

.terminal-dots {
  display: flex;
  gap: 0.4rem;
}

.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }

.terminal-body {
  padding: 1.25rem;
  color: #f1f5f9;
  font-size: 0.875rem;
  line-height: 1.6;
  overflow-x: auto;
}

/* Mentor vs Student Conversational Dialogues */
.dialogue-wrapper {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dialogue-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  max-width: 92%;
  animation: fadeIn 0.3s ease-out;
}

.dialogue-student {
  align-self: flex-start;
}

.dialogue-mentor {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.avatar-circle {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.avatar-student-style {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  border: 2px solid #38bdf8;
}

.avatar-mentor-style {
  background: linear-gradient(135deg, #059669, #10b981);
  border: 2px solid #34d399;
}

/* Light & Dark Chat Bubbles */
.chat-bubble-student {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0c4a6e;
  border-radius: 1.125rem 1.125rem 1.125rem 0.25rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}
.dark .chat-bubble-student {
  background: #0c4a6e33;
  border: 1px solid #0284c766;
  color: #f0f9ff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.chat-bubble-mentor {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #14532d;
  border-radius: 1.125rem 1.125rem 0.25rem 1.125rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}
.dark .chat-bubble-mentor {
  background: #064e3b33;
  border: 1px solid #05966966;
  color: #ecfdf5;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

/* Badges & Tags */
.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-phase1 { background: #e0f2fe; color: #0369a1; border: 1px solid #7dd3fc; }
.dark .badge-phase1 { background: #0369a126; color: #38bdf8; border: 1px solid #0284c755; }

.badge-phase2 { background: #e0e7ff; color: #4338ca; border: 1px solid #a5b4fc; }
.dark .badge-phase2 { background: #4338ca26; color: #818cf8; border: 1px solid #6366f155; }

.badge-phase3 { background: #f3e8ff; color: #7e22ce; border: 1px solid #d8b4fe; }
.dark .badge-phase3 { background: #7e22ce26; color: #c084fc; border: 1px solid #a855f755; }

.badge-phase4 { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.dark .badge-phase4 { background: #15803d26; color: #34d399; border: 1px solid #10b98155; }

/* Flag Chips */
.flag-chip {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 0.2rem 0.55rem;
  border-radius: 0.375rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  display: inline-block;
  margin: 0.15rem;
}
.dark .flag-chip {
  background: #1e293b;
  border: 1px solid #334155;
  color: #93c5fd;
}

/* Comparison Matrix Cards */
.matrix-card {
  border-left: 4px solid #6366f1;
  transition: all 0.2s ease;
}
.matrix-card:hover {
  transform: translateX(4px);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
