/* ========================================
   UTILITIES
   Utility classes and global styles
   ======================================== */

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

/* Selection Color */
::selection {
    background-color: var(--primary-color);
    color: white;
}

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

/* Utility Classes */
.hidden {
    display: none !important;
}

.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;
}

/* ========================================
   READING PROGRESS BAR
   Thin bar at top of header showing scroll progress
   ======================================== */

.reading-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color), var(--accent-color));
    background-size: 200% auto;
    transition: width 0.1s linear;
    z-index: 1001;
    pointer-events: none;
}

[data-theme="light"] .reading-progress {
    background: linear-gradient(90deg, #0f766e, #14b8a6, #0891b2);
    background-size: 200% auto;
}
