:root {
    --bg: #ffffff;
    --side-bg: #f8f9fa;
    --text: #1a1a1a;
    --text-light: #666;
    --accent: #2c3e50;
    --border: #ececec;
    --font-header: 'Playfair Display', serif;
    --font-body: 'Source Serif Pro', serif;
    --font-ui: 'Source Sans Pro', sans-serif;
}

.dark-theme {
    --bg: #121212;
    --side-bg: #1a1a1a;
    --text: #e0e0e0;
    --text-light: #a0a0a0;
    --border: #333;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

/* Progress Bar */
#progress-container {
    position: fixed;
    top: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 1000;
}

#progress-bar {
    height: 4px;
    background: var(--accent);
    width: 0%;
}

/* Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 300px;
    background: var(--side-bg);
    border-right: 1px solid var(--border);
    padding: 40px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 80px 10%;
}

/* Typography */
h1 {
    font-family: var(--font-header);
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 40px;
}

.reading-area {
    font-size: 1.25rem;
    line-height: 1.9;
    max-width: 700px;
}

.drop-cap {
    float: left;
    font-size: 5rem;
    line-height: 0.8;
    padding-right: 12px;
    font-family: var(--font-header);
    color: var(--accent);
}

blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 30px;
    margin: 40px 0;
    font-style: italic;
    font-size: 1.5rem;
    color: var(--text-light);
}

/* Sidebar UI */
.side-nav ul {
    list-style: none;
    margin-top: 60px;
}

.side-nav li a {
    text-decoration: none;
    color: var(--text-light);
    font-family: var(--font-ui);
    display: block;
    padding: 15px 0;
    font-size: 1.1rem;
}

.side-nav li a span {
    font-size: 0.7rem;
    margin-right: 15px;
    opacity: 0.5;
}

.side-nav li a.active, .side-nav li a:hover {
    color: var(--text);
    font-weight: 600;
}

#theme-toggle {
    margin-top: auto;
    background: var(--text);
    color: var(--bg);
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-family: var(--font-ui);
}

/* Responsive */
@media (max-width: 1024px) {
    .app-wrapper { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: relative; }
    .main-content { padding: 40px 5%; }
}