/* Graph Container */
#graph-container {
    width: 100%;
    border: 1px solid var(--graph-line);
    border-radius: 8px;
    background: var(--graph-bg);
    margin: 20px 0;
}

[id^="graph-container-"] {
    width: 100%;
    border: 1px solid var(--graph-line);
    border-radius: 1rem;
    background: var(--graph-bg);
    color: var(--graph-text);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* SVG Elements */
.graph-svg {
    cursor: grab;
}

.graph-svg:active {
    cursor: grabbing;
}

/* Bubble Chart */
#graph-container-bubble {
    width: 100%;
    margin: 20px 0;
    border: 1px solid rgba(27, 36, 68, 0.7);
    border-radius: 18px;
    background: transparent;
    overflow: hidden;
}

.bubble-chart-svg {
    display: block;
    margin: 0 auto;
    background: transparent;
    cursor: default;
}

.bubble-node-link {
    text-decoration: none;
}

.bubble-node-group {
    cursor: pointer;
}

.bubble-node-circle {
    stroke-width: .2;
    vector-effect: non-scaling-stroke;
    transition:
        opacity 160ms ease,
        filter 160ms ease;
    filter: drop-shadow(0 8px 14px rgba(2, 30, 115, 0.10));
}

.bubble-node-circle-tld {
    fill: #5b62f9;
    stroke: #5b62f9;
}

.bubble-node-circle-tlt {
    fill: rgba(91, 98, 249, 0.78);
    stroke: #5b62f9;
}

.bubble-node-group:hover .bubble-node-circle {
    opacity: 0.96;
    stroke-width: 1.5;
    filter: drop-shadow(0 0 15px rgba(147, 152, 255, 0.4));
}

.bubble-node-label {
    fill: #fafcff;
    font-family: 'Hind', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    pointer-events: none;
    user-select: none;
}

.bubble-back-control {
    cursor: pointer;
}

.bubble-back-control-text {
    fill: #5b62f9;
    font-family: 'Hind', sans-serif;
    font-size: 17px;
    font-weight: 600;
}

.bubble-seo-heading {
    fill: #959fb2;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.bubble-seo-link-text {
    fill: #5b62f9;
    font-family: 'Hind', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-decoration: underline;
}

.bubble-seo-link-text:hover {
    text-decoration: underline;
}

/* Nodes */
.graph-node {
    cursor: pointer;
    transition: all 0.2s ease;
    stroke-opacity: 0.1;
}

.graph-node:hover {
    stroke-width: 3;
    filter: drop-shadow(0 0 8px rgba(0,0,0,0.2));
}

/* Links */
.graph-link {
    stroke-linecap: round;
    stroke: var(--graph-line);
    opacity: 0.2;
}

/* Labels */
.graph-label {
    pointer-events: none;
    user-select: none;
    font-weight: 500;
    fill: var(--graph-text);
}

/* Controls */
.graph-controls {
    margin: 15px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.graph-controls button {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.graph-controls button:hover {
    background: #f0f0f0;
    border-color: #999;
}

.graph-controls button.active {
    background: #1f77b4;
    color: white;
    border-color: #1f77b4;
}

/* Search */
#graph-search {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    width: 200px;
}

/* Error message */
.error {
    color: #d32f2f;
    padding: 20px;
    text-align: center;
}

nav {
    margin: 0 auto 0 auto;
}
hr {
    z-index: -10;
}

.expertise-loading {
    position: relative;
    transition: box-shadow 0.25s ease, background-color 0.25s ease;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--graph-line) 35%, transparent);
}

.expertise-loading::after {
    content: 'Loading expertise...';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--graph-text);
    background: color-mix(in srgb, var(--graph-bg) 92%, transparent);
    padding: 4px 8px;
    border-radius: 12px;
    pointer-events: none;
    z-index: 5;
}

.expertise-updated {
    animation: expertiseUpdatedPulse 1.2s ease;
}

.bubble-chart-svg a.bubble-node-link,
.bubble-chart-svg a.bubble-node-link:hover,
.bubble-chart-svg a.bubble-node-link:active,
.bubble-chart-svg a.bubble-node-link:focus {
    transform: none !important;
    filter: none !important;
    overflow: visible !important;
    position: static !important;
}

@keyframes expertiseUpdatedPulse {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--graph-line) 35%, transparent);
        background-color: color-mix(in srgb, var(--graph-bg) 92%, transparent);
    }
    100% {
        box-shadow: 0 0 0 12px rgba(4, 15, 217, 0);
        background-color: transparent;
    }
}

/*.menu-item {*/
/*    background:#FFF;*/
/*    min-width:190px;*/
/*    transition: background 0.7s, color 0.7s, transform 0.7s;*/
/*    margin:0px 0px 0px 0px;*/
/*    padding:4px 20px;*/
/*    box-sizing:border-box;*/
/*    position:relative;*/
/*    text-decoration: none;*/
/*    color: #070707;*/
/*}*/