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

:root {
    --bg-primary: #0f1117;
    --bg-secondary: #161822;
    --bg-card: #1c1f2e;
    --bg-code: #1e2235;
    --accent: #4f8ff7;
    --accent-glow: rgba(79, 143, 247, 0.15);
    --accent-hover: #6ba3ff;
    --green: #4ade80;
    --orange: #fb923c;
    --purple: #a78bfa;
    --pink: #f472b6;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #2a2d3e;
    --border-hover: #3d4155;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 8px 32px rgba(0,0,0,0.3);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.4);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* === NAVBAR === */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 17, 23, 0.85);
    backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
}

.navbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.5px;
}

.navbar-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.navbar-links a {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
    position: relative;
}

.navbar-links a:hover,
.navbar-links a.active {
    color: var(--text-primary);
    background: var(--accent-glow);
}

.navbar-links a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background: var(--accent);
    border-radius: 999px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

/* === HERO === */
.hero {
    padding: 100px 24px 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    pointer-events: none;
}

.hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text .subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 480px;
    line-height: 1.7;
}

.hero-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.badge {
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.badge-html { background: rgba(251,146,60,0.12); color: var(--orange); border: 1px solid rgba(251,146,60,0.2); }
.badge-css { background: rgba(79,143,247,0.12); color: var(--accent); border: 1px solid rgba(79,143,247,0.2); }
.badge-js { background: rgba(250,204,21,0.12); color: #facc15; border: 1px solid rgba(250,204,21,0.2); }

.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--accent);
    color: #fff;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79,143,247,0.3);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    transition: all var(--transition);
    cursor: pointer;
}

.btn-outline:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-2px);
}

/* Hero Code */
.hero-code {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(0,0,0,0.25);
    border-bottom: 1px solid var(--border);
}

.code-dots {
    display: flex;
    gap: 7px;
}

.code-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dots span:nth-child(1) { background: #ef4444; }
.code-dots span:nth-child(2) { background: #eab308; }
.code-dots span:nth-child(3) { background: #22c55e; }

.code-filename {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    color: var(--text-muted);
}

.code-body {
    padding: 24px;
    overflow-x: auto;
    position: relative;
}

.code-body pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre;
    margin: 0;
}

/* Syntax Highlighting */
.tag { color: #ef4444; }
.attr { color: var(--orange); }
.string { color: var(--green); }
.comment { color: var(--text-muted); font-style: italic; }
.keyword { color: var(--purple); }
.function { color: #60a5fa; }
.property { color: var(--pink); }
.value { color: var(--green); }
.number { color: var(--orange); }
.selector { color: #60a5fa; }
.punctuation { color: var(--text-muted); }
.variable { color: var(--pink); }

/* === FEATURES === */
.features {
    padding: 100px 24px;
}

.features-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-label {
    display: inline-block;
    padding: 6px 18px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid rgba(79,143,247,0.15);
}

.section-header h2 {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 17px;
    max-width: 560px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 28px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: block;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
    opacity: 0;
    transition: opacity var(--transition);
}

.feature-card:hover::before { opacity: 1; }

.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.feature-card.html-card::before { background: linear-gradient(90deg, var(--orange), #f97316); }
.feature-card.css-card::before { background: linear-gradient(90deg, var(--accent), #3b82f6); }
.feature-card.js-card::before { background: linear-gradient(90deg, #facc15, #eab308); }

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 22px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

.html-card .feature-icon { background: rgba(251,146,60,0.12); color: var(--orange); border: 1px solid rgba(251,146,60,0.15); }
.css-card .feature-icon { background: rgba(79,143,247,0.12); color: var(--accent); border: 1px solid rgba(79,143,247,0.15); }
.js-card .feature-icon { background: rgba(250,204,21,0.12); color: #facc15; border: 1px solid rgba(250,204,21,0.15); }

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14.5px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.feature-topics { display: flex; flex-wrap: wrap; gap: 6px; }

.topic-tag {
    padding: 4px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.feature-arrow {
    position: absolute;
    top: 36px;
    right: 28px;
    color: var(--text-muted);
    font-size: 18px;
    transition: all var(--transition);
}

.feature-card:hover .feature-arrow {
    color: var(--accent);
    transform: translateX(4px);
}

/* === CODE PREVIEW SECTION === */
.code-preview-section {
    padding: 100px 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.code-preview-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.code-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 4px;
    width: fit-content;
}

.code-tab {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    font-family: 'Inter', sans-serif;
}

.code-tab:hover { color: var(--text-secondary); }

.code-tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.code-panel { display: none; }
.code-panel.active { display: block; }

/* === CODE BLOCK WITH COPY === */
.code-block {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--border);
}

.code-block-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    color: var(--text-muted);
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 500;
}

.copy-btn:hover {
    background: var(--accent-glow);
    color: var(--accent);
    border-color: rgba(79,143,247,0.3);
}

.copy-btn.copied {
    background: rgba(74,222,128,0.12);
    color: var(--green);
    border-color: rgba(74,222,128,0.3);
}

.copy-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.code-block-body {
    padding: 20px 24px;
    overflow-x: auto;
}

.code-block-body pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.85;
    color: var(--text-secondary);
    margin: 0;
    white-space: pre;
}

/* === LESSON PAGE === */
.lesson-layout {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 24px 100px;
}

.lesson-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.lesson-breadcrumb a {
    color: var(--accent);
    transition: color var(--transition);
}

.lesson-breadcrumb a:hover { color: var(--accent-hover); }

.lesson-title {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1.2px;
    margin-bottom: 16px;
    line-height: 1.2;
}

.lesson-description {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 680px;
    line-height: 1.7;
}

.lesson-section {
    margin-bottom: 56px;
}

.lesson-section h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.lesson-section:first-of-type h2 {
    border-top: none;
    padding-top: 0;
}

.lesson-section p {
    color: var(--text-secondary);
    font-size: 15.5px;
    margin-bottom: 20px;
    line-height: 1.8;
}

.lesson-section ul {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 20px;
    padding-left: 24px;
    line-height: 1.9;
}

.lesson-section ul li { margin-bottom: 6px; }

.lesson-section ul li code,
.inline-code {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-code);
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 13px;
    color: var(--pink);
    border: 1px solid var(--border);
}

.lesson-note {
    background: var(--accent-glow);
    border: 1px solid rgba(79,143,247,0.15);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 18px 22px;
    margin-bottom: 24px;
    font-size: 14.5px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.lesson-note strong { color: var(--accent); }

/* === EXAM HIGHLIGHT (Discreet) === */
.exam-focus {
    position: relative;
    border-left: 3px solid var(--purple);
    background: linear-gradient(90deg, rgba(167, 139, 250, 0.08), transparent);
    padding-left: 12px;
    transition: all var(--transition);
}

.exam-focus::after {
    content: '★';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 14px;
    color: var(--purple);
    opacity: 0.3;
}

.exam-focus:hover {
    border-left-color: rgba(167, 139, 250, 0.8);
    background: linear-gradient(90deg, rgba(167, 139, 250, 0.15), transparent);
}

.exam-focus:hover::after {
    opacity: 1;
}

.lesson-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.lesson-nav-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    min-width: 200px;
}

.lesson-nav-btn:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-2px);
}

.lesson-nav-btn .nav-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.lesson-nav-btn .nav-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.lesson-nav-btn.next {
    text-align: right;
    margin-left: auto;
}

/* === FOOTER === */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 48px 24px;
    text-align: center;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
    list-style: none;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 14px;
    transition: color var(--transition);
}

.footer-links a:hover { color: var(--text-primary); }

.footer-copy {
    color: var(--text-muted);
    font-size: 13px;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-text { animation: fadeInUp 0.7s ease 0.1s both; }
.hero-code { animation: fadeInUp 0.7s ease 0.3s both; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; gap: 48px; }
    .hero-text h1 { font-size: 42px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .navbar-links { display: none; }
    .mobile-toggle { display: block; }
    .navbar-links.open {
        display: flex; flex-direction: column;
        position: absolute; top: 68px; left: 0; right: 0;
        background: var(--bg-primary); border-bottom: 1px solid var(--border);
        padding: 16px; gap: 4px;
    }
    .hero { padding: 60px 24px 50px; }
    .hero-text h1 { font-size: 34px; }
    .features-grid { grid-template-columns: 1fr; }
    .lesson-title { font-size: 32px; }
    .lesson-nav { flex-direction: column; }
    .lesson-nav-btn.next { text-align: left; }
    .code-tabs { overflow-x: auto; width: 100%; }
}
