/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Themes ──────────────────────────────────────────────────── */
[data-theme="light"] {
    --bg:           #ffffff;
    --bg2:          #f8f8f6;
    --surface:      #ffffff;
    --surface2:     #f3f3f0;
    --border:       #e8e6e0;
    --border2:      #d4d2cc;
    --text:         #111110;
    --text2:        #6f6d66;
    --muted:        #b5b3ac;
    --accent:       #6c47ff;
    --accent2:      #8b6fff;
    --accent-bg:    #f0ecff;
    --green:        #16a34a;
    --green-bg:     #dcfce7;
    --shadow-sm:    0 1px 2px rgba(0,0,0,0.05);
    --shadow:       0 2px 8px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:    0 8px 24px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.05);
    --shadow-lg:    0 20px 48px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
    --font:         'Plus Jakarta Sans', -apple-system, sans-serif;
    --mono:         'JetBrains Mono', monospace;
    --radius:       14px;
}

[data-theme="dark"] {
    --bg:           #0a0a0a;
    --bg2:          #111111;
    --surface:      #161616;
    --surface2:     #1c1c1c;
    --border:       #272727;
    --border2:      #333333;
    --text:         #ededec;
    --text2:        #8c8c89;
    --muted:        #555552;
    --accent:       #9b7fff;
    --accent2:      #b89fff;
    --accent-bg:    #1e1530;
    --green:        #4ade80;
    --green-bg:     #0f2d1a;
    --shadow-sm:    0 1px 2px rgba(0,0,0,0.3);
    --shadow:       0 2px 8px rgba(0,0,0,0.4);
    --shadow-md:    0 8px 24px rgba(0,0,0,0.5);
    --shadow-lg:    0 20px 48px rgba(0,0,0,0.6);
}

/* ── Base ────────────────────────────────────────────────────── */
html { font-size: 16px; scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s, color 0.3s;
}

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

/* ── Navbar ──────────────────────────────────────────────────── */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 62px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
}

[data-theme="dark"] .navbar { background: rgba(10,10,10,0.85); }

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    letter-spacing: -0.01em;
}

.nav-logo {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: white;
    letter-spacing: 0;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.1rem;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text2);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.nav-links a:hover { background: var(--surface2); color: var(--text); }

.theme-toggle {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.35rem 0.55rem;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    margin-left: 0.5rem;
    transition: background 0.15s, transform 0.15s;
    color: var(--text);
}
.theme-toggle:hover { background: var(--border); transform: scale(1.05); }

/* ── Container ───────────────────────────────────────────────── */
.container { max-width: 860px; margin: 0 auto; padding: 0 1.5rem; flex: 1; }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5rem 0 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    animation: floatBlob 8s ease-in-out infinite;
}

[data-theme="dark"] .blob { opacity: 0.25; }

.blob-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #c4b5fd, #818cf8);
    top: -100px; right: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, #a5f3fc, #67e8f9);
    bottom: 0; left: -80px;
    animation-delay: 3s;
}

.blob-3 {
    width: 250px; height: 250px;
    background: radial-gradient(circle, #fde68a, #fca5a5);
    top: 40%; left: 40%;
    animation-delay: 5s;
}

@keyframes floatBlob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.97); }
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.4;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 680px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--green);
    background: var(--green-bg);
    border: 1px solid var(--green);
    padding: 0.3rem 0.85rem 0.3rem 0.65rem;
    border-radius: 99px;
    margin-bottom: 2rem;
    letter-spacing: 0.01em;
}

.badge-dot {
    width: 7px; height: 7px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

.hero-title {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, #ec4899 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-height: 1.2em;
    display: inline-block;
}

.gradient-text::after {
    content: '|';
    -webkit-text-fill-color: var(--accent);
    animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-sub {
    font-size: 1.15rem;
    color: var(--text2);
    line-height: 1.75;
    max-width: 520px;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat { text-align: center; }
.stat-num { display: block; font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text); }
.stat-label { font-size: 0.75rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-divider { width: 1px; height: 32px; background: var(--border2); }

.hero-scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 1;
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.4; transform: scaleY(0.6); }
}

.hero-scroll-indicator span {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    writing-mode: vertical-rl;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font);
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 0 0 rgba(108,71,255,0.4);
}
.btn-primary:hover {
    background: var(--accent2);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(108,71,255,0.35);
    color: white;
}

.btn-ghost {
    background: var(--surface2);
    color: var(--text);
    border: 1px solid var(--border2);
}
.btn-ghost:hover {
    background: var(--border);
    transform: translateY(-2px);
    color: var(--text);
}

.btn-white {
    background: white;
    color: var(--accent);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.btn-white:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    color: var(--accent);
}

/* ── Sections ────────────────────────────────────────────────── */
.section {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
}

.section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-head h2 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
}

.link-arrow {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    transition: color 0.2s;
}
.link-arrow:hover { color: var(--accent); }
.link-arrow span { transition: transform 0.2s; display: inline-block; }
.link-arrow:hover span { transform: translateX(3px); }

.muted { color: var(--muted); }

/* ── Cards ───────────────────────────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease,
                border-color 0.2s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-bg) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
    color: var(--text);
}

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

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.85rem;
    position: relative;
}

.card-arrow {
    font-size: 1.1rem;
    color: var(--muted);
    transition: color 0.2s, transform 0.2s;
    flex-shrink: 0;
}
.card:hover .card-arrow { color: var(--accent); transform: translate(2px, -2px); }

.card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
    position: relative;
}

.card-desc {
    font-size: 0.855rem;
    color: var(--text2);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1.1rem;
    position: relative;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.card-date {
    font-size: 0.75rem;
    color: var(--muted);
    font-family: var(--mono);
}

.card-read {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.2s, transform 0.2s;
}
.card:hover .card-read { opacity: 1; transform: translateX(0); }

.card-more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface2);
    border-style: dashed;
    min-height: 160px;
}

.card-more-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text2);
    position: relative;
    transition: color 0.2s;
}

.card-more-inner .card-arrow { font-size: 1.2rem; }
.card-more:hover .card-more-inner { color: var(--accent); }
.card-more-icon { font-size: 1.5rem; }

/* ── Tags ────────────────────────────────────────────────────── */
.card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.18rem 0.55rem;
    background: var(--accent-bg);
    color: var(--accent);
    border-radius: 99px;
    text-transform: uppercase;
}

/* ── Build Grid ──────────────────────────────────────────────── */
.build-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.build-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
    text-decoration: none;
    color: var(--text);
}

.build-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    color: var(--text);
}

.build-featured {
    grid-column: span 1;
    background: linear-gradient(135deg, var(--accent-bg), var(--surface));
    border-color: var(--accent);
}

.build-icon { font-size: 1.75rem; flex-shrink: 0; }
.build-body { flex: 1; }
.build-body h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.35rem; letter-spacing: -0.01em; }
.build-body p { font-size: 0.845rem; color: var(--text2); line-height: 1.55; }

.build-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.15rem 0.55rem;
    border-radius: 99px;
    margin-bottom: 0.4rem;
    background: var(--green-bg);
    color: var(--green);
}

.build-badge-soon {
    background: var(--surface2);
    color: var(--muted);
}

.build-arrow {
    font-size: 1rem;
    color: var(--muted);
    transition: color 0.2s, transform 0.2s;
}
.build-card:hover .build-arrow { color: var(--accent); transform: translate(2px, -2px); }

/* ── CTA ─────────────────────────────────────────────────────── */
.cta-section {
    margin: 1rem 0 5rem;
    padding: 4rem 3rem;
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 50%, #ec4899 100%);
    border-radius: 20px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
    animation: ctaGlow 4s ease-in-out infinite;
}

@keyframes ctaGlow {
    0%, 100% { transform: translate(-10%, -10%); }
    50% { transform: translate(10%, 10%); }
}

.cta-content { position: relative; z-index: 1; }
.cta-emoji { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
.cta-section h2 { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.75rem; }
.cta-section p { opacity: 0.9; font-size: 1.05rem; margin-bottom: 2rem; max-width: 400px; margin-left: auto; margin-right: auto; }

/* ── Reveal animation ────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Blog index ──────────────────────────────────────────────── */
.blog-header { padding: 3.5rem 0 2rem; }
.blog-header h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 0.4rem; }

.post-list { display: flex; flex-direction: column; }

.post-list-item {
    display: block;
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    transition: padding-left 0.25s;
    group: true;
}

.post-list-item:first-child { border-top: 1px solid var(--border); }
.post-list-item:hover { padding-left: 0.75rem; }

.post-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem; }
.post-date { font-size: 0.75rem; color: var(--muted); font-family: var(--mono); }
.post-list-item h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.45rem; transition: color 0.2s; }
.post-list-item:hover h2 { color: var(--accent); }
.post-list-item p { font-size: 0.9rem; color: var(--text2); }

/* ── Blog post article ───────────────────────────────────────── */
.post-article { max-width: 680px; padding: 2.5rem 0 5rem; }

.post-header { margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.post-header h1 { font-size: 2.1rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.04em; margin: 0.75rem 0 0.85rem; }
.post-summary { font-size: 1.05rem; color: var(--text2); line-height: 1.7; }

.post-content { line-height: 1.85; font-size: 1.02rem; }
.post-content h2 { font-size: 1.4rem; font-weight: 800; margin: 2.5rem 0 0.85rem; letter-spacing: -0.03em; }
.post-content h3 { font-size: 1.15rem; font-weight: 700; margin: 2rem 0 0.5rem; }
.post-content p { margin-bottom: 1.4rem; }
.post-content ul, .post-content ol { margin: 0 0 1.4rem 1.5rem; }
.post-content li { margin-bottom: 0.45rem; }
.post-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-content code {
    font-family: var(--mono);
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 0.12rem 0.4rem;
    border-radius: 5px;
    font-size: 0.86em;
    color: #e11d48;
}
[data-theme="dark"] .post-content code { color: #f9a8d4; }
.post-content pre {
    background: #13111c;
    color: #e2def4;
    padding: 1.35rem 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.7;
    border: 1px solid #2d2640;
    box-shadow: var(--shadow-md);
}
.post-content pre code { padding: 0; background: none; border: none; color: inherit; font-size: inherit; }
.post-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 0.6rem 1.25rem;
    color: var(--text2);
    margin: 1.75rem 0;
    font-style: italic;
    background: var(--accent-bg);
    border-radius: 0 8px 8px 0;
}
.post-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: 0.9rem; }
.post-content th { background: var(--surface2); padding: 0.65rem 1rem; border: 1px solid var(--border); font-weight: 700; text-align: left; }
.post-content td { padding: 0.65rem 1rem; border: 1px solid var(--border); }
.post-content tr:nth-child(even) td { background: var(--bg2); }
.post-content img { max-width: 100%; border-radius: 10px; }

.post-footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.post-footer a { font-size: 0.9rem; color: var(--text2); font-weight: 500; }
.post-footer a:hover { color: var(--accent); }

/* ── Callout boxes ───────────────────────────────────────────── */
.question, .answer, .warning, .concept, .realworld {
    padding: 14px 18px;
    margin: 1.4rem 0;
    border-radius: 10px;
    font-size: 0.93rem;
    line-height: 1.72;
}

[data-theme="light"] .question  { background: #eff6ff; border-left: 4px solid #3b82f6; }
[data-theme="light"] .answer    { background: #f0fdf4; border-left: 4px solid #22c55e; }
[data-theme="light"] .warning   { background: #fff7ed; border-left: 4px solid #f97316; }
[data-theme="light"] .concept   { background: #faf5ff; border-left: 4px solid #a855f7; }
[data-theme="light"] .realworld { background: #f0fdf4; border-left: 4px solid #16a34a; }

[data-theme="dark"] .question  { background: #0d1f33; border-left: 4px solid #3b82f6; }
[data-theme="dark"] .answer    { background: #0d2218; border-left: 4px solid #22c55e; }
[data-theme="dark"] .warning   { background: #2a1800; border-left: 4px solid #f97316; }
[data-theme="dark"] .concept   { background: #1a0d2e; border-left: 4px solid #a855f7; }
[data-theme="dark"] .realworld { background: #0a2218; border-left: 4px solid #16a34a; }

.question strong, .answer strong, .warning strong,
.concept strong, .realworld strong { display: block; margin-bottom: 6px; font-size: 0.9rem; }

/* ── Projects page ───────────────────────────────────────────── */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-top: 2rem; }
.project-card {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.project-card h2 { font-size: 1.05rem; font-weight: 700; margin: 0.6rem 0 0.4rem; }
.project-card p { font-size: 0.87rem; color: var(--text2); margin-bottom: 1rem; line-height: 1.55; }

.project-status { display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 0.18rem 0.6rem; border-radius: 99px; letter-spacing: 0.04em; }
.status-in-progress { background: #fef3c7; color: #92400e; }
.status-completed { background: #dcfce7; color: #166534; }
[data-theme="dark"] .status-in-progress { background: #2a1800; color: #fbbf24; }
[data-theme="dark"] .status-completed { background: #052e16; color: #4ade80; }

/* ── Chat ────────────────────────────────────────────────────── */
.chat-container {
    margin-top: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 560px;
    box-shadow: var(--shadow-md);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg2);
}

.chat-msg { max-width: 82%; }
.chat-msg strong { font-size: 0.72rem; color: var(--muted); display: block; margin-bottom: 0.3rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.chat-msg p { background: var(--surface); padding: 0.8rem 1.1rem; border-radius: 12px; font-size: 0.93rem; line-height: 1.65; margin: 0; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.chat-msg.user { align-self: flex-end; text-align: right; }
.chat-msg.user p { background: var(--accent); color: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(108,71,255,0.3); }

.chat-form { display: flex; border-top: 1px solid var(--border); padding: 0.9rem; gap: 0.65rem; background: var(--surface); }

.chat-form input {
    flex: 1;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    color: var(--text);
    font-size: 0.93rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: var(--font);
}
.chat-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }

/* ── Footer ──────────────────────────────────────────────────── */
.footer { padding: 1.5rem 2rem; border-top: 1px solid var(--border); background: var(--bg); }
.footer-inner { max-width: 860px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; color: var(--muted); }
.footer-brand { font-weight: 700; color: var(--text2); }
.footer a { color: var(--muted); transition: color 0.2s; }
.footer a:hover { color: var(--accent); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .navbar { padding: 0 1rem; }
    .container { padding: 0 1rem; }
    .hero { min-height: 80vh; padding: 3.5rem 0 3rem; }
    .hero-title { font-size: 2.4rem; }
    .hero-actions { flex-direction: column; align-items: flex-start; }
    .cards-grid { grid-template-columns: 1fr; }
    .build-grid { grid-template-columns: 1fr; }
    .cta-section { padding: 2.5rem 1.5rem; }
    .cta-section h2 { font-size: 1.5rem; }
    .hero-scroll-indicator { display: none; }
    .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}
