@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;600;800&display=swap');

:root {
    --accent: #6366f1;
    --glass: rgba(15, 23, 42, 0.7);
    --emerald: #10b981;
    --slate-900: #020617;
    --gold: #fbbf24;
    --indigo-rgb: 99, 102, 241;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--slate-900);
    color: #cbd5e1;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.bg-glow {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.15), transparent),
                radial-gradient(circle at 20% 80%, rgba(30, 41, 59, 1), transparent);
    z-index: -1;
}

.glass { background: var(--glass); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.05); }

/* --- MODAL CENTERING LOGIC --- */
.modal-container {
    display: none; /* Initially hidden */
    position: fixed;
    inset: 0;
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* This class is toggled by GSAP/JS to show the modal */
.modal-active {
    display: flex !important;
}

/* --- VIEW SECTIONS --- */
.view-section { display: none; opacity: 0; transform: translateY(15px); }
.view-section.active { display: flex; flex-direction: column; opacity: 1; transform: translateY(0); transition: all 0.5s ease; }

#gatekeeper-view { display: none; }
#gatekeeper-view.active { display: flex; }

.network-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    height: calc(100vh - 280px);
    min-height: 500px;
}

/* --- LISTS & TILES --- */
.fav-list { overflow-y: auto; padding-right: 12px; }
.project-feed { overflow-y: auto; padding-right: 12px; scroll-behavior: smooth; }

.project-tile {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid rgba(255, 255, 255, 0.03);
    background: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
}
.project-tile:hover {
    transform: translateY(-8px);
    border-color: rgba(var(--indigo-rgb), 0.5);
    background: rgba(var(--indigo-rgb), 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.fav-node-card { transition: all 0.3s ease; border-left: 3px solid transparent; }
.fav-node-card:hover { background: rgba(255,255,255,0.05); border-left: 3px solid var(--accent); transform: translateX(5px); }
.fav-node-card.selected { background: rgba(var(--indigo-rgb), 0.1); border-left: 3px solid var(--accent); }

.sidebar-link { transition: all 0.3s; cursor: pointer; position: relative; color: #94a3b8; }
.sidebar-link:hover { background: rgba(255,255,255,0.03); color: white; }
.sidebar-link.active { color: white; background: rgba(var(--indigo-rgb), 0.1); }
.sidebar-link.active::after { content: ''; position: absolute; left: 0; top: 20%; height: 60%; width: 4px; background: var(--accent); border-radius: 0 4px 4px 0; }

/* --- GRID & DOTS --- */
.node-grid { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; background: rgba(255,255,255,0.02); padding: 20px; border-radius: 20px; }
.node-dot { aspect-ratio: 1; background: rgba(255,255,255,0.1); border-radius: 2px; transition: all 0.5s; }
.node-dot.active-node { background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* --- FORM COMPONENTS --- */
.switch { position: relative; display: inline-block; width: 40px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #334155; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--emerald); }
input:checked + .slider:before { transform: translateX(20px); }

.nav-link { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #94a3b8; transition: color 0.3s; }

details > summary { list-style: none; outline: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }