:root {
    --bg: #06090f;
    --panel: rgba(16, 24, 39, 0.75);
    --panel-border: rgba(255, 255, 255, 0.08);
    --accent: #7c5cff;
    --accent2: #2ee9a6;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --line: rgba(255, 255, 255, 0.05);
    --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
    --glow: rgba(124, 92, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Effects */
.fx-dots {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(var(--line) 1px, transparent 1px);
    background-size: 32px 32px;
    z-index: -1;
    pointer-events: none;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
}

.fx-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    z-index: -1;
    filter: blur(80px);
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: linear-gradient(135deg, #fff 0%, var(--muted) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-background-fill-color: transparent;
    /* Fixed from fill-color typo if any */
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.kicker {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--muted);
    max-width: 800px;
    margin-bottom: 2rem;
}

/* Layout */
.wrap {
    width: 100%;
    margin: 0 auto;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(6, 9, 15, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand h1 {
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navlinks {
    display: flex;
    gap: 1.5rem;
}

.navlinks a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: 0.2s;
}

.navlinks a:hover,
.navlinks a.active {
    color: var(--accent2);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* Sections / Pages */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.page {
    min-height: calc(100vh - 100px);
    padding: 6rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.page.in {
    opacity: 1;
    transform: translateY(0);
}

/* Grids & Cards */
.grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.grid.two {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.grid.three {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 2rem;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: rgba(124, 92, 255, 0.3);
    background: rgba(16, 24, 39, 0.85);
    transform: translateY(-5px);
}

.card h3 {
    margin-bottom: 1rem;
    color: #fff;
}

/* Lists */
.list {
    list-style: none;
}

.list li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.bullet {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background: rgba(124, 92, 255, 0.1);
    color: var(--accent);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Tags */
.tagrow {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    border: 1px solid var(--line);
}

.tag.accent {
    background: rgba(124, 92, 255, 0.1);
    color: var(--accent);
    border-color: rgba(124, 92, 255, 0.2);
}

.tag.green {
    background: rgba(46, 233, 166, 0.1);
    color: var(--accent2);
    border-color: rgba(46, 233, 166, 0.2);
}

/* Diagrams */
.diagram-wrap {
    margin-top: 2rem;
    background: #0b0e14;
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    overflow: hidden;
}

.diagram-toolbar {
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.diagram {
    padding: 3rem;
    overflow: auto;
    background: radial-gradient(circle at center, rgba(124, 92, 255, 0.03) 0%, transparent 70%);
}

.diagram-inner {
    transform-origin: center center;
    transition: transform 0.3s;
    display: flex;
    justify-content: center;
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--muted);
}

.btn.primary {
    background: var(--accent);
    border-color: transparent;
}

/* Responsive */
@media (max-width: 900px) {
    .navlinks {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .grid.two {
        grid-template-columns: 1fr;
    }

    .page {
        padding: 4rem 0;
    }
}

footer {
    padding: 4rem 2rem;
    border-top: 1px solid var(--line);
    text-align: center;
}

.foot {
    color: var(--muted);
    font-size: 0.85rem;
}