@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #050510;
    --sidebar-bg: #0a0a1a;
    --text-primary: #e0e0ff;
    --text-secondary: #9a9ac0;
    --accent-blue: #00d2ff;
    --accent-violet: #8a2be2;
    --glass-bg: rgba(20, 20, 40, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.3s ease;
}

body.theme-light {
    --bg-color: #f0f2f5;
    --sidebar-bg: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --accent-blue: #0077b6;
    --accent-violet: #5e17eb;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

body.theme-hc {
    --bg-color: #000000;
    --sidebar-bg: #000000;
    --text-primary: #ffffff;
    --text-secondary: #ffff00;
    --accent-blue: #00ffff;
    --accent-violet: #ff00ff;
    --glass-bg: #000000;
    --glass-border: #ffffff;
    --glass-shadow: none;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 210, 255, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(138, 43, 226, 0.08), transparent 25%);
    background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -1px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; color: var(--accent-blue); }
h4 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); margin-bottom: 0.5rem;}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-violet);
    text-shadow: 0 0 8px rgba(138, 43, 226, 0.5);
}

/* Layout */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 300px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--glass-border);
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    text-transform: uppercase;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section a {
    display: block;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    font-size: 1rem;
    border-left: 2px solid transparent;
    padding-left: 10px;
    margin-bottom: 0.2rem;
}

.nav-section a:hover {
    color: #fff;
    border-left: 2px solid var(--accent-blue);
    background-color: rgba(255,255,255,0.02);
}

.nav-section a.active {
    color: #fff;
    border-left: 2px solid var(--accent-violet);
    background-color: rgba(138, 43, 226, 0.1);
}

.nav-section a.disabled {
    color: #4a4a6a;
    pointer-events: none;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 300px; /* Offset for fixed sidebar */
    padding: 3rem 4rem;
    max-width: 1400px;
}

/* Glassmorphism Components */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

.content-card {
    background: rgba(20, 20, 40, 0.6);
}

/* Document Formatting (White Papers) */
.doc-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.author {
    font-style: italic;
    color: var(--text-secondary);
}

.doc-body p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.equation-box {
    background: rgba(0, 0, 0, 0.3);
    border-left: 4px solid var(--accent-blue);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    font-size: 1.2rem;
    text-align: center;
}

.proof-card {
    background: linear-gradient(145deg, rgba(0, 255, 204, 0.05), rgba(0,0,0,0.4));
    border: 1px solid rgba(0, 255, 204, 0.2);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-violet));
    color: #fff;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.5);
    transform: translateY(-2px);
    color: #fff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background: rgba(0, 210, 255, 0.1);
    transform: translateY(-2px);
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    margin: 2rem 0;
    background: rgba(0,0,0,0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

th {
    background-color: var(--sidebar-bg); /* Use theme variable for sticky background */
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
    line-height: 1.4;
    min-width: 110px;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid var(--accent-blue);
}

.archaic-term {
    font-style: italic;
    color: #aaa;
    font-weight: 400;
    font-size: 0.8rem;
}

tr:hover td {
    background-color: rgba(0, 210, 255, 0.05);
}

/* Geometric Taxonomy Colors (ROYGBIV Spectrum) */
.geo-perfect { color: #00ff66; font-weight: bold; }
.geo-impeller { color: #ccff00; }
.geo-wedge { color: #ffcc00; }
.geo-scaffold { color: #ff6600; }
.geo-cavitation { color: #ff0033; opacity: 0.8; }

/* Accessibility & Focus */
:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

body.theme-hc :focus {
    outline: 3px solid #ffff00;
}

/* Micro-Interactions */
@keyframes glow-pulse {
    0% { box-shadow: 0 0 10px rgba(0, 255, 204, 0.2); }
    50% { box-shadow: 0 0 30px rgba(0, 255, 204, 0.6); border-color: #00ffcc; }
    100% { box-shadow: 0 0 10px rgba(0, 255, 204, 0.2); }
}

@keyframes glow-pulse-magic {
    0% { box-shadow: 0 0 10px rgba(204, 0, 255, 0.2); }
    50% { box-shadow: 0 0 40px rgba(204, 0, 255, 0.8); border-color: #cc00ff; }
    100% { box-shadow: 0 0 10px rgba(204, 0, 255, 0.2); }
}

.animate-glow {
    animation: glow-pulse 1.5s ease-in-out;
}

.animate-glow-magic {
    animation: glow-pulse-magic 1.5s ease-in-out;
}

