/* Fallback styles for immediate use while Tailwind loads - Dark Mode Compatible */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* Smooth scrolling and offset for fixed navigation */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Account for fixed header */
}

/* Ensure basic responsive behavior */
.container, .max-w-7xl {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Basic navigation styles - Dark Mode Compatible */
nav {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Dark mode navigation */
html.dark nav {
    background: rgba(17, 24, 39, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Basic button styles - Less aggressive */
.btn {
    background: #007BFF;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #0056b3;
}

/* Basic card styles - Dark Mode Compatible */
.fallback-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 2rem;
    margin: 1rem 0;
    transition: all 0.3s ease;
}

/* Dark mode cards */
html.dark .fallback-card {
    background: rgb(31, 41, 55) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Basic grid - Non-intrusive */
.fallback-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Basic spacing - Less aggressive */
.fallback-py-16 {
    padding: 4rem 0;
}

.fallback-px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Typography - Less aggressive */
.fallback-text-4xl {
    font-size: 2.5rem;
    font-weight: bold;
}

.fallback-text-3xl {
    font-size: 2rem;
    font-weight: bold;
}

.fallback-text-xl {
    font-size: 1.25rem;
}

/* Colors - Dark Mode Compatible */
.fallback-text-blue {
    color: #007BFF;
}

html.dark .fallback-text-blue {
    color: #60A5FA;
}

.fallback-text-gray-900 {
    color: #111827;
}

html.dark .fallback-text-gray-900 {
    color: #F9FAFB !important;
}

.fallback-text-gray-600 {
    color: #6B7280;
}

html.dark .fallback-text-gray-600 {
    color: #D1D5DB !important;
}

/* Responsive */
@media (max-width: 768px) {
    .fallback-grid {
        grid-template-columns: 1fr;
    }
    
    .fallback-text-4xl {
        font-size: 2rem;
    }
    
    .fallback-py-16 {
        padding: 2rem 0;
    }
}

/* Fix navigation padding to prevent title overlap */
.hero-section-fix {
    padding-top: 8rem !important; /* 128px to account for fixed navigation */
}

/* Emergency dark mode fixes if Tailwind fails */
html.dark {
    background: linear-gradient(135deg, rgb(17, 24, 39), rgb(31, 41, 55)) !important;
}

html.dark body {
    background: transparent !important;
    color: rgb(249, 250, 251) !important;
}

/* Navbar dark mode emergency fix */
html.dark nav,
html.dark .bg-white {
    background: rgba(17, 24, 39, 0.95) !important;
}

html.dark nav *,
html.dark .bg-white * {
    color: rgb(249, 250, 251) !important;
}

html.dark nav a:hover,
html.dark .bg-white a:hover {
    color: rgb(96, 165, 250) !important;
}

/* Featured projects cards dark mode emergency fix */
html.dark .bg-white.rounded-2xl,
html.dark [class*="bg-white"] {
    background: rgb(31, 41, 55) !important;
}

html.dark .bg-white.rounded-2xl *,
html.dark [class*="bg-white"] * {
    color: rgb(249, 250, 251) !important;
}

html.dark .text-blue-600 {
    color: rgb(96, 165, 250) !important;
}

html.dark .text-gray-600 {
    color: rgb(209, 213, 219) !important;
}

html.dark .text-gray-900 {
    color: rgb(249, 250, 251) !important;
}
