@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg-color: #050608;
  --bg-card: #0c0f14;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --m-blue: #0066d4;
  --m-light-blue: #00a0e9;
  --m-red: #e30613;
  --accent-color: #00a0e9;
  --accent-hover: #33b3ff;
  --border-color: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(12, 15, 20, 0.75);
  --m-gradient: linear-gradient(90deg, var(--m-blue) 0%, var(--m-light-blue) 50%, var(--m-red) 100%);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Subtle Carbon Fiber Pattern Overlay */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(45deg, #090b0e 25%, transparent 25%), 
    linear-gradient(-45deg, #090b0e 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #090b0e 75%), 
    linear-gradient(-45deg, transparent 75%, #090b0e 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  opacity: 0.15;
  z-index: -2;
  pointer-events: none;
}

/* Glowing instrumentation background orbs */
.glow {
  position: absolute;
  top: 15%;
  left: 80%;
  transform: translate(-50%, -50%);
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(0,102,212,0.12) 0%, rgba(5,6,8,0) 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(80px);
}

.glow-left {
  position: absolute;
  top: 70%;
  left: 10%;
  transform: translate(-50%, -50%);
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(227,6,19,0.06) 0%, rgba(5,6,8,0) 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(80px);
}

/* Header & M-Sport Top Bar */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.8rem 4rem;
  backdrop-filter: blur(20px);
  background-color: rgba(5, 6, 8, 0.7);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

/* The M-Sport color band above nav */
nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--m-gradient);
}

.logo {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 1.6rem;
  color: #fff;
  letter-spacing: -1.5px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.logo span {
  color: var(--accent-color);
  background: linear-gradient(135deg, var(--m-light-blue), #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.25s ease;
  position: relative;
  padding: 0.2rem 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--m-gradient);
  transition: width 0.25s ease;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Main layouts */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

h1 {
  font-size: clamp(3.2rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  background: linear-gradient(180deg, #ffffff 30%, #a1aab5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -3px;
  text-transform: uppercase;
}

p.subtitle {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  color: var(--text-secondary);
  max-width: 750px;
  margin-bottom: 3.5rem;
  font-weight: 300;
}

/* Action Buttons */
.cta-group {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 1.1rem 2.4rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  background-color: var(--m-blue);
  color: #fff;
  border: 1px solid var(--m-blue);
  box-shadow: 0 4px 20px rgba(0, 102, 212, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--m-gradient);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 102, 212, 0.5);
  border-color: var(--m-light-blue);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary > * {
  position: relative;
  z-index: 2;
}

.btn-secondary {
  background-color: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: #fff;
  transform: translateY(-2px);
}

/* Premium Dashboard / Terminal Window */
.terminal-window {
  margin-top: 5rem;
  width: 100%;
  max-width: 900px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.6), 0 0 40px rgba(0, 102, 212, 0.08);
  position: relative;
}

/* The subtle M line on top of the terminal */
.terminal-window::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--m-gradient);
}

.terminal-header {
  background-color: #080a0d;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot.red { background-color: var(--m-red); }
.dot.yellow { background-color: #ffb700; }
.dot.green { background-color: #10b981; }

.terminal-body {
  padding: 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  text-align: left;
  color: #b9c3ce;
  background-color: #06080a;
}

.terminal-line {
  margin-bottom: 10px;
  line-height: 1.7;
}

.prompt::before {
  content: "❯";
  color: var(--m-light-blue);
  margin-right: 12px;
  font-weight: bold;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1.2em;
  background-color: var(--m-light-blue);
  vertical-align: bottom;
  animation: blink 1s step-end infinite;
  box-shadow: 0 0 8px var(--m-light-blue);
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Pages grids and premium items */
.page-content {
  justify-content: flex-start;
  padding-top: 3rem;
  max-width: 1000px;
}

.page-title {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  margin-bottom: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  width: 100%;
  margin-top: 3.5rem;
}

/* Premium Card with M-sport Accent Hover */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2.5rem;
  text-align: left;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--border-color);
  transition: background 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 25px rgba(0, 102, 212, 0.05);
}

.card:hover::before {
  background: var(--m-gradient);
}

.card h3 {
  color: #fff;
  font-size: 1.6rem;
  margin-bottom: 1rem;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.card p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Tutorials & Drills list */
.tutorial-list {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  width: 100%;
  margin-top: 3.5rem;
}

.tutorial-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2rem 2.5rem;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tutorial-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--m-blue);
  transition: background 0.3s;
}

/* Rotate colors for M-sport dashboard feel */
.tutorial-list .tutorial-item:nth-child(2)::before {
  background: var(--m-light-blue);
}
.tutorial-list .tutorial-item:nth-child(3)::before {
  background: var(--m-red);
}

.tutorial-item:hover {
  background-color: #10141b;
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.tutorial-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.tutorial-item:nth-child(1) .tutorial-meta { color: var(--m-light-blue); }
.tutorial-item:nth-child(2) .tutorial-meta { color: #5bc8ff; }
.tutorial-item:nth-child(3) .tutorial-meta { color: var(--m-red); }

.tutorial-item h3 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.tutorial-item p {
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

.tutorial-item a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.tutorial-item a:hover {
  color: var(--m-light-blue);
}

/* Glowing command trigger box */
.command-box {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  background-color: #06080a;
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  color: #5bc8ff;
  margin-top: 1rem;
  width: fit-content;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
  border-left: 2px solid var(--m-light-blue);
}

/* Explanation instrumentation boxes */
.terminal-explanation {
  margin-top: 4rem;
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  border-radius: 6px;
  text-align: left;
  width: 100%;
  position: relative;
}

.terminal-explanation::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--m-gradient);
}

.terminal-explanation h3 {
  color: #fff;
  margin-bottom: 1.2rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.terminal-explanation p {
  margin-bottom: 0.8rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.terminal-explanation p strong {
  color: #fff;
}

.terminal-explanation code {
  font-family: 'JetBrains Mono', monospace;
  background-color: #06080a;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  color: var(--m-light-blue);
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
}