:root {
    /* Brand Palette */
    --bg: #0b0f14;
    --surface: #131820;
    --surface-hover: #1c222c;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.15);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #06b6d4; 
    --primary-dim: rgba(6, 182, 212, 0.15);
    --font-main: 'Inter', sans-serif;
    --nav-height: 70px;
    --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

[data-theme="light"] {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary: #0891b2;
    --primary-dim: rgba(8, 145, 178, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* Typography & Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; width: 100%; }
h1, h2, h3 { line-height: 1.1; font-weight: 600; color: var(--text-main); }
a { text-decoration: none; color: inherit; transition: 0.2s; }

/* Utilities */
.flex { display: flex; }
.grid { display: grid; }
.center { align-items: center; justify-content: center; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* SVG Fixes */
svg { width: 1em; height: 1em; display: inline-block; vertical-align: middle; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.8rem 1.6rem; border-radius: 8px; font-weight: 500; 
    transition: all 0.3s var(--ease); cursor: pointer; border: none; font-size: 0.95rem;
    gap: 0.5rem;
}
.btn-primary { background: var(--text-main); color: var(--bg); font-weight: 600; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.btn-outline { border: 1px solid var(--border-strong); color: var(--text-main); background: transparent; }
.btn-outline:hover { background: var(--surface-hover); border-color: var(--text-muted); }

/* Navigation */
nav {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border); background: rgba(11, 15, 20, 0.7);
}
[data-theme="light"] nav { background: rgba(255, 255, 255, 0.8); }

.nav-inner { height: var(--nav-height); display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; gap: 0.5rem; }

.nav-links { display: flex; gap: 2rem; align-items: center; height: 100%; }
.nav-links a { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; display: flex; align-items: center; height: 100%; }
.nav-links a:hover, .nav-links a.active { color: var(--text-main); }

/* Dropdown Menu */
.dropdown { position: relative; display: inline-block; height: 100%; display: flex; align-items: center; }
.dropdown > a { cursor: default; }

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%; left: 50%; transform: translateX(-50%);
    background-color: var(--surface);
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    z-index: 2000;
    margin-top: -5px; 
}
.dropdown-content::before {
    content: ''; position: absolute; top: -6px; left: 50%; margin-left: -6px;
    border-width: 0 6px 6px; border-style: solid;
    border-color: var(--border) transparent; display: block; width: 0;
}
.dropdown:hover .dropdown-content { display: block; animation: fadeIn 0.2s ease; }
.dropdown-content a {
    color: var(--text-muted); padding: 10px 16px; text-decoration: none;
    display: block; border-radius: 6px; font-size: 0.9rem; transition: 0.2s;
    line-height: 1.4; height: auto;
}
.dropdown-content a:hover { background-color: var(--surface-hover); color: var(--text-main); }
.dropdown-content a.active { background-color: var(--surface-hover); color: var(--primary); }

@keyframes fadeIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 4rem 0; text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-top: auto; }

/* Controls */
.nav-controls { display: flex; gap: 1rem; align-items: center; }
.control-group { background: var(--surface); padding: 3px; border-radius: 20px; border: 1px solid var(--border); display: flex; align-items: center; }
.control-btn {
    background: transparent; border: none; color: var(--text-muted);
    padding: 4px 10px; font-size: 0.75rem; font-weight: 600; cursor: pointer; border-radius: 15px;
    line-height: 1; display: flex; align-items: center; justify-content: center;
}
.control-btn.active { background: var(--bg); color: var(--text-main); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

@media(max-width: 768px) {
    .nav-links { display: none; }
}

/* --- SuperNotes Specific Visuals --- */
.sn-grid-bg {
    background-image: radial-gradient(var(--border-strong) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: center;
}

.sn-note {
    background: #1e1e1e; border: 1px solid var(--border);
    border-radius: 8px; padding: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-family: 'Inter', sans-serif; font-size: 0.75rem;
    color: #eee; position: absolute;
    transition: transform 0.3s ease;
}
.sn-note:hover { transform: scale(1.1); z-index: 10; border-color: var(--primary); }
.sn-note::before { content:''; display:block; width:20px; height:4px; border-radius:2px; margin-bottom:8px; }
.sn-note.yellow::before { background: #facc15; }
.sn-note.pink::before { background: #f472b6; }
.sn-note.cyan::before { background: #22d3ee; }

.connection-line {
    position: absolute; height: 2px; background: var(--border-strong);
    transform-origin: left center; z-index: 0;
}