/* ═══════════════════════════════════════════════════════════════
   CORTEX DOSSIER MODALS — Personnel Dossier System
   Agent-Themed HUD Modals with GSAP Boot Sequences
   ═══════════════════════════════════════════════════════════════ */

/* ─── OVERLAY ────────────────────────────────────────────────── */
.dd-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(2, 6, 15, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    cursor: pointer;
}
.dd-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ─── MODAL CONTAINER ────────────────────────────────────────── */
.dd-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    z-index: 9001;
    width: 94%;
    max-width: 820px;
    max-height: 88vh;
    overflow-y: auto;
    border-radius: 20px;
    padding: 0;
    background: rgba(8, 14, 28, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 0 80px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    opacity: 0;
    visibility: hidden;
    cursor: default;
}
.dd-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Scrollbar */
.dd-modal::-webkit-scrollbar { width: 5px; }
.dd-modal::-webkit-scrollbar-track { background: transparent; }
.dd-modal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}
.dd-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ─── CLOSE BUTTON ───────────────────────────────────────────── */
.dd-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 20;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.dd-close:hover {
    border-color: rgba(255, 70, 70, 0.4);
    color: #ff6b6b;
    background: rgba(255, 70, 70, 0.08);
    box-shadow: 0 0 12px rgba(255, 70, 70, 0.15);
}

/* ═══════════════════════════════════════════════════════════════
   BIOMETRIC HEADER
   ═══════════════════════════════════════════════════════════════ */
.dd-header {
    position: relative;
    padding: 32px 32px 24px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Avatar container with reticle */
.dd-avatar-wrap {
    position: relative;
    width: 88px;
    height: 88px;
    flex-shrink: 0;
}
.dd-avatar-wrap img,
.dd-avatar-wrap video {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}
.dd-avatar-reticle {
    position: absolute;
    inset: 0;
    z-index: 3;
    animation: dd-reticle-spin 12s linear infinite;
}

@keyframes dd-reticle-spin {
    to { transform: rotate(360deg); }
}

/* Header text */
.dd-header-info {
    flex: 1;
    min-width: 0;
}
.dd-agent-name {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
    margin: 0 0 2px;
}
.dd-agent-role {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0 0 12px;
}
.dd-agent-quote {
    font-size: 14px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.5);
    min-height: 20px;
    border-left: 2px solid;
    padding-left: 12px;
    line-height: 1.5;
}
.dd-typing-cursor {
    display: inline-block;
    width: 2px;
    height: 14px;
    margin-left: 2px;
    vertical-align: middle;
    animation: dd-blink 0.8s step-end infinite;
}

@keyframes dd-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ─── LAUNCH BUTTONS ─────────────────────────────────────────── */
.dd-launch-btns {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.dd-btn {
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid;
    background: transparent;
}
.dd-btn:hover {
    transform: translateY(-1px);
}
.dd-btn-primary {
    color: #fff;
}
.dd-btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
}
.dd-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

/* ═══════════════════════════════════════════════════════════════
   BODY LAYOUT — Sidebar + Skills Grid
   ═══════════════════════════════════════════════════════════════ */
.dd-body {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 0;
    min-height: 320px;
}

/* ─── TELEMETRY SIDEBAR ──────────────────────────────────────── */
.dd-sidebar {
    padding: 24px 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dd-tele-block {
    text-align: center;
}
.dd-tele-label {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 10px;
}
.dd-ring-wrap {
    width: 100px;
    height: 100px;
    margin: 0 auto 8px;
    position: relative;
}
.dd-ring-wrap svg {
    width: 100%;
    height: 100%;
}
.dd-ring-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}
.dd-tele-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

/* Counter block */
.dd-counter-block {
    text-align: center;
}
.dd-counter-value {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
}
.dd-counter-unit {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    margin-left: 2px;
}

/* Live Uplink badge */
.dd-uplink {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: auto;
}
.dd-uplink-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: dd-uplink-pulse 2s ease-in-out infinite;
}

@keyframes dd-uplink-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; box-shadow: 0 0 8px currentColor; }
}

/* ─── SKILLS GRID ────────────────────────────────────────────── */
.dd-skills {
    padding: 24px;
}
.dd-skills-title {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 16px;
}
.dd-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

/* Skill Node Card */
.dd-skill {
    position: relative;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: default;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}
.dd-skill:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}
.dd-skill-icon {
    font-size: 16px;
    margin-bottom: 6px;
}
.dd-skill-name {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3px;
    transition: all 0.3s ease;
}
.dd-skill-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════
   AGENT THEME: COLUMNINI — Emerald Data Matrix
   ═══════════════════════════════════════════════════════════════ */
.dd-modal[data-agent="columnini"] {
    border-color: rgba(16, 185, 129, 0.2);
    box-shadow:
        0 0 80px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(16, 185, 129, 0.08),
        inset 0 1px 0 rgba(16, 185, 129, 0.1);
}
.dd-modal[data-agent="columnini"] .dd-agent-role { color: #10b981; }
.dd-modal[data-agent="columnini"] .dd-agent-quote { border-color: rgba(16, 185, 129, 0.4); }
.dd-modal[data-agent="columnini"] .dd-typing-cursor { background: #10b981; }
.dd-modal[data-agent="columnini"] .dd-btn-primary {
    border-color: rgba(16, 185, 129, 0.5);
    color: #10b981;
}
.dd-modal[data-agent="columnini"] .dd-btn-primary:hover {
    background: rgba(16, 185, 129, 0.12);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}
.dd-modal[data-agent="columnini"] .dd-ring-value,
.dd-modal[data-agent="columnini"] .dd-counter-value { color: #10b981; }
.dd-modal[data-agent="columnini"] .dd-uplink {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: rgba(16, 185, 129, 0.7);
}
.dd-modal[data-agent="columnini"] .dd-uplink-dot {
    background: #10b981;
    color: #10b981;
}
.dd-modal[data-agent="columnini"] .dd-skill {
    border-color: rgba(16, 185, 129, 0.15);
}
.dd-modal[data-agent="columnini"] .dd-skill:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.12);
}
.dd-modal[data-agent="columnini"] .dd-skills-title { color: rgba(16, 185, 129, 0.5); }

/* Columnini decode hover effect */
.dd-modal[data-agent="columnini"] .dd-skill:hover .dd-skill-name {
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

/* ═══════════════════════════════════════════════════════════════
   AGENT THEME: REDEYE RILEY — Midnight Stealth HUD
   ═══════════════════════════════════════════════════════════════ */
.dd-modal[data-agent="riley"] {
    border-color: rgba(245, 158, 11, 0.2);
    box-shadow:
        0 0 80px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(245, 158, 11, 0.06),
        inset 0 1px 0 rgba(245, 158, 11, 0.08);
}
.dd-modal[data-agent="riley"] .dd-agent-role { color: #f59e0b; }
.dd-modal[data-agent="riley"] .dd-agent-quote { border-color: rgba(245, 158, 11, 0.4); }
.dd-modal[data-agent="riley"] .dd-typing-cursor { background: #f59e0b; }
.dd-modal[data-agent="riley"] .dd-btn-primary {
    border-color: rgba(245, 158, 11, 0.5);
    color: #f59e0b;
}
.dd-modal[data-agent="riley"] .dd-btn-primary:hover {
    background: rgba(245, 158, 11, 0.12);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}
.dd-modal[data-agent="riley"] .dd-ring-value,
.dd-modal[data-agent="riley"] .dd-counter-value { color: #f59e0b; }
.dd-modal[data-agent="riley"] .dd-uplink {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.15);
    color: rgba(245, 158, 11, 0.7);
}
.dd-modal[data-agent="riley"] .dd-uplink-dot {
    background: #f59e0b;
    color: #f59e0b;
}
.dd-modal[data-agent="riley"] .dd-skill {
    border-color: rgba(245, 158, 11, 0.15);
}
.dd-modal[data-agent="riley"] .dd-skill:hover {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.12);
}
.dd-modal[data-agent="riley"] .dd-skills-title { color: rgba(245, 158, 11, 0.5); }

/* Riley scanline hover */
.dd-modal[data-agent="riley"] .dd-skill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #f59e0b, transparent);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.4s ease;
}
.dd-modal[data-agent="riley"] .dd-skill:hover::before {
    transform: translateY(0);
    opacity: 0.6;
}

/* Riley ATC bracket hover */
.dd-modal[data-agent="riley"] .dd-skill::after {
    content: '[ ]';
    position: absolute;
    top: 8px;
    right: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: rgba(245, 158, 11, 0);
    letter-spacing: 4px;
    transition: color 0.3s ease;
}
.dd-modal[data-agent="riley"] .dd-skill:hover::after {
    color: rgba(245, 158, 11, 0.5);
}

/* Radar sweep animation for Riley avatar */
.dd-radar-sweep {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    z-index: 1;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(245, 158, 11, 0.25) 30deg,
        transparent 60deg
    );
    animation: dd-radar-spin 3s linear infinite;
}

@keyframes dd-radar-spin {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════
   AGENT THEME: PULSE — Precision Print-Scanner
   ═══════════════════════════════════════════════════════════════ */
.dd-modal[data-agent="pulse"] {
    border-color: rgba(244, 63, 94, 0.2);
    box-shadow:
        0 0 80px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(244, 63, 94, 0.06),
        inset 0 1px 0 rgba(244, 63, 94, 0.08);
}
.dd-modal[data-agent="pulse"] .dd-agent-role { color: #f43f5e; }
.dd-modal[data-agent="pulse"] .dd-agent-quote { border-color: rgba(244, 63, 94, 0.4); }
.dd-modal[data-agent="pulse"] .dd-typing-cursor { background: #f43f5e; }
.dd-modal[data-agent="pulse"] .dd-btn-primary {
    border-color: rgba(244, 63, 94, 0.5);
    color: #f43f5e;
}
.dd-modal[data-agent="pulse"] .dd-btn-primary:hover {
    background: rgba(244, 63, 94, 0.12);
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.2);
}
.dd-modal[data-agent="pulse"] .dd-ring-value,
.dd-modal[data-agent="pulse"] .dd-counter-value { color: #f43f5e; }
.dd-modal[data-agent="pulse"] .dd-uplink {
    background: rgba(244, 63, 94, 0.06);
    border: 1px solid rgba(244, 63, 94, 0.15);
    color: rgba(244, 63, 94, 0.7);
}
.dd-modal[data-agent="pulse"] .dd-uplink-dot {
    background: #f43f5e;
    color: #f43f5e;
}
.dd-modal[data-agent="pulse"] .dd-skill {
    border-color: rgba(244, 63, 94, 0.15);
}
.dd-modal[data-agent="pulse"] .dd-skill:hover {
    border-color: rgba(244, 63, 94, 0.4);
    box-shadow: 0 0 16px rgba(244, 63, 94, 0.12);
}
.dd-modal[data-agent="pulse"] .dd-skills-title { color: rgba(244, 63, 94, 0.5); }

/* Pulse laser scan line */
.dd-laser-scan {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    border-radius: 50%;
}
.dd-laser-scan::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #f43f5e, transparent);
    box-shadow: 0 0 8px #f43f5e, 0 0 20px rgba(244, 63, 94, 0.3);
    animation: dd-laser-sweep 2.5s ease-in-out infinite;
}

@keyframes dd-laser-sweep {
    0%, 100% { top: 10%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    50% { top: 85%; }
}

/* Pulse crop-mark hover on skills */
.dd-modal[data-agent="pulse"] .dd-skill::before,
.dd-modal[data-agent="pulse"] .dd-skill::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}
.dd-modal[data-agent="pulse"] .dd-skill::before {
    top: 4px;
    left: 4px;
    border-top-color: transparent;
    border-left-color: transparent;
}
.dd-modal[data-agent="pulse"] .dd-skill::after {
    bottom: 4px;
    right: 4px;
    border-bottom-color: transparent;
    border-right-color: transparent;
}
.dd-modal[data-agent="pulse"] .dd-skill:hover::before {
    border-top-color: rgba(244, 63, 94, 0.5);
    border-left-color: rgba(244, 63, 94, 0.5);
}
.dd-modal[data-agent="pulse"] .dd-skill:hover::after {
    border-bottom-color: rgba(244, 63, 94, 0.5);
    border-right-color: rgba(244, 63, 94, 0.5);
}

/* ═══════════════════════════════════════════════════════════════
   AGENT THEME: SCOOP MCGRAB — Revenue Heist
   ═══════════════════════════════════════════════════════════════ */
.dd-modal[data-agent="scoop"] {
    border: 2px solid #fbbf24;
    box-shadow:
        0 0 80px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(251, 191, 36, 0.25),
        inset 0 0 20px rgba(251, 191, 36, 0.08);
}
.dd-modal[data-agent="scoop"] .dd-agent-role { color: #fbbf24; }
.dd-modal[data-agent="scoop"] .dd-agent-quote { border-color: rgba(251, 191, 36, 0.4); }
.dd-modal[data-agent="scoop"] .dd-typing-cursor { background: #fbbf24; }
.dd-modal[data-agent="scoop"] .dd-btn-primary {
    border-color: rgba(251, 191, 36, 0.5);
    color: #fbbf24;
}
.dd-modal[data-agent="scoop"] .dd-btn-primary:hover {
    background: rgba(251, 191, 36, 0.12);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
}
.dd-modal[data-agent="scoop"] .dd-ring-value,
.dd-modal[data-agent="scoop"] .dd-counter-value { color: #fbbf24; }
.dd-modal[data-agent="scoop"] .dd-uplink {
    background: rgba(251, 191, 36, 0.06);
    border: 1px solid rgba(251, 191, 36, 0.15);
    color: rgba(251, 191, 36, 0.7);
}
.dd-modal[data-agent="scoop"] .dd-uplink-dot {
    background: #fbbf24;
    color: #fbbf24;
}
.dd-modal[data-agent="scoop"] .dd-skill {
    border-color: rgba(251, 191, 36, 0.18);
}
.dd-modal[data-agent="scoop"] .dd-skill:hover {
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.12);
}
.dd-modal[data-agent="scoop"] .dd-skills-title { color: rgba(251, 191, 36, 0.5); }

/* Scoop vault-crack border race */
.dd-vault-border {
    position: absolute;
    inset: -1px;
    border-radius: 20px;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}
.dd-vault-border svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.dd-vault-border rect {
    fill: none;
    stroke-width: 2;
    stroke-dasharray: 0 9999;
    stroke-linecap: round;
}

/* Scoop vault dial tick on avatar */
.dd-vault-dial {
    position: absolute;
    inset: 0;
    z-index: 1;
    animation: dd-vault-tick 0.8s steps(12) infinite;
}

@keyframes dd-vault-tick {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════
   AGENT THEME: ATTICUS — Wise Compliance Owl
   ═══════════════════════════════════════════════════════════════ */
.dd-modal[data-agent="atticus"] {
    border-color: rgba(244, 63, 94, 0.2);
    box-shadow:
        0 0 80px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(244, 63, 94, 0.06),
        inset 0 1px 0 rgba(244, 63, 94, 0.08);
}
.dd-modal[data-agent="atticus"] .dd-agent-role { color: #f43f5e; }
.dd-modal[data-agent="atticus"] .dd-agent-quote { border-color: rgba(244, 63, 94, 0.4); }
.dd-modal[data-agent="atticus"] .dd-typing-cursor { background: #f43f5e; }
.dd-modal[data-agent="atticus"] .dd-btn-primary {
    border-color: rgba(244, 63, 94, 0.5);
    color: #f43f5e;
}
.dd-modal[data-agent="atticus"] .dd-btn-primary:hover {
    background: rgba(244, 63, 94, 0.12);
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.2);
}
.dd-modal[data-agent="atticus"] .dd-ring-value,
.dd-modal[data-agent="atticus"] .dd-counter-value { color: #f43f5e; }
.dd-modal[data-agent="atticus"] .dd-uplink {
    background: rgba(244, 63, 94, 0.06);
    border: 1px solid rgba(244, 63, 94, 0.15);
    color: rgba(244, 63, 94, 0.7);
}
.dd-modal[data-agent="atticus"] .dd-uplink-dot {
    background: #f43f5e;
    color: #f43f5e;
}
.dd-modal[data-agent="atticus"] .dd-skill {
    border-color: rgba(244, 63, 94, 0.15);
}
.dd-modal[data-agent="atticus"] .dd-skill:hover {
    border-color: rgba(244, 63, 94, 0.4);
    box-shadow: 0 0 16px rgba(244, 63, 94, 0.12);
}
.dd-modal[data-agent="atticus"] .dd-skills-title { color: rgba(244, 63, 94, 0.5); }

/* Atticus wisdom-glow hover effect on skills */
.dd-modal[data-agent="atticus"] .dd-skill::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 0%, rgba(244, 63, 94, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.dd-modal[data-agent="atticus"] .dd-skill:hover::before {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   AGENT THEME: COPYCAT — Shadow Reporter Fill-In
   ═══════════════════════════════════════════════════════════════ */
.dd-modal[data-agent="copycat"] {
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow:
        0 0 80px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(59, 130, 246, 0.06),
        inset 0 1px 0 rgba(59, 130, 246, 0.08);
}
.dd-modal[data-agent="copycat"] .dd-agent-role { color: #3b82f6; }
.dd-modal[data-agent="copycat"] .dd-agent-quote { border-color: rgba(59, 130, 246, 0.4); }
.dd-modal[data-agent="copycat"] .dd-typing-cursor { background: #3b82f6; }
.dd-modal[data-agent="copycat"] .dd-btn-primary {
    border-color: rgba(59, 130, 246, 0.5);
    color: #3b82f6;
}
.dd-modal[data-agent="copycat"] .dd-btn-primary:hover {
    background: rgba(59, 130, 246, 0.12);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}
.dd-modal[data-agent="copycat"] .dd-ring-value,
.dd-modal[data-agent="copycat"] .dd-counter-value { color: #3b82f6; }
.dd-modal[data-agent="copycat"] .dd-uplink {
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.15);
    color: rgba(59, 130, 246, 0.7);
}
.dd-modal[data-agent="copycat"] .dd-uplink-dot {
    background: #3b82f6;
    color: #3b82f6;
}
.dd-modal[data-agent="copycat"] .dd-skill {
    border-color: rgba(59, 130, 246, 0.15);
}
.dd-modal[data-agent="copycat"] .dd-skill:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.12);
}
.dd-modal[data-agent="copycat"] .dd-skills-title { color: rgba(59, 130, 246, 0.5); }

/* CopyCat mirror-glow hover effect on skills */
.dd-modal[data-agent="copycat"] .dd-skill::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.dd-modal[data-agent="copycat"] .dd-skill:hover::before {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   AGENT THEME: PICA VANCE — Lapsed Revenue Detective
   ═══════════════════════════════════════════════════════════════ */
.dd-modal[data-agent="pica"] {
    border-color: rgba(168, 85, 247, 0.2);
    box-shadow:
        0 0 80px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(168, 85, 247, 0.06),
        inset 0 1px 0 rgba(168, 85, 247, 0.08);
}
.dd-modal[data-agent="pica"] .dd-agent-role { color: #a855f7; }
.dd-modal[data-agent="pica"] .dd-agent-quote { border-color: rgba(168, 85, 247, 0.4); }
.dd-modal[data-agent="pica"] .dd-typing-cursor { background: #a855f7; }
.dd-modal[data-agent="pica"] .dd-btn-primary {
    border-color: rgba(168, 85, 247, 0.5);
    color: #a855f7;
}
.dd-modal[data-agent="pica"] .dd-btn-primary:hover {
    background: rgba(168, 85, 247, 0.12);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}
.dd-modal[data-agent="pica"] .dd-ring-value,
.dd-modal[data-agent="pica"] .dd-counter-value { color: #a855f7; }
.dd-modal[data-agent="pica"] .dd-uplink {
    background: rgba(168, 85, 247, 0.06);
    border: 1px solid rgba(168, 85, 247, 0.15);
    color: rgba(168, 85, 247, 0.7);
}
.dd-modal[data-agent="pica"] .dd-uplink-dot {
    background: #a855f7;
    color: #a855f7;
}
.dd-modal[data-agent="pica"] .dd-skill {
    border-color: rgba(168, 85, 247, 0.15);
}
.dd-modal[data-agent="pica"] .dd-skill:hover {
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.12);
}
.dd-modal[data-agent="pica"] .dd-skills-title { color: rgba(168, 85, 247, 0.5); }

/* Pica evidence-glow hover effect on skills */
.dd-modal[data-agent="pica"] .dd-skill::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.dd-modal[data-agent="pica"] .dd-skill:hover::before {
    opacity: 1;
}

/* Pica magnifying glass scanline on hover */
.dd-modal[data-agent="pica"] .dd-skill::after {
    content: '⌕';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 14px;
    color: rgba(168, 85, 247, 0);
    transition: color 0.3s ease;
}
.dd-modal[data-agent="pica"] .dd-skill:hover::after {
    color: rgba(168, 85, 247, 0.5);
}

/* ═══════════════════════════════════════════════════════════════
   ECOSYSTEM HUB — "All Roads Lead to Cortex"
   ═══════════════════════════════════════════════════════════════ */
.eco-hub-section {
    position: relative;
    padding: 16px 0 8px;
    overflow: hidden;
}

.eco-hub-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    height: 360px;
}

/* Center core */
.eco-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    z-index: 10;
    cursor: pointer;
}
.eco-core-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.25) 0%, rgba(0, 242, 254, 0.05) 50%, rgba(0, 242, 254, 0.01) 80%);
    border: 2px solid rgba(0, 242, 254, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.15),
                inset 0 0 20px rgba(0, 242, 254, 0.08);
}
.eco-core:hover .eco-core-inner {
    border-color: rgba(0, 242, 254, 0.8);
    box-shadow: 0 0 50px rgba(0, 242, 254, 0.35),
                inset 0 0 30px rgba(0, 242, 254, 0.12);
    transform: scale(1.05);
}
.eco-core-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 3px;
    color: #00f2fe;
    text-align: center;
    text-shadow: 0 0 12px rgba(0, 242, 254, 0.4);
}

/* Sonar rings — upgraded with gradient borders */
.eco-sonar {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1.5px solid transparent;
    background-image: linear-gradient(#0f172a, #0f172a), linear-gradient(135deg, rgba(0,242,254,0.4), rgba(139,92,246,0.3), rgba(16,185,129,0.2));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    pointer-events: none;
    animation: dd-sonar-ping 3.5s ease-out infinite;
}
.eco-sonar:nth-child(2) { animation-delay: 1.2s; }
.eco-sonar:nth-child(3) { animation-delay: 2.4s; }

@keyframes dd-sonar-ping {
    0% { width: 80px; height: 80px; opacity: 0.6; }
    100% { width: 380px; height: 380px; opacity: 0; }
}

/* ─── GLASSMORPHISM NODE PANELS ───────────────────────────────── */
.eco-node {
    position: absolute;
    width: 110px;
    text-align: center;
    z-index: 5;
    cursor: default;
    animation: dd-float 6s ease-in-out infinite;
}
.eco-node:nth-child(2) { animation-delay: -1s; }
.eco-node:nth-child(3) { animation-delay: -2s; }
.eco-node:nth-child(4) { animation-delay: -3s; }
.eco-node:nth-child(5) { animation-delay: -4s; }
.eco-node:nth-child(6) { animation-delay: -5s; }

@keyframes dd-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Glassmorphism base for the node icon panels */
.eco-node-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 8px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.eco-node-icon.glass-panel {
    background: rgba(10, 20, 35, 0.55);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1.5px solid rgba(0, 255, 200, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4),
                0 0 15px rgba(0, 242, 254, 0.06),
                inset 0 0 20px rgba(0, 255, 200, 0.06);
    animation: eco-node-breathe 4s ease-in-out infinite;
}

/* Icon breathing animation */
@keyframes eco-node-breathe {
    0%, 100% { box-shadow: 0 8px 32px 0 rgba(0,0,0,0.4), 0 0 15px rgba(0,242,254,0.06), inset 0 0 20px rgba(0,255,200,0.06); }
    50% { box-shadow: 0 8px 32px 0 rgba(0,0,0,0.4), 0 0 25px rgba(0,242,254,0.12), inset 0 0 30px rgba(0,255,200,0.1); }
}

/* Animated corner accent lines */
.eco-node-icon.glass-panel::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 18px;
    background: conic-gradient(from var(--eco-icon-angle, 0deg), transparent 60%, rgba(0,242,254,0.4) 75%, transparent 90%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 1.5px;
    animation: eco-icon-spin 6s linear infinite;
    opacity: 0.7;
}
@property --eco-icon-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes eco-icon-spin { to { --eco-icon-angle: 360deg; } }

/* Inline SVG icon styling */
.node-icon {
    width: 28px;
    height: 28px;
    color: #00ffc8;
    filter: drop-shadow(0 0 8px rgba(0, 255, 200, 0.6));
    transition: all 0.4s ease;
}

/* Magnetic Hover Effect — Upgraded */
.eco-node:hover .eco-node-icon.glass-panel {
    border-color: rgba(0, 255, 200, 0.7);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5),
                0 0 30px rgba(0, 255, 200, 0.25),
                0 0 60px rgba(0, 242, 254, 0.1),
                inset 0 0 25px rgba(0, 255, 200, 0.12);
    transform: scale(1.12);
    animation: none;
}

.eco-node:hover .eco-node-icon.glass-panel::before {
    opacity: 1;
    animation: eco-icon-spin 2s linear infinite;
}

.eco-node:hover .node-icon {
    filter: drop-shadow(0 0 14px rgba(0, 255, 200, 0.9)) drop-shadow(0 0 28px rgba(0,242,254,0.4));
    transform: scale(1.08);
}

.eco-node-label {
    color: #f1f5f9;
    font-family: 'Inter', 'Space Grotesk', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.eco-node:hover .eco-node-label {
    color: #fff;
    text-shadow: 0 0 8px rgba(0, 255, 200, 0.3);
}

/* Data stream SVG — enhanced bloom + glow */
.eco-streams {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    filter: drop-shadow(0 0 4px rgba(0,242,254,0.15));
}
.eco-stream-line {
    fill: none;
    stroke: rgba(0, 255, 200, 0.08);
    stroke-width: 1.5;
}
.eco-stream-pulse {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 12 60;
    animation: dd-stream-flow 2.5s linear infinite;
    filter: drop-shadow(0 0 6px currentColor);
}

/* Traveling particle dots along streams */
.eco-stream-particle {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 3 120;
    animation: dd-stream-particle 4s linear infinite;
    filter: drop-shadow(0 0 10px currentColor);
}

@keyframes dd-stream-flow {
    to { stroke-dashoffset: -72; }
}
@keyframes dd-stream-particle {
    to { stroke-dashoffset: -123; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .dd-modal {
        max-width: 98%;
        max-height: 92vh;
        border-radius: 14px;
    }
    .dd-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px 20px 20px;
    }
    .dd-agent-quote {
        border-left: none;
        border-top: 2px solid;
        padding-left: 0;
        padding-top: 10px;
    }
    .dd-launch-btns {
        justify-content: center;
    }
    .dd-body {
        grid-template-columns: 1fr;
    }
    .dd-sidebar {
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 16px 20px;
        justify-content: space-around;
    }
    .dd-skills-grid {
        grid-template-columns: 1fr;
    }

    /* Ecosystem Hub */
    .eco-hub-container {
        height: 340px;
    }
    .eco-node {
        width: 80px;
    }
    .eco-node-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    .eco-node-label {
        font-size: 10px;
    }
}
