/* --- Thread Art Capabilities Layout --- */
.thread-wrapper {
    display: flex;
    position: relative;
    background: var(--bg-color);
    width: 100%;
}

.thread-content-col {
    width: 50%;
    z-index: 10;
    position: relative;
    pointer-events: none;
}

/* Re-enable pointer events for specific children */
.thread-content-col>* {
    pointer-events: auto;
}

.expertise-header {
    position: sticky;
    top: 6rem;
    /* Below Navbar */
    padding: 0 5rem;
    margin-bottom: 2rem;
    z-index: 20;
    pointer-events: auto;
    mix-blend-mode: difference;
    /* Ensure visibility */
}

/* Ensure items don't overlap the sticky header too early if they have large margins */
.thread-item {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 5rem;
    transition: opacity 0.5s;
}

.thread-sticky-col {
    width: 50%;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    z-index: 5;
    border-left: 1px solid var(--border-color);
}

/* SVG Container */
.thread-svg-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

.thread-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(0px 0px 8px rgba(240, 82, 37, 0.5));
}

/* Thread Paths */
.thread-path {
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
    vector-effect: non-scaling-stroke;
}

/* --- Typography & Active States --- */

.cap-title {
    font-family: var(--font-heading);
    font-size: 6vw;
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -2px;
    color: #ffffff;
    /* Force White */
    opacity: 0.4;
    /* Visible inactive state */
    margin-bottom: 2rem;
    transition: all 0.6s ease;
    transform-origin: left center;
}

.cap-desc {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.5;
    /* Always visible */
    transform: translateY(0);
    /* Remove offset that might be hiding it */
    transition: all 0.6s ease;
}

.cap-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    opacity: 0.5;
    /* Always visible */
    transform: translateY(0);
    /* Remove offset */
    transition: all 0.6s ease 0.1s;
    pointer-events: auto;
}

.tool-pill {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.6rem 1.4rem;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-muted);
    background: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    /* Show it's interactive */
}

.tool-pill:hover {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(240, 82, 37, 0.3);
}

/* Active Class */
.thread-item.active .cap-title {
    color: var(--text-color);
    transform: scale(1.02);
    opacity: 1;
    /* Ensure full brightness when active */
}

.thread-item.active .cap-desc,
.thread-item.active .cap-tools {
    opacity: 1;
    transform: translateY(0);
}

.thread-item.active .tool-pill {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .thread-wrapper {
        flex-direction: column-reverse;
    }

    .thread-content-col {
        width: 100%;
        padding-bottom: 50vh;
        /* Spacer to allow last item to scroll fully if needed */
    }

    .thread-sticky-col {
        width: 100%;
        height: 50vh;
        position: sticky;
        top: 0;
        z-index: 1;
        opacity: 0.3;
        /* Fade out graphic so text is readable over it */
        pointer-events: none;
        border-left: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .thread-item {
        min-height: 60vh;
        padding: 2rem;
        justify-content: center;
        /* background: rgba(5, 5, 5, 0.8);  Optional backdrop */
    }

    .cap-title {
        font-size: 3rem;
    }
}