/* An opt-in, page-local easter egg. The normal theme stays untouched. */
:root[data-matrix="true"] {
    background: #020805;
    --bg: #020805;
    --surface: rgba(5, 20, 11, .94);
    --surface-raised: rgba(12, 34, 19, .96);
    --text: #d4ffdf;
    --muted: #a0cbaa;
    --subtle: #7fae8a;
    --line: #28583a;
    --accent: #45ff82;
    --accent-ink: #031b0b;
    --purple: #b4ff87;
    --blue: #80f7af;
    --nav: rgba(6, 23, 13, .97);
    --shadow: 0 22px 70px #0006;
}

:root[data-matrix="true"] body { isolation: isolate; background: transparent; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
:root[data-matrix="true"] .workspace-file { box-shadow: inset 0 2px 12px #45ff8208; }
:root[data-matrix="true"] .workspace-path { color: var(--accent); }
:root[data-matrix="true"] .skill-badge { --badge-ink: var(--accent); }
:root[data-matrix="true"] .site-footer { background: var(--surface); }

.matrix-rain {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: .5;
}

.matrix-controls {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: calc(100% - 32px);
    padding-left: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #06170d;
    color: var(--accent);
    box-shadow: 0 6px 24px #0005;
    font: 400 .75rem/1.5 var(--mono);
}
.matrix-notice { min-width: 0; overflow-wrap: anywhere; }
.matrix-exit {
    min-width: 48px;
    min-height: 44px;
    padding: 10px 12px;
    border-left: 1px solid var(--line);
    border-radius: 0 5px 5px 0;
    color: var(--text);
    font: inherit;
}
.matrix-exit:hover, .matrix-exit:focus-visible { color: var(--accent-ink); background: var(--accent); }
.matrix-exit:focus-visible { outline-offset: -3px; }

@media (prefers-reduced-motion: reduce) {
    .matrix-rain { opacity: .28; }
}
