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

:root {
  /* Colors */
  --primary: #0052FF;
  --primary-hover: #003ECB;
  --primary-light: #EAF0FF;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #F1F5F9;
  --border-color: #E2E8F0;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --header-bg: rgba(255, 255, 255, 0.85);
  --mobile-nav-bg: #FFFFFF;
  
  /* Layout */
  --max-width: 1200px;
  --header-height: 80px;
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.03);
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --primary: #4D8AFF;
  --primary-hover: #6B9FFF;
  --primary-light: #0A1628;
  --bg-primary: #080C14;
  --bg-secondary: #0D1120;
  --bg-tertiary: #131828;
  --border-color: #1E2438;
  --text-primary: #E6EDF3;
  --text-secondary: #8B949E;
  --text-muted: #6E7681;
  --header-bg: rgba(0, 0, 0, 0.75);
  --mobile-nav-bg: #080C14;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.5), 0 2px 4px -1px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.6), 0 4px 6px -2px rgba(0,0,0,0.5);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* Header Styles */
header {
  position: sticky;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Modern Sliding Dark Mode Switch */
.theme-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 64px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFB800 0%, #FF7A00 100%);
  border: none;
  cursor: pointer;
  padding: 3px;
  flex-shrink: 0;
  transition: background 0.45s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  box-shadow: 0 2px 10px rgba(255, 130, 0, 0.35);
  outline: none;
}

.theme-switch:focus-visible {
  box-shadow: 0 0 0 3px rgba(77, 138, 255, 0.4);
}

[data-theme="dark"] .theme-switch {
  background: linear-gradient(135deg, #1A3070 0%, #0052FF 100%);
  box-shadow: 0 2px 10px rgba(0, 82, 255, 0.35);
}

/* Sliding thumb */
.switch-thumb {
  position: absolute;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: left 0.45s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  z-index: 2;
}

[data-theme="dark"] .switch-thumb {
  left: calc(100% - 29px);
}

/* Sun icon — visible in light mode (thumb is on left showing sun) */
.thumb-sun {
  display: flex;
  color: #FF8C00;
}

/* Moon icon — visible in dark mode (thumb slides right showing moon) */
.thumb-moon {
  display: none;
  color: #4D8AFF;
}

[data-theme="dark"] .thumb-sun { display: none; }
[data-theme="dark"] .thumb-moon { display: flex; }

/* Background track icons */
.switch-track-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  z-index: 1;
  transition: opacity 0.3s ease;
}

.switch-track-moon {
  right: 6px;
  color: rgba(255,255,255,0.75);
  opacity: 1;
}

.switch-track-sun {
  left: 7px;
  color: rgba(255,255,255,0.75);
  opacity: 0;
}

[data-theme="dark"] .switch-track-moon { opacity: 0; }
[data-theme="dark"] .switch-track-sun  { opacity: 1; }

/* Header right controls container */
.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-container {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  height: 76px;
  width: auto;
  object-fit: contain;
}

/* Dark logo style matching light logo size limits */
[data-theme="dark"] .brand-logo {
  height: 67px;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
}

nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

nav a:hover, nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.cta-button {
  background-color: var(--primary);
  color: #FFFFFF !important;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.cta-button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Footer & Contact Section */
footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-brand {
  flex: 1 1 300px;
}

.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-brand-logo img {
  height: 32px;
}

.footer-brand-logo span {
  font-weight: 700;
  font-size: 1.1rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 280px;
}

.footer-links {
  display: flex;
  gap: 80px;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Animations & Utilities */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-padding {
  padding: 100px 0;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
}

.badge-primary {
  background-color: var(--primary-light);
  color: var(--primary);
}

.grid-bg-overlay {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, var(--border-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-color) 1px, transparent 1px);
  background-position: center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

:root:not([data-theme="dark"]) .grid-bg-overlay {
  opacity: 0.6;
}

/* Mobile Responsive Menu button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  margin: 5px 0;
  transition: var(--transition);
}

/* Mobile styles */
@media (max-width: 768px) {
  nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--mobile-nav-bg);
    flex-direction: column;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    gap: 20px;
  }
  
  nav.open {
    display: flex;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .footer-links {
    gap: 40px;
  }

  .theme-toggle .toggle-label {
    display: none;
  }
}
