/* ─────────────────────────────────────────────
   aSinghWhoCodes, homepage
   Design: Dark OLED + Motion-Driven + Bento grid
   Fonts: Space Grotesk (display), DM Sans (body), JetBrains Mono (labels)
   ───────────────────────────────────────────── */

:root,
[data-theme="dark"] {
    --bg: #050706;
    --bg-2: #0a0e0c;
    --surface: #0d1210;
    --surface-2: #131a17;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --text: #eef3f0;
    --muted: #9aa69f;
    --accent: #4eefaf;
    --accent-2: #a6f7d6;
    --accent-ink: #03140d;
    --accent-soft: rgba(78, 239, 175, 0.12);
    --krom: #ff5c72;
    --krom-soft: rgba(255, 92, 114, 0.14);
    --bubble-in: #1d2522;
    --bubble-in-text: #e6ece9;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    --nav-bg: rgba(5, 7, 6, 0.72);
    color-scheme: dark;
}

[data-theme="light"] {
    --bg: #f5f6f2;
    --bg-2: #eceee8;
    --surface: #ffffff;
    --surface-2: #f3f5f1;
    --line: rgba(10, 20, 15, 0.09);
    --line-strong: rgba(10, 20, 15, 0.18);
    --text: #0c1310;
    --muted: #55605a;
    --accent: #0a8a5c;
    --accent-2: #13b47c;
    --accent-ink: #ffffff;
    --accent-soft: rgba(10, 138, 92, 0.1);
    --krom: #d6334c;
    --krom-soft: rgba(214, 51, 76, 0.1);
    --bubble-in: #eceeea;
    --bubble-in-text: #17201b;
    --shadow: 0 20px 50px rgba(20, 40, 30, 0.12);
    --nav-bg: rgba(245, 246, 242, 0.78);
    color-scheme: light;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

ul,
ol {
    list-style: none;
}

kbd {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    padding: 2px 6px;
    border: 1px solid var(--line-strong);
    border-bottom-width: 2px;
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--text);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

::selection {
    background: var(--accent);
    color: var(--accent-ink);
}

.wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

.grad {
    background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 60%, var(--accent) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
    to {
        background-position: -200% 0;
    }
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 200;
    padding: 10px 14px;
    background: var(--accent);
    color: var(--accent-ink);
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

.scroll-progress {
    position: fixed;
    inset: 0 0 auto 0;
    height: 2px;
    z-index: 120;
    background: linear-gradient(90deg, var(--accent), var(--krom));
    transform-origin: 0 50%;
    transform: scaleX(0);
}

/* ── Labels ── */
.mono-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mono-tag .prompt,
.mono-tag .num {
    color: var(--accent);
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 var(--accent);
    animation: ping 2s ease-out infinite;
    flex: none;
}

@keyframes ping {
    0% {
        box-shadow: 0 0 0 0 rgba(78, 239, 175, 0.6);
    }

    80%,
    100% {
        box-shadow: 0 0 0 10px rgba(78, 239, 175, 0);
    }
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 999px;
    font: 600 1rem/1 'DM Sans', sans-serif;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: 0 8px 30px -8px var(--accent);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--line-strong);
}

.btn-ghost:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.btn-krom {
    background: var(--krom);
    color: #fff;
    box-shadow: 0 8px 30px -10px var(--krom);
}

.btn-lg {
    min-height: 56px;
    padding: 16px 26px;
    font-size: 1.05rem;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: border-color 0.2s, background 0.2s;
}

.icon-btn:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

/* ── Nav ── */
.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.nav.scrolled {
    border-bottom-color: var(--line);
}

.nav-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav-logo img {
    height: 45px;
    width: auto;
}

[data-theme="light"] .nav-logo img {
    filter: brightness(0.62) saturate(1.4);
}

.nav-links {
    display: flex;
    gap: 6px;
}

.nav-links a {
    position: relative;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: var(--surface-2);
}

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

.cmdk-btn {
    height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: 500 0.95rem 'DM Sans', sans-serif;
    transition: border-color 0.2s, background 0.2s;
}

.cmdk-btn:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.cmdk-btn-desktop {
    display: inline-flex;
    gap: 3px;
}

.cmdk-btn-mobile {
    display: none;
}

/* ── Hero ── */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 110px 0 80px;
    overflow: hidden;
    isolation: isolate;
}

.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.9;
}

.hero::before {
    content: "";
    position: absolute;
    z-index: -3;
    width: 900px;
    height: 900px;
    top: -300px;
    right: -250px;
    background: radial-gradient(circle, var(--accent-soft), transparent 65%);
}

.hero-fade {
    position: absolute;
    inset: auto 0 0 0;
    height: 220px;
    z-index: -1;
    background: linear-gradient(to bottom, transparent, var(--bg));
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    align-items: center;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.7rem, 6.4vw, 5.4rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
    margin: 18px 0 24px;
}

.hero-title .line {
    display: block;
}

.hero-title [data-word] {
    display: inline-block;
}

.hero-lead {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 34rem;
}

.hero-lead strong {
    color: var(--text);
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 40px;
    margin-top: 44px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.hero-stats dt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero-stats dd {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2;
}

.hero-stats dd.small {
    font-size: 1.25rem;
    padding-top: 8px;
}

/* ── Phone demo ── */
.hero-demo {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 12px;
}

.demo-caption {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 16px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.phone {
    position: relative;
    /* Real iPhone proportions (71.6 x 147.6 mm), not a squat tablet. */
    width: min(300px, 100%);
    aspect-ratio: 71.6 / 147.6;
    border-radius: 48px;
    padding: 10px;
    background: linear-gradient(160deg, #1a201d, #0b0f0d);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow), inset 0 0 0 6px #050706;
    display: flex;
    flex-direction: column;
}

[data-theme="light"] .phone {
    background: linear-gradient(160deg, #e4e7e2, #d3d8d2);
    box-shadow: var(--shadow), inset 0 0 0 6px #f9faf8;
}

.phone-notch {
    position: absolute;
    top: 19px;
    left: 50%;
    width: 86px;
    height: 25px;
    border-radius: 20px;
    background: #000;
    transform: translateX(-50%);
    z-index: 2;
}

.phone-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 50px 14px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    border-radius: 39px 39px 0 0;
}

.phone-head strong {
    display: block;
    font-size: 0.92rem;
    line-height: 1.2;
}

.phone-head small {
    color: var(--muted);
    font-size: 0.75rem;
}

.phone-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    overflow: hidden;
    flex: none;
}

.phone-avatar img {
    width: 30px;
    height: 30px;
}

.chat {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 7px;
    padding: 14px 11px 78px;
    overflow: hidden;
    background: var(--surface);
    border-radius: 0 0 39px 39px;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 40px);
    mask-image: linear-gradient(to bottom, transparent 0, #000 40px);
}

.bubble {
    max-width: 82%;
    padding: 7px 12px;
    border-radius: 18px;
    font-size: 12.5px;
    line-height: 1.35;
    animation: bubble-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
    flex: none;
}

.bubble.me {
    align-self: flex-end;
    background: var(--krom);
    color: #fff;
    border-bottom-right-radius: 6px;
}

.bubble.bot {
    align-self: flex-start;
    background: var(--bubble-in);
    color: var(--bubble-in-text);
    border-bottom-left-radius: 6px;
}

.bubble.typing {
    display: inline-flex;
    gap: 4px;
    padding: 13px 14px;
}

.bubble.typing i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--muted);
    animation: dots 1.1s infinite ease-in-out;
}

.bubble.typing i:nth-child(2) {
    animation-delay: 0.15s;
}

.bubble.typing i:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes dots {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.5;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

@keyframes bubble-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.92);
    }
}

.ticket {
    position: absolute;
    right: -22px;
    bottom: 0;
    width: 220px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-left: 4px solid var(--krom);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateX(30px) rotate(4deg) scale(0.9);
    transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.3);
    pointer-events: none;
}

.ticket.show {
    opacity: 1;
    transform: translateX(0) rotate(3deg) scale(1);
}

.ticket.show .ticket-bell {
    animation: ring 0.9s ease 0.2s 2;
}

@keyframes ring {

    0%,
    100% {
        transform: rotate(0);
    }

    20% {
        transform: rotate(18deg);
    }

    40% {
        transform: rotate(-16deg);
    }

    60% {
        transform: rotate(10deg);
    }

    80% {
        transform: rotate(-6deg);
    }
}

.ticket-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ticket-bell {
    color: var(--krom);
    display: inline-block;
    transform-origin: 50% 0;
}

.ticket-new {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--krom);
    font-weight: 500;
}

.ticket-id {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--muted);
}

.ticket-item {
    font-weight: 700;
    font-size: 0.95rem;
}

.ticket-mod {
    font-size: 0.82rem;
    color: var(--muted);
}

.ticket-foot {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--line-strong);
    font-size: 0.82rem;
    color: var(--muted);
}

.ticket-foot strong {
    color: var(--text);
}

.replay {
    margin-top: 14px;
    min-height: 44px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font: 500 0.85rem 'DM Sans', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s, border-color 0.2s;
}

.replay:hover {
    color: var(--text);
    border-color: var(--accent);
}

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 24px;
    width: 26px;
    height: 42px;
    border: 2px solid var(--line-strong);
    border-radius: 20px;
    transform: translateX(-50%);
}

.scroll-cue span {
    position: absolute;
    left: 50%;
    top: 8px;
    width: 4px;
    height: 8px;
    border-radius: 4px;
    background: var(--accent);
    transform: translateX(-50%);
    animation: cue 1.8s ease-in-out infinite;
}

@keyframes cue {
    0% {
        opacity: 0;
        transform: translate(-50%, 0);
    }

    30% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, 14px);
    }
}

/* ── Sections ── */
.section {
    padding: 120px 0;
    position: relative;
}

.section-head {
    margin-bottom: 48px;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin-top: 12px;
    max-width: 18ch;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--muted);
    white-space: nowrap;
}

.badge-live {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    background: var(--accent-soft);
}

.badge-ok {
    color: var(--text);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chips li {
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--muted);
}

.chips-sm li {
    padding: 4px 9px;
    font-size: 0.72rem;
}

/* ── Flagship (Kromigo) ── */
.flagship {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--surface), var(--bg-2));
    padding: clamp(24px, 4vw, 48px);
    isolation: isolate;
}

.flagship-glow {
    position: absolute;
    z-index: -1;
    width: 700px;
    height: 700px;
    top: -380px;
    left: -200px;
    background: radial-gradient(circle, var(--krom-soft), transparent 60%);
    pointer-events: none;
}

.flagship-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.flagship-brand {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.flagship-brand img {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #fff;
    padding: 6px;
}

.flagship-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.flagship-intro p {
    color: var(--muted);
}

.flagship-intro em {
    color: var(--krom);
    font-style: normal;
    font-weight: 700;
}

.flagship-ctas {
    margin-top: 28px;
}

/* Pipeline */
.pipeline {
    position: relative;
    padding: 24px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 60%, transparent);
}

.pipeline .mono-tag {
    margin-bottom: 18px;
}

.pipe {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pipe li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 500;
}

.pipe-icon {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    color: var(--muted);
    transition: color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.pipe li.lit .pipe-icon {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 20px -4px var(--accent);
}

.pipe-ai .pipe-icon {
    color: var(--krom);
}

.pipe li.pipe-ai.lit .pipe-icon {
    color: var(--krom);
    border-color: var(--krom);
    box-shadow: 0 0 20px -4px var(--krom);
}

.pipe-track {
    position: absolute;
    left: 45px;
    top: 82px;
    bottom: 46px;
    width: 2px;
    background: repeating-linear-gradient(to bottom, var(--line-strong) 0 5px, transparent 5px 10px);
}

.pipe-pulse {
    position: absolute;
    left: 50%;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 14px 3px var(--accent);
    transform: translate(-50%, -50%);
    animation: pulse-down 4s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}

@keyframes pulse-down {
    0% {
        top: 0;
        opacity: 0;
    }

    8% {
        opacity: 1;
    }

    92% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Decisions */
.decisions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 40px 0 28px;
}

.decision {
    padding: 22px;
    border-radius: 18px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    transition: border-color 0.25s, transform 0.25s;
}

.decision:hover {
    border-color: color-mix(in srgb, var(--krom) 50%, transparent);
    transform: translateY(-3px);
}

.decision i {
    color: var(--krom);
    font-size: 1.2rem;
}

.decision h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    line-height: 1.25;
    margin: 12px 0 8px;
}

.decision p {
    font-size: 0.92rem;
    color: var(--muted);
}

.decision em {
    color: var(--text);
}

/* ── Bento ── */
.bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(230px, auto);
    gap: 16px;
}

.tile {
    --mx: 50%;
    --my: 50%;
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: var(--surface);
    padding: 24px;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform-style: preserve-3d;
    transition: border-color 0.25s, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s;
}

/* Spotlight that follows the pointer */
.tile::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(420px circle at var(--mx) var(--my), var(--accent-soft), transparent 45%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

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

a.tile:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
    box-shadow: var(--shadow);
}

.tile h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-top: 6px;
}

.tile p {
    color: var(--muted);
    font-size: 0.95rem;
}

.tile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.app-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.app-icon-glyph {
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, var(--accent), #2a9d74);
    color: var(--accent-ink);
    font-size: 1.3rem;
}

[data-theme="light"] .app-icon-glyph {
    color: #fff;
}

.tile-arrow {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    color: var(--muted);
    transition: background 0.25s, color 0.25s, transform 0.25s;
}

a.tile:hover .tile-arrow {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: var(--accent);
    transform: rotate(-45deg);
}

.t-mem {
    grid-column: span 2;
    grid-row: span 2;
    flex-direction: row;
    gap: 16px;
}

.t-mem .tile-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    z-index: 1;
}

.t-mem .chips {
    margin-top: auto;
    padding-bottom: 52px;
}

/* MemoryNest: three framed phones fanned out on a soft glow */
.mem-phones {
    position: relative;
    width: 55%;
    flex: none;
    min-height: 340px;
    margin: -24px -24px -24px 0;
}

.t-mem .tile-arrow {
    z-index: 4;
    background: var(--surface);
}

.mem-glow {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 120%;
    aspect-ratio: 1;
    transform: translate(-50%, -45%);
    background: radial-gradient(circle, rgba(120, 140, 255, 0.28), rgba(150, 110, 255, 0.1) 40%, transparent 65%);
    pointer-events: none;
}

.device {
    --x: -50%;
    --r: 0deg;
    --s: 1;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 50%;
    max-width: 220px;
    aspect-ratio: 470 / 1024;
    padding: 5px;
    border-radius: 30px;
    background: linear-gradient(150deg, #2b302e, #0b0d0c 40%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 50px -12px rgba(0, 0, 0, 0.55);
    transform: translate(var(--x), -50%) rotate(var(--r)) scale(var(--s));
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.4s;
}

/* little dynamic island */
.device::before {
    content: "";
    position: absolute;
    top: 11px;
    left: 50%;
    width: 30%;
    height: 9px;
    border-radius: 9px;
    background: #000;
    transform: translateX(-50%);
    z-index: 1;
}

.device img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 25px;
}

.device-center {
    z-index: 3;
}

.device-left,
.device-right {
    --s: 0.84;
    filter: brightness(0.8) saturate(0.9);
}

.device-left {
    --x: -96%;
    --r: -8deg;
    z-index: 1;
}

.device-right {
    --x: -4%;
    --r: 8deg;
    z-index: 2;
}

.t-mem:hover .device-center {
    --s: 1.03;
}

.t-mem:hover .device-left {
    --x: -106%;
    --r: -11deg;
    filter: none;
}

.t-mem:hover .device-right {
    --x: 6%;
    --r: 11deg;
    filter: none;
}

[data-theme="light"] .mem-glow {
    background: radial-gradient(circle, rgba(120, 140, 255, 0.22), rgba(150, 110, 255, 0.08) 40%, transparent 65%);
}

[data-theme="light"] .device {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 24px 40px -14px rgba(30, 40, 80, 0.35);
}

.t-ing {
    grid-column: span 2;
    grid-row: span 2;
}

/* Ingrain: three real App Store screens rising from the bottom of the tile */
.ing-phones {
    position: relative;
    flex: 1;
    min-height: 250px;
    margin: 14px -24px -24px;
    padding-top: 30px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 4%;
    overflow: hidden;
    border-radius: 0 0 24px 24px;
}

.ing-glow {
    position: absolute;
    left: 50%;
    bottom: -40%;
    width: 110%;
    aspect-ratio: 1;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(0, 212, 255, 0.28), rgba(0, 212, 255, 0.06) 45%, transparent 65%);
    pointer-events: none;
}

.device.device-ing {
    position: relative;
    left: auto;
    top: auto;
    flex: none;
    width: 28%;
    max-width: 180px;
    transform: translateY(26px);
    filter: brightness(0.85);
}

.device.device-ing.is-mid {
    transform: translateY(0);
    filter: none;
    z-index: 2;
}

.device-ing img,
.device-fill img {
    object-fit: contain;
    object-position: top;
    background: #1b1f38;
    padding-top: 18px;
}

.t-ing:hover .device-ing {
    transform: translateY(10px);
    filter: none;
}

.t-ing:hover .device-ing.is-mid {
    transform: translateY(-12px);
}

.t-ing .tile-arrow {
    z-index: 4;
    background: var(--surface);
}

.t-econ,
.t-market {
    grid-column: span 2;
}

.app-icon-econ {
    background: linear-gradient(140deg, #f5a524, #e2711d);
    color: #1d1205 !important;
}

.t-econ strong,
.t-market strong {
    color: var(--text);
}

.t-econ .chips,
.t-market .chips {
    margin-top: auto;
}

.market-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.market-top .big-num {
    font-size: 3.2rem !important;
}

.market-top .badge i {
    color: #f5a524;
}

/* ── Hero whoami line ── */
.whoami {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text);
    margin-top: 6px;
}

.whoami-sep {
    color: var(--accent);
    margin: 0 6px;
}

/* ── Experience ── */
.impact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 56px;
}

.impact-card {
    padding: 26px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at 0% 0%, var(--accent-soft), transparent 55%),
        var(--surface);
}

.impact-num {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 10px;
}

.impact-num i {
    font-size: 0.45em;
    color: var(--muted);
}

.impact-card p:last-child {
    color: var(--muted);
    font-size: 0.95rem;
}

.timeline {
    position: relative;
    border-left: 1px solid var(--line-strong);
    margin-left: 6px;
}

.role {
    position: relative;
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 24px;
    padding: 0 0 40px 32px;
}

.role::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 6px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
}

.role:first-child::before {
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}

.role-when {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
    align-self: start;
}

.role-body h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.role-body h3+h3 {
    margin-top: 10px;
}

.role-body .at {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0;
}

.role-body ul {
    margin-top: 10px;
    display: grid;
    gap: 6px;
}

.role-body li {
    position: relative;
    padding-left: 18px;
    color: var(--muted);
    font-size: 0.97rem;
}

.role-body li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.role-edu {
    padding-bottom: 0;
}

.habit-row {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.habit-row span {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
    transition: transform 0.25s;
}

.habit-row span.on {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2), 0 0 14px -4px var(--accent);
}

.t-ing:hover .habit-row span {
    transform: translateY(2px);
}

.t-ing:hover .habit-row span:nth-child(odd) {
    transform: translateY(-2px);
}

.fork-spin {
    transition: transform 0.9s cubic-bezier(0.3, 1.4, 0.4, 1);
}

.t-fork:hover .fork-spin {
    transform: rotate(540deg);
}

.route-svg {
    margin-top: auto;
    width: 75%;
    overflow: visible;
}

.route-svg path {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 260;
    stroke-dashoffset: 260;
    transition: stroke-dashoffset 1.2s ease;
}

.route-svg circle {
    fill: var(--surface);
    stroke: var(--accent);
    stroke-width: 2.5;
}

.t-route:hover .route-svg path,
.t-route.drawn .route-svg path {
    stroke-dashoffset: 0;
}

.t-now {
    grid-column: span 2;
    justify-content: center;
    background:
        radial-gradient(circle at 100% 0%, var(--accent-soft), transparent 55%),
        var(--surface);
}

.now-text {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text) !important;
    font-size: clamp(1.2rem, 2vw, 1.55rem) !important;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-top: 8px;
}

.big-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 4.2rem !important;
    font-weight: 700;
    line-height: 1;
    color: var(--accent) !important;
    letter-spacing: -0.04em;
}

.t-years {
    justify-content: flex-end;
}

.t-remote {
    justify-content: flex-end;
}

.t-remote strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    color: var(--text);
}

.globe {
    align-self: flex-start;
    line-height: 1;
    font-size: 3.4rem;
    color: var(--accent);
    margin-bottom: auto;
    animation: spin-slow 24s linear infinite;
}

@keyframes spin-slow {
    to {
        transform: rotate(360deg);
    }
}

/* ── About ── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.about-text p {
    font-size: 1.15rem;
    color: var(--muted);
}

.about-text p+p {
    margin-top: 18px;
}

.focus {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.focus-item {
    display: flex;
    gap: 14px;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.focus-item i {
    font-size: 1.5rem;
    color: var(--accent);
    width: 28px;
    flex: none;
    padding-top: 2px;
}

.focus-item h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
}

.focus-item p {
    font-size: 0.88rem;
    color: var(--muted);
}

.marquee {
    display: flex;
    overflow: hidden;
    margin-top: 80px;
    padding: 22px 0;
    border-block: 1px solid var(--line);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
    display: flex;
    flex: none;
    gap: 48px;
    padding-right: 48px;
    animation: marquee 38s linear infinite;
}

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

.marquee-track span {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--muted);
    white-space: nowrap;
    transition: color 0.2s;
}

.marquee-track span:nth-child(3n+1) {
    color: var(--text);
}

.marquee-track span::after {
    content: "✦";
    margin-left: 48px;
    color: var(--accent);
    font-size: 0.6em;
    vertical-align: middle;
}

@keyframes marquee {
    to {
        transform: translateX(-100%);
    }
}

/* ── Contact ── */
.contact {
    text-align: center;
    overflow: hidden;
}

.contact::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -400px;
    width: 1000px;
    height: 700px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, var(--accent-soft), transparent 65%);
    z-index: -1;
}

.contact-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 9vw, 7rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
    margin: 18px 0 20px;
}

.contact-lead {
    color: var(--muted);
    font-size: 1.15rem;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 36px;
}

/* ── Footer ── */
.footer {
    border-top: 1px solid var(--line);
    padding: 28px 0;
    font-size: 0.9rem;
    color: var(--muted);
}

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

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

.footer a:hover {
    color: var(--accent);
}

/* ── Command palette ── */
.cmdk {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 12vh 16px 16px;
}

.cmdk[hidden] {
    display: none;
}

.cmdk-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fade 0.2s ease both;
}

.cmdk-panel {
    position: relative;
    width: min(560px, 100%);
    border-radius: 18px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

@keyframes fade {
    from {
        opacity: 0;
    }
}

@keyframes pop {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.97);
    }
}

.cmdk-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px 6px 18px;
    border-bottom: 1px solid var(--line);
}

.cmdk-input-row i {
    color: var(--accent);
}

.cmdk-input-row input {
    flex: 1;
    min-height: 52px;
    border: 0;
    background: transparent;
    color: var(--text);
    font: 500 1.05rem 'DM Sans', sans-serif;
    outline: none;
}

.cmdk-esc {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    padding: 6px 9px;
    min-height: 32px;
    border-radius: 6px;
    border: 1px solid var(--line-strong);
    background: var(--surface-2);
    color: var(--muted);
    cursor: pointer;
}

.cmdk-list {
    max-height: min(60vh, 420px);
    overflow-y: auto;
    padding: 8px;
}

.cmdk-group {
    padding: 10px 12px 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.cmdk-item {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 48px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text);
}

.cmdk-item i {
    width: 20px;
    text-align: center;
    color: var(--muted);
}

.cmdk-item .hint {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--muted);
}

.cmdk-item[aria-selected="true"] {
    background: var(--accent-soft);
}

.cmdk-item[aria-selected="true"] i {
    color: var(--accent);
}

.cmdk-empty {
    padding: 24px;
    text-align: center;
    color: var(--muted);
}

/* ── Toast ── */
.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 400;
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--text);
    color: var(--bg);
    font-weight: 600;
    font-size: 0.92rem;
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ── Pre-animation states (only when motion is allowed and JS is running) ── */
.motion [data-reveal],
.motion [data-hero],
.motion .hero-title [data-word] {
    opacity: 0;
}

/* ── Responsive ── */
@media (max-width: 1080px) {
    .decisions {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .t-mem,
    .t-ing,
    .t-econ,
    .t-market,
    .t-now {
        grid-column: span 2;
    }

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

@media (max-width: 920px) {
    .nav-links {
        display: none;
    }

    .cmdk-btn-desktop,
    .footer-hint {
        display: none;
    }

    .cmdk-btn-mobile {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .hero {
        padding-top: 104px;
    }

    .hero-grid,
    .flagship-top,
    .about-grid {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        gap: 48px;
    }

    .hero-demo {
        max-width: 420px;
        margin: 0 auto;
        width: 100%;
    }

    .scroll-cue {
        display: none;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    .wrap {
        padding: 0 16px;
    }

    .section {
        padding: 84px 0;
    }

    .hero-ctas .btn {
        flex: 1 1 100%;
    }

    .hero-stats {
        gap: 12px 28px;
    }


    .ticket {
        right: -4px;
        bottom: 0;
        width: 196px;
    }

    .decisions,
    .bento,
    .focus {
        grid-template-columns: 1fr;
    }

    .t-mem,
    .t-ing,
    .t-econ,
    .t-market,
    .t-now {
        grid-column: span 1;
    }

    .t-mem,
    .t-ing {
        grid-row: span 1;
        flex-direction: column;
    }

    .ing-phones {
        flex: none;
        height: 300px;
    }

    .role {
        grid-template-columns: 1fr;
        gap: 6px;
        padding-left: 24px;
    }

    .t-mem .chips {
        padding-bottom: 0;
    }

    .mem-phones {
        width: auto;
        min-height: 0;
        height: 320px;
        margin: 4px -24px -24px;
    }

    .device {
        width: 40%;
        max-width: 150px;
    }

    .contact-actions .btn {
        flex: 1 1 100%;
    }

    .contact-actions .btn-primary {
        font-size: 0.95rem;
    }
}

/* ── Reduced motion: everything visible and still ── */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .marquee-track {
        animation: none;
    }

    .marquee {
        flex-wrap: wrap;
    }

    .marquee-track+.marquee-track {
        display: none;
    }

    .pipe-pulse {
        display: none;
    }
}

/* Decorative glows extend past the edges; "clip" (unlike "hidden") can't be
   scrolled sideways by focus or scrollIntoView. */
.hero,
.contact,
.flagship,
.tile,
.ing-phones {
    overflow: clip;
}
