/* Custom CSS for Re Resources Portfolio */

/* CSS Custom Properties for Theme Colors */
:root {
    --primary-color: #1a1a1a;      /* Dark gray - Contrast ratio 15.8:1 on white */
    --secondary-color: #666666;    /* Medium gray - Contrast ratio 5.74:1 on white (WCAG AA compliant) */
    --accent-color: #2563eb;       /* Blue - Contrast ratio 5.17:1 on white (WCAG AA compliant) */
}

/* Color Contrast Compliance Notes:
 * All color combinations meet WCAG AA standards (minimum 4.5:1 for normal text)
 * - Primary text (#1a1a1a) on white: 15.8:1 ✓
 * - Secondary text (#666666) on white: 5.74:1 ✓
 * - Accent color (#2563eb) on white: 5.17:1 ✓
 * - White text on accent (#2563eb): 5.17:1 ✓
 * - Gray-700 (#374151) on white: 10.7:1 ✓
 * - White text on gray-900 (#111827): 17.4:1 ✓
 */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Skip to Content Link for Accessibility */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Focus Indicators for Keyboard Navigation */
a:focus,
button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Navigation Active State */
.nav-link.active {
    color: var(--accent-color);
    font-weight: 600;
}

/* Hero Section Background */
#hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Ensure text contrast on hero background images */
#hero .relative.z-10 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Dark overlay for hero section to ensure WCAG AA contrast */
#hero .absolute.inset-0 {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Image Lazy Loading */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img[data-src].loaded {
    opacity: 1;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Project and Service Cards */
.project-card,
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover,
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Ensure proper spacing for fixed header */
body {
    padding-top: 80px;
}

/* Mobile Menu Transition */
#mobile-menu {
    transition: max-height 0.3s ease-in-out;
}

/* Print Styles */
@media print {
    header,
    footer {
        display: none;
    }
    
    body {
        padding-top: 0;
    }
}

/* Image Error State */
img.image-error {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
}
