/* ==================================================================
   UnProductive™ Anti-Productivity Suite
   "Enterprise-grade software for accomplishing nothing."
   ================================================================== */

/* ---------- CSS VARIABLES ---------- */
:root {
    --acid:     #ccff00;
    --magenta:  #ff00ff;
    --cyan:     #00ffff;
    --void:     #050505;
    --concrete: #1a1a1a;
    --sidebar-w: 240px;
    --footer-h: 56px;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }

html, body {
    height: 100%;
    overflow: hidden; /* no outer scrollbar — content scrolls inside .main-content */
}

body {
    background-color: var(--void);
    color: #d1d5db;
    font-family: 'Space Mono', monospace;
    line-height: 1.6;
    /* NO custom cursor */
}

::selection { background: var(--acid); color: #000; }

/* ---------- NOISE OVERLAY ---------- */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 200;
    opacity: 0.04;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- THREE.JS CANVAS ---------- */
#three-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ---------- APP SHELL ---------- */
.app-shell {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
    width: 60px;
    flex-shrink: 0;
    height: 100%;
    border-right: 1px solid rgba(255,255,255,0.07);
    background: rgba(5,5,5,0.90);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1.5rem;
    z-index: 50;
    transition: width 0.3s ease;
    overflow: hidden;
    box-shadow: inset -1px 0 20px rgba(255,255,255,0.01);
    position: relative;
}

.sidebar:hover {
    width: var(--sidebar-w);
}

/* collapsed brand label */
.sidebar-brand-collapsed {
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    color: var(--acid);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    white-space: nowrap;
    position: absolute;
    top: 4.5rem;
    left: 50%;
    transform: translateX(-50%) rotate(180deg);
    transition: opacity 0.2s;
    pointer-events: none;
}

.sidebar:hover .sidebar-brand-collapsed { opacity: 0; }

/* mobile hamburger (hidden on desktop) */
.nav-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 300;
    background: var(--concrete);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

/* sidebar contents  */
.sidebar-content {
    opacity: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: var(--sidebar-w);
    padding: 1rem 1.5rem 2rem;
    height: 100%;
    transition: opacity 0.25s;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar:hover .sidebar-content {
    opacity: 1;
    pointer-events: auto;
}

/* nav links */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #9ca3af;
    padding: 0.5rem 0.5rem;
    border: 1px solid transparent;
    width: 100%;
    transition: color 0.15s, border-color 0.15s;
    text-decoration: none;
}
.nav-link:hover { color: var(--acid); border-color: var(--acid); }

/* ---------- MAIN WRAPPER & CONTENT ---------- */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    min-width: 0;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2rem 2rem 1.5rem;
    position: relative;
    /* breathing room above footer */
    padding-bottom: calc(var(--footer-h) + 1rem);
}

/* Thin, unobtrusive scrollbar */
.main-content::-webkit-scrollbar { width: 4px; }
.main-content::-webkit-scrollbar-track { background: transparent; }
.main-content::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }
.main-content::-webkit-scrollbar-thumb:hover { background: var(--acid); }

/* ---------- PAGE HEADER ---------- */
.page-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 10;
}
@media (min-width: 768px) {
    .page-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 8vw, 6rem);
    color: white;
    letter-spacing: -0.04em;
    line-height: 1;
    font-style: italic;
    font-weight: 900;
}

.clock-block { text-align: left; }
@media (min-width: 768px) { .clock-block { text-align: right; } }

/* ---------- TOGGLE BUTTON ---------- */
.toggle-btn {
    width: 44px;
    height: 24px;
    background: var(--acid);
    border-radius: 9999px;
    border: 1px solid rgba(255,255,255,0.15);
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}
.toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #000;
    border-radius: 9999px;
    transition: left 0.2s;
}

/* ---------- BENTO GRID ---------- */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    position: relative;
    z-index: 10;
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(12, 1fr);
    }
    .w1 { grid-column: span 8; }
    .w2 { grid-column: span 4; }
    .w3 { grid-column: span 5; }
    .w4 { grid-column: span 7; }
    .w5 { grid-column: span 6; }
    .w6 { grid-column: span 6; }
    .w7 { grid-column: span 4; }
    .w8 { grid-column: span 8; }
}

/* ---------- WIDGET BASE ---------- */
.widget {
    background: var(--concrete);
    border: 1px solid rgba(255,255,255,0.07);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease-out, box-shadow 0.25s ease;
    /* Localized 3D physics */
    --local-mouse-x: 0;
    --local-mouse-y: 0;
    transform-style: preserve-3d;
    will-change: transform;
}

.widget:hover {
    z-index: 20;
    transform: perspective(900px)
               rotateX(calc(var(--local-mouse-y) * -12deg))
               rotateY(calc(var(--local-mouse-x) * 12deg))
               translateZ(20px);
    box-shadow: 0 24px 48px -12px rgba(0,0,0,0.8);
}

/* Widget-specific backgrounds */
.w1 { background: var(--concrete); border-color: rgba(255,255,255,0.08); }
.w2 { background: var(--void); border: 2px solid var(--magenta); }
.w3 { background: #080808; border-color: rgba(255,255,255,0.04); }
.w4 { background: var(--concrete); border-top: 6px solid var(--acid); }
.w5 { background: linear-gradient(135deg, #050505 0%, #0b0a00 100%); border-color: rgba(204,255,0,0.15); }
.w6 { background: #070707; border-color: rgba(255,255,255,0.04); }
.w7 { background: var(--concrete); border: 1px solid rgba(255,0,255,0.15); }
.w8 { background: var(--void); border-color: rgba(255,255,255,0.04); }

.widget-icon-bg {
    position: absolute;
    top: 1rem; right: 1rem;
    color: rgba(255,255,255,0.08);
    pointer-events: none;
    transition: color 0.2s;
}
.w1:hover .widget-icon-bg { color: rgba(204,255,0,0.3); }

.widget-title {
    font-size: 1.15rem;
    color: white;
    font-weight: 700;
    margin-bottom: 0.5rem;
    pointer-events: none;
}
.widget-desc {
    font-size: 0.75rem;
    color: #6b7280;
    max-width: 32rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 10;
    pointer-events: none;
    line-height: 1.7;
}

/* ---------- EVASIVE BUTTON ---------- */
.evasion-zone {
    position: relative;
    width: 100%;
    min-height: 130px;
    flex: 1;
    border: 1px dashed rgba(255,255,255,0.12);
    overflow: hidden;
    z-index: 20;
}

.evasive-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    color: black;
    padding: 0.6rem 2rem;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 6px 6px 0 var(--acid);
    border: none;
    transition: top 0.1s cubic-bezier(0.25,0.46,0.45,0.94),
                left 0.1s cubic-bezier(0.25,0.46,0.45,0.94),
                background 0.15s, color 0.15s, transform 0.15s;
    z-index: 30;
    white-space: nowrap;
}

.evasion-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.08);
    font-size: 0.65rem;
    text-align: center;
    padding: 1rem;
    pointer-events: none;
    line-height: 1.6;
}

/* ---------- THREE.JS WIDGET ---------- */
.three-widget-container {
    flex: 1;
    min-height: 160px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.three-widget-container canvas { display: block; }

/* ---------- THOUGHT SHREDDER ---------- */
.shredder-textarea {
    width: 100%;
    height: 7rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255,255,255,0.12);
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-style: italic;
    outline: none;
    resize: none;
    padding: 0.5rem;
    transition: border-color 0.2s;
    position: relative;
    z-index: 10;
}
.shredder-textarea:focus { border-color: var(--cyan); }
.shredder-textarea::placeholder { color: #374151; }

@keyframes delete-flash {
    0%   { filter: blur(0); transform: skew(0deg);  background: transparent; color: white; }
    25%  { filter: blur(2px); transform: skew(-18deg); background: rgba(255,0,0,0.2); color: var(--magenta); }
    50%  { filter: blur(6px); transform: skew(18deg) scaleY(0.15); background: red; color: transparent; }
    75%  { filter: blur(2px); transform: skew(-8deg); background: rgba(255,0,0,0.1); color: var(--acid); }
    100% { filter: blur(0); transform: skew(0deg);  background: transparent; color: white; }
}
.shredding { animation: delete-flash 0.45s forwards cubic-bezier(0.25,0.46,0.45,0.94); }

.btn-cyan {
    background: var(--cyan);
    color: black;
    padding: 0.4rem 1.1rem;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    transition: background 0.15s, transform 0.1s;
    box-shadow: 0 4px 14px rgba(0,255,255,0.3);
}
.btn-cyan:hover   { background: white; transform: translateY(-2px); }
.btn-cyan:active  { transform: translateY(0) scale(0.96); }

/* ---------- ANTI-LEDGER ---------- */
.anti-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--void);
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.07);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.anti-item:hover { border-color: var(--acid); }
.anti-item[data-accent="magenta"]:hover { border-color: var(--magenta); }
.anti-item[data-accent="cyan"]:hover    { border-color: var(--cyan); }

.anti-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
    position: relative;
}
.anti-item:hover .anti-checkbox                             { background: var(--acid); border-color: var(--acid); }
.anti-item[data-accent="magenta"]:hover .anti-checkbox      { background: var(--magenta); border-color: var(--magenta); }
.anti-item[data-accent="cyan"]:hover .anti-checkbox         { background: var(--cyan); border-color: var(--cyan); }

.anti-label {
    font-size: 0.8rem;
    color: #d1d5db;
    transition: text-decoration 0.2s, opacity 0.2s;
    flex: 1;
}
.anti-blur { font-family: 'Space Mono', monospace; opacity: 0.45; }
.anti-item:hover .anti-blur { opacity: 0.9; filter: blur(1px); }
.anti-item:hover .anti-label { text-decoration: line-through; text-decoration-color: var(--acid); }

.anti-status {
    font-size: 0.65rem;
    color: #4b5563;
    margin-left: auto;
    flex-shrink: 0;
    transition: color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.anti-item:hover .anti-status { color: var(--acid); }
.anti-item[data-accent="magenta"]:hover .anti-status { color: var(--magenta); }
.anti-item[data-accent="cyan"]:hover .anti-status    { color: var(--cyan); }

/* ---------- AI ADVISOR WIDGET ---------- */
.ai-glow {
    position: absolute;
    top: -20px; right: -20px;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(204,255,0,0.08), transparent 70%);
    pointer-events: none;
}

.ai-output {
    flex: 1;
    background: rgba(26,26,26,0.6);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 0.75rem 0.75rem 2rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    min-height: 80px;
    position: relative;
    margin-bottom: 0.75rem;
}
#ai-advice-text { transition: opacity 0.3s, color 0.4s; }

.ai-btn {
    width: 100%;
    background: var(--acid);
    color: black;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.6rem 1rem;
    border: none;
    box-shadow: 6px 6px 0 rgba(204,255,0,0.3);
    transition: background 0.15s, transform 0.1s;
    overflow: hidden;
}
.ai-btn:hover   { background: white; transform: translateY(-2px); }
.ai-btn:active  { transform: translateY(0) scale(0.97); }
.ai-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- VIBE TERMINAL ---------- */
.vibe-terminal {
    background: black;
    border: 1px solid rgba(74,222,128,0.15);
    padding: 0.75rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    flex: 1;
    overflow-y: auto;
    max-height: 160px;
    min-height: 120px;
    line-height: 1.7;
    scroll-behavior: smooth;
}
.vibe-terminal::-webkit-scrollbar { width: 3px; }
.vibe-terminal::-webkit-scrollbar-thumb { background: #1a2a1a; }

.t-dim  { color: #374151; }
.t-ok   { color: #4ade80; }
.t-warn { color: #fbbf24; }
.t-err  { color: #ef4444; }
.t-info { color: #60a5fa; }
.t-sys  { color: var(--magenta); }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.terminal-cursor { animation: blink 1s step-start infinite; font-weight: 700; color: #4ade80; }

.terminal-input {
    background: var(--concrete);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0.45rem 0.75rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: white;
    outline: none;
    transition: border-color 0.15s;
    min-width: 0;
}
.terminal-input:focus { border-color: #4ade80; }
.terminal-input::placeholder { color: #374151; }

.terminal-run-btn {
    background: #052805;
    color: #4ade80;
    border: 1px solid rgba(74,222,128,0.15);
    padding: 0.45rem 1rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.terminal-run-btn:hover { background: #073d07; border-color: #4ade80; }

/* ---------- PRODUCTIVITY DONUT ---------- */
.donut-wrapper {
    width: 140px;
    height: 140px;
    position: relative;
    margin: 0 auto 1rem;
}
.donut-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#donut-arc {
    filter: drop-shadow(0 0 5px #ff00ff);
    transition: stroke-dasharray 1s ease;
}

/* ---------- MOTIVATIONAL SABOTEUR ---------- */
.w8 { flex-direction: row; align-items: center; gap: 2rem; flex-wrap: wrap; }
.saboteur-icon {
    font-size: 5rem;
    line-height: 1;
    flex-shrink: 0;
    animation: icon-pulse 2s ease-in-out infinite alternate;
    color: var(--acid);
}
@keyframes icon-pulse {
    0%   { transform: scale(1) rotate(-3deg); filter: drop-shadow(0 0 10px rgba(204,255,0,0.3)); }
    100% { transform: scale(1.08) rotate(3deg); filter: drop-shadow(0 0 20px rgba(204,255,0,0.6)); }
}
#motivational-quote { transition: opacity 0.3s, transform 0.3s; }

.quote-btn {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    background: var(--concrete);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0.45rem 0.9rem;
    transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.quote-btn:hover { color: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 12px rgba(0,255,255,0.2); }

/* ---------- GLITCH TEXT ---------- */
.text-glitch { position: relative; display: inline-block; }
.text-glitch::before,
.text-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    background: transparent;
}
.text-glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff0000;
    clip: rect(24px, 9999px, 90px, 0);
    animation: ga2 3s infinite linear alternate-reverse;
}
.text-glitch::after {
    left: -2px;
    text-shadow: -2px 0 #0000ff;
    clip: rect(85px, 9999px, 140px, 0);
    animation: ga1 2.5s infinite linear alternate-reverse;
}
@keyframes ga1 { 0% { clip: rect(10px,9999px,44px,0); } 100% { clip: rect(62px,9999px,88px,0); } }
@keyframes ga2 { 0% { clip: rect(65px,9999px,100px,0); } 100% { clip: rect(15px,9999px,30px,0); } }

/* ---------- NAV GLITCH HOVER ---------- */
.glitch-hover:hover {
    animation: nav-glitch 0.3s ease both infinite;
    background: var(--magenta);
    color: #000;
}
@keyframes nav-glitch {
    0%   { transform: skew(0deg); }
    25%  { transform: skew(-8deg); }
    50%  { transform: skew(8deg); }
    75%  { transform: skew(-4deg); }
    100% { transform: skew(0deg); }
}

/* ---------- FOOTER ---------- */
.site-footer {
    height: var(--footer-h);
    flex-shrink: 0;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    gap: 1rem;
    z-index: 50;
}

.void-orb {
    width: 30px;
    height: 30px;
    border-radius: 9999px;
    background: var(--concrete);
    border: 2px solid rgba(255,255,255,0.12);
    flex-shrink: 0;
    position: relative;
}
.void-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    white-space: nowrap;
    background: black;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.3rem 0.6rem;
    font-size: 0.65rem;
    color: #9ca3af;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.void-orb:hover .void-tooltip,
.void-orb:focus .void-tooltip { opacity: 1; }

.void-core { animation: pulse-void 4s ease-in-out infinite alternate; }
@keyframes pulse-void {
    0%   { box-shadow: 0 0 8px rgba(0,0,0,1), 0 0 16px rgba(255,0,255,0.15); transform: scale(0.94) rotateZ(0deg); }
    100% { box-shadow: 0 0 30px rgba(0,0,0,1), 0 0 60px rgba(0,255,255,0.4);  transform: scale(1.06) rotateZ(180deg); }
}

.footer-controls {
    display: none;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.65rem;
}
@media (min-width: 640px) { .footer-controls { display: flex; } }

.vol-slider { width: 80px; accent-color: var(--acid); }

.fix-btn {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--magenta);
    color: black;
    padding: 0.25rem 0.6rem;
    border: none;
    box-shadow: 3px 3px 0 rgba(255,0,255,0.4);
    transition: box-shadow 0.15s, transform 0.1s;
    animation: fix-pulse 2.5s ease-in-out infinite alternate;
}
.fix-btn:hover { transform: translate(2px, 2px); box-shadow: none; }
@keyframes fix-pulse {
    0%   { box-shadow: 3px 3px 0 rgba(255,0,255,0.4); }
    100% { box-shadow: 6px 6px 0 rgba(255,0,255,0.6), 0 0 16px rgba(255,0,255,0.3); }
}

.ctrl-btn {
    width: 38px;
    height: 38px;
    background: var(--concrete);
    border: none;
    color: rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.ctrl-btn:hover { background: white; color: black; }

/* ---------- TOASTS ---------- */
.toast-layer {
    position: fixed;
    bottom: calc(var(--footer-h) + 1rem);
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 150;
    pointer-events: none;
    align-items: flex-end;
    max-width: 280px;
}

/* ---------- SYNERGY MODAL ---------- */
.synergy-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.96);
    backdrop-filter: blur(20px);
    z-index: 500;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}
.synergy-modal:not([hidden]) { display: flex; }
[hidden] { display: none !important; }

.synergy-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
    filter: drop-shadow(0 0 10px var(--acid));
}
@keyframes spin { to { transform: rotate(360deg); } }

.synergy-progress-track {
    width: 100%;
    max-width: 480px;
    height: 4px;
    background: var(--concrete);
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    border-radius: 2px;
    margin: 0 auto;
}
.synergy-progress-bar {
    height: 100%;
    width: 99%;
    background: var(--cyan);
    box-shadow: 0 0 12px var(--cyan);
    animation: progress-breathe 3s ease-in-out infinite alternate;
}
@keyframes progress-breathe {
    0%   { opacity: 0.6; }
    100% { opacity: 1; box-shadow: 0 0 20px var(--cyan); }
}

.synergy-cancel-zone { position: relative; width: 200px; height: 52px; }
.synergy-cancel-btn {
    position: absolute;
    inset: 0;
    background: #7f1d1d;
    color: white;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    box-shadow: 6px 6px 0 rgba(255,0,0,0.4);
    transition: top 0.1s ease, left 0.1s ease;
}

/* ---------- MOBILE OVERRIDES ---------- */
@media (max-width: 639px) {
    /* Sidebar becomes a slide-in overlay */
    .sidebar {
        position: fixed;
        left: 0; top: 0;
        width: 0;
        height: 100%;
        z-index: 200;
        overflow: hidden;
    }
    .sidebar.is-open {
        width: var(--sidebar-w);
        box-shadow: 4px 0 40px rgba(0,0,0,0.8);
    }
    .sidebar.is-open .sidebar-content { opacity: 1; pointer-events: auto; }
    .sidebar.is-open .sidebar-brand-collapsed { opacity: 0; }
    .nav-toggle { display: flex; }
    .main-content { padding: 4rem 1rem 1rem; }
    .page-title { font-size: 2.2rem; }
    .w8 { flex-direction: column; align-items: flex-start; }
    .saboteur-icon { font-size: 3rem; }
    .bento-grid { gap: 1rem; }
}

@media (min-width: 640px) {
    .nav-toggle { display: none; }
    .sidebar { position: relative; }
}

/* ---------- GITHUB WIDGET (W9) ---------- */
.w9 {
    grid-column: 1 / -1; /* always full-width */
    background: #050507;
    border: 1px solid rgba(255,255,255,0.06);
    border-left: 4px solid var(--acid);
    position: relative;
    overflow: hidden;
}
.w9:hover {
    transform: none; /* override tactile tilt — keeps it stable for reading */
    box-shadow: 0 0 60px rgba(204,255,0,0.04);
}

/* "CLASSIFIED" watermark stamp */
.redacted-stamp {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-family: 'Space Mono', monospace;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: rgba(255, 0, 0, 0.06);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transform: rotate(-12deg);
    pointer-events: none;
    user-select: none;
    border: 0.18em solid rgba(255,0,0,0.06);
    padding: 0.1em 0.4em;
    line-height: 1;
    transition: color 0.4s;
}
.w9:hover .redacted-stamp {
    color: rgba(255,0,0,0.1);
    border-color: rgba(255,0,0,0.1);
}

/* Header row */
.github-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 640px) {
    .github-header {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

/* Profile button */
.github-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--concrete);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.github-profile-btn:hover {
    background: var(--acid);
    color: black;
    border-color: var(--acid);
    box-shadow: 4px 4px 0 rgba(204,255,0,0.4);
}

/* Repo grid */
.repo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 640px)  { .repo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .repo-grid { grid-template-columns: repeat(3, 1fr); } }

/* Repo card */
.repo-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.07);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}
.repo-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(204,255,0,0.04) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.repo-card:hover {
    border-color: var(--acid);
    background: rgba(204,255,0,0.03);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4), 4px 4px 0 rgba(204,255,0,0.2);
}
.repo-card:hover::after { opacity: 1; }

.repo-card-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.repo-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--acid);
    flex-shrink: 0;
    animation: repo-ping 2s ease-in-out infinite;
}
@keyframes repo-ping {
    0%, 100% { box-shadow: 0 0 0 0 rgba(204,255,0,0.4); }
    50%       { box-shadow: 0 0 0 5px rgba(204,255,0,0); }
}

.repo-lang {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--acid);
    background: rgba(204,255,0,0.08);
    border: 1px solid rgba(204,255,0,0.15);
    padding: 0.1em 0.4em;
}

.repo-star {
    margin-left: auto;
    color: #4b5563;
    font-size: 0.85rem;
    transition: color 0.2s;
}
.repo-card:hover .repo-star { color: var(--acid); }

.repo-name {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    transition: color 0.2s;
    word-break: break-word;
}
.repo-card:hover .repo-name { color: var(--acid); }

.repo-desc {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: #6b7280;
    line-height: 1.7;
    flex: 1;
}
.repo-irony {
    display: block;
    margin-top: 0.3rem;
    color: #374151;
    font-style: italic;
    transition: color 0.2s;
}
.repo-card:hover .repo-irony { color: #4b5563; }

.repo-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.repo-tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.repo-card:hover .repo-tag { color: rgba(204,255,0,0.5); }