/* ==========================================================================
   Basic Mechanical Engineering - Core Design System & Tokens (main.css)
   Designed & Developed by Ashish Vegan
   Theme: Netflix Red & Deep Espresso Dark Brown
   ========================================================================== */

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

:root {
  /* Color Palette - Warm Light Mode with Netflix Red Accents */
  --bg-primary: #faf6f5;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f5edea;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #ffffff;

  --text-primary: #1f1412;
  --text-secondary: #57413d;
  --text-muted: #8a706b;
  --text-inverted: #faf6f5;

  --border-subtle: #ebdcd7;
  --border-medium: #d6c0b8;
  --border-focus: #E50914;

  /* Netflix Red Brand Accents */
  --primary: #E50914;
  --primary-50: #fef2f2;
  --primary-100: #fee2e2;
  --primary-500: #ef4444;
  --primary-600: #E50914;
  --primary-700: #b81d24;
  --primary-glow: rgba(229, 9, 20, 0.28);

  /* Functional Status Colors */
  --accent-red: #E50914;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #e11d48;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;

  /* Shadows & Glassmorphism */
  --shadow-sm: 0 1px 3px rgba(31, 20, 18, 0.08);
  --shadow-md: 0 4px 10px rgba(31, 20, 18, 0.1);
  --shadow-lg: 0 12px 28px rgba(31, 20, 18, 0.14);
  --shadow-xl: 0 20px 40px rgba(31, 20, 18, 0.18);
  --glass-bg: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(235, 220, 215, 0.8);
  --glass-blur: blur(14px);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --max-width: 1280px;
  --nav-height: 72px;
}

/* ==========================================================================
   NETFLIX RED & DARK BROWN THEME VARIABLES
   ========================================================================== */
:root[data-theme="dark"],
html[data-theme="dark"],
body.dark-theme {
  /* Deep dark espresso brown background */
  --bg-primary: #140e0c;
  --bg-surface: #1c1412;
  --bg-surface-elevated: #281b17;
  --bg-subtle: #33221d;
  --bg-card: rgba(28, 20, 18, 0.88);
  --bg-card-hover: #3d2923;

  --text-primary: #fcf8f7;
  --text-secondary: #d6c6c1;
  --text-muted: #a18e88;
  --text-inverted: #140e0c;

  --border-subtle: #2d1d18;
  --border-medium: #4a3129;
  --border-focus: #E50914;

  --primary: #E50914;
  --primary-50: #3f1212;
  --primary-100: #591616;
  --primary-500: #ff333a;
  --primary-600: #E50914;
  --primary-700: #b81d24;
  --primary-glow: rgba(229, 9, 20, 0.45);

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 6px 14px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 14px 30px rgba(0, 0, 0, 0.8);
  --shadow-xl: 0 22px 45px rgba(0, 0, 0, 0.9);
  --glass-bg: rgba(28, 20, 18, 0.88);
  --glass-border: rgba(74, 49, 41, 0.65);
}

/* ==========================================================================
   Base Resets & Typography
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.1rem; font-weight: 600; }
h6 { font-size: 0.95rem; font-weight: 600; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-600);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-500);
}

code, kbd, samp, pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-600);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* Section Header Utility */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-600);
  background: var(--primary-50);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
}

body.dark-theme .section-tag,
[data-theme="dark"] .section-tag {
  color: #ff4d52;
  background: rgba(229, 9, 20, 0.15);
  border-color: rgba(229, 9, 20, 0.3);
}

.section-title {
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Background Atmospheric Radial Gradients (Netflix Crimson + Espresso) */
.ambient-glow-top {
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 450px;
  background: radial-gradient(circle, rgba(229, 9, 20, 0.12) 0%, rgba(229, 9, 20, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

body.dark-theme .ambient-glow-top,
[data-theme="dark"] .ambient-glow-top {
  background: radial-gradient(circle, rgba(229, 9, 20, 0.22) 0%, rgba(20, 14, 12, 0) 70%);
}
