@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================
   DESIGN VARIABLES
   ========================================== */
:root {
    --font-display: 'Outfit', sans-serif;
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 20px;
    --r-full: 9999px;

    --sp-xs: 0.5rem;
    --sp-sm: 1rem;
    --sp-md: 1.5rem;
    --sp-lg: 2.25rem;
    --sp-xl: 3.5rem;
    --sp-2xl: 5rem;
    --sp-3xl: 7rem;

    /* Light mode colors */
    --bg-0: #f5f3ee;
    --bg-1: #ebe8df;
    --bg-2: #dedad0;
    --card: #ffffff;
    --txt-0: #0d0f11;
    --txt-1: #434850;
    --txt-2: #7e8490;
    --acc: #0e6b62;
    --acc-hi: #128f83;
    --acc-br: #17c9b4;
    --acc-glow: rgba(14, 107, 98, 0.12);
    --acc-glow-vivid: rgba(23, 201, 180, 0.18);
    --border: rgba(13, 15, 17, 0.08);
    --border-hi: rgba(13, 15, 17, 0.16);
    --border-acc: rgba(14, 107, 98, 0.28);
    --dot: rgba(14, 107, 98, 0.07);
    --sh-sm: 0 1px 4px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.03);
    --sh-md: 0 6px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    --sh-lg: 0 20px 56px rgba(0, 0, 0, 0.10), 0 4px 16px rgba(0, 0, 0, 0.06);
    --sh-acc: 0 8px 32px rgba(14, 107, 98, 0.28);
    --sh-vivid: 0 0 40px rgba(23, 201, 180, 0.18), 0 8px 32px rgba(14, 107, 98, 0.22);
    --sel-bg: #0e6b62;
    --sel-txt: #ffffff;

    --hero-glow-1: rgba(14, 107, 98, 0.28);
    --hero-glow-2: rgba(99, 102, 241, 0.14);
    --hero-glow-3: rgba(23, 201, 180, 0.10);

    /* 3D card colors */
    --dev-clr: #0891b2;
    --dev-glow: rgba(8, 145, 178, 0.07);
    --dev-glow-lg: rgba(8, 145, 178, 0.15);

    --ai-clr: #7c3aed;
    --ai-glow: rgba(124, 58, 237, 0.07);
    --ai-glow-lg: rgba(124, 58, 237, 0.15);

    --data-clr: #059669;
    --data-glow: rgba(5, 150, 105, 0.07);
    --data-glow-lg: rgba(5, 150, 105, 0.15);

    --finance-clr: #d97706;
    --finance-glow: rgba(217, 119, 6, 0.07);
    --finance-glow-lg: rgba(217, 119, 6, 0.15);

    --content-clr: #db2777;
    --content-glow: rgba(219, 39, 119, 0.07);
    --content-glow-lg: rgba(219, 39, 119, 0.15);

    --health-clr: #dc2626;
    --health-glow: rgba(220, 38, 38, 0.07);
    --health-glow-lg: rgba(220, 38, 38, 0.15);
}

[data-theme="dark"] {
    --bg-0: #080c0f;
    --bg-1: #0f1518;
    --bg-2: #171e23;
    --card: #0f1518;
    --txt-0: #ecf0f6;
    --txt-1: #98a1ad;
    --txt-2: #6e7885;
    --acc: #18d4c0;
    --acc-hi: #20edd8;
    --acc-br: #28ffea;
    --acc-glow: rgba(24, 212, 192, 0.12);
    --acc-glow-vivid: rgba(40, 255, 234, 0.18);
    --border: rgba(236, 240, 246, 0.07);
    --border-hi: rgba(236, 240, 246, 0.14);
    --border-acc: rgba(24, 212, 192, 0.25);
    --dot: rgba(24, 212, 192, 0.05);
    --sh-sm: 0 2px 8px rgba(0, 0, 0, 0.28);
    --sh-md: 0 8px 24px rgba(0, 0, 0, 0.36);
    --sh-lg: 0 20px 56px rgba(0, 0, 0, 0.48);
    --sh-acc: 0 8px 32px rgba(24, 212, 192, 0.24);
    --sh-vivid: 0 0 40px rgba(40, 255, 234, 0.22), 0 8px 32px rgba(24, 212, 192, 0.28);
    --sel-bg: #18d4c0;
    --sel-txt: #080c0f;

    --hero-glow-1: rgba(24, 212, 192, 0.32);
    --hero-glow-2: rgba(139, 92, 246, 0.18);
    --hero-glow-3: rgba(40, 255, 234, 0.10);

    /* Dark mode 3D card colors */
    --dev-clr: #38bdf8;
    --dev-glow: rgba(56, 189, 248, 0.15);
    --dev-glow-lg: rgba(56, 189, 248, 0.38);

    --ai-clr: #c084fc;
    --ai-glow: rgba(192, 132, 252, 0.15);
    --ai-glow-lg: rgba(192, 132, 252, 0.38);

    --data-clr: #4ade80;
    --data-glow: rgba(74, 222, 128, 0.15);
    --data-glow-lg: rgba(74, 222, 128, 0.38);

    --finance-clr: #fb923c;
    --finance-glow: rgba(251, 146, 60, 0.15);
    --finance-glow-lg: rgba(251, 146, 60, 0.38);

    --content-clr: #f472b6;
    --content-glow: rgba(244, 114, 182, 0.15);
    --content-glow-lg: rgba(244, 114, 182, 0.38);

    --health-clr: #fb7185;
    --health-glow: rgba(251, 113, 133, 0.15);
    --health-glow-lg: rgba(251, 113, 133, 0.38);
}

/* ==========================================
   RESET & BASE RULES
   ========================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-0);
    color: var(--txt-1);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.45s ease, color 0.45s ease;
    padding-top: 68px; /* For fixed header */
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--txt-0);
    font-weight: 800;
    line-height: 1.15;
}

/* Layout Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 1024px) {
    .container {
        padding: 0 48px;
    }
}

section {
    padding: var(--sp-2xl) 0;
    border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
    section {
        padding: var(--sp-3xl) 0;
    }
}

/* ==========================================
   HEADER / NAV
   ========================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(247, 245, 240, 0.72);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: background 0.45s ease, box-shadow 0.3s ease, border-color 0.45s ease;
}

header.scrolled {
    background: rgba(247, 245, 240, 0.92);
    box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] header {
    background: rgba(13, 16, 18, 0.72);
}

[data-theme="dark"] header.scrolled {
    background: rgba(13, 16, 18, 0.92);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 68px;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--txt-0);
}

.logo span {
    color: var(--acc);
}

.nav-links {
    display: none;
    align-items: center;
    gap: var(--sp-lg);
}

.nav-link {
    font-size: 0.855rem;
    font-weight: 500;
    color: var(--txt-1);
    position: relative;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--acc);
    border-radius: 1px;
    transition: width 0.25s var(--ease-expo);
}

.nav-link:hover {
    color: var(--txt-0);
}

.nav-link:hover::after {
    width: 100%;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: var(--r-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--txt-1);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    color: var(--txt-0);
    border-color: var(--border-hi);
    background: var(--bg-1);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: block;
}

.mobile-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: var(--r-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--txt-1);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

@media (min-width: 768px) {
    .mobile-nav-btn {
        display: none;
    }
}

.mobile-nav-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.mobile-drawer {
    position: fixed;
    top: 68px;
    left: 0;
    width: 100%;
    background: var(--bg-0);
    border-bottom: 1px solid var(--border);
    padding: var(--sp-md) var(--sp-lg);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 999;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s var(--ease-expo), opacity 0.3s ease;
}

.mobile-drawer.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.mobile-drawer .nav-link {
    font-size: 1rem;
    font-weight: 600;
    padding: var(--sp-xs) 0;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: var(--r-md);
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--acc) 0%, var(--acc-hi) 100%);
    color: var(--sel-txt);
    box-shadow: 0 4px 14px var(--acc-glow);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--acc-hi) 0%, var(--acc-br) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-vivid);
}

.btn-primary span, .btn-primary svg {
    position: relative;
    z-index: 1;
}

.btn-secondary {
    background: transparent;
    color: var(--txt-0);
    border: 1.5px solid var(--border-hi);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: var(--bg-1);
    border-color: var(--border-acc);
    color: var(--acc);
    transform: translateY(-2px);
    box-shadow: var(--sh-md);
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--acc);
    transition: all 0.2s ease;
}

.btn-text:hover {
    color: var(--acc-hi);
    gap: 12px;
}

.btn-text svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    transition: transform 0.2s ease;
}

.btn-text:hover svg {
    transform: translateX(4px);
}

/* Tag style */
.tag {
    display: inline-flex;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--r-full);
    background: var(--bg-1);
    color: var(--acc);
    border: 1px solid var(--border);
}

/* ==========================================
   SECTION HEADER
   ========================================== */
.section-header {
    margin-bottom: var(--sp-xl);
}

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--acc);
    display: block;
    margin-bottom: 8px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

/* ==========================================
   APP SHOWCASE (DETAIL PAGES)
   ========================================== */
.showcase-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-xl);
    align-items: start;
    margin-top: var(--sp-lg);
}

@media (min-width: 992px) {
    .showcase-grid {
        grid-template-columns: 1.1fr 0.9fr;
    }
}

.showcase-visual {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--sp-md);
    box-shadow: var(--sh-md);
    position: relative;
}

.showcase-visual img {
    width: 100%;
    height: auto;
    border-radius: var(--r-md);
    display: block;
}

.showcase-info {
    display: flex;
    flex-direction: column;
    gap: var(--sp-lg);
}

.showcase-header .app-category {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--acc);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    display: block;
}

.showcase-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: -0.04em;
    margin-bottom: var(--sp-xs);
}

.showcase-meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.showcase-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--sp-lg);
    box-shadow: var(--sh-sm);
}

.showcase-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.showcase-card p {
    color: var(--txt-1);
    font-size: 0.98rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.showcase-card p:last-child {
    margin-bottom: 0;
}

.features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.features-list li {
    display: flex;
    align-items: start;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--txt-1);
}

.features-list li::before {
    content: "✓";
    color: var(--acc);
    font-weight: bold;
    flex-shrink: 0;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-md);
}

.spec-item span:first-child {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--txt-2);
    text-transform: uppercase;
    display: block;
}

.spec-item span:last-child {
    font-weight: 600;
    color: var(--txt-0);
    font-size: 0.95rem;
}

/* Back navigation */
.back-nav {
    margin-bottom: var(--sp-lg);
}

/* ==========================================
   WORK.HTML DYNAMIC CARDS SHOWCASE
   ========================================== */
.work-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-lg);
    margin-top: var(--sp-lg);
}

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

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

/* Project Card in work.html - using the 3D tilt + glow mechanics */
.work-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--sp-lg);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    transform-style: preserve-3d;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.work-card:hover {
    border-color: var(--glow-clr, var(--acc));
    box-shadow: 0 10px 30px var(--glow-clr-glow, rgba(10, 87, 80, 0.05)), 
                0 1px 8px var(--glow-clr-glow-lg, rgba(10, 87, 80, 0.1));
}

/* 3D Translation nested elements */
.work-card-content {
    transform: translateZ(30px);
}

.work-card-footer {
    transform: translateZ(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--sp-md);
}

.work-card-meta {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.work-card-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--txt-0);
}

.work-card-desc {
    font-size: 0.88rem;
    color: var(--txt-1);
    line-height: 1.5;
}

/* Individual card colors (tied to shared variables) */
.work-card.card-dev {
    --glow-clr: var(--dev-clr);
    --glow-clr-glow: var(--dev-glow);
    --glow-clr-glow-lg: var(--dev-glow-lg);
}
.work-card.card-ai {
    --glow-clr: var(--ai-clr);
    --glow-clr-glow: var(--ai-glow);
    --glow-clr-glow-lg: var(--ai-glow-lg);
}
.work-card.card-data {
    --glow-clr: var(--data-clr);
    --glow-clr-glow: var(--data-glow);
    --glow-clr-glow-lg: var(--data-glow-lg);
}
.work-card.card-finance {
    --glow-clr: var(--finance-clr);
    --glow-clr-glow: var(--finance-glow);
    --glow-clr-glow-lg: var(--finance-glow-lg);
}
.work-card.card-content {
    --glow-clr: var(--content-clr);
    --glow-clr-glow: var(--content-glow);
    --glow-clr-glow-lg: var(--content-glow-lg);
}
.work-card.card-health {
    --glow-clr: var(--health-clr);
    --glow-clr-glow: var(--health-glow);
    --glow-clr-glow-lg: var(--health-glow-lg);
}

/* Glow spotlight circle overlay */
.work-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        220px circle at var(--x, 50%) var(--y, 50%),
        var(--glow-clr-glow-lg, rgba(10, 87, 80, 0.1)) 0%,
        transparent 80%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

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

/* ==========================================
   FOOTER
   ========================================== */
footer {
    padding: var(--sp-xl) 0;
    background: var(--bg-0);
    border-top: 1px solid var(--border);
    transition: background-color 0.45s ease, border-color 0.45s ease;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 200px;
    background: radial-gradient(ellipse, var(--acc-glow) 0%, transparent 70%);
    pointer-events: none;
}

.footer-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
    }
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--txt-0);
}

.footer-logo span {
    color: var(--acc);
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--txt-2);
}

/* Animations */
.reveal {
    opacity: 1; /* Fallback for no-js, otherwise handled by JS transitions */
}

/* ==========================================
   CUSTOM SLIDE-IN TOAST NOTIFICATIONS
   ========================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--card);
    border: 1.5px solid var(--border-hi);
    border-left: 4px solid var(--acc);
    border-radius: var(--r-md);
    padding: 14px 20px;
    box-shadow: var(--sh-lg);
    color: var(--txt-0);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 600;
    min-width: 280px;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s var(--ease-expo);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success { border-left-color: var(--data-clr); }
.toast.error { border-left-color: var(--health-clr); }
.toast.info { border-left-color: var(--dev-clr); }
.toast.warning { border-left-color: var(--finance-clr); }

/* ==========================================
   HERO SCROLL INDICATOR
   ========================================== */
.scroll-indicator {
    position: absolute;
    bottom: var(--sp-md);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.3s;
    z-index: 10;
}

.scroll-indicator:hover {
    opacity: 1;
}

/* ==========================================
   UI/UX PRO MAX - ENHANCED ENGAGEMENT COMPONENTS
   ========================================== */

/* --- 1. HERO SPLIT GRID & INTERACTIVE TERMINAL --- */
.hero-split-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-xl);
    align-items: center;
    position: relative;
    z-index: 2;
}

@media (min-width: 1024px) {
    .hero-split-grid {
        grid-template-columns: 1fr 1.1fr;
        gap: var(--sp-2xl);
    }
}

.hero-terminal {
    background: var(--card);
    border: 1px solid var(--border-hi);
    border-radius: var(--r-lg);
    box-shadow: 0 20px 40px -15px var(--acc-glow), 0 0 0 1px var(--border);
    overflow: hidden;
    backdrop-filter: blur(16px);
    transition: transform 0.3s var(--ease-expo), border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-terminal:hover {
    border-color: var(--border-acc);
    box-shadow: 0 25px 50px -12px var(--acc-glow-vivid), 0 0 0 1px var(--acc);
}

.terminal-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: var(--bg-1);
    border-bottom: 1px solid var(--border);
}

.terminal-dots {
    display: flex;
    align-items: center;
    gap: 7px;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--txt-2);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.terminal-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--acc);
    background: var(--acc-glow);
    padding: 3px 8px;
    border-radius: var(--r-full);
    border: 1px solid var(--border-acc);
}

.terminal-live-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--acc);
    box-shadow: 0 0 8px var(--acc);
    animation: pulseGlow 1.8s infinite;
}

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

.terminal-nav {
    display: flex;
    background: var(--bg-0);
    border-bottom: 1px solid var(--border);
    padding: 0 12px;
    gap: 6px;
    overflow-x: auto;
}

.terminal-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--txt-1);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.terminal-tab-btn:hover {
    color: var(--txt-0);
}

.terminal-tab-btn.active {
    color: var(--acc);
    border-bottom-color: var(--acc);
    background: var(--bg-1);
}

.terminal-body {
    padding: 20px;
}

.terminal-panel {
    display: none;
    animation: termFade 0.25s var(--ease-expo);
}

.terminal-panel.active {
    display: block;
}

@keyframes termFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 2. HIGH-TRUST CONTINUOUS MARQUEE --- */
.marquee-section {
    padding: var(--sp-md) 0;
    background: var(--bg-1);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    position: relative;
}

.marquee-section::before,
.marquee-section::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

.marquee-section::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-1), transparent);
}

.marquee-section::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-1), transparent);
}

.marquee-track {
    display: flex;
    gap: var(--sp-lg);
    width: max-content;
    animation: marqueeScroll 32s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--txt-1);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.marquee-badge:hover {
    border-color: var(--border-acc);
    color: var(--acc);
    transform: translateY(-1px);
    box-shadow: var(--sh-sm);
}

/* --- 3. FLAGSHIP ECOSYSTEMS SHOWCASE GRID --- */
.ecosystem-section {
    padding: var(--sp-3xl) 0;
    position: relative;
}

.ecosystem-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-xl);
    margin-top: var(--sp-xl);
}

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

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

.ecosystem-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--sp-xl);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--ease-expo);
    box-shadow: var(--sh-sm);
}

.ecosystem-card:hover {
    border-color: var(--acc);
    transform: translateY(-5px);
    box-shadow: 0 16px 36px var(--acc-glow);
}

.ecosystem-card-top {
    margin-bottom: var(--sp-md);
}

.ecosystem-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--r-md);
    background: var(--acc-glow);
    color: var(--acc);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--sp-md);
}

.ecosystem-card h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--txt-0);
}

.ecosystem-card p {
    font-size: 0.92rem;
    color: var(--txt-1);
    line-height: 1.6;
    margin-bottom: var(--sp-md);
}

.ecosystem-interactive-preview {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 14px;
    margin-bottom: var(--sp-md);
}

.ecosystem-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--sp-sm);
    border-top: 1px solid var(--border);
}

/* --- 4. INTERACTIVE 3-STEP PROJECT ESTIMATOR --- */
.estimator-wrapper {
    background: var(--card);
    border: 1px solid var(--border-hi);
    border-radius: var(--r-lg);
    padding: var(--sp-xl);
    box-shadow: var(--sh-md);
    position: relative;
}

.estimator-step-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--acc);
    margin-bottom: 8px;
    display: block;
}

.scope-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: var(--sp-md);
}

.scope-chip {
    padding: 8px 14px;
    border-radius: var(--r-md);
    background: var(--bg-1);
    border: 1px solid var(--border);
    color: var(--txt-1);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.scope-chip:hover {
    background: var(--bg-2);
    color: var(--txt-0);
    border-color: var(--border-hi);
}

.scope-chip.selected {
    background: var(--acc-glow);
    border-color: var(--acc);
    color: var(--acc);
    font-weight: 700;
}

.estimator-summary-bar {
    background: var(--bg-1);
    border: 1px solid var(--border-acc);
    border-radius: var(--r-md);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: var(--sp-md);
}

.estimator-est-label {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--txt-2);
    text-transform: uppercase;
}

.estimator-est-val {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--acc);
}

/* --- 5. UNIVERSAL COMMAND PALETTE (CMD + K) --- */
.cmd-palette-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s var(--ease-expo);
}

.cmd-palette-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.cmd-palette-dialog {
    background: var(--bg-0);
    border: 1px solid var(--border-hi);
    border-radius: var(--r-lg);
    width: 100%;
    max-width: 580px;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    transform: scale(0.96) translateY(-10px);
    transition: transform 0.25s var(--ease-expo);
}

.cmd-palette-backdrop.open .cmd-palette-dialog {
    transform: scale(1) translateY(0);
}

.cmd-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-1);
}

.cmd-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--txt-0);
}

.cmd-kbd-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    background: var(--bg-2);
    border: 1px solid var(--border-hi);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--txt-2);
}

.cmd-results-list {
    max-height: 340px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cmd-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--r-md);
    color: var(--txt-1);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cmd-item:hover, .cmd-item.focused {
    background: var(--acc-glow);
    color: var(--acc);
    font-weight: 600;
}

.cmd-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cmd-item-category {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    color: var(--txt-2);
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-1);
}

.mouse-wheel {
    width: 24px;
    height: 38px;
    border: 2px solid var(--txt-2);
    border-radius: var(--r-full);
    position: relative;
}

.mouse-wheel::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    background: var(--acc);
    border-radius: var(--r-full);
    transform: translateX(-50%);
    animation: scrollMouse 1.8s ease-in-out infinite;
}

@keyframes scrollMouse {
    0% { top: 8px; opacity: 1; }
    50% { top: 16px; opacity: 0.3; }
    100% { top: 8px; opacity: 1; }
}
