:root {
    /* Light Mode (Agency Pro - Day) - Kept as backup/toggle */
    --c-paper-bg: #dbe2e8;
    /* Steel Grey / Official Desk */
    --c-paper-light: #ffffff;
    /* Clean White Paper */
    --c-ink: #1e293b;
    /* Slate 800 - Professional Navy/Black */
    --c-ink-faded: #64748b;
    /* Slate 500 */
    --c-stamp: #dc2626;
    /* Vivid Red */
    --c-highlight: rgba(255, 255, 0, 0.25);
    /* High-vis Yellow */
    --shadow-paper: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    /* Clean drop shadow */
    --grain-opacity: 0.04;
    /* Subtle grain */
    --filter-blend: multiply;
}

.dark {
    /* Dark Mode (Secret Agency - Black Ops) */
    --c-paper-bg: #000000;
    /* Infinite Black */
    --c-paper-light: #111111;
    /* Matte Charcoal */
    --c-ink: #E5E5E5;
    /* Platinum/Silver Text */
    --c-ink-faded: #525252;
    /* Dark Grey info */
    --c-stamp: #bf1a1a;
    /* Blood/Dark Red */
    --c-highlight: rgba(255, 0, 0, 0.2);
    /* Red redacted style */
    --shadow-paper: 0 0 40px rgba(0, 0, 0, 1);
    /* Deep shadow */
    --grain-opacity: 0.12;
    /* Gritty texture */
    --filter-blend: overlay;
}

body {
    background-color: var(--c-paper-bg);
    color: var(--c-ink);
    transition: background-color 0.5s ease, color 0.5s ease;
}

.paper-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="1"/%3E%3C/svg%3E');
    opacity: var(--grain-opacity);
    mix-blend-mode: var(--filter-blend);
}

.typewriter-cursor::after {
    content: '_';
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Smooth transition for theme toggle */
*,
*::before,
*::after {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}