@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --bg: #030508;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-hover: rgba(0, 240, 255, 0.06);
    --bg-code: rgba(0, 0, 0, 0.4);
    --border: rgba(0, 240, 255, 0.12);
    --border-subtle: rgba(0, 240, 255, 0.06);
    --text: #e0f2fe;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #00f0ff;
    --accent-hover: #5eeaff;
    --accent-subtle: rgba(0, 240, 255, 0.08);
    --accent-border: rgba(0, 240, 255, 0.25);
    --neon-pink: #ff0080;
    --neon-purple: #a855f7;
    --green: #00ff88;
    --green-subtle: rgba(0, 255, 136, 0.08);
    --green-border: rgba(0, 255, 136, 0.25);
    --red: #ff3366;
    --red-subtle: rgba(255, 51, 102, 0.08);
    --yellow: #fbbf24;
    --yellow-subtle: rgba(251, 191, 36, 0.08);
    --yellow-border: rgba(251, 191, 36, 0.25);
    --cyan: #5eead4;
    --code-accent: #5eead4;
    --radius: 10px;
    --radius-lg: 14px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html { font-size: 17px; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated background grid */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
    pointer-events: none;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(0, 240, 255, 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 240, 255, 0.4); }

::selection { background: rgba(0, 240, 255, 0.25); color: #fff; text-shadow: 0 0 10px var(--accent); }

/* ── Animated Gradient ── */
@keyframes gradientFlow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ── Layout ── */
.layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
    background: rgba(3, 5, 8, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    padding: 1.5rem 1rem;
    position: sticky; top: 0; height: 100vh;
    overflow-y: auto;
    display: flex; flex-direction: column;
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.05), inset -1px 0 0 rgba(0, 240, 255, 0.08);
}
.sidebar-brand {
    font-size: 1.15rem; font-weight: 800;
    color: var(--text);
    margin-bottom: 0.1rem;
    display: flex; align-items: center; gap: 0.5rem;
    letter-spacing: -0.01em;
    text-decoration: none;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}
.sidebar-brand:hover { color: var(--accent); text-shadow: 0 0 30px rgba(0, 240, 255, 0.5); }
.sidebar-brand .brand-icon {
    width: 22px; height: 22px;
    color: var(--accent);
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.5));
}
.sidebar-tagline {
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}
.sidebar-nav { flex: 1; }
.sidebar-nav h3 {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin: 1.5rem 0 0.4rem;
    font-weight: 700;
}
.sidebar-nav a {
    display: flex; align-items: center; gap: 0.45rem;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.82rem;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}
.sidebar-nav a .nav-icon {
    width: 14px; height: 14px; flex-shrink: 0; opacity: 0.5;
    transition: all 0.2s;
}
.sidebar-nav a:hover {
    color: var(--accent);
    background: var(--bg-hover);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}
.sidebar-nav a:hover .nav-icon { opacity: 0.9; color: var(--accent); filter: drop-shadow(0 0 4px rgba(0, 240, 255, 0.5)); }
.sidebar-nav a.active {
    color: var(--accent);
    background: var(--accent-subtle);
    font-weight: 600;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1), inset 0 0 0 1px var(--accent-border);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}
.sidebar-nav a.active .nav-icon { opacity: 1; color: var(--accent); filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.6)); }
.sidebar-nav a.github-link {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
}
.sidebar-nav a.github-link:hover { color: #fff; border-color: var(--border); }

/* ── Main ── */
.main { padding: 0; max-width: 860px; margin: 0 auto; width: 100%; min-width: 0; }

/* ── Mobile Nav ── */
.mobile-nav {
    display: none;
    align-items: center; justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(3, 5, 8, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.mobile-nav-brand {
    font-weight: 800; color: var(--text); font-size: 1rem;
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}
.mobile-menu-btn {
    background: rgba(0, 240, 255, 0.08); border: 1px solid var(--border);
    color: var(--accent); padding: 0.4rem 0.8rem;
    border-radius: 8px; cursor: pointer; font-family: var(--font); font-size: 0.8rem;
    display: flex; align-items: center; gap: 0.35rem;
    transition: all 0.2s;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}
.mobile-menu-btn:hover {
    background: rgba(0, 240, 255, 0.15);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
    border-color: var(--accent);
}
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); z-index: 150; }
.sidebar-overlay.show { display: block; }

/* ── Content ── */
.content { padding: 3rem 2rem; animation: fadeIn 0.5s ease-out; overflow-wrap: break-word; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.chapter-header { margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.chapter-number {
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.15em;
    color: var(--accent); font-weight: 700; margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}
.chapter-title {
    font-size: 2.4rem; font-weight: 800; margin-bottom: 0.75rem;
    line-height: 1.15; letter-spacing: -0.02em;
    background: linear-gradient(135deg, #e0f2fe 0%, #00f0ff 50%, #0088ff 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.2));
    animation: gradientFlow 4s ease infinite;
}
.chapter-description { color: var(--text-secondary); font-size: 1.1rem; max-width: 600px; line-height: 1.7; }

.learning-objectives {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg); padding: 1.25rem; margin: 2rem 0;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.05), inset 0 1px 0 rgba(255,255,255,0.03);
}
.learning-objectives h3 {
    color: var(--accent); font-size: 0.78rem; text-transform: uppercase;
    letter-spacing: 0.1em; margin-bottom: 0.7rem; font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}
.learning-objectives ul { margin-left: 1.2rem; color: var(--text-secondary); }
.learning-objectives li { margin-bottom: 0.35rem; }

/* ── Sections ── */
.section { margin: 2.5rem 0; }
.section h2 {
    font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #e0f2fe 0%, #5eead4 50%, #00f0ff 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 15px rgba(94, 234, 212, 0.15));
    animation: gradientFlow 4s ease infinite;
}
.section h3 { font-size: 1.15rem; font-weight: 600; margin: 1.5rem 0 0.6rem; color: var(--text); }
.section p { color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.75; }
.section ul, .section ol { margin-left: 1.5rem; color: var(--text-secondary); margin-bottom: 1rem; }
.section li { margin-bottom: 0.35rem; }

/* ── Doc Links ── */
.doc-link {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0.75rem 0 1.25rem;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 240, 255, 0.03);
    border-left: 2px solid var(--accent);
    border-radius: 0 6px 6px 0;
}
.doc-link a { color: var(--accent); text-decoration: none; font-weight: 500; }
.doc-link a:hover { text-decoration: underline; }

/* ── Code ── */
.code-block-wrapper { position: relative; margin: 1.2rem 0; }
.code-block-wrapper pre {
    background: var(--bg-code) !important;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius); padding: 1.1rem 1.25rem;
    overflow-x: auto; font-size: 0.92rem; line-height: 1.65;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.03);
}
.code-block-wrapper pre code { font-family: var(--font-mono); }
.copy-btn {
    position: absolute; top: 0.5rem; right: 0.5rem;
    background: rgba(0, 240, 255, 0.1); border: 1px solid var(--accent-border);
    color: var(--accent); padding: 0.3rem 0.6rem;
    border-radius: 6px; cursor: pointer; font-size: 0.75rem;
    font-family: var(--font); opacity: 0; transition: all 0.2s;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}
.code-block-wrapper:hover .copy-btn { opacity: 1; }
.copy-btn:hover {
    background: var(--accent); color: #000; border-color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}
.copy-btn.copied { background: var(--green); color: #000; border-color: var(--green); opacity: 1; box-shadow: 0 0 20px rgba(0, 255, 136, 0.3); }

code {
    background: rgba(0, 240, 255, 0.1);
    color: var(--code-accent);
    padding: 0.15rem 0.45rem; border-radius: 5px;
    font-family: var(--font-mono); font-size: 0.92em;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.1);
}
pre code { background: none; padding: 0; color: inherit; border: none; box-shadow: none; }

/* ── Comparison Box ── */
.comparison-box {
    margin: 1.5rem 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.04);
}
.comparison-header {
    background: rgba(0, 240, 255, 0.04); padding: 0.7rem 1rem; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; user-select: none;
    border-bottom: 1px solid var(--border-subtle);
}
.comparison-header:hover { background: rgba(0, 240, 255, 0.08); }
.comparison-header h4 { font-size: 0.85rem; color: var(--text); margin: 0; }
.comparison-header .toggle-icon { color: var(--accent); transition: transform 0.2s; filter: drop-shadow(0 0 4px rgba(0, 240, 255, 0.5)); }
.comparison-box.open .toggle-icon { transform: rotate(180deg); }
.comparison-content { display: none; padding: 1rem; background: rgba(0, 0, 0, 0.2); }
.comparison-box.open .comparison-content { display: block; }
.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; overflow: hidden; }
.comparison-col { min-width: 0; }
.comparison-col .code-block-wrapper { margin-left: 0; margin-right: 0; }
.comparison-col h5 { font-size: 0.72rem; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.5rem; letter-spacing: 0.05em; font-weight: 700; }
.comparison-col .lang-tag {
    display: inline-block; padding: 0.15rem 0.55rem; border-radius: 5px;
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.5rem;
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
}
.lang-tag.js { background: rgba(251, 191, 36, 0.15); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.2); }
.lang-tag.py { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); }
.lang-tag.kt { background: rgba(0, 240, 255, 0.12); color: #00f0ff; border: 1px solid rgba(0, 240, 255, 0.2); box-shadow: 0 0 10px rgba(0, 240, 255, 0.1); }

/* ── Exercise Box ── */
.exercise-box {
    background: rgba(168, 85, 247, 0.05);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: var(--radius); padding: 1.25rem; margin: 1.5rem 0;
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.08);
}
.exercise-box h4 {
    color: var(--neon-purple); font-size: 0.8rem; text-transform: uppercase;
    letter-spacing: 0.1em; margin-bottom: 0.7rem; font-weight: 700;
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}
.exercise-box p { color: var(--text-secondary); margin-bottom: 0.7rem; }
.exercise-hint { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--border); }
.exercise-hint summary { color: var(--neon-purple); cursor: pointer; font-size: 0.85rem; font-weight: 600; }
.exercise-hint-content { margin-top: 0.7rem; color: var(--text-secondary); }

/* ── Concept Check ── */
.concept-check {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem; margin: 1.5rem 0;
    border-left: 3px solid var(--yellow);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.05);
}
.concept-check h4 {
    color: var(--yellow); font-size: 0.8rem; text-transform: uppercase;
    letter-spacing: 0.1em; margin-bottom: 0.8rem; font-weight: 700;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}
.concept-check p { color: var(--text); font-weight: 500; margin-bottom: 0.8rem; }
.check-option {
    background: rgba(255,255,255,0.02); border: 1px solid var(--border);
    border-radius: 8px; padding: 0.8rem 1rem; margin: 0.4rem 0;
    cursor: pointer; transition: all 0.2s; color: var(--text-secondary);
}
.check-option:hover { border-color: var(--accent); box-shadow: 0 0 15px rgba(0, 240, 255, 0.1); color: var(--text); }
.check-option.correct { border-color: var(--green); background: var(--green-subtle); color: var(--green); box-shadow: 0 0 15px rgba(0, 255, 136, 0.15); }
.check-option.wrong { border-color: var(--red); background: var(--red-subtle); color: var(--red); box-shadow: 0 0 15px rgba(255, 51, 102, 0.15); }
.check-feedback { margin-top: 0.7rem; padding: 0.7rem; border-radius: 6px; display: none; font-size: 0.88rem; }
.check-feedback.show { display: block; }
.check-feedback.correct { background: var(--green-subtle); color: var(--green); }
.check-feedback.wrong { background: var(--red-subtle); color: var(--red); }

/* ── Info Boxes ── */
.info-box {
    position: relative;
    padding: 0.9rem 1.1rem 0.9rem 2.5rem;
    border-radius: var(--radius); margin: 1rem 0;
    color: var(--text-secondary); line-height: 1.65;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.04);
}
.info-box .info-icon {
    position: absolute; left: 0.9rem; top: 0.9rem;
    width: 18px; height: 18px;
    filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.4));
}
.info-box:not(.warning-box):not(.error-box):not(.success-box) {
    background: rgba(0, 240, 255, 0.04);
    border-left: 3px solid var(--accent);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.06);
}
.info-box:not(.warning-box):not(.error-box):not(.success-box) .info-icon { color: var(--accent); }
.warning-box { background: rgba(251, 191, 36, 0.05); border-left: 3px solid var(--yellow); box-shadow: 0 0 15px rgba(251, 191, 36, 0.06); }
.warning-box .info-icon { color: var(--yellow); filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.4)); }
.error-box { background: rgba(255, 51, 102, 0.05); border-left: 3px solid var(--red); box-shadow: 0 0 15px rgba(255, 51, 102, 0.06); }
.error-box .info-icon { color: var(--red); filter: drop-shadow(0 0 6px rgba(255, 51, 102, 0.4)); }
.success-box { background: rgba(0, 255, 136, 0.05); border-left: 3px solid var(--green); box-shadow: 0 0 15px rgba(0, 255, 136, 0.06); }
.success-box .info-icon { color: var(--green); filter: drop-shadow(0 0 6px rgba(0, 255, 136, 0.4)); }
.info-box strong { color: var(--text); }

/* ── Tip Box ── */
.tip-box {
    position: relative;
    padding: 1.1rem 1.1rem 1.1rem 2.5rem;
    border-radius: var(--radius); margin: 1rem 0;
    line-height: 1.65;
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--green);
    background: rgba(0, 255, 136, 0.03);
    backdrop-filter: blur(8px);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.05);
}
.tip-box .tip-icon {
    position: absolute; left: 1.1rem; top: 1.1rem;
    width: 18px; height: 18px; color: var(--green);
    filter: drop-shadow(0 0 6px rgba(0, 255, 136, 0.4));
}
.tip-box strong { color: var(--green); text-shadow: 0 0 8px rgba(0, 255, 136, 0.3); }

/* ── Navigation ── */
.chapter-nav { display: flex; justify-content: space-between; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); gap: 1rem; }
.nav-btn {
    display: flex; flex-direction: column; padding: 0.9rem 1.25rem;
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text); text-decoration: none;
    transition: all 0.2s; max-width: 45%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}
.nav-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.15);
    transform: translateY(-2px);
}
.nav-btn.next { align-items: flex-end; text-align: right; margin-left: auto; }
.nav-btn .label { font-size: 0.68rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.08em; margin-bottom: 0.2rem; }
.nav-btn .title { font-weight: 600; color: var(--accent); text-shadow: 0 0 10px rgba(0, 240, 255, 0.3); }

/* ── Landing Page ── */
.hero { text-align: center; padding: 5rem 2rem 3rem; max-width: 680px; margin: 0 auto; }
.hero h1 {
    font-size: 3.2rem; font-weight: 800;
    margin-bottom: 1rem; letter-spacing: -0.03em; line-height: 1.05;
    background: linear-gradient(135deg, #e0f2fe 0%, #00f0ff 50%, #0088ff 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(0, 240, 255, 0.3));
    animation: gradientFlow 4s ease infinite;
}
.hero p { color: var(--text-secondary); font-size: 1.15rem; margin-bottom: 2rem; line-height: 1.7; }
.hero-cta {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: linear-gradient(135deg, #00f0ff, #0088ff);
    background-size: 300% 300%;
    color: #000; font-weight: 700;
    padding: 0.85rem 2.2rem; border-radius: var(--radius);
    text-decoration: none; font-size: 0.95rem;
    transition: all 0.2s;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.3), 0 4px 15px rgba(0, 0, 0, 0.3);
    border: none;
    animation: gradientFlow 4s ease infinite;
}
.hero-cta:hover {
    background: linear-gradient(135deg, #5eeaff, #00f0ff, #0088ff);
    background-size: 300% 300%;
    box-shadow: 0 0 50px rgba(0, 240, 255, 0.5), 0 4px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
    animation: gradientFlow 3s ease infinite;
}

.hero-stats {
    display: flex; justify-content: center; gap: 2.5rem;
    margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border-subtle);
}
.hero-stat { text-align: center; }
.hero-stat-value {
    font-size: 1.5rem; font-weight: 800;
    background: linear-gradient(135deg, #00f0ff, #0088ff, #00f0ff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.3));
    animation: gradientFlow 4s ease infinite;
}
.hero-stat-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-top: 0.1rem; font-weight: 600; }

.github-banner {
    display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    max-width: 680px; margin: 0 auto 2rem; padding: 0.75rem 1.5rem;
    background: rgba(0, 240, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    color: var(--text-secondary); font-size: 0.9rem;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.05);
    backdrop-filter: blur(8px);
}
.github-banner svg {
    color: var(--text); flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.3));
}
.github-banner a { color: var(--accent); text-decoration: none; font-weight: 600; text-shadow: 0 0 8px rgba(0, 240, 255, 0.2); }
.github-banner a:hover { text-decoration: underline; text-shadow: 0 0 15px rgba(0, 240, 255, 0.4); }

@media (max-width: 600px) {
    .github-banner { margin: 0 1rem 1.5rem; padding: 0.6rem 1rem; font-size: 0.85rem; flex-wrap: wrap; text-align: center; }
}

.chapters-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem; padding: 0 2rem 3rem; max-width: 860px; margin: 0 auto;
}
.chapter-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg); padding: 1.25rem;
    text-decoration: none; color: var(--text);
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}
.chapter-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.12), 0 8px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(-4px);
}
.chapter-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.chapter-card-number {
    font-size: 0.68rem; color: var(--accent); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}
.chapter-card .duration {
    font-size: 0.68rem; color: var(--text-muted);
    background: rgba(255,255,255,0.03);
    padding: 0.15rem 0.5rem; border-radius: 20px;
    border: 1px solid var(--border-subtle);
}
.chapter-card h3 { font-size: 1.05rem; margin-bottom: 0.3rem; font-weight: 700; }
.chapter-card p { color: var(--text-muted); font-size: 0.83rem; line-height: 1.5; }

.landing-content { max-width: 860px; margin: 0 auto; padding: 0 2rem 2rem; }
.landing-content h2 { font-size: 1.2rem; font-weight: 700; margin: 2rem 0 0.6rem; }
.landing-content ul { margin-left: 1.5rem; color: var(--text-secondary); margin-bottom: 1rem; }
.landing-content li { margin-bottom: 0.35rem; }
.landing-content a { color: var(--accent); text-decoration: none; text-shadow: 0 0 8px rgba(0, 240, 255, 0.2); }
.landing-content a:hover { text-decoration: underline; text-shadow: 0 0 15px rgba(0, 240, 255, 0.4); }

/* ── Footer ── */
.footer {
    text-align: center; padding: 2.5rem 2rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-subtle);
    font-size: 0.82rem;
    background: linear-gradient(to bottom, transparent, rgba(0, 240, 255, 0.02));
}
.footer a { color: var(--accent); text-decoration: none; font-weight: 500; }
.footer a:hover { text-decoration: underline; }

.hljs { background: transparent !important; padding: 0 !important; }

table {
    width: 100%; border-collapse: collapse;
    margin: 1rem 0; font-size: 0.87rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}
th, td { padding: 0.7rem 0.9rem; text-align: left; border-bottom: 1px solid var(--border-subtle); }
th {
    color: var(--accent); font-weight: 600;
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
    background: rgba(0, 240, 255, 0.04);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}
tr:hover { background: rgba(0, 240, 255, 0.02); }

/* ══════════════════════════════════════
   RESPONSIVE — Tablet
   ══════════════════════════════════════ */
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }

    .sidebar {
        display: none;
        position: fixed; top: 0; left: 0;
        width: 280px; height: 100vh;
        z-index: 200;
        background: rgba(3, 5, 8, 0.95);
        border-right: 1px solid var(--border);
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 0 0 50px rgba(0, 240, 255, 0.1);
    }
    .sidebar.open {
        display: flex;
        transform: translateX(0);
    }
    .mobile-nav { display: flex !important; }

    .main { width: 100%; max-width: 100%; }
    .content { padding: 2rem 1.5rem; }

    .chapter-title { font-size: 2rem; }
    .section h2 { font-size: 1.25rem; }

    .code-block-wrapper pre { font-size: 0.85rem; padding: 0.9rem 1rem; }
    .copy-btn { opacity: 1; }

    .comparison-grid { grid-template-columns: 1fr; gap: 0.75rem; }
    .comparison-content { padding: 0.75rem; }

    .chapter-nav { gap: 0.75rem; }
    .nav-btn { max-width: 48%; padding: 0.75rem 1rem; }

    .chapters-grid { grid-template-columns: 1fr; padding: 0 1.5rem 2rem; }

    .hero h1 { font-size: 2.6rem; }
    .hero p { font-size: 1.05rem; }

    table { font-size: 0.82rem; }
    th, td { padding: 0.5rem 0.6rem; }
}

/* ══════════════════════════════════════
   RESPONSIVE — Phone
   ══════════════════════════════════════ */
@media (max-width: 600px) {
    html { font-size: 16px; }
    .content { padding: 1.5rem 1rem; }

    .chapter-header { margin-bottom: 1.5rem; padding-bottom: 1rem; }
    .chapter-title { font-size: 1.7rem; letter-spacing: -0.02em; }
    .chapter-description { font-size: 0.95rem; }
    .chapter-number { font-size: 0.65rem; }

    .section { margin: 1.75rem 0; }
    .section h2 { font-size: 1.15rem; margin-bottom: 0.75rem; }
    .section h3 { font-size: 1rem; }
    .section p { font-size: 0.93rem; line-height: 1.65; }

    .code-block-wrapper { margin: 1rem -0.25rem; }
    .code-block-wrapper pre {
        font-size: 0.82rem;
        padding: 0.75rem 0.85rem;
        border-radius: 6px;
        line-height: 1.55;
    }

    .info-box { padding: 0.75rem 0.85rem 0.75rem 2.2rem; font-size: 0.9rem; }
    .info-box .info-icon { left: 0.75rem; top: 0.75rem; width: 16px; height: 16px; }
    .tip-box { padding: 0.75rem 0.85rem 0.75rem 2.2rem; font-size: 0.9rem; }
    .tip-box .tip-icon { left: 0.85rem; top: 0.75rem; width: 16px; height: 16px; }

    .learning-objectives { padding: 1rem; margin: 1.25rem 0; }

    .concept-check { padding: 1rem; }
    .check-option { padding: 0.65rem 0.85rem; font-size: 0.9rem; }

    .exercise-box { padding: 1rem; }

    .chapter-nav { flex-direction: column; gap: 0.5rem; }
    .nav-btn { max-width: 100%; }
    .nav-btn.next { align-items: flex-start; text-align: left; margin-left: 0; }

    .hero { padding: 3rem 1rem 2rem; }
    .hero h1 { font-size: 2rem; line-height: 1.15; }
    .hero p { font-size: 0.95rem; }

    .hero-stats { gap: 1rem; flex-wrap: wrap; }
    .hero-stat-value { font-size: 1.2rem; }

    .chapters-grid { padding: 0 1rem 2rem; }
    .chapter-card { padding: 1rem; }

    .landing-content { padding: 0 1rem 1.5rem; }

    table { font-size: 0.78rem; display: block; overflow-x: auto; }
    th, td { padding: 0.4rem 0.5rem; }

    .comparison-box { margin: 1rem -0.25rem; border-radius: 6px; }
    .comparison-content { padding: 0.75rem; }

    code { font-size: 0.85em; word-break: break-word; }
}