/*
* Portfolio Website - Accessibility Styles
* Additional styles to improve accessibility
* Version: 1.0
* Last Modified: August 24, 2025
*/

/* ============================================
   Accessibility Improvements
============================================ */

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

/* Focus styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
[tabindex]:focus {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* Better keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    box-shadow: 0 0 0 3px var(--color-primary-transparent);
}

/* Skip link for keyboard navigation */
.skip-link {
    position: absolute;
    top: -50px;
    left: 10px;
    padding: 8px 15px;
    background-color: var(--color-primary);
    color: var(--color-background);
    border-radius: var(--border-radius-sm);
    z-index: var(--z-header);
    transition: top 0.3s;
}

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

/* High contrast mode adjustments */
@media (forced-colors: active) {
    .btn,
    .nav-link,
    .project-link,
    .contact-icon,
    .theme-btn {
        border: 1px solid currentColor;
    }

    .progress-fill {
        background-color: Highlight;
    }
}

/* Improved label styling for switches */
.switch-container {
    display: flex;
    align-items: center;
}

.switch-label {
    margin-left: 10px;
    cursor: pointer;
}

/* Improved ARIA state indicators */
[aria-expanded="true"] .expand-icon::before {
    content: "\f077"; /* Font Awesome chevron up */
}

[aria-expanded="false"] .expand-icon::before {
    content: "\f078"; /* Font Awesome chevron down */
}

/* Improved focus indication for card components */
.skill-card:focus-within,
.project-card:focus-within,
.timeline-content:focus-within {
    box-shadow: 0 0 0 3px var(--color-primary);
}

/* Helper for screen readers to announce dynamic content changes */
.live-region {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
