/* Root Variables */
:root {
    --color-primary: #2EC4B6;
    --color-secondary: #A855F7;
    --color-accent: #45E89F;
    --color-warning: #F0C040;
    --color-dark: #0A1929;
    --color-darker: #0F2B4A;
    --color-slate: #4A6B7B;
    --color-light: #E8F4F0;

    --font-display: 'Josefin Sans', sans-serif;
    --font-body: 'Karla', sans-serif;
    --font-mono: 'Fira Code', monospace;

    --sidebar-width: 240px;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, #0A1929 0%, #0F2B4A 100%);
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--color-light);
}

h2 {
    font-weight: 300;
}

p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--color-dark);
    border-right: 1px solid rgba(46, 196, 182, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    padding: 2rem 1.5rem;
}

.sidebar-header {
    margin-bottom: 3rem;
}

.sidebar-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 0.1em;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}

.sidebar-nav::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, rgba(46, 196, 182, 0.3) 0%, rgba(46, 196, 182, 0) 100%);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 1;
}

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

.nav-link.active {
    color: var(--color-accent);
}

.nav-circle {
    width: 8px;
    height: 8px;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    flex-shrink: 0;
    transition: var(--transition-smooth);
    background: transparent;
}

.nav-link.active .nav-circle {
    background: var(--color-primary);
    box-shadow: 0 0 12px rgba(46, 196, 182, 0.4);
    animation: aurora-pulse 2s ease-in-out infinite;
}

.nav-label {
    font-family: var(--font-body);
}

.sidebar-footer {
    padding-top: 2rem;
    border-top: 1px solid rgba(46, 196, 182, 0.1);
}

.sidebar-tagline {
    font-size: 0.8rem;
    color: rgba(46, 196, 182, 0.6);
    font-style: italic;
    font-family: var(--font-mono);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    position: relative;
    min-height: 100vh;
}

.dependency-canvas {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    height: 100vh;
    z-index: 0;
    display: block;
}

/* Sections */
.content-section {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: rgba(10, 25, 41, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(46, 196, 182, 0.1);
}

.section-content {
    max-width: 800px;
    width: 100%;
}

.section-heading {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-text {
    margin-bottom: 1.5rem;
    color: rgba(232, 244, 240, 0.8);
    font-size: 1.05rem;
}

/* CTA Buttons */
.cta-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.cta-button {
    padding: 0.875rem 2rem;
    font-family: var(--font-body);
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
    color: var(--color-dark);
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(69, 232, 159, 0.3);
}

.cta-button.secondary {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.cta-button.secondary:hover {
    background: rgba(46, 196, 182, 0.1);
    transform: translateY(-2px);
}

/* Graph Container */
.graph-container {
    margin-top: 2rem;
    background: rgba(46, 196, 182, 0.05);
    border: 1px solid rgba(46, 196, 182, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
}

.graph-visualization {
    width: 100%;
    height: 400px;
    background: rgba(10, 25, 41, 0.5);
    border-radius: 0.5rem;
    display: block;
    margin-bottom: 1.5rem;
}

.graph-legend {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.legend-node {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 8px rgba(46, 196, 182, 0.4);
}

.legend-node.transitive {
    opacity: 0.6;
}

.legend-node.vulnerable {
    background: var(--color-warning);
    box-shadow: 0 0 8px rgba(240, 192, 64, 0.4);
}

.legend-label {
    color: rgba(232, 244, 240, 0.7);
}

/* Supply Chain Grid */
.supply-chain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.chain-card {
    background: linear-gradient(135deg, rgba(46, 196, 182, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border: 1px solid rgba(46, 196, 182, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    transition: var(--transition-smooth);
}

.chain-card:hover {
    background: linear-gradient(135deg, rgba(46, 196, 182, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
    transform: translateY(-4px);
    border-color: rgba(46, 196, 182, 0.4);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--color-accent);
}

.card-text {
    font-size: 0.95rem;
    color: rgba(232, 244, 240, 0.7);
}

/* Vulnerability List */
.vulnerability-list {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vuln-item {
    background: rgba(46, 196, 182, 0.05);
    border-left: 4px solid var(--color-primary);
    border-radius: 0.5rem;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    transition: var(--transition-smooth);
}

.vuln-item:hover {
    background: rgba(46, 196, 182, 0.1);
}

.vuln-severity {
    padding: 0.4rem 0.8rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}

.vuln-severity.high {
    background: rgba(240, 192, 64, 0.2);
    color: var(--color-warning);
}

.vuln-severity.medium {
    background: rgba(168, 85, 247, 0.2);
    color: var(--color-secondary);
}

.vuln-package {
    font-family: var(--font-mono);
    color: var(--color-accent);
    font-weight: 600;
}

.vuln-version {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: rgba(232, 244, 240, 0.6);
}

.vuln-details {
    color: rgba(232, 244, 240, 0.7);
    font-size: 0.95rem;
}

/* Compliance Standards */
.compliance-standards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.standard {
    background: rgba(46, 196, 182, 0.08);
    border: 1px solid rgba(46, 196, 182, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
}

.standard h4 {
    color: var(--color-accent);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.standard p {
    color: rgba(232, 244, 240, 0.6);
    font-size: 0.95rem;
}

/* Documentation Links */
.doc-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.doc-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(46, 196, 182, 0.08);
    border: 1px solid rgba(46, 196, 182, 0.2);
    border-radius: 0.5rem;
    color: var(--color-accent);
    text-decoration: none;
    transition: var(--transition-smooth);
    font-weight: 500;
}

.doc-link:hover {
    background: rgba(46, 196, 182, 0.15);
    transform: translateX(4px);
    border-color: rgba(46, 196, 182, 0.4);
}

.link-icon {
    font-size: 1.25rem;
    transition: var(--transition-smooth);
}

.doc-link:hover .link-icon {
    transform: translateX(4px);
}

.link-text {
    flex: 1;
}

/* Animations */
@keyframes aurora-pulse {
    0% {
        box-shadow: 0 0 12px rgba(46, 196, 182, 0.4);
    }
    50% {
        box-shadow: 0 0 24px rgba(46, 196, 182, 0.8);
    }
    100% {
        box-shadow: 0 0 12px rgba(46, 196, 182, 0.4);
    }
}

@keyframes aurora-wave {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100% 0;
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 0;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        width: 240px;
        height: 100vh;
        z-index: 2000;
        transition: left 0.3s ease-in-out;
        box-shadow: 2px 0 24px rgba(0, 0, 0, 0.5);
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .dependency-canvas {
        left: 0;
        width: 100%;
    }

    .content-section {
        padding: 3rem 1.5rem;
    }

    .section-heading {
        font-size: clamp(2rem, 4vw, 3rem);
    }

    .supply-chain-grid,
    .compliance-standards {
        grid-template-columns: 1fr;
    }

    .cta-group {
        flex-direction: column;
    }

    .cta-button {
        width: 100%;
    }

    .vuln-item {
        gap: 1rem;
    }

    .graph-legend {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .section-heading {
        font-size: 1.75rem;
    }

    .section-text {
        font-size: 0.95rem;
    }

    .content-section {
        padding: 2rem 1rem;
    }

    .sidebar {
        width: 100%;
    }
}
