/* ===========================================
   READING PROGRESS INDICATOR
   =========================================== */

.reading-progress {
    position: fixed;
    z-index: 9999;
    overflow: hidden;
    background: rgba(0, 255, 255, 0.1);
}

/* Top position (horizontal) */
.reading-progress-top {
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

/* Bottom position (horizontal) */
.reading-progress-bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

/* Left position (vertical) */
.reading-progress-left {
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

/* Right position (vertical) */
.reading-progress-right {
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
}

/* Gradient fill bar */
.reading-progress-fill {
    transition: width 0.1s ease-out, height 0.1s ease-out;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Horizontal positions (top/bottom) */
.reading-progress-top .reading-progress-fill,
.reading-progress-bottom .reading-progress-fill {
    height: 100%;
    width: 0%;
}

/* Vertical positions (left/right) */
.reading-progress-left .reading-progress-fill,
.reading-progress-right .reading-progress-fill {
    width: 100%;
    height: 0%;
}

/* Signal bars container */
.reading-progress-bars {
    position: absolute;
    display: flex;
    gap: 3px;
    padding: 0 10px;
}

/* Horizontal positions - bars on the right */
.reading-progress-top .reading-progress-bars,
.reading-progress-bottom .reading-progress-bars {
    top: 0;
    right: 20px;
    height: 100%;
    align-items: center;
    flex-direction: row;
}

/* Vertical positions - bars at bottom */
.reading-progress-left .reading-progress-bars,
.reading-progress-right .reading-progress-bars {
    bottom: 20px;
    left: 0;
    width: 100%;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

/* Signal bars */
.signal-bar {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 2px;
    transition: all 0.2s ease;
}

/* Horizontal bars */
.reading-progress-top .signal-bar,
.reading-progress-bottom .signal-bar {
    width: 3px;
    height: 60%;
}

/* Vertical bars */
.reading-progress-left .signal-bar,
.reading-progress-right .signal-bar {
    width: 60%;
    height: 3px;
}

.signal-bar.active {
    background: var(--accent-primary);
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.8);
}

.reading-progress-top .signal-bar.active,
.reading-progress-bottom .signal-bar.active {
    height: 100%;
}

.reading-progress-left .signal-bar.active,
.reading-progress-right .signal-bar.active {
    width: 100%;
}

.signal-bar[data-bar="1"] { transition-delay: 0s; }
.signal-bar[data-bar="2"] { transition-delay: 0.05s; }
.signal-bar[data-bar="3"] { transition-delay: 0.1s; }
.signal-bar[data-bar="4"] { transition-delay: 0.15s; }
.signal-bar[data-bar="5"] { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
    .reading-progress-fill,
    .signal-bar {
        transition: none;
    }
}

/* ===========================================
   DARK MODE (Default - no class needed)
   =========================================== */
/* Default state (no class) uses :root variables which are dark mode */
/* Only add explicit dark-mode styles if needed for specificity */

/* Ensure dark mode elements have proper styling */
body.dark-mode .site-header,
body.dark-mode .site-footer {
    border-color: rgba(232, 230, 227, 0.1);
}

body.dark-mode .site-title a {
    color: var(--text-primary);
}

body.dark-mode .site-description {
    color: rgba(232, 230, 227, 0.7);
}

body.dark-mode .project-card,
body.dark-mode .related-project-card {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(0, 255, 255, 0.2);
    color: var(--text-primary);
}

body.dark-mode .project-card:hover,
body.dark-mode .related-project-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

body.dark-mode .project-title,
body.dark-mode .related-project-title {
    color: var(--accent-primary);
}

body.dark-mode .filter-button {
    background: rgba(0, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.3);
    color: var(--accent-primary);
}

body.dark-mode .filter-button:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--accent-primary);
}

body.dark-mode .filter-button.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

body.dark-mode .meta-tag,
body.dark-mode .related-project-type {
    background: rgba(0, 255, 255, 0.15);
    border-color: rgba(0, 255, 255, 0.3);
    color: var(--accent-primary);
}

body.dark-mode .featured-badge {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

body.dark-mode .obscura-veil-badge,
body.dark-mode .card-obscura-badge {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.15), rgba(0, 255, 255, 0.15));
    border-color: rgba(138, 43, 226, 0.3);
    color: rgba(138, 43, 226, 0.9);
}

body.dark-mode .page-title {
    color: var(--accent-primary);
}

body.dark-mode .entry-content blockquote,
body.dark-mode .page-content blockquote {
    border-left-color: var(--accent-primary);
    background: rgba(0, 255, 255, 0.05);
    color: var(--text-primary);
}

body.dark-mode .post-navigation a,
body.dark-mode .project-navigation a {
    color: var(--accent-primary);
}

body.dark-mode .post-navigation a:hover,
body.dark-mode .project-navigation a:hover {
    color: var(--accent-secondary);
}

body.dark-mode .tags-links a {
    background: rgba(0, 255, 255, 0.15);
    border-color: rgba(0, 255, 255, 0.3);
    color: var(--accent-primary);
}

body.dark-mode .tags-links a:hover {
    background: rgba(0, 255, 255, 0.25);
    border-color: var(--accent-primary);
}

body.dark-mode .project-external-link {
    color: var(--accent-primary);
}

body.dark-mode .project-external-link:hover {
    color: var(--accent-secondary);
}

body.dark-mode .reading-progress {
    background: rgba(0, 255, 255, 0.1);
}

body.dark-mode .reading-progress-fill {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

body.dark-mode .signal-bar {
    background: rgba(0, 255, 255, 0.3);
}

body.dark-mode .signal-bar.active {
    background: var(--accent-primary);
}

body.dark-mode .signal-strength-indicator {
    background: rgba(0, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.3);
    color: var(--accent-primary);
}


body.dark-mode code,
body.dark-mode pre {
    background: rgba(0, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(0, 255, 255, 0.2);
}

body.dark-mode .entry-content code,
body.dark-mode .page-content code {
    background: rgba(0, 255, 255, 0.15);
    color: var(--accent-primary);
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

body.dark-mode .entry-content pre,
body.dark-mode .page-content pre {
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    border: 1px solid rgba(0, 255, 255, 0.2);
    padding: 1rem;
    border-radius: 4px;
}

body.dark-mode table {
    border-color: rgba(0, 255, 255, 0.3);
}

body.dark-mode table th {
    background: rgba(0, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(0, 255, 255, 0.3);
}

body.dark-mode table td {
    border-color: rgba(0, 255, 255, 0.2);
    color: var(--text-primary);
}

body.dark-mode hr {
    border-color: rgba(0, 255, 255, 0.3);
}

body.dark-mode .form-messages.success {
    background: rgba(0, 200, 0, 0.1);
    border-color: #00ff00;
    color: #00ff00;
}

body.dark-mode .form-messages.error {
    background: rgba(200, 0, 0, 0.1);
    border-color: #ff0000;
    color: #ff6666;
}

body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode input[type="search"],
body.dark-mode textarea {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 255, 255, 0.3);
    color: var(--text-primary);
}

body.dark-mode input[type="text"]:focus,
body.dark-mode input[type="email"]:focus,
body.dark-mode input[type="search"]:focus,
body.dark-mode textarea:focus {
    border-color: var(--accent-primary);
    outline-color: var(--accent-primary);
    color: var(--text-primary);
}

body.dark-mode button,
body.dark-mode .button {
    color: var(--bg-primary);
}

body.dark-mode .submit-button {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

body.dark-mode .submit-button:hover {
    background: var(--accent-secondary);
    color: var(--bg-primary);
}

/* ===========================================
   LIGHT MODE (Dark Mode Toggle)
   =========================================== */

body.light-mode {
    --bg-primary: #f5f5f5;
    --text-primary: #0a0a0a;
    --accent-primary: #0066cc;
    --accent-secondary: #cc0066;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* High contrast text in light mode */
body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode h6 {
    color: #000000;
}

body.light-mode p,
body.light-mode .entry-content,
body.light-mode .page-content {
    color: #1a1a1a;
}

body.light-mode a {
    color: var(--accent-primary);
}

body.light-mode a:hover {
    color: #004499;
}

body.light-mode .site-header,
body.light-mode .site-footer {
    border-color: rgba(10, 10, 10, 0.2);
}

body.light-mode .site-title a {
    color: #000000;
}

body.light-mode .site-description {
    color: #333333;
}

body.light-mode .project-card,
body.light-mode .related-project-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 102, 204, 0.3);
    color: #1a1a1a;
}

body.light-mode .project-card:hover,
body.light-mode .related-project-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 102, 204, 0.2);
}

body.light-mode .project-title,
body.light-mode .related-project-title {
    color: var(--accent-primary);
}

body.light-mode .filter-button {
    background: rgba(0, 102, 204, 0.1);
    border-color: rgba(0, 102, 204, 0.3);
    color: var(--accent-primary);
}

body.light-mode .filter-button:hover {
    background: rgba(0, 102, 204, 0.2);
    border-color: var(--accent-primary);
    color: #004499;
}

body.light-mode .filter-button.active {
    background: var(--accent-primary);
    color: #ffffff;
}

body.light-mode .meta-tag,
body.light-mode .related-project-type {
    background: rgba(0, 102, 204, 0.15);
    border-color: rgba(0, 102, 204, 0.4);
    color: var(--accent-primary);
}

body.light-mode .featured-badge {
    background: var(--accent-primary);
    color: #ffffff;
}

body.light-mode .obscura-veil-badge,
body.light-mode .card-obscura-badge {
    background: rgba(204, 0, 102, 0.1);
    border-color: rgba(204, 0, 102, 0.3);
    color: var(--accent-secondary);
}

body.light-mode .page-title {
    color: var(--accent-primary);
}

body.light-mode .entry-content blockquote,
body.light-mode .page-content blockquote {
    border-left-color: var(--accent-primary);
    background: rgba(0, 102, 204, 0.05);
    color: #2a2a2a;
}

body.light-mode .post-navigation a,
body.light-mode .project-navigation a {
    color: var(--accent-primary);
}

body.light-mode .post-navigation a:hover,
body.light-mode .project-navigation a:hover {
    color: #004499;
}

body.light-mode .tags-links a {
    background: rgba(0, 102, 204, 0.15);
    border-color: rgba(0, 102, 204, 0.4);
    color: var(--accent-primary);
}

body.light-mode .tags-links a:hover {
    background: rgba(0, 102, 204, 0.25);
    border-color: var(--accent-primary);
}

body.light-mode .project-external-link {
    color: var(--accent-primary);
}

body.light-mode .project-external-link:hover {
    color: #004499;
}

body.light-mode .reading-progress {
    background: rgba(0, 102, 204, 0.1);
}

body.light-mode .reading-progress-fill {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

body.light-mode .signal-bar {
    background: rgba(0, 102, 204, 0.3);
}

body.light-mode .signal-bar.active {
    background: var(--accent-primary);
}

body.light-mode .signal-strength-indicator {
    background: rgba(0, 102, 204, 0.1);
    border-color: rgba(0, 102, 204, 0.3);
    color: var(--accent-primary);
}


/* Ensure all text elements have proper contrast in light mode */
body.light-mode code,
body.light-mode pre {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
    border-color: rgba(0, 102, 204, 0.2);
}

body.light-mode .entry-content code,
body.light-mode .page-content code {
    background: rgba(0, 102, 204, 0.1);
    color: #004499;
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

body.light-mode .entry-content pre,
body.light-mode .page-content pre {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
    border: 1px solid rgba(0, 102, 204, 0.2);
    padding: 1rem;
    border-radius: 4px;
}

body.light-mode table {
    border-color: rgba(0, 102, 204, 0.3);
}

body.light-mode table th {
    background: rgba(0, 102, 204, 0.1);
    color: #000000;
    border-color: rgba(0, 102, 204, 0.3);
}

body.light-mode table td {
    border-color: rgba(0, 102, 204, 0.2);
    color: #1a1a1a;
}

body.light-mode hr {
    border-color: rgba(0, 102, 204, 0.3);
}

body.light-mode .form-messages.success {
    background: rgba(0, 200, 0, 0.1);
    border-color: #00cc00;
    color: #006600;
}

body.light-mode .form-messages.error {
    background: rgba(200, 0, 0, 0.1);
    border-color: #cc0000;
    color: #990000;
}

body.light-mode input[type="text"],
body.light-mode input[type="email"],
body.light-mode input[type="search"],
body.light-mode textarea {
    background: #ffffff;
    border-color: rgba(0, 102, 204, 0.3);
    color: #1a1a1a;
}

body.light-mode input[type="text"]:focus,
body.light-mode input[type="email"]:focus,
body.light-mode input[type="search"]:focus,
body.light-mode textarea:focus {
    border-color: var(--accent-primary);
    outline-color: var(--accent-primary);
    color: #000000;
}

body.light-mode button,
body.light-mode .button {
    color: #ffffff;
}

body.light-mode .submit-button {
    background: var(--accent-primary);
    color: #ffffff;
}

body.light-mode .submit-button:hover {
    background: #004499;
    color: #ffffff;
}

/* ===========================================
   DARK MODE TOGGLE
   =========================================== */

.dark-mode-toggle-wrapper {
    position: fixed;
    z-index: 1000;
}

/* Corner Toggle Style */
.dark-mode-toggle-wrapper.toggle-style-corner {
    position: fixed;
}

.dark-mode-toggle-wrapper.toggle-position-top-left {
    top: 2rem;
    left: 2rem;
}

.dark-mode-toggle-wrapper.toggle-position-top-right {
    top: 2rem;
    right: 2rem;
}

.dark-mode-toggle-wrapper.toggle-position-bottom-left {
    bottom: 2rem;
    left: 2rem;
}

.dark-mode-toggle-wrapper.toggle-position-bottom-right {
    bottom: 2rem;
    right: 2rem;
}

/* Toggle Switch */
.dark-mode-toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    display: block;
    width: 60px;
    height: 30px;
    background: rgba(0, 255, 255, 0.2);
    border: 2px solid var(--accent-primary);
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 
        0 0 10px rgba(0, 255, 255, 0.3),
        inset 0 0 10px rgba(0, 255, 255, 0.1);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: var(--accent-primary);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.toggle-slider-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 8px;
    font-size: 14px;
    pointer-events: none;
}

.toggle-icon-dark,
.toggle-icon-light {
    opacity: 0;
    transition: opacity 0.3s ease;
    line-height: 1;
}

.toggle-input:checked + .toggle-slider {
    background: rgba(255, 0, 255, 0.2);
    border-color: var(--accent-secondary);
    box-shadow: 
        0 0 10px rgba(255, 0, 255, 0.3),
        inset 0 0 10px rgba(255, 0, 255, 0.1);
}

.toggle-input:checked + .toggle-slider::before {
    transform: translateX(30px);
    background: var(--accent-secondary);
}

.toggle-input:checked + .toggle-slider .toggle-icon-light {
    opacity: 1;
}

.toggle-input:not(:checked) + .toggle-slider .toggle-icon-dark {
    opacity: 1;
}

.dark-mode-toggle-switch:hover .toggle-slider {
    box-shadow: 
        0 0 15px rgba(0, 255, 255, 0.5),
        inset 0 0 10px rgba(0, 255, 255, 0.2);
}

.toggle-input:checked + .toggle-slider:hover {
    box-shadow: 
        0 0 15px rgba(255, 0, 255, 0.5),
        inset 0 0 10px rgba(255, 0, 255, 0.2);
}

.toggle-input:focus + .toggle-slider {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Slide-Out Panel Style */
.dark-mode-toggle-wrapper.toggle-style-slide-out {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.dark-mode-toggle-trigger {
    position: relative;
    width: 50px;
    height: 50px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid var(--accent-primary);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: var(--accent-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 255, 255, 0.2);
}

.dark-mode-toggle-trigger:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: -2px 0 15px rgba(0, 255, 255, 0.4);
}

.dark-mode-toggle-trigger:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}

.dark-mode-toggle-panel {
    position: absolute;
    right: 50px;
    top: 0;
    width: 200px;
    background: rgba(10, 10, 10, 0.95);
    border: 2px solid var(--accent-primary);
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 1rem;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: -2px 0 20px rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.dark-mode-toggle-panel.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.toggle-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.toggle-label {
    font-family: var(--font-header);
    font-size: 0.9rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.toggle-panel-close {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.toggle-panel-close:hover {
    color: var(--accent-secondary);
}

.toggle-panel-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toggle-label-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-top: 0.5rem;
}

.toggle-label-dark,
.toggle-label-light {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.toggle-panel-content {
    position: relative;
}

.toggle-panel-content .toggle-input:checked ~ .toggle-label-text .toggle-label-light,
.toggle-panel-content:has(.toggle-input:checked) .toggle-label-text .toggle-label-light {
    opacity: 1;
    color: var(--accent-secondary);
}

.toggle-panel-content .toggle-input:not(:checked) ~ .toggle-label-text .toggle-label-dark,
.toggle-panel-content:has(.toggle-input:not(:checked)) .toggle-label-text .toggle-label-dark {
    opacity: 1;
    color: var(--accent-primary);
}

/* Light mode adjustments */
body.light-mode .dark-mode-toggle-trigger {
    background: rgba(0, 102, 204, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

body.light-mode .dark-mode-toggle-trigger:hover {
    background: rgba(0, 102, 204, 0.2);
}

body.light-mode .dark-mode-toggle-panel {
    background: rgba(245, 245, 245, 0.95);
    border-color: var(--accent-primary);
}

body.light-mode .toggle-slider {
    background: rgba(0, 102, 204, 0.2);
    border-color: var(--accent-primary);
    box-shadow: 
        0 0 10px rgba(0, 102, 204, 0.3),
        inset 0 0 10px rgba(0, 102, 204, 0.1);
}

body.light-mode .toggle-input:checked + .toggle-slider {
    background: rgba(204, 0, 102, 0.2);
    border-color: var(--accent-secondary);
    box-shadow: 
        0 0 10px rgba(204, 0, 102, 0.3),
        inset 0 0 10px rgba(204, 0, 102, 0.1);
}

@media (prefers-reduced-motion: reduce) {
    .toggle-slider,
    .toggle-slider::before,
    .dark-mode-toggle-panel,
    .dark-mode-toggle-trigger {
        transition: none;
    }
    
    .dark-mode-toggle-trigger:hover {
        transform: none;
    }
}

@media (max-width: 768px) {
    .dark-mode-toggle-wrapper.toggle-position-top-left,
    .dark-mode-toggle-wrapper.toggle-position-top-right,
    .dark-mode-toggle-wrapper.toggle-position-bottom-left,
    .dark-mode-toggle-wrapper.toggle-position-bottom-right {
        top: auto;
        bottom: 1rem;
        right: 1rem;
        left: auto;
    }
    
    .dark-mode-toggle-panel {
        width: 180px;
    }
}

/* ===========================================
   GLITCH EFFECTS
   =========================================== */

/* Chromatic Aberration */
.chromatic-active {
    animation: chromaticAberration 0.3s ease-in-out;
}

@keyframes chromaticAberration {
    0%, 100% {
        text-shadow: 
            0 0 0 var(--accent-primary),
            0 0 0 var(--accent-secondary);
    }
    25% {
        text-shadow: 
            -2px 0 0 var(--accent-primary),
            2px 0 0 var(--accent-secondary);
    }
    50% {
        text-shadow: 
            2px 0 0 var(--accent-primary),
            -2px 0 0 var(--accent-secondary);
    }
    75% {
        text-shadow: 
            -1px 0 0 var(--accent-primary),
            1px 0 0 var(--accent-secondary);
    }
}

/* Image Glitch Effects */
.glitch-image {
    position: relative;
    overflow: hidden;
}

.glitch-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    z-index: 1;
}

.glitch-scanlines.active {
    opacity: 1;
}

.glitch-image.glitch-active {
    filter: contrast(1.2) brightness(1.1);
    animation: imageGlitch 0.3s ease-in-out;
}

@keyframes imageGlitch {
    0%, 100% {
        transform: translate(0);
        filter: contrast(1.2) brightness(1.1);
    }
    20% {
        transform: translate(-2px, 2px);
        filter: contrast(1.3) brightness(1.2) hue-rotate(5deg);
    }
    40% {
        transform: translate(-2px, -2px);
        filter: contrast(1.1) brightness(0.9) hue-rotate(-5deg);
    }
    60% {
        transform: translate(2px, 2px);
        filter: contrast(1.3) brightness(1.2) hue-rotate(5deg);
    }
    80% {
        transform: translate(2px, -2px);
        filter: contrast(1.1) brightness(0.9) hue-rotate(-5deg);
    }
}

/* Random Glitch */
.glitch-random-active {
    animation: randomGlitch 0.2s ease-in-out;
}

@keyframes randomGlitch {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-1px, 1px); }
    20% { transform: translate(1px, -1px); }
    30% { transform: translate(-1px, -1px); }
    40% { transform: translate(1px, 1px); }
    50% { transform: translate(-1px, 1px); }
    60% { transform: translate(1px, -1px); }
    70% { transform: translate(-1px, -1px); }
    80% { transform: translate(1px, 1px); }
    90% { transform: translate(-1px, 1px); }
}

@media (prefers-reduced-motion: reduce) {
    .chromatic-active,
    .glitch-image.glitch-active,
    .glitch-random-active {
        animation: none;
    }
    
    .glitch-scanlines {
        transition: none;
    }
}

/* ===========================================
   CRYPTOGRAPHIC TEXT EFFECTS
   =========================================== */

.crypto-text {
    position: relative;
    display: inline-block;
    /* Font will be monospace only during encryption/decryption */
}

/* Encrypted state: use monospace font for the "code" aesthetic */
.crypto-text.crypto-encoded {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1em;
    color: rgba(0, 255, 255, 0.6);
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
    font-weight: 600;
}

/* Decrypting state: still monospace during animation */
.crypto-text.decrypting {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1em;
    animation: cryptoDecrypt 0.1s ease-in-out infinite;
    color: rgba(0, 255, 255, 0.8);
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

/* Revealed characters (during and after decryption) - use theme font */
.crypto-text .crypto-revealed {
    font-family: inherit; /* Use the theme's font */
    letter-spacing: normal; /* Reset letter spacing */
}

/* Headers with crypto-text should use header font, not inherit body font */
h1.crypto-text .crypto-revealed,
h2.crypto-text .crypto-revealed,
h3.crypto-text .crypto-revealed,
h4.crypto-text .crypto-revealed,
h5.crypto-text .crypto-revealed,
h6.crypto-text .crypto-revealed,
.page-title.crypto-text .crypto-revealed {
    font-family: var(--font-header) !important; /* Use header font for headers */
}

/* Decrypted state: inherit theme font, remove monospace styling */
.crypto-text.decrypted {
    font-family: inherit; /* Use the theme's font */
    letter-spacing: normal; /* Reset letter spacing */
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
    animation: cryptoReveal 0.5s ease-out;
}

/* Headers with crypto-text should use header font when decrypted */
h1.crypto-text.decrypted,
h2.crypto-text.decrypted,
h3.crypto-text.decrypted,
h4.crypto-text.decrypted,
h5.crypto-text.decrypted,
h6.crypto-text.decrypted,
.page-title.crypto-text.decrypted {
    font-family: var(--font-header) !important; /* Use header font for headers */
}

@keyframes cryptoDecrypt {
    0%, 100% {
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        opacity: 0.85;
        filter: brightness(1.2);
    }
}

@keyframes cryptoReveal {
    0% {
        opacity: 0.8;
        transform: scale(0.98);
        text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
    }
}

/* Light mode adjustments */
body.light-mode .crypto-text.crypto-encoded {
    color: rgba(0, 102, 204, 0.6);
    text-shadow: 0 0 5px rgba(0, 102, 204, 0.3);
}

body.light-mode .crypto-text.decrypting {
    color: rgba(0, 102, 204, 0.8);
    text-shadow: 0 0 8px rgba(0, 102, 204, 0.5);
}

body.light-mode .crypto-text.decrypted {
    font-family: inherit; /* Ensure theme font in light mode too */
    letter-spacing: normal;
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(0, 102, 204, 0.6);
}

/* Headers with crypto-text in light mode should also use header font */
body.light-mode h1.crypto-text.decrypted,
body.light-mode h2.crypto-text.decrypted,
body.light-mode h3.crypto-text.decrypted,
body.light-mode h4.crypto-text.decrypted,
body.light-mode h5.crypto-text.decrypted,
body.light-mode h6.crypto-text.decrypted,
body.light-mode .page-title.crypto-text.decrypted {
    font-family: var(--font-header) !important; /* Use header font for headers */
}

body.light-mode h1.crypto-text .crypto-revealed,
body.light-mode h2.crypto-text .crypto-revealed,
body.light-mode h3.crypto-text .crypto-revealed,
body.light-mode h4.crypto-text .crypto-revealed,
body.light-mode h5.crypto-text .crypto-revealed,
body.light-mode h6.crypto-text .crypto-revealed,
body.light-mode .page-title.crypto-text .crypto-revealed {
    font-family: var(--font-header) !important; /* Use header font for headers */
}

@media (prefers-reduced-motion: reduce) {
    .crypto-text.decrypting,
    .crypto-text.decrypted {
        animation: none;
    }
}

/* ===========================================
   SIGNAL STRENGTH INDICATOR
   =========================================== */

.signal-strength-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(0, 255, 255, 0.05));
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 6px;
    font-family: var(--font-header);
    font-size: 0.75rem;
    color: var(--accent-primary);
    box-shadow: 
        0 2px 8px rgba(0, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    line-height: 1;
}

.signal-strength-indicator:hover {
    border-color: var(--accent-primary);
    box-shadow: 
        0 4px 12px rgba(0, 255, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.signal-label {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    font-size: 0.7rem;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

.signal-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    padding: 0.15rem 0;
    height: 20px;
    position: relative;
}

.signal-bar-indicator {
    width: 6px;
    min-width: 6px;
    background: rgba(0, 255, 255, 0.25);
    border: 1px solid rgba(0, 255, 255, 0.4);
    border-radius: 3px 3px 2px 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.signal-bar-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 255, 255, 0.4) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.signal-bar-indicator.active::before {
    opacity: 1;
}

/* Progressive bar heights with consistent spacing */
.signal-bar-indicator[data-bar="1"] { 
    height: 6px;
    margin-bottom: 0;
}

.signal-bar-indicator[data-bar="2"] { 
    height: 9px;
    margin-bottom: 0;
}

.signal-bar-indicator[data-bar="3"] { 
    height: 12px;
    margin-bottom: 0;
}

.signal-bar-indicator[data-bar="4"] { 
    height: 15px;
    margin-bottom: 0;
}

.signal-bar-indicator[data-bar="5"] { 
    height: 18px;
    margin-bottom: 0;
}

.signal-bar-indicator.active {
    background: linear-gradient(180deg, var(--accent-primary) 0%, rgba(0, 255, 255, 0.9) 50%, rgba(0, 255, 255, 0.7) 100%);
    border-color: var(--accent-primary);
    box-shadow: 
        0 0 6px rgba(0, 255, 255, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 255, 255, 0.2);
    animation: signalPulse 2s ease-in-out infinite;
    transform: translateY(0);
}

@keyframes signalPulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 
            0 0 6px rgba(0, 255, 255, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.3),
            inset 0 -1px 0 rgba(0, 255, 255, 0.2);
    }
    50% {
        opacity: 0.9;
        box-shadow: 
            0 0 10px rgba(0, 255, 255, 0.9),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            inset 0 -1px 0 rgba(0, 255, 255, 0.3);
    }
}

/* Flicker effect for highest bar - only when flickering class is present */
.signal-bar-indicator.active.highest-bar {
    animation: signalPulse 2s ease-in-out infinite;
}

.signal-bar-indicator.active.highest-bar.flickering {
    animation: signalPulse 2s ease-in-out infinite, signalFlicker 0.15s ease-in-out infinite;
}

@keyframes signalFlicker {
    0%, 100% {
        opacity: 1;
        box-shadow: 
            0 0 8px rgba(0, 255, 255, 0.8),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            inset 0 -1px 0 rgba(0, 255, 255, 0.3);
    }
    50% {
        opacity: 0.7;
        box-shadow: 
            0 0 12px rgba(0, 255, 255, 1),
            inset 0 1px 0 rgba(255, 255, 255, 0.5),
            inset 0 -1px 0 rgba(0, 255, 255, 0.4);
    }
}

.signal-quality {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
    margin-left: 0.5rem;
    padding-left: 0.75rem;
    border-left: 1px solid rgba(0, 255, 255, 0.3);
}

/* Style Variations */
.signal-strength-indicator.signal-style-compact {
    padding: 0.5rem 1rem;
    gap: 0.6rem;
}

.signal-strength-indicator.signal-style-expanded {
    padding: 0.75rem 1.5rem;
    gap: 1rem;
}

.signal-strength-indicator.signal-style-minimal {
    padding: 0.4rem 0.8rem;
    gap: 0.5rem;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.signal-style-minimal .signal-label {
    display: none;
}

/* Position Variations */
.signal-strength-indicator.signal-position-above-header {
    width: 100%;
    display: flex;
    justify-content: center;
    border-radius: 0 0 6px 6px;
    border-left: none;
    border-right: none;
    border-top: none;
    margin-bottom: 0;
}

.signal-strength-indicator.signal-position-header {
    margin-left: auto;
}

.signal-strength-indicator.signal-position-floating {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 999;
}

.signal-strength-indicator.signal-position-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    display: flex;
    justify-content: center;
    border-radius: 0 0 6px 6px;
    border-left: none;
    border-right: none;
    border-top: none;
    margin-bottom: 1rem;
}

.signal-strength-indicator.signal-position-footer {
    margin: 1rem auto 0;
    display: flex;
    justify-content: center;
}

/* Light Mode Adjustments */
body.light-mode .signal-strength-indicator {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1), rgba(0, 102, 204, 0.05));
    border-color: rgba(0, 102, 204, 0.3);
    box-shadow: 
        0 2px 8px rgba(0, 102, 204, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

body.light-mode .signal-strength-indicator:hover {
    border-color: var(--accent-primary);
    box-shadow: 
        0 4px 12px rgba(0, 102, 204, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

body.light-mode .signal-bar-indicator {
    background: rgba(0, 102, 204, 0.25);
    border-color: rgba(0, 102, 204, 0.4);
}

body.light-mode .signal-bar-indicator.active {
    background: linear-gradient(180deg, var(--accent-primary), rgba(0, 102, 204, 0.8));
    border-color: var(--accent-primary);
    box-shadow: 
        0 0 6px rgba(0, 102, 204, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

body.light-mode .signal-bar-indicator.active.highest-bar {
    animation: signalPulse 2s ease-in-out infinite;
}

body.light-mode .signal-bar-indicator.active.highest-bar.flickering {
    animation: signalPulse 2s ease-in-out infinite, signalFlickerLight 0.15s ease-in-out infinite;
}

@keyframes signalFlickerLight {
    0%, 100% {
        opacity: 1;
        box-shadow: 
            0 0 8px rgba(0, 102, 204, 0.8),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
    50% {
        opacity: 0.7;
        box-shadow: 
            0 0 12px rgba(0, 102, 204, 1),
            inset 0 1px 0 rgba(255, 255, 255, 0.6);
    }
}

body.light-mode .signal-quality {
    border-left-color: rgba(0, 102, 204, 0.3);
}

@media (prefers-reduced-motion: reduce) {
    .signal-bar-indicator,
    .signal-bar-indicator.active,
    .signal-bar-indicator.active.highest-bar,
    .signal-bar-indicator.active.highest-bar.flickering {
        animation: none;
        transition: none;
    }
    
    .signal-strength-indicator {
        transition: none;
    }
}

@media (max-width: 768px) {
    .signal-strength-indicator.signal-position-floating {
        top: 1rem;
        right: 1rem;
        padding: 0.5rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .signal-strength-indicator.signal-style-expanded {
        padding: 0.6rem 1rem;
        gap: 0.75rem;
    }
    
    .signal-quality {
        display: none;
    }
}

.interference-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 255, 0.03) 2px,
        rgba(0, 255, 255, 0.03) 4px
    );
    animation: interferenceFlicker 0.1s ease-in-out infinite;
    opacity: 0.3;
}

@keyframes interferenceFlicker {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
    .signal-bar-indicator.active,
    .signal-bar-indicator.active.highest-bar,
    .signal-bar-indicator.active.highest-bar.flickering,
    .interference-pattern {
        animation: none;
    }
}

/* ===========================================
   TERMINAL MODE
   =========================================== */

body.terminal-mode {
    font-family: 'Courier New', 'Share Tech Mono', monospace;
    background: #000;
    color: #00ff00;
}

body.terminal-mode .terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 0, 0.03),
        rgba(0, 255, 0, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
}

body.terminal-mode .terminal-prompt {
    font-family: 'Courier New', monospace;
    color: #00ff00;
    margin-bottom: 1rem;
}

body.terminal-mode .prompt-user {
    color: #00ff00;
}

body.terminal-mode .prompt-path {
    color: #00ffff;
}

body.terminal-mode .terminal-nav a,
body.terminal-mode .terminal-link {
    color: #00ff00;
    text-decoration: none;
}

body.terminal-mode .terminal-nav a:hover,
body.terminal-mode .terminal-link:hover {
    background: rgba(0, 255, 0, 0.1);
    text-decoration: underline;
}

body.terminal-mode .terminal-shortcuts-help {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00ff00;
    padding: 2rem;
    z-index: 10000;
    color: #00ff00;
    font-family: 'Courier New', monospace;
}

body.terminal-mode .terminal-shortcuts-help kbd {
    background: rgba(0, 255, 0, 0.2);
    padding: 0.25rem 0.5rem;
    border: 1px solid #00ff00;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .terminal-typewriter {
        animation: none;
    }
}

/* ===========================================
   SOCIAL MEDIA ICONS
   =========================================== */

.social-media-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin: 1rem 0;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--text-primary);
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.social-icon:hover::before,
.social-icon:focus::before {
    left: 100%;
}

.social-icon:hover,
.social-icon:focus {
    color: var(--accent-primary);
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

.social-icon:active {
    transform: translateY(0);
}

.social-icon i {
    font-size: 1.25rem;
    z-index: 1;
}

.social-icon .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Header Social Icons */
.social-header {
    margin-top: 1rem;
}

/* Footer Social Icons */
.social-footer {
    margin-bottom: 1.5rem;
    justify-content: center;
}

/* Post/Project Header Social Icons */
.social-post-header,
.social-project-header {
    margin-bottom: 1rem;
}

/* ===========================================
   SOCIAL SHARE BUTTONS
   =========================================== */

.social-share-buttons {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 4px;
}

.share-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.share-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.share-button:hover::before,
.share-button:focus::before {
    left: 100%;
}

.share-button:hover,
.share-button:focus {
    color: var(--accent-primary);
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

.share-button:active {
    transform: translateY(0);
}

.share-button i {
    font-size: 1.1rem;
    z-index: 1;
}

.share-button span {
    z-index: 1;
}

/* Specific share button styles */
.share-x:hover,
.share-x:focus {
    color: #000000;
    background: rgba(0, 0, 0, 0.1);
    border-color: #000000;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

.share-facebook:hover,
.share-facebook:focus {
    color: #1877f2;
    background: rgba(24, 119, 242, 0.1);
    border-color: #1877f2;
    box-shadow: 0 0 15px rgba(24, 119, 242, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .social-media-icons {
        gap: 0.75rem;
    }
    
    .social-icon {
        width: 2.25rem;
        height: 2.25rem;
    }
    
    .social-icon i {
        font-size: 1.1rem;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-button {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .social-icon,
    .share-button {
        transition: none;
    }
    
    .social-icon::before,
    .share-button::before {
        display: none;
    }
    
    .social-icon:hover,
    .social-icon:focus,
    .share-button:hover,
    .share-button:focus {
        transform: none;
    }
}

