/* Styles for backend.html */
/* ── Hero ───────────────────────────────────────────── */
.backend-hero {
    text-align: center;
    padding: 3rem 0 4rem;
}

.backend-hero-badge {
    margin-bottom: 1.5rem;
}

.backend-hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.backend-hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.backend-hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ── Stats ──────────────────────────────────────────── */
.backend-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 5rem;
}

@media (min-width: 768px) {
    .backend-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ── Section wrapper ────────────────────────────────── */
.backend-section {
    margin-bottom: 2rem;
}

/* ── Framework Cards ────────────────────────────────── */
.framework-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .framework-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.framework-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.framework-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.flask-card::before  { background: linear-gradient(90deg, #3b82f6, #06b6d4); }
.fastapi-card::before { background: linear-gradient(90deg, #10b981, #3b82f6); }
.django-card::before  { background: linear-gradient(90deg, #8b5cf6, #ec4899); }

.framework-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
}

.framework-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.flask-icon   { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.fastapi-icon { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.django-icon  { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }

.framework-name {
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
}

.framework-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
    margin-bottom: 1rem;
}

.fastapi-tag {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
    border-color: rgba(16, 185, 129, 0.2);
}

.django-tag {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border-color: rgba(139, 92, 246, 0.2);
}

.framework-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

.framework-topics {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.75rem;
    flex-grow: 1;
}

.framework-topics li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-left: 1.25rem;
    position: relative;
}

.framework-topics li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-blue);
    font-size: 0.75rem;
}

.fastapi-card .framework-topics li::before { color: var(--accent-emerald); }
.django-card  .framework-topics li::before { color: #a78bfa; }

.framework-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition);
    margin-top: auto;
}

.fastapi-card .framework-link { color: var(--accent-emerald); }
.django-card  .framework-link { color: #a78bfa; }

.framework-link:hover {
    gap: 0.7rem;
}

/* ── Curriculum list ────────────────────────────────── */
.curriculum-list {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.curriculum-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.curriculum-icon {
    font-size: 1.5rem;
    width: 2.5rem;
    flex-shrink: 0;
    text-align: center;
    margin-top: 0.1rem;
}

.curriculum-item strong {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.curriculum-item p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin: 0;
    line-height: 1.55;
}

/* ── About section grid (reuse from about page) ─────── */
.about-section-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 900px) {
    .about-section-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.about-section-text p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

/* ── Code visual card (reuse from about page) ───────── */
.about-visual-card {
    background: #0d1117;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.visual-card-header {
    background: #161b22;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.visual-card-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
    font-family: var(--font-mono);
}

.visual-code {
    padding: 1.5rem;
    font-size: 0.82rem;
    line-height: 1.7;
    color: #c9d1d9;
    overflow-x: auto;
    font-family: var(--font-mono);
    white-space: pre;
    background: transparent;
    border: none;
    margin: 0;
}

.code-keyword { color: #ff7b72; }
.code-class   { color: #79c0ff; }
.code-fn      { color: #d2a8ff; }
.code-str     { color: #a5d6ff; }

/* ── Learning Path ──────────────────────────────────── */
.learning-path-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.04) 0%, rgba(16, 185, 129, 0.04) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    margin: 4rem 0;
    position: relative;
    overflow: hidden;
}

.learning-path-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

.path-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 720px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .path-steps {
        flex-direction: row;
        align-items: flex-start;
    }
}

.path-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    padding: 0 1rem;
}

.path-step-num {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    flex-shrink: 0;
    box-shadow: 0 0 20px var(--accent-glow);
}

.path-step-content h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.path-step-content p {
    font-size: 0.83rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.path-connector {
    display: none;
}

@media (min-width: 768px) {
    .path-connector {
        display: block;
        height: 2px;
        background: linear-gradient(90deg, var(--accent-blue), var(--accent-emerald));
        flex: 0 0 40px;
        margin-top: 25px;
        opacity: 0.4;
    }
}

/* ── CTA (reuse from about page) ───────────────────── */
.about-cta {
    margin-bottom: 2rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.about-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

.about-cta h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 1rem;
}

.about-cta p {
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto 2rem;
}

.about-cta-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* stat cards (reuse) */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* section labels / headings (reuse) */
.section-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-blue);
    display: block;
    margin-bottom: 0.75rem;
}

.about-section-heading {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 1.5rem;
}

/* btn-secondary (reuse) */
.btn-secondary {
    display: inline-block;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-hover);
    color: var(--text-primary);
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* post-card-title override for h3 */
.post-card-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

/* ── Python Interactive Studio (Option 1) ───────────── */
.python-studio-section {
    position: relative;
}

.studio-wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4);
    position: relative;
}

.studio-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #3b82f6, #8b5cf6, #ef4444);
}

/* Tabs Bar */
.studio-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.studio-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 1.1rem 1rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
}

.studio-tab:hover {
    background: rgba(255, 255, 255, 0.03);
}

.studio-tab.active {
    background: var(--card-bg);
    border-bottom-color: var(--accent-blue);
}

.studio-tab.active[data-target="beginner"] {
    border-bottom-color: #10b981;
}

.studio-tab.active[data-target="intermediate"] {
    border-bottom-color: #f59e0b;
}

.studio-tab.active[data-target="senior"] {
    border-bottom-color: #ef4444;
}

.tab-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
}

.tab-indicator.green  { background: #10b981; box-shadow: 0 0 8px #10b981; }
.tab-indicator.yellow { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.tab-indicator.red    { background: #ef4444; box-shadow: 0 0 8px #ef4444; }

.tab-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.tab-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Studio Grid */
.studio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 960px) {
    .studio-grid {
        grid-template-columns: 42% 58%;
    }
}

/* Left Info Card */
.studio-info-card {
    padding: 2.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 960px) {
    .studio-info-card {
        border-bottom: none;
        border-right: 1px solid var(--border-color);
    }
}

.pane-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    width: fit-content;
}

.badge-beginner {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-intermediate {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-senior {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.pane-title {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.pane-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

.pane-takeaways {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.takeaway-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.takeaway-icon {
    color: var(--accent-emerald);
    font-weight: bold;
    flex-shrink: 0;
}

.pane-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.studio-btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.85rem;
}

/* Right Code Terminal Card */
.studio-code-card {
    background: #0d1117;
    display: flex;
    flex-direction: column;
    min-height: 380px;
}

.studio-code-header {
    background: #161b22;
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.studio-window-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.studio-code-filename {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-left: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.studio-header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.btn-copy-code {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #c9d1d9;
    padding: 0.25rem 0.55rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-family: var(--font-mono);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition);
}

.btn-copy-code:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.btn-copy-code.copied {
    background: rgba(16, 185, 129, 0.25);
    border-color: #10b981;
    color: #10b981;
}

.btn-github-star {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--accent-blue);
    padding: 0.25rem 0.55rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
}

.btn-github-star:hover {
    background: var(--accent-blue);
    color: #fff;
}

.studio-code-body {
    flex-grow: 1;
    padding: 1.25rem;
    overflow-x: auto;
    background: #0d1117;
}

.studio-code-block {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    line-height: 1.7;
    color: #c9d1d9;
    background: transparent;
    border: none;
    white-space: pre;
}

/* Syntax Highlighting Colors */
.code-keyword { color: #ff7b72; font-weight: 600; }
.code-class   { color: #79c0ff; font-weight: 600; }
.code-fn      { color: #d2a8ff; font-weight: 500; }
.code-str     { color: #a5d6ff; }
.code-comment { color: #8b949e; font-style: italic; }

.studio-code-footer {
    background: #161b22;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.clone-label {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.clone-cmd {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: #58a6ff;
    background: rgba(56, 139, 253, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(56, 139, 253, 0.2);
}

@media (max-width: 768px) {
    .studio-tabs {
        grid-template-columns: 1fr;
    }
    .studio-tab {
        padding: 0.85rem 1rem;
    }
    .studio-info-card {
        padding: 1.5rem;
    }
}

