/* ============================================
   PROJECTS: list, details, chat demo, live frame, gallery, video
   ============================================ */

/* ----- Chat demo ----- */
/* ----- Scenario tabs ----- */
.scenario-tabs {
    display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 12px;
    max-width: 1080px; margin: 0 auto 20px;
}
.scenario-tab {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(22, 28, 40, 0.6);
    color: var(--text-soft); text-align: left;
    font-family: inherit; cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.scenario-tab:hover { border-color: rgba(139, 92, 246, 0.35); transform: translateY(-2px); }
.scenario-tab > i {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.06); color: #c084fc; font-size: 1rem;
}
.scenario-tab strong { display: block; color: white; font-size: 0.95rem; }
.scenario-tab small { color: var(--text-mute); font-size: 0.8rem; }
.scenario-tab.active {
    border-color: rgba(139, 92, 246, 0.6);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(139, 92, 246, 0.16));
}
.scenario-tab.active > i { background: var(--gradient-primary); color: white; }

/* ----- Layout ----- */
.live-demo-grid {
    display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px;
    max-width: 1080px; margin: 0 auto;
}

/* ----- Chat shell ----- */
.chat-shell {
    border: 1px solid var(--border);
    border-radius: 24px; overflow: hidden;
    background: #0f131b;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    display: flex; flex-direction: column;
}
.chat-browser-bar {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 14px; background: #161b25;
    border-bottom: 1px solid var(--border);
}
.chat-browser-bar > span { width: 10px; height: 10px; border-radius: 50%; background: #3a4252; }
.chat-browser-bar > span:nth-child(1) { background: #f87171; }
.chat-browser-bar > span:nth-child(2) { background: #fbbf24; }
.chat-browser-bar > span:nth-child(3) { background: #34d399; }
.chat-url {
    margin-left: 12px; flex: 1; max-width: 260px;
    padding: 4px 12px; border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-mute); font-size: 0.78rem;
}
.chat-url i { font-size: 0.7rem; margin-right: 4px; color: #34d399; }

.chat-widget { display: flex; flex-direction: column; height: 560px; }
.chat-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}
.chat-agent { display: flex; align-items: center; gap: 12px; }
.chat-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 0.95rem;
    transition: background 0.4s;
}
.chat-avatar.ai { background: var(--gradient-primary); }
.chat-avatar.human { background: var(--gradient-warm); }
.chat-agent-name { font-weight: 600; color: white; font-size: 0.95rem; }
.chat-agent-status { display: flex; align-items: center; gap: 6px; color: var(--text-mute); font-size: 0.78rem; }
.chat-restart {
    width: 34px; height: 34px; border-radius: 10px;
    border: 1px solid var(--border); background: transparent;
    color: var(--text-soft); cursor: pointer;
}
.chat-restart:hover { color: white; background: rgba(255, 255, 255, 0.06); }

.chat-body {
    flex: 1; overflow-y: auto;
    padding: 20px 18px;
    display: flex; flex-direction: column; gap: 10px;
    scroll-behavior: smooth;
}
.msg {
    max-width: 82%;
    padding: 11px 15px;
    border-radius: 18px;
    font-size: 0.93rem; line-height: 1.5;
    animation: msgIn 0.3s ease;
    word-wrap: break-word;
}
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg.user { align-self: flex-end; background: #2b5be7; color: white; border-bottom-right-radius: 6px; }
.msg.ai { align-self: flex-start; background: #1d2330; color: #e6ecf5; border-bottom-left-radius: 6px; }
.msg.human { align-self: flex-start; background: rgba(249, 115, 22, 0.14); border: 1px solid rgba(249, 115, 22, 0.3); color: #fde6d4; border-bottom-left-radius: 6px; }
.msg-label { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 3px; opacity: 0.7; }
.msg.system {
    align-self: center; max-width: 100%;
    background: transparent; color: var(--text-mute);
    font-size: 0.78rem; padding: 4px 12px;
    display: flex; align-items: center; gap: 8px;
}
.msg.system::before, .msg.system::after { content: ''; height: 1px; width: 32px; background: var(--border); }
.msg.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.msg.typing span {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--text-mute);
    animation: typingDot 1.2s infinite;
}
.msg.typing span:nth-child(2) { animation-delay: 0.15s; }
.msg.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingDot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }

.slot-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.slot-row button {
    padding: 7px 12px; border-radius: 10px;
    border: 1px solid rgba(96, 165, 250, 0.4);
    background: rgba(59, 130, 246, 0.1);
    color: #93c5fd; font-family: inherit; font-size: 0.82rem; cursor: pointer;
}
.slot-row button:hover:not(:disabled) { background: rgba(59, 130, 246, 0.25); }
.slot-row button:disabled { opacity: 0.45; cursor: default; }
.slot-row button.picked { opacity: 1; background: #2b5be7; color: white; border-color: #2b5be7; }

.chat-suggestions {
    display: flex; gap: 8px; padding: 0 18px 10px;
    overflow-x: auto; scrollbar-width: none;
}
.chat-suggestions::-webkit-scrollbar { display: none; }
.chat-suggestions button {
    flex-shrink: 0;
    padding: 7px 14px; border-radius: 60px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-soft); font-family: inherit; font-size: 0.82rem; cursor: pointer;
    transition: all 0.2s;
}
.chat-suggestions button:hover { color: white; border-color: rgba(139, 92, 246, 0.5); }

.chat-input {
    display: flex; gap: 8px; padding: 12px 14px;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}
.chat-input input {
    flex: 1; min-width: 0;
    padding: 12px 16px; border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
    color: white; font-family: inherit; font-size: 0.92rem; outline: none;
}
.chat-input input:focus { border-color: rgba(139, 92, 246, 0.6); }
.chat-input button {
    width: 46px; border-radius: 14px; border: none;
    background: var(--gradient-primary); color: white; cursor: pointer;
}
.chat-input button:disabled { opacity: 0.5; cursor: default; }

/* ----- Insight panel ----- */
.insight-panel {
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(18, 22, 33, 0.75);
    backdrop-filter: blur(14px);
    padding: 20px;
    display: flex; flex-direction: column;
    min-width: 0;
}
.insight-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.insight-head h3 { font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.insight-head h3 i { color: #c084fc; }
.chip.orange { background: rgba(249, 115, 22, 0.12); border-color: rgba(249, 115, 22, 0.35); color: #fb923c; }

.insight-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.insight-metric {
    padding: 12px 14px; border-radius: 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-soft);
    display: flex; flex-direction: column; gap: 2px;
}
.insight-metric span { color: var(--text-mute); font-size: 0.75rem; }
.insight-metric strong { font-size: 1.2rem; color: white; transition: color 0.3s; }
.insight-metric small { color: var(--text-mute); font-size: 0.75rem; }
.sentiment-bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); margin: 8px 0 4px; overflow: hidden; }
.sentiment-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #fbbf24, #34d399); transition: width 0.6s ease, background 0.6s ease; }
.sentiment-bar i.bad { background: linear-gradient(90deg, #ef4444, #f97316); }

.insight-log-title { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-mute); margin-bottom: 10px; }
.insight-log {
    list-style: none; flex: 1;
    display: flex; flex-direction: column; gap: 8px;
    max-height: 300px; overflow-y: auto;
    padding-right: 4px;
}
.insight-empty { color: var(--text-mute); font-size: 0.85rem; padding: 14px; border: 1px dashed var(--border); border-radius: 12px; text-align: center; }
.log-item {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 10px 12px; border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    animation: msgIn 0.35s ease;
}
.log-item > i {
    width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 0.78rem;
}
.log-item.blue > i { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.log-item.purple > i { background: rgba(139, 92, 246, 0.15); color: #c084fc; }
.log-item.green > i { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.log-item.orange > i { background: rgba(249, 115, 22, 0.15); color: #fb923c; }
.log-item.red > i { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.log-item strong { display: block; font-size: 0.85rem; color: white; }
.log-item span { font-size: 0.78rem; color: var(--text-mute); }

.insight-outcome {
    margin-top: 14px; padding: 14px 16px; border-radius: 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.12));
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #a7f3d0; font-size: 0.9rem;
    display: flex; gap: 10px; align-items: center;
    animation: msgIn 0.4s ease;
}
.insight-outcome strong { color: white; }


/* ============================================
   PROJECTS LIST
   ============================================ */
.projects-page,
.projects-page button,
.projects-page input {
    font-family: inherit;
}

.projects-hero { padding-bottom: 48px; }
.projects-hero h1 { max-width: 900px; margin: 0 auto 18px; }
.projects-hero p.lead { max-width: 740px; margin-bottom: 0; }

.projects-counts {
    margin: 36px auto 0; max-width: 620px;
    display: grid; grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--border); border-radius: 16px;
    background: rgba(18, 22, 33, 0.55);
}
.projects-counts[hidden] { display: none; }
.projects-counts > div { padding: 16px 10px; display: flex; flex-direction: column; gap: 3px; }
.projects-counts > div + div { border-left: 1px solid var(--border); }
.projects-counts strong { font-size: 1.65rem; font-weight: 700; color: white; line-height: 1.1; }
.projects-counts span { color: var(--text-mute); font-size: 0.82rem; }

.projects-section { padding-top: 52px; }
.projects-intro { margin-bottom: 30px; }
.projects-intro .eyebrow { margin-bottom: 14px; }
.projects-intro .section-title { margin-bottom: 8px; }
.projects-intro .section-subtitle { max-width: none; margin: 0; }
.projects-controls { margin-bottom: 30px; }
.projects-toolbar {
    display: flex; justify-content: space-between; align-items: center; gap: 18px;
    flex-wrap: wrap; padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.kind-tabs {
    display: inline-flex; flex-wrap: wrap; gap: 5px;
}
.kind-tabs button {
    padding: 9px 13px; border: 1px solid transparent; border-radius: 9px;
    background: transparent; color: var(--text-soft);
    font-size: 0.9rem; font-weight: 500; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.kind-tabs button:hover { color: white; background: rgba(255, 255, 255, 0.045); }
.kind-tabs button.active {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3); color: #e6ddff;
}
.projects-search {
    display: flex; align-items: center; gap: 10px;
    padding: 0 14px; height: 44px; min-width: 250px;
    border: 1px solid var(--border); border-radius: 10px;
    background: rgba(255, 255, 255, 0.035); color: var(--text-mute);
    transition: border-color 0.2s, background 0.2s;
}
.projects-search:focus-within { border-color: rgba(139, 92, 246, 0.55); background: rgba(255, 255, 255, 0.055); }
.projects-search input { flex: 1; min-width: 0; border: none; background: transparent; color: white; font-size: 0.9rem; outline: none; }
.projects-search input::placeholder { color: var(--text-mute); }
.category-chips { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 14px; }
.category-chips .chip {
    cursor: pointer; font-family: inherit; padding: 6px 12px; font-size: 0.82rem;
    border-radius: 8px; border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025); color: var(--text-soft);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.category-chips .chip:hover { color: white; border-color: rgba(139, 92, 246, 0.4); }
.category-chips .chip.active { background: rgba(139, 92, 246, 0.14); border-color: rgba(139, 92, 246, 0.38); color: #e6ddff; }

.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.project-card {
    display: flex; flex-direction: column;
    min-width: 0; border-radius: 18px; overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.075);
    background: linear-gradient(180deg, rgba(26, 32, 46, 0.82), rgba(18, 22, 33, 0.88));
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    animation: msgIn 0.4s ease;
}
.project-card:hover {
    transform: translateY(-4px); border-color: rgba(139, 92, 246, 0.38);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3);
}
.project-card:focus-visible { outline: 2px solid #a78bfa; outline-offset: 4px; }
.pc-thumb {
    position: relative; aspect-ratio: 16 / 9;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pc-thumb::after {
    content: ""; position: absolute; inset: 55% 0 0;
    background: linear-gradient(180deg, transparent, rgba(8, 11, 18, 0.25));
    pointer-events: none;
}
.pc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.project-card:hover .pc-thumb img { transform: scale(1.04); }
.pc-icon {
    width: 68px; height: 68px; border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.65rem; color: white; position: relative; z-index: 1;
    background: rgba(255, 255, 255, 0.13); backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.35s;
}
.project-card:hover .pc-icon { transform: scale(1.08) rotate(-4deg); }
.c-purple { background: linear-gradient(135deg, #6d28d9, #3b82f6); }
.c-blue { background: linear-gradient(135deg, #1d4ed8, #06b6d4); }
.c-green { background: linear-gradient(135deg, #047857, #06b6d4); }
.c-pink { background: linear-gradient(135deg, #be185d, #f97316); }
.c-orange { background: linear-gradient(135deg, #c2410c, #f59e0b); }
.c-cyan { background: linear-gradient(135deg, #0e7490, #6366f1); }
.pc-thumb.has-img { background: #0f131b; }
.pc-kind {
    position: absolute; top: 12px; left: 12px;
    z-index: 1; padding: 5px 9px; border-radius: 7px;
    background: rgba(7, 10, 17, 0.72); backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white; font-size: 0.72rem; font-weight: 600;
    display: inline-flex; align-items: center; gap: 6px;
}
.pc-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.pc-cat { color: #c084fc; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.055em; margin-bottom: 7px; }
.pc-body h3 { font-size: 1.15rem; line-height: 1.3; margin-bottom: 8px; }
.pc-body p {
    color: var(--text-soft); font-size: 0.92rem; line-height: 1.6; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pc-badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; min-height: 25px; }
.pc-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 9px; border-radius: 7px;
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-soft);
    color: var(--text-soft); font-size: 0.75rem;
}
.pc-badge i { color: #34d399; }
.pc-link {
    align-self: flex-start; color: white; font-weight: 600; font-size: 0.9rem;
    display: inline-flex; align-items: center; gap: 9px;
    padding-top: 13px; border-top: 1px solid var(--border-soft); width: 100%;
}
.pc-link i { transition: transform 0.2s; color: #c084fc; }
.project-card:hover .pc-link i { transform: translateX(4px); }

.project-card.skeleton { pointer-events: none; animation: none; }
.project-card.skeleton .pc-thumb, .project-card.skeleton .pc-body i, .sk-line {
    background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.09), rgba(255,255,255,0.04));
    background-size: 200% 100%; animation: shimmer 1.4s infinite;
}
.project-card.skeleton .pc-body i { display: block; height: 12px; border-radius: 6px; margin-bottom: 10px; }
.project-card.skeleton .pc-body i:nth-child(1) { width: 40%; }
.project-card.skeleton .pc-body i:nth-child(2) { width: 85%; height: 18px; }
.project-card.skeleton .pc-body i:nth-child(3) { width: 70%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.projects-empty { text-align: center; color: var(--text-soft); padding: 40px 0; }
.projects-empty button { background: none; border: none; color: #c084fc; font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
.projects-empty code { color: #f472b6; }

/* ============================================
   PROJECT DETAILS
   ============================================ */
.project-hero { text-align: left; padding-top: 48px; }
.project-skeleton { max-width: 760px; }
.sk-line { display: block; height: 14px; border-radius: 8px; margin-bottom: 16px; }
.sk-line.tall { height: 46px; }
.sk-line.w30 { width: 30%; } .sk-line.w60 { width: 60%; } .sk-line.w70 { width: 70%; } .sk-line.w90 { width: 90%; }

.crumbs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--text-mute); font-size: 0.85rem; margin-bottom: 28px; }
.crumbs a { color: var(--text-soft); }
.crumbs a:hover { color: white; }
.crumbs i { font-size: 0.6rem; opacity: 0.6; }
.crumbs span { color: var(--text-mute); }

.ph-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.ph-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.project-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 18px; }
.project-hero p.lead { margin: 0 0 22px; max-width: 680px; }
.ph-tags { display: flex; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 28px; }
.ph-tags span { color: var(--text-mute); font-size: 0.9rem; font-weight: 500; }
.project-hero .hero-cta-row { justify-content: flex-start; }

.ph-facts {
    border: 1px solid var(--border); border-radius: 22px;
    background: rgba(18, 22, 33, 0.75); backdrop-filter: blur(14px);
    padding: 24px;
    animation: heroRise 0.6s ease both;   /* transform-only: keeps LCP fast */
}
.ph-facts-icon {
    width: 56px; height: 56px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: white; margin-bottom: 18px;
}
.ph-facts dl { display: grid; gap: 0; }
.ph-facts dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border-soft); font-size: 0.9rem; }
.ph-facts dt { color: var(--text-mute); white-space: nowrap; }
.ph-facts dt i { width: 16px; color: #a78bfa; margin-right: 4px; }
.ph-facts dd { color: white; font-weight: 500; text-align: right; }
.ph-tech { padding-top: 14px; border-top: 1px solid var(--border-soft); }
.ph-tech > span { display: block; color: var(--text-mute); font-size: 0.8rem; margin-bottom: 10px; }
.ph-tech div { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-tech b { font-weight: 500; font-size: 0.8rem; padding: 4px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); color: var(--text-soft); }

.ph-metrics {
    margin-top: 44px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    border: 1px solid var(--border); border-radius: 22px;
    background: rgba(18, 22, 33, 0.6); backdrop-filter: blur(12px);
    overflow: hidden;
}
.ph-metrics > div { padding: 22px 20px; display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--border); margin-left: -1px; }
.ph-metrics strong { font-size: 1.9rem; font-weight: 800; line-height: 1.1; background: var(--gradient-cool); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ph-metrics span { color: var(--text-mute); font-size: 0.85rem; }

/* Sticky section nav */
.section-nav {
    position: sticky; top: 72px; z-index: 50;
    background: rgba(10, 12, 16, 0.85);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft);
}
.section-nav-inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 8px 0; scroll-behavior: smooth; }
.section-nav-inner::-webkit-scrollbar { display: none; }
.section-nav a {
    flex-shrink: 0; padding: 8px 14px; border-radius: 60px;
    color: var(--text-soft); font-size: 0.88rem; font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.section-nav a:hover { color: white; }
.section-nav a.active { color: white; background: rgba(139, 92, 246, 0.2); }
.project-section { scroll-margin-top: 140px; }
.project-section + .project-section { padding-top: 40px; }

/* Overview */
.overview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.overview-card {
    position: relative; padding: 28px; border-radius: 22px;
    background: linear-gradient(180deg, rgba(26, 32, 46, 0.8), rgba(18, 22, 33, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-top: 3px solid var(--accent, #8b5cf6);
}
.overview-card.orange { --accent: #f97316; }
.overview-card.blue { --accent: #3b82f6; }
.overview-card.green { --accent: #10b981; }
.overview-card .card-icon { width: 52px; height: 52px; font-size: 1.3rem; border-radius: 14px; margin-bottom: 16px; }
.overview-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.overview-card p { color: var(--text-soft); font-size: 0.95rem; line-height: 1.7; }
.ov-step { position: absolute; top: 22px; right: 24px; font-weight: 800; font-size: 1.6rem; color: rgba(255, 255, 255, 0.08); }

/* Live frame */
.live-frame {
    max-width: 1100px; margin: 0 auto;
    border: 1px solid var(--border); border-radius: 20px; overflow: hidden;
    background: #0f131b; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.live-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #161b25; border-bottom: 1px solid var(--border); }
.live-dots { display: flex; gap: 6px; }
.live-dots span { width: 10px; height: 10px; border-radius: 50%; background: #f87171; }
.live-dots span:nth-child(2) { background: #fbbf24; }
.live-dots span:nth-child(3) { background: #34d399; }
.live-url { flex: 1; min-width: 0; padding: 5px 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); color: var(--text-mute); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-url i { color: #34d399; font-size: 0.7rem; margin-right: 4px; }
.live-devices { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); }
.live-devices button, .live-open {
    width: 32px; height: 30px; border-radius: 8px; border: none;
    background: transparent; color: var(--text-mute); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.live-devices button.active { background: rgba(139, 92, 246, 0.3); color: white; }
.live-open:hover, .live-devices button:hover { color: white; }
.live-stage { background: repeating-linear-gradient(45deg, #0d1017, #0d1017 10px, #10141c 10px, #10141c 20px); display: flex; justify-content: center; }
.live-stage iframe { display: block; width: 100%; height: 640px; border: none; background: white; transition: width 0.4s ease; }
.live-frame[data-size="tablet"] iframe { width: 820px; max-width: 100%; }
.live-frame[data-size="mobile"] iframe { width: 390px; max-width: 100%; }
.live-note { text-align: center; color: var(--text-mute); font-size: 0.85rem; margin-top: 14px; }
.live-note a { color: #c084fc; font-weight: 600; }

/* Gallery */
.gallery { max-width: 1000px; margin: 0 auto; }
.gallery-main {
    position: relative; border-radius: 20px; overflow: hidden;
    border: 1px solid var(--border); background: #0f131b;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.gallery-main img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: #0f131b; }
.g-prev, .g-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(10, 12, 16, 0.7); backdrop-filter: blur(8px);
    color: white; cursor: pointer; transition: background 0.2s;
}
.g-prev { left: 14px; } .g-next { right: 14px; }
.g-prev:hover, .g-next:hover { background: rgba(139, 92, 246, 0.6); }
.gallery-caption {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 18px; border-top: 1px solid var(--border);
    font-size: 0.9rem; color: var(--text-soft);
}
.g-count { color: var(--text-mute); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumbs button {
    flex: 0 0 120px; padding: 0; border-radius: 12px; overflow: hidden;
    border: 2px solid transparent; background: none; cursor: pointer; opacity: 0.55;
    transition: opacity 0.2s, border-color 0.2s;
}
.gallery-thumbs button img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.gallery-thumbs button:hover { opacity: 0.85; }
.gallery-thumbs button.active { opacity: 1; border-color: #8b5cf6; }

/* Video */
.video-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 20px; max-width: 1100px; margin: 0 auto; }
.video-layout.no-chapters { grid-template-columns: 1fr; max-width: 900px; }
.video-wrap {
    position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden;
    border: 1px solid var(--border); background: black;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.video-wrap iframe, .video-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.video-chapters { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.video-chapters button {
    width: 100%; display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; border-radius: 14px;
    border: 1px solid var(--border-soft); background: rgba(22, 28, 40, 0.6);
    color: white; font-family: inherit; font-size: 0.9rem; text-align: left; cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.video-chapters button:hover { border-color: rgba(139, 92, 246, 0.35); }
.video-chapters button.active { border-color: rgba(139, 92, 246, 0.6); background: rgba(139, 92, 246, 0.12); }
.ch-num { font-weight: 800; color: rgba(167, 139, 250, 0.8); font-size: 0.85rem; }
.ch-text { flex: 1; min-width: 0; }
.ch-time { color: var(--text-mute); font-size: 0.78rem; font-variant-numeric: tabular-nums; }

/* Steps flow */
.steps-flow { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 20px; position: relative; }
.flow-step { position: relative; padding: 26px 22px; border-radius: 20px; background: rgba(22, 28, 40, 0.7); border: 1px solid var(--border-soft); }
.flow-num {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--gradient-primary); color: white; font-weight: 800; margin-bottom: 16px;
    box-shadow: 0 0 0 6px rgba(139, 92, 246, 0.12);
}
.flow-step h4 { font-size: 1.05rem; margin-bottom: 6px; }
.flow-step p { color: var(--text-soft); font-size: 0.9rem; }
.flow-step:not(:last-child)::after {
    content: "\f054"; font-family: "Font Awesome 6 Free"; font-weight: 900;
    position: absolute; right: -16px; top: 34px; z-index: 2;
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #1a1f2c; border: 1px solid var(--border); color: #a78bfa; font-size: 0.6rem;
}

/* Use cases */
.usecase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.usecase {
    display: flex; gap: 14px; align-items: center;
    padding: 18px; border-radius: 18px;
    background: rgba(22, 28, 40, 0.7); border: 1px solid var(--border-soft);
}
.usecase > i {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(59, 130, 246, 0.12); color: #60a5fa;
}
.usecase strong { display: block; color: white; font-size: 0.95rem; }
.usecase span { color: var(--text-mute); font-size: 0.85rem; }

/* Testimonial */
.project-quote {
    max-width: 860px; margin: 0 auto; text-align: center;
    padding: 48px 40px; border-radius: 28px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.12));
    border: 1px solid rgba(139, 92, 246, 0.3);
}
.project-quote > i { font-size: 2rem; color: #a78bfa; opacity: 0.7; margin-bottom: 18px; }
.project-quote blockquote { font-size: clamp(1.1rem, 2.2vw, 1.4rem); line-height: 1.6; color: white; font-weight: 500; margin-bottom: 26px; }
.pq-author { display: inline-flex; align-items: center; gap: 12px; text-align: left; }
.pq-author .avatar { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; background: var(--gradient-primary); color: white; }
.pq-author strong { display: block; }
.pq-author span { color: var(--text-mute); font-size: 0.88rem; }

.faq-wrap { max-width: 860px; margin: 0 auto; }
.faq-q:focus-visible { outline: 2px solid #a78bfa; outline-offset: -2px; }
.feature-card h3 { font-size: 1.1rem; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 960px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .ph-grid, .live-demo-grid, .video-layout { grid-template-columns: 1fr; }
    .ph-grid { gap: 28px; }
    .overview-grid { grid-template-columns: 1fr; }
    .steps-flow { grid-template-columns: repeat(2, 1fr); }
    .flow-step::after { display: none; }
    .insight-log { max-height: 240px; }
    .live-stage iframe { height: 560px; }
}
@media (max-width: 760px) {
    .scenario-tabs { grid-template-columns: 1fr; gap: 8px; }
    .scenario-tab { padding: 12px 14px; }
    .chat-widget { height: 500px; }
    .chat-browser-bar { display: none; }
    .msg { max-width: 88%; font-size: 0.9rem; }
}
@media (max-width: 640px) {
    .projects-grid, .steps-flow { grid-template-columns: 1fr; }
    .projects-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
    .kind-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .kind-tabs::-webkit-scrollbar { display: none; }
    .kind-tabs button { padding: 8px 14px; font-size: 0.85rem; }
    .projects-search { min-width: 0; width: 100%; }
    .category-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 14px 16px 0; }
    .category-chips::-webkit-scrollbar { display: none; }
    .category-chips .chip { flex-shrink: 0; }
    .projects-counts strong { font-size: 1.4rem; }
    .projects-counts > div { padding: 14px 6px; }
    .projects-counts span { font-size: 0.74rem; }
    .projects-section { padding-top: 40px; }
    .projects-intro { margin-bottom: 24px; }
    .projects-hero { padding-bottom: 36px; }
    .project-hero { padding-top: 28px; }
    .project-hero .hero-cta-row .btn { width: 100%; }
    .ph-metrics { grid-template-columns: 1fr 1fr; }
    .ph-metrics > div { padding: 16px; border-top: 1px solid var(--border); }
    .ph-metrics strong { font-size: 1.5rem; }
    .section-nav { top: 64px; }
    .live-bar { gap: 8px; padding: 8px 10px; }
    .live-dots { display: none; }
    .live-stage iframe { height: 520px; }
    .g-prev, .g-next { width: 36px; height: 36px; }
    .gallery-thumbs button { flex-basis: 90px; }
    .project-quote { padding: 32px 20px; border-radius: 22px; }
}
