:root {
    --accent-color: #bf00ff;
    --accent-glow: rgba(191, 0, 255, 0.4);
    --obsidian: #0a0510;
    --slate-gray: #807090;
    --terminal-bg: rgba(20, 10, 30, 0.85);
    --mint-gray: #e6d8f0;
    --font-heading: 'Orbitron', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--obsidian);
    color: var(--mint-gray);
    font-family: var(--font-mono);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Top Fade & Traceline Effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to bottom,
            rgba(10, 5, 16, 0.7) 0%,
            transparent 100%);
    z-index: 45;
    pointer-events: none;
}

/* Subtle Traceline at the very top */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.3;
    z-index: 101;
    /* Above scanlines */
    pointer-events: none;
}

/* Moving Grid Background */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(191, 0, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(191, 0, 255, .05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    z-index: -2;
    transform: translate(-25%, -25%);
}

@keyframes gridMove {
    0% {
        transform: translate(-25%, -25%);
    }

    100% {
        transform: translate(0, 0);
    }
}

/* CRT Scanlines */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.1) 0px,
            rgba(0, 0, 0, 0.1) 1px,
            transparent 1px,
            transparent 2px);
    pointer-events: none;
    z-index: 100;
}

/* Leaf Visual Integration */
.visual-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    z-index: -1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
}

.leaf-visual {
    width: 80%;
    max-width: 1200px;
    opacity: 0.15;
    filter: blur(4px) brightness(1.1);
    mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0) 70%);
    -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0) 70%);
    animation: breathingLeaf 15s ease-in-out infinite;
}

@keyframes breathingLeaf {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.1;
        filter: blur(4px) brightness(1);
    }

    50% {
        transform: scale(1.03) rotate(0.5deg);
        opacity: 0.2;
        filter: blur(3px) brightness(1.2);
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 4rem);
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    z-index: 50;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(191, 0, 255, 0.2);
    border-radius: 50px;
    background: rgba(10, 5, 16, 0.6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.nav-brand {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-glow);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
}

.nav-links a {
    color: var(--mint-gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

.nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-right .github-link {
    color: var(--mint-gray);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-right .github-link:hover {
    color: var(--accent-color);
}

/* Mega Menu */
.nav-item-dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    height: 100%;
}

.dropdown-trigger .chevron {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
}

.nav-item-dropdown:hover .dropdown-trigger .chevron {
    transform: rotate(180deg);
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: -1rem;
    margin-top: 15px;
    transform: translateY(10px);
    background: rgba(20, 10, 30, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(191, 0, 255, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    gap: 2.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(191, 0, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 550px;
    z-index: 100;
}

/* Invisible bridge to prevent hover loss in the gap */
.mega-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
}

.nav-item-dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mega-menu-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(191, 0, 255, 0.15);
}

.mega-menu-col a {
    color: var(--slate-gray);
    font-size: 0.85rem;
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: block;
    cursor: default;
}

.mega-menu-col a:hover {
    color: var(--mint-gray);
    background: rgba(191, 0, 255, 0.1);
    transform: translateX(3px);
}

/* Content Wrapper */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 4rem 2rem;
    position: relative;
    z-index: 10;
}

/* Hero Section */
.hero-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    margin-bottom: 6rem;
    min-height: 60vh;
}

.subpage-header {
    text-align: center;
    padding: 10rem 2rem 4rem 2rem;
    margin-bottom: 4rem;
    border-bottom: 1px solid rgba(191, 0, 255, 0.1);
}

.subpage-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

h1.glitch {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    font-weight: 900;
    color: var(--accent-color);
    letter-spacing: 0.3rem;
    margin-bottom: 0.5rem;
    position: relative;
    text-shadow: 0 0 15px var(--accent-glow);
    animation: glitch 5s infinite;
    user-select: none;
    -webkit-user-select: none;
}

h1.glitch::before,
h1.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    clip: rect(0, 900px, 0, 0);
}

h1.glitch::before {
    left: -2px;
    text-shadow: 2px 0 #ff0080;
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

h1.glitch::after {
    left: 2px;
    text-shadow: -2px 0 #ff00ff;
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch {

    0%,
    90%,
    100% {
        text-shadow: 0 0 15px var(--accent-glow);
        transform: skew(0);
    }

    92% {
        text-shadow: -2px 0 #ff0080, 2px 0 #ff00ff;
        transform: skew(2deg);
    }

    94% {
        text-shadow: 2px 0 #ff0080, -2px 0 #ff00ff;
        transform: skew(-2deg);
    }
}

@keyframes glitch-anim-1 {
    0% {
        clip: rect(20px, 9999px, 10px, 0);
    }

    20% {
        clip: rect(40px, 9999px, 30px, 0);
    }

    40% {
        clip: rect(60px, 9999px, 50px, 0);
    }

    60% {
        clip: rect(80px, 9999px, 70px, 0);
    }

    80% {
        clip: rect(100px, 9999px, 90px, 0);
    }

    100% {
        clip: rect(120px, 9999px, 110px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(10px, 9999px, 20px, 0);
    }

    20% {
        clip: rect(30px, 9999px, 40px, 0);
    }

    40% {
        clip: rect(50px, 9999px, 60px, 0);
    }

    60% {
        clip: rect(70px, 9999px, 80px, 0);
    }

    80% {
        clip: rect(90px, 9999px, 100px, 0);
    }

    100% {
        clip: rect(110px, 9999px, 120px, 0);
    }
}

.subtitle {
    font-size: 1.1rem;
    color: var(--slate-gray);
    letter-spacing: 0.2rem;
    margin-bottom: 2rem;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 3rem;
    color: var(--mint-gray);
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #fff;
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--mint-gray);
    border: 1px solid var(--slate-gray);
}

.btn-secondary:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    margin-top: 1rem;
}

.btn-outline:hover {
    background-color: rgba(191, 0, 255, 0.1);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Terminal Area */
.hero-visual {
    flex: 1;
    max-width: 500px;
    width: 100%;
}

.terminal {
    background: var(--terminal-bg);
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    padding: 0;
    text-align: left;
    box-shadow: 0 0 40px var(--accent-glow), inset 0 0 30px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    backdrop-filter: blur(15px);
    user-select: none;
    -webkit-user-select: none;
}

.terminal-header {
    background: rgba(191, 0, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(191, 0, 255, 0.25);
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-dot.red {
    background: #ff5f56;
}

.terminal-dot.yellow {
    background: #ffbd2e;
}

.terminal-dot.green {
    background: #27ca40;
}

.terminal-title {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    color: var(--accent-color);
    opacity: 0.7;
}

.terminal-content {
    padding: 1.5rem 2rem;
    font-size: 1rem;
    color: var(--accent-color);
    min-height: 200px;
}

.terminal-line {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.terminal-line::before {
    content: ">";
    opacity: 0.5;
}

#status-text::after {
    content: "█";
    margin-left: 0.2rem;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

#status-text {
    color: var(--accent-color);
    font-weight: bold;
    font-variant-ligatures: none;
}

/* Sections */
section {
    margin-bottom: 12rem;
}

h2 {
    font-family: var(--font-heading);
    color: var(--mint-gray);
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.section-title {
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-glow);
}

.section-subtitle {
    text-align: center;
    color: var(--slate-gray);
    margin-bottom: 4rem;
}

.subpage-header .section-subtitle {
    margin-bottom: 2rem;
}

/* Trusted By */
.trusted-by h2 {
    font-size: 1.2rem;
    color: var(--slate-gray);
    font-weight: 400;
}

.trusted-logos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    max-width: 1000px;
    margin: 2rem auto 0 auto;
}

.logo-placeholder {
    padding: 1rem;
    background: rgba(191, 0, 255, 0.05);
    border: 1px dashed var(--slate-gray);
    border-radius: 4px;
    color: var(--slate-gray);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 4.5rem;
    transition: all 0.3s ease;
}

.logo-placeholder:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(191, 0, 255, 0.1);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Feature Rows */
.feature-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    margin-bottom: 10rem;
    scroll-margin-top: 120px;
}

.feature-row.reverse {
    flex-direction: row-reverse;
}

.feature-text {
    flex: 1;
    order: 1;
}

.feature-image {
    flex: 1;
    order: 2;
    display: flex;
    justify-content: center;
}

.feature-text h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--mint-gray);
    margin-bottom: 1rem;
}

.feature-text p {
    color: var(--slate-gray);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.feature-full-width {
    flex: 1 0 100%;
    width: 100%;
    order: 3;
    margin: 2rem 0 0 0;
    padding: 2rem 0 3rem 0;
    position: relative;
}

/* Accent Closer Line (Strong to Fade) */
.feature-full-width::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        var(--accent-color) 0%, 
        rgba(191, 0, 255, 0.4) 30%, 
        rgba(191, 0, 255, 0.1) 60%, 
        transparent 100%);
    box-shadow: 0 0 8px rgba(191, 0, 255, 0.2);
}

.feature-full-width p,
.feature-full-width .feature-list {
    max-width: 800px;
    color: var(--slate-gray);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.feature-full-width .feature-list li {
    color: var(--slate-gray);
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.feature-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--slate-gray);
}

.feature-text a,
.feature-list a {
    color: var(--accent-color);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.feature-text a:hover,
.feature-list a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.feature-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.feature-image {
    flex: 1;
}

.placeholder-img {
    width: 100%;
    height: 300px;
    background: rgba(20, 10, 30, 0.6);
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-gray);
    box-shadow: 0 0 20px rgba(191, 0, 255, 0.1);
    backdrop-filter: blur(5px);
}

/* FAQ */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid rgba(191, 0, 255, 0.3);
    border-radius: 4px;
    background: rgba(10, 5, 16, 0.6);
    overflow: hidden;
}

.faq-item summary {
    padding: 1.5rem;
    cursor: pointer;
    font-family: var(--font-heading);
    color: var(--mint-gray);
    font-weight: bold;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    color: var(--accent-color);
    font-size: 1.5rem;
}

.faq-item[open] summary::after {
    content: "-";
}

.faq-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--slate-gray);
    line-height: 1.6;
    border-top: 1px solid rgba(191, 0, 255, 0.1);
}

/* Footer */
.site-footer {
    padding: 3rem 2rem;
    border-top: 1px solid rgba(191, 0, 255, 0.2);
    text-align: center;
    background: rgba(10, 5, 16, 0.8);
    position: relative;
    z-index: 10;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.github-link {
    color: var(--slate-gray);
    transition: all .3s ease;
}

.github-link:hover {
    color: var(--accent-color);
    filter: drop-shadow(0 0 8px var(--accent-color));
}

.site-footer p {
    color: var(--slate-gray);
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 900px) {

    .hero-split,
    .feature-row {
        flex-direction: column;
        text-align: center;
    }

    .feature-row.reverse {
        flex-direction: column;
    }

    h1.glitch {
        font-size: 3rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .feature-list li {
        text-align: left;
    }

    .trusted-logos {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .trusted-logos {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1.25rem;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        width: calc(100% - 2rem);
    }

    .nav-brand {
        flex: 1;
    }

    .nav-right {
        flex: 0 0 auto;
    }

    .nav-links {
        flex: 0 0 100%;
        justify-content: center;
        gap: 0.75rem;
        flex-wrap: wrap;
        font-size: 0.8rem;
    }

    .mega-menu {
        display: none;
    }

    .chevron {
        display: none;
    }

    .subpage-header h1 {
        font-size: 2rem;
    }

    .content-wrapper {
        padding-top: 10rem;
    }
}

.rag-diagram {
    mix-blend-mode: multiply;
}

/* Interactive Impact Glitch */
.impact-glitch {
    animation: impact-glitch-anim 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both !important;
}

@keyframes impact-glitch-anim {
    0% {
        transform: translate(0);
        filter: brightness(1) contrast(1);
    }

    10% {
        transform: translate(-10px, -5px) skew(5deg);
        filter: brightness(2) contrast(1.5) hue-rotate(90deg);
    }

    30% {
        transform: translate(10px, 5px) skew(-5deg);
        filter: brightness(1.5) contrast(2) hue-rotate(180deg);
    }

    50% {
        transform: translate(-5px, 10px) skew(2deg);
        filter: brightness(2) contrast(1.2) hue-rotate(270deg);
    }

    70% {
        transform: translate(5px, -10px) skew(-2deg);
        filter: brightness(1.2) contrast(1.8) hue-rotate(360deg);
    }

    90% {
        transform: translate(-2px, 2px);
        filter: brightness(1.5) contrast(1.1);
    }

    100% {
        transform: translate(0);
        filter: brightness(1) contrast(1);
    }
}

/* Tabbed Interface */
.tabbed-interface {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.tabs-header {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid rgba(191, 0, 255, 0.2);
    padding-bottom: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.tabs-header::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--slate-gray);
    font-family: var(--font-body);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -0.6rem;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--mint-gray);
    background: rgba(191, 0, 255, 0.05);
    border-radius: 4px 4px 0 0;
}

.tab-btn.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

.tabs-content {
    background: rgba(20, 10, 30, 0.6);
    border: 1px solid rgba(191, 0, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    min-height: 300px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
    width: 100%;
    height: 100%;
}

.tab-pane.active {
    display: block;
    cursor: default;
}

/* Image styling for when screenshots replace placeholders */
.feature-image img,
.tab-pane img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    display: block;
    cursor: default;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
.feature-screenshot {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(191, 0, 255, 0.15);
    background: rgba(20, 10, 30, 0.4);
    transition: transform 0.3s ease;
}

.feature-screenshot:hover {
    box-shadow: 0 0 30px var(--accent-glow);
}

.tech-stack-image {
    width: 100%;
    height: auto;
    display: block;
    cursor: default;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(191, 0, 255, 0.15);
    background: rgba(20, 10, 30, 0.4);
}

/* ── Docs Layout ──────────────────────────────────────────────────────────── */

.docs-shell {
    display: flex;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 7rem 2rem 4rem 2rem;
    min-height: calc(100vh - 160px);
    gap: 0;
    position: relative;
    z-index: 10;
}

.docs-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 7rem;
    height: calc(100vh - 8rem);
    overflow-y: auto;
    padding: 2rem 1.5rem 2rem 0;
    border-right: 1px solid rgba(191, 0, 255, 0.15);
    scrollbar-width: none;
}

.docs-sidebar::-webkit-scrollbar { display: none; }

.docs-sidebar-label {
    font-family: var(--font-heading);
    font-size: 0.62rem;
    color: var(--accent-color);
    letter-spacing: 0.15rem;
    opacity: 0.7;
    margin-bottom: 1rem;
}

.docs-sidebar-doc-title {
    font-family: var(--font-heading);
    font-size: 0.62rem;
    color: var(--accent-color);
    letter-spacing: 0.15rem;
    line-height: 1.35;
    margin-bottom: 1.25rem;
}

.docs-sidebar-back {
    display: block;
    color: var(--slate-gray);
    text-decoration: none;
    font-size: 0.8rem;
    margin-bottom: 1.75rem;
    transition: color 0.2s;
}

.docs-sidebar-back:hover { color: var(--accent-color); }

.docs-toc {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.docs-toc a {
    display: block;
    text-decoration: none;
    font-size: 0.82rem;
    padding: 0.28rem 0.75rem;
    color: var(--slate-gray);
    border-left: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    line-height: 1.4;
}

.docs-toc a.toc-h2 {
    color: rgba(230, 216, 240, 0.65);
    margin-top: 0.4rem;
}

.docs-toc a.toc-h3 {
    padding-left: 1.5rem;
    font-size: 0.78rem;
}

.docs-toc a:hover,
.docs-toc a.active {
    color: var(--accent-color);
    border-left-color: var(--accent-color);
}

/* Docs content area */
.docs-content {
    flex: 1;
    min-width: 0;
    padding: 2rem 0 4rem 3rem;
}

.docs-content h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-glow);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(191, 0, 255, 0.2);
    text-align: left;
}

.docs-content h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--mint-gray);
    margin-top: 3rem;
    margin-bottom: 1rem;
    scroll-margin-top: 6rem;
    text-align: left;
}

.docs-content h3 {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--accent-color);
    opacity: 0.85;
    margin-top: 2rem;
    margin-bottom: 0.6rem;
    scroll-margin-top: 6rem;
}

.docs-content p {
    color: var(--mint-gray);
    opacity: 0.85;
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 0.92rem;
}

.docs-content ul,
.docs-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.docs-content li {
    color: var(--mint-gray);
    opacity: 0.85;
    line-height: 1.8;
    margin-bottom: 0.25rem;
    font-size: 0.92rem;
}

.docs-content a {
    color: var(--accent-color);
    text-decoration: none;
}

.docs-content a:hover { text-decoration: underline; }

.docs-content code {
    font-family: var(--font-mono);
    background: rgba(191, 0, 255, 0.08);
    border: 1px solid rgba(191, 0, 255, 0.2);
    border-radius: 3px;
    padding: 0.1rem 0.4rem;
    font-size: 0.85em;
    color: var(--accent-color);
}

.docs-content pre {
    background: var(--terminal-bg);
    border: 1px solid rgba(191, 0, 255, 0.25);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
}


.docs-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: rgba(230, 216, 240, 0.65);
    font-size: 0.87rem;
    line-height: 1.7;
}

/* highlight.js overrides — keep our pre shell, blend hljs colors into the theme */
.docs-content pre code.hljs {
    background: transparent;
    padding: 0;
}

.copy-btn {
    position: absolute;
    top: 0.6rem;
    right: 0.75rem;
    background: transparent;
    border: 1px solid rgba(191, 0, 255, 0.25);
    border-radius: 3px;
    color: var(--slate-gray);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    letter-spacing: 0.05rem;
    user-select: none;
    -webkit-user-select: none;
}

.copy-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.copy-btn.copied {
    border-color: rgba(39, 202, 64, 0.5);
    color: #27ca40;
}

.docs-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.87rem;
}

.docs-content th {
    background: rgba(191, 0, 255, 0.1);
    color: var(--accent-color);
    padding: 0.6rem 1rem;
    text-align: left;
    border: 1px solid rgba(191, 0, 255, 0.2);
    font-family: var(--font-heading);
    font-size: 0.72rem;
    letter-spacing: 0.05rem;
}

.docs-content td {
    padding: 0.55rem 1rem;
    border: 1px solid rgba(191, 0, 255, 0.1);
    color: var(--mint-gray);
    opacity: 0.85;
    line-height: 1.5;
    vertical-align: top;
}

.docs-content tr:hover td { background: rgba(191, 0, 255, 0.04); }

.docs-content hr {
    border: none;
    border-top: 1px solid rgba(191, 0, 255, 0.12);
    margin: 2.5rem 0;
}

.docs-content blockquote {
    border-left: 2px solid var(--accent-color);
    padding-left: 1rem;
    margin-left: 0;
    color: var(--slate-gray);
}

/* Docs index page — category + cards */
.docs-category { margin-bottom: 3rem; }

.docs-category-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(191, 0, 255, 0.15);
}

.docs-category-label {
    font-family: var(--font-heading);
    font-size: 0.68rem;
    color: var(--accent-color);
    letter-spacing: 0.15rem;
    opacity: 0.8;
}

.docs-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.docs-card {
    display: block;
    text-decoration: none;
    padding: 1.5rem;
    background: rgba(20, 10, 30, 0.6);
    border: 1px solid rgba(191, 0, 255, 0.2);
    border-radius: 8px;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
    box-shadow: 0 0 10px rgba(191, 0, 255, 0.05);
}

.docs-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(191, 0, 255, 0.15);
    transform: translateY(-2px);
}

.docs-card h3 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-align: left;
}

.docs-card p {
    font-size: 0.82rem;
    color: var(--slate-gray);
    line-height: 1.5;
    text-align: left;
}

@media (max-width: 900px) {
    .docs-shell {
        flex-direction: column;
        padding-top: 6rem;
    }

    .docs-sidebar {
        width: 100%;
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(191, 0, 255, 0.15);
        padding: 1rem 0 1.5rem 0;
    }

    .docs-toc { flex-direction: row; flex-wrap: wrap; gap: 0.25rem; }

    .docs-toc a { border-left: none; border-bottom: 2px solid transparent; }
    .docs-toc a.toc-h3 { padding-left: 0.75rem; }
    .docs-toc a.active { border-bottom-color: var(--accent-color); }

    .docs-content { padding: 2rem 0; }
}

/* Image Modal / Lightbox */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 5, 16, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    box-shadow: 0 0 50px var(--accent-glow);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.image-modal.active img {
    transform: scale(1);
}
