/* SEO and Performance Optimizations */

/* Critical CSS for above-the-fold content */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Font display optimization */
@font-face {
    font-family: 'Roboto';
    font-display: swap;
    /* Improves loading performance */
}

@font-face {
    font-family: 'Raleway';
    font-display: swap;
}

@font-face {
    font-family: 'Ubuntu';
    font-display: swap;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Lazy loading support */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Core Web Vitals optimizations */
.hero-img img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Reduce layout shift */
.service-item {
    min-height: 200px;
}

.portfolio-item {
    min-height: 300px;
}

/* Accessibility improvements */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px 12px;
    text-decoration: none;
    z-index: 9999;
    border-radius: 4px;
    font-size: 14px;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

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

/* Focus indicators for better accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #ff9800;
    outline-offset: 2px;
}

/* Optimize animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Responsive font sizes for better mobile experience */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }
}