/* Critical CSS for Above-the-Fold Content - OPTIMIZED */
/* This CSS is inlined to prevent render-blocking */

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
  min-height: 100vh;
}

/* Critical Layout - Above the fold only */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  height: 60px;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  height: 60px;
  padding: 0 1rem;
  font-weight: 600;
  color: #333;
  text-decoration: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.main {
  margin-top: 60px;
  min-height: calc(100vh - 60px);
}

/* Critical Typography - Only main headings */
h1 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #1a1a1a;
}

/* Critical Images - Layout shift prevention */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout shift prevention */
.lazy-image-placeholder {
  background: #f0f0f0;
  min-height: 200px;
}

/* Mobile Critical Styles - Minimal */
@media (max-width: 769px) {
  html {
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .navbar {
    height: 56px;
  }
  
  .navbar-brand {
    height: 56px;
  }
  
  .main {
    margin-top: 56px;
  }
  
  .container {
    padding: 0 15px;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  body {
    background: #1a1a1a;
    color: #e0e0e0;
  }
  
  .navbar {
    background: #2a2a2a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  }
  
  .navbar-brand {
    color: #e0e0e0;
  }
  
  .card {
    background: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  }
  
  h1, h2, h3 {
    color: #f0f0f0;
  }
  
  a {
    color: #4db8ff;
  }
}

/* Accessibility */
:focus {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Print Styles */
@media print {
  .navbar,
  .sidebar,
  .footer {
    display: none;
  }
  
  .main {
    margin: 0;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
  }
}