/* ============================================================
   CORTEX — Dark Futuristic Landing Page
   ============================================================ */

:root {
    --bg-deep: #06060e;
    --bg-surface: #0c0c1a;
    --bg-card: rgba(12, 12, 30, 0.6);
    --neon-cyan: #00e5ff;
    --neon-cyan-dim: rgba(0, 229, 255, 0.15);
    --neon-purple: #8b5cf6;
    --neon-purple-dim: rgba(139, 92, 246, 0.15);
    --neon-red: #ff003c;
    --text-primary: #e8e8f0;
    --text-secondary: #8888a8;
    --text-muted: #4a4a6a;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(0, 229, 255, 0.3);
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text-primary);
    background: var(--bg-deep);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--neon-cyan);
    color: var(--bg-deep);
}

/* ── Scanlines ──────────────────────────────── */

.scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

/* ── Navigation ─────────────────────────────── */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 2rem;
    transition: background 0.3s, backdrop-filter 0.3s;
}

.nav--scrolled {
    background: rgba(6, 6, 14, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-primary);
}

.nav__logo-svg {
    width: 28px;
    height: 28px;
}

.nav__logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav__links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: color 0.2s;
}

.nav__links a:hover {
    color: var(--neon-cyan);
}

.nav__patch {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--neon-purple);
    padding: 0.35rem 0.9rem;
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 4px;
    background: var(--neon-purple-dim);
    position: relative;
    cursor: default;
    transition: border-color 0.3s, text-shadow 0.3s;
}

.nav__patch:hover {
    border-color: rgba(139, 92, 246, 0.5);
    text-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}

/* ── Hero ───────────────────────────────────── */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}

.hero__glow {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(0, 229, 255, 0.08) 0%, rgba(139, 92, 246, 0.04) 40%, transparent 70%);
    pointer-events: none;
}

.hero__content {
    position: relative;
    text-align: center;
    max-width: 800px;
}

.hero__badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--neon-cyan);
    background: var(--neon-cyan-dim);
    border: 1px solid rgba(0, 229, 255, 0.2);
    padding: 0.4rem 1.2rem;
    border-radius: 100px;
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease-out;
}

.hero__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(4rem, 12vw, 9rem);
    line-height: 1;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.8rem, 2vw, 1.5rem);
}

.hero__logo {
    width: clamp(50px, 8vw, 80px);
    height: clamp(50px, 8vw, 80px);
    filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.3));
}

.hero__title-line {
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--neon-cyan) 50%, var(--neon-purple) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 0 60px rgba(0, 229, 255, 0.3));
}

.hero__subtitle {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--neon-cyan);
    height: 1.6em;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.8s ease-out 0.6s both;
}

.hero__desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    animation: fadeIn 0.8s ease-out 0.8s both;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease-out 1s both;
}

.hero__stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    animation: fadeIn 0.8s ease-out 1.2s both;
}

.hero__stat {
    text-align: center;
}

.hero__stat-num {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--text-primary);
}

.hero__stat-plus {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--neon-cyan);
}

.hero__stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero__stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* ── Buttons ────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.8rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s;
    border: none;
}

.btn--primary {
    background: var(--neon-cyan);
    color: var(--bg-deep);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.25);
}

.btn--primary:hover {
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.4);
    transform: translateY(-2px);
}

.btn--ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn--ghost:hover {
    border-color: var(--border-hover);
    background: var(--neon-cyan-dim);
}

.btn--lg {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

/* ── Sections ───────────────────────────────── */

section {
    padding: 6rem 2rem;
}

.section__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.section__header {
    text-align: center;
    margin-bottom: 4rem;
}

.section__tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--neon-cyan);
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 1rem;
}

.section__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
}

.section__desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ── Capability Cards ───────────────────────── */

.capabilities {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.capabilities__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.cap-card {
    position: relative;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(10px);
}

.cap-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 40px rgba(0, 229, 255, 0.08);
}

.cap-card--accent {
    border-color: rgba(139, 92, 246, 0.2);
    background: linear-gradient(135deg, var(--bg-card), rgba(139, 92, 246, 0.05));
}

.cap-card--accent:hover {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 8px 40px rgba(139, 92, 246, 0.1);
}

.cap-card__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
    color: var(--neon-cyan);
    background: var(--neon-cyan-dim);
    border-radius: 10px;
    border: 1px solid rgba(0, 229, 255, 0.15);
}

.cap-card--accent .cap-card__icon {
    color: var(--neon-purple);
    background: var(--neon-purple-dim);
    border-color: rgba(139, 92, 246, 0.2);
}

.cap-card__icon svg {
    width: 22px;
    height: 22px;
}

.cap-card__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.06em;
    margin-bottom: 0.6rem;
}

.cap-card__desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.cap-card__tools {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
}

/* ── Terminal Demo ──────────────────────────── */

.demo {
    background: var(--bg-deep);
}

.demo__wrapper {
    max-width: 800px;
    margin: 0 auto;
    transition: max-width 0.5s ease;
}

.demo__wrapper--split {
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.demo__video-panel {
    display: none;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #0a0a14;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(139, 92, 246, 0.05);
}

.demo__wrapper--split .demo__video-panel {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

.demo__video-bar {
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.demo__video-panel video {
    width: 100%;
    display: block;
}

.terminal {
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #0a0a14;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(0, 229, 255, 0.05);
}

.demo__wrapper--split .terminal {
    max-width: none;
}

.terminal__bar {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
}

.terminal__dots {
    display: flex;
    gap: 6px;
}

.terminal__dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}

.terminal__dots span:nth-child(1) { background: #ff5f56; }
.terminal__dots span:nth-child(2) { background: #ffbd2e; }
.terminal__dots span:nth-child(3) { background: #27c93f; }

.terminal__title {
    flex: 1;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.terminal__body {
    padding: 1.5rem;
    min-height: 350px;
    max-height: 450px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.7;
}

.terminal__line {
    white-space: pre-wrap;
    word-break: break-all;
}

.terminal__line--user {
    color: var(--text-primary);
    margin-top: 0.6rem;
}

.terminal__line--agent {
    color: var(--text-secondary);
    margin-top: 0.6rem;
}

.terminal__line--tool {
    color: var(--text-muted);
    margin-top: 0.2rem;
    padding-left: 0.4rem;
    border-left: 2px solid rgba(0, 229, 255, 0.15);
}

.terminal__line--output {
    color: var(--text-muted);
    padding-left: 0.4rem;
    border-left: 2px solid rgba(0, 229, 255, 0.15);
}

.terminal__line--success {
    color: #27c93f;
    padding-left: 0.4rem;
    border-left: 2px solid rgba(39, 201, 63, 0.3);
}

.terminal__line--prompt {
    color: var(--text-primary);
}

.terminal__label {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.terminal__label--user {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.terminal__label--agent {
    background: var(--neon-cyan-dim);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 229, 255, 0.2);
}

.terminal__label--tool {
    background: var(--neon-purple-dim);
    color: var(--neon-purple);
    border: 1px solid rgba(139, 92, 246, 0.2);
    font-size: 0.6rem;
}

.terminal__label--voice {
    background: rgba(255, 170, 0, 0.08);
    color: #ffaa00;
    border: 1px solid rgba(255, 170, 0, 0.2);
}

.terminal__line--voice {
    color: #ffaa00;
    font-style: italic;
}

.terminal__prompt {
    color: var(--neon-cyan);
    font-weight: 600;
}

.terminal__cursor {
    display: inline-block;
    animation: blink 1s step-end infinite;
    color: var(--neon-cyan);
}

.terminal__controls {
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem 1.2rem;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.terminal__btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: var(--neon-cyan-dim);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.terminal__btn:hover {
    background: rgba(0, 229, 255, 0.2);
    border-color: var(--neon-cyan);
}

/* ── Skills Section ─────────────────────────── */

.skills {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.skills__split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.code-block {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #0a0a14;
}

.code-block__bar {
    padding: 0.7rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.code-block__body {
    padding: 1.5rem;
    font-size: 0.78rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-block__body code {
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

.code-key { color: var(--neon-cyan); }
.code-str { color: #27c93f; }
.code-bool { color: var(--neon-purple); }

.step {
    display: flex;
    gap: 1.2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}

.step:last-child {
    border-bottom: none;
}

.step__num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--neon-cyan);
    opacity: 0.4;
    flex-shrink: 0;
    width: 2.5rem;
}

.step__content h4 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.step__content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.step__content code {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--neon-cyan);
    background: var(--neon-cyan-dim);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

/* ── Architecture ───────────────────────────── */

.arch__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.arch__card {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: center;
    transition: border-color 0.3s, transform 0.3s;
}

.arch__card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.arch__label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.arch__value {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}

/* ── CTA ────────────────────────────────────── */

.cta {
    padding: 8rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(0, 229, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.cta__content {
    position: relative;
}

.cta__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0.04em;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.cta__highlight {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta__desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

/* ── Footer ─────────────────────────────────── */

.footer {
    padding: 2rem;
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
}

.footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer__by {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer__by a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer__by a:hover {
    color: var(--neon-cyan);
}

.footer__links {
    display: flex;
    gap: 1.5rem;
}

.footer__links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

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

.footer__copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Animations ─────────────────────────────── */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Scroll reveal */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ─────────────────────────────── */

@media (max-width: 900px) {
    .capabilities__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skills__split {
        grid-template-columns: 1fr;
    }

    .arch__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .demo__wrapper--split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .nav__links a:not(.nav__github) {
        display: none;
    }

    .hero__title {
        font-size: clamp(3rem, 14vw, 5rem);
    }

    .hero__stats {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .hero__stat-divider {
        display: none;
    }

    .hero__actions {
        flex-direction: column;
        align-items: center;
    }

    .capabilities__grid {
        grid-template-columns: 1fr;
    }

    .arch__grid {
        grid-template-columns: 1fr;
    }

    .footer__inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
