/* ============================================================
   Pascal Guay — pascalnet.net
   Dark "embedding space" design system. No frameworks.
   ============================================================ */

:root {
    --bg: #06070d;
    --bg-alt: #0a0d17;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-2: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #e9edf8;
    --text-dim: #9aa3bd;
    --text-faint: #6b7490;
    --blue: #4f8cff;
    --violet: #8b5cf6;
    --pink: #ec4899;
    --accent: #6ea8ff;
    --grad: linear-gradient(92deg, var(--blue), var(--violet) 55%, var(--pink));
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
    --radius: 18px;
    --nav-h: 72px;
    --shadow-card: 0 18px 50px rgba(0, 0, 0, 0.45);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16.5px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
img, svg, canvas { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #9ec5ff; }
ul { list-style: none; }
::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.mono { font-family: var(--font-mono); }
.skip-link {
    position: fixed; left: 16px; top: -60px; z-index: 600;
    background: var(--bg-alt); color: var(--text);
    border: 1px solid var(--accent); border-radius: 10px;
    padding: 10px 18px; font-size: 0.9rem; transition: top 0.25s var(--ease-out);
}
.skip-link:focus-visible { top: 14px; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.grad-text {
    background: var(--grad);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: grad-sheen 7s ease-in-out infinite;
}
@keyframes grad-sheen {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* film grain — the expensive-website texture */
body::after {
    content: ''; position: fixed; inset: 0; z-index: 300; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    opacity: 0.05;
}

/* subtle scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #232a41; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #2f3854; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
    position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 200;
    background: transparent; pointer-events: none;
}
#scroll-progress-bar {
    display: block; height: 100%; width: 100%;
    background: var(--grad);
    transform: scaleX(0); transform-origin: 0 50%;
}

/* ---------- Nav ---------- */
nav#site-nav {
    position: fixed; inset: 0 0 auto 0; z-index: 100;
    height: var(--nav-h);
    display: flex; align-items: center;
    background: transparent;
    transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}
nav#site-nav.scrolled {
    background: rgba(6, 7, 13, 0.78);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 var(--border), 0 12px 40px rgba(0, 0, 0, 0.35);
}
.nav-inner { display: flex; align-items: center; gap: 28px; width: 100%; }
.logo { display: flex; align-items: center; gap: 11px; color: var(--text); }
.logo:hover { color: #fff; }
.logo-mark { width: 30px; height: 30px; flex-shrink: 0; }
.logo-mark line { stroke: url(#none), var(--accent); stroke: var(--accent); stroke-width: 1.4; opacity: 0.85; }
.logo-mark circle { fill: var(--bg); stroke: var(--accent); stroke-width: 1.6; }
.logo-mark circle:nth-of-type(3) { stroke: var(--pink); }
.logo-text { font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; letter-spacing: 0.01em; white-space: nowrap; }
.logo-caret { color: var(--accent); animation: caret-blink 1.15s steps(1) infinite; }

.nav-menu { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav-links { display: flex; gap: 26px; }
.nav-links a {
    color: var(--text-dim); font-size: 0.95rem; font-weight: 500;
    position: relative; padding: 6px 0;
}
.nav-links a::after {
    content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
    background: var(--grad); border-radius: 2px;
    transform: scaleX(0); transform-origin: 0 50%;
    transition: transform 0.3s var(--ease-out);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--text); }

.lang-switch { display: flex; align-items: center; gap: 6px; color: var(--text-faint); }
.lang-switch button {
    background: none; border: 0; cursor: pointer;
    color: var(--text-faint); font-family: var(--font-mono); font-size: 0.9rem;
    padding: 4px 5px; border-radius: 6px; transition: color 0.2s ease;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.is-active { color: var(--text); text-shadow: 0 0 14px rgba(110, 168, 255, 0.8); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font-family: var(--font-head); font-weight: 600; font-size: 0.98rem;
    padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
    cursor: pointer; transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    will-change: transform;
}
.btn .ico { width: 17px; height: 17px; fill: currentColor; }
.btn-primary {
    background: var(--grad); color: #fff;
    box-shadow: 0 8px 30px rgba(110, 92, 246, 0.35);
    position: relative; overflow: hidden;
}
.btn-primary::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: -80%; width: 55%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-18deg);
    transition: left 0.55s var(--ease-out);
    pointer-events: none;
}
.btn-primary:hover::after { left: 130%; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(139, 92, 246, 0.5); color: #fff; }
.btn-nav { animation: cta-nudge 9s ease-in-out infinite; }
@keyframes cta-nudge {
    0%, 88%, 100% { box-shadow: 0 8px 30px rgba(110, 92, 246, 0.35); }
    93% { box-shadow: 0 8px 42px rgba(139, 92, 246, 0.75), 0 0 0 5px rgba(139, 92, 246, 0.18); }
}
.btn-ghost {
    background: var(--surface); color: var(--text);
    border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: #fff; transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn-nav { padding: 10px 20px; font-size: 0.9rem; }

.cmdk-chip {
    background: var(--surface); color: var(--text-faint); cursor: pointer;
    border: 1px solid var(--border); border-radius: 8px;
    font-size: 0.78rem; padding: 6px 10px; letter-spacing: 0.04em;
    transition: color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.cmdk-chip:hover { color: var(--text); border-color: var(--accent); box-shadow: 0 0 16px rgba(110, 168, 255, 0.25); }

/* ---------- Minimap rail ---------- */
.rail {
    position: fixed; right: 16px; top: 50%; transform: translateY(-50%);
    z-index: 90; display: flex; flex-direction: column; gap: 13px;
}
.rail a {
    position: relative; display: block; width: 10px; height: 10px; border-radius: 50%;
    border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.06);
    transition: transform 0.25s var(--ease-out), background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.rail a:hover { border-color: var(--accent); transform: scale(1.3); }
.rail a.is-current {
    background: var(--grad); border-color: transparent;
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.85); transform: scale(1.35);
}
.rail .rail-tip {
    position: absolute; right: 22px; top: 50%;
    transform: translateY(-50%) translateX(5px);
    background: rgba(12, 15, 26, 0.96); border: 1px solid var(--border-strong);
    border-radius: 8px; color: var(--text);
    font-family: var(--font-mono); font-size: 0.68rem; padding: 4px 10px;
    white-space: nowrap; opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s var(--ease-out);
}
.rail a:hover .rail-tip, .rail a:focus-visible .rail-tip { opacity: 1; transform: translateY(-50%) translateX(0); }
@media (max-width: 1140px) { .rail { display: none; } }

/* ---------- Command palette ---------- */
.cmdk { position: fixed; inset: 0; z-index: 400; }
.cmdk[hidden] { display: none; }
.cmdk-backdrop {
    position: absolute; inset: 0; background: rgba(4, 5, 10, 0.6);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    animation: cmdk-fade 0.18s ease forwards;
}
.cmdk-panel {
    position: relative; margin: 16vh auto 0; width: min(580px, 92vw);
    background: linear-gradient(170deg, rgba(18, 22, 38, 0.97), rgba(10, 13, 23, 0.98));
    border: 1px solid var(--border-strong); border-radius: 16px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 60px rgba(139, 92, 246, 0.12);
    overflow: hidden;
    animation: cmdk-pop 0.2s var(--ease-out) forwards;
}
@keyframes cmdk-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cmdk-pop { from { opacity: 0; transform: translateY(-10px) scale(0.975); } to { opacity: 1; transform: none; } }
.cmdk-input-row { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.cmdk-glyph { color: var(--pink); }
#cmdk-input {
    flex: 1; background: none; border: 0; outline: none;
    color: var(--text); font-family: var(--font-mono); font-size: 1rem;
}
#cmdk-input::placeholder { color: var(--text-faint); }
kbd {
    font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-faint);
    border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px;
    padding: 3px 7px; background: rgba(255, 255, 255, 0.03);
}
.cmdk-list { max-height: 330px; overflow-y: auto; padding: 8px; }
.cmdk-group {
    color: var(--text-faint); font-family: var(--font-mono); font-size: 0.66rem;
    letter-spacing: 0.16em; text-transform: uppercase; padding: 12px 12px 6px;
}
.cmdk-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border-radius: 10px; cursor: pointer;
    color: var(--text-dim); font-size: 0.95rem; position: relative;
}
.cmdk-item .ci-ico { color: var(--text-faint); font-family: var(--font-mono); width: 18px; text-align: center; flex-shrink: 0; }
.cmdk-item kbd { margin-left: auto; }
.cmdk-item.is-active { background: var(--surface-2); color: var(--text); }
.cmdk-item.is-active::before {
    content: ''; position: absolute; left: 0; top: 20%; bottom: 20%; width: 2.5px;
    border-radius: 2px; background: var(--grad);
}
.cmdk-item.is-active .ci-ico { color: var(--accent); }
.cmdk-empty { padding: 26px 12px; text-align: center; color: var(--text-faint); font-size: 0.9rem; }
.cmdk-foot {
    padding: 10px 18px; border-top: 1px solid var(--border);
    color: var(--text-faint); font-size: 0.68rem; letter-spacing: 0.05em;
}

/* ---------- Toast ---------- */
.toast {
    position: fixed; left: 50%; bottom: 34px; z-index: 500;
    transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
    background: linear-gradient(170deg, rgba(20, 25, 42, 0.97), rgba(12, 15, 26, 0.97));
    border: 1px solid var(--border-strong); border-radius: 12px;
    color: var(--text); font-size: 0.85rem; padding: 13px 22px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55), 0 0 40px rgba(110, 168, 255, 0.14);
    transition: opacity 0.28s ease, transform 0.28s var(--ease-out);
    max-width: min(480px, 90vw); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; margin-left: auto; z-index: 120; }
.nav-toggle span {
    display: block; width: 24px; height: 2px; background: var(--text);
    margin: 5px 0; border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    position: relative; min-height: 100svh;
    display: flex; flex-direction: column; justify-content: center;
    padding: calc(var(--nav-h) + 40px) 0 90px;
    overflow: hidden; isolation: isolate;
}
#embedding-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-grid {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        linear-gradient(rgba(110, 168, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(110, 168, 255, 0.05) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 42%, #000 25%, transparent 72%);
    mask-image: radial-gradient(ellipse 75% 65% at 50% 42%, #000 25%, transparent 72%);
}
.hero::before, .hero::after {
    content: ''; position: absolute; z-index: -1; border-radius: 50%;
    filter: blur(110px); pointer-events: none; opacity: 0.55;
}
.hero::before {
    width: 520px; height: 520px; left: -180px; top: -120px;
    background: radial-gradient(circle, rgba(79, 140, 255, 0.35), transparent 65%);
    animation: blob-a 17s ease-in-out infinite alternate;
}
.hero::after {
    width: 560px; height: 560px; right: -200px; bottom: -160px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.22), transparent 65%);
    animation: blob-b 21s ease-in-out infinite alternate;
}
@keyframes blob-a { to { transform: translate(70px, 50px) scale(1.18); } }
@keyframes blob-b { to { transform: translate(-60px, -40px) scale(1.1); } }

.hero-content { position: relative; }
.hero-eyebrow {
    color: var(--accent); font-size: 0.85rem; letter-spacing: 0.14em;
    text-transform: uppercase; margin-bottom: 22px;
}
.hero-eyebrow::before { content: '▸ '; color: var(--pink); }
.hero-name {
    font-family: var(--font-head); font-weight: 700;
    font-size: clamp(3rem, 8.5vw, 5.6rem);
    line-height: 1.02; letter-spacing: -0.02em; margin-bottom: 22px;
}
.hero-typed {
    font-size: clamp(1.05rem, 2.4vw, 1.45rem); color: var(--text);
    min-height: 1.6em; margin-bottom: 18px;
}
#typed-target .tok-candidate { color: var(--text-faint); opacity: 0.6; }
.type-caret {
    display: inline-block; width: 0.55em; height: 1.15em; margin-left: 3px;
    background: var(--accent); vertical-align: text-bottom;
    animation: caret-blink 0.9s steps(1) infinite;
    box-shadow: 0 0 18px rgba(110, 168, 255, 0.9);
}
@keyframes caret-blink { 50% { opacity: 0; } }
.hero-sub { max-width: 640px; color: var(--text-dim); font-size: 1.06rem; margin-bottom: 36px; }
.hero-sub strong { color: var(--text); font-weight: 600; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 60px; }

/* ---------- Intent router ---------- */
.intent-form {
    position: relative; display: flex; align-items: center; gap: 10px;
    max-width: 560px; margin-bottom: 38px;
    background: rgba(10, 13, 23, 0.55);
    border: 1px solid var(--border-strong); border-radius: 14px;
    padding: 4px 6px 4px 16px;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.intent-form:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(110, 168, 255, 0.14), 0 0 34px rgba(110, 168, 255, 0.18);
}
.intent-glyph { color: var(--pink); flex-shrink: 0; }
#intent-input {
    flex: 1; background: none; border: 0; outline: none; min-width: 0;
    color: var(--text); font-size: 0.92rem; padding: 11px 0;
}
#intent-input::placeholder { color: var(--text-faint); }
.intent-go {
    flex-shrink: 0; width: 40px; height: 40px; cursor: pointer;
    background: var(--surface-2); color: var(--text-dim);
    border: 1px solid var(--border); border-radius: 10px; font-size: 1.05rem;
    transition: color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s var(--ease-out);
}
.intent-go:hover { color: #fff; border-color: var(--accent); box-shadow: 0 0 18px rgba(110, 168, 255, 0.35); transform: translateX(2px); }
.intent-out {
    position: absolute; left: 16px; right: 16px; top: calc(100% + 7px);
    font-size: 0.73rem; color: var(--text-dim); min-height: 1.2em;
    pointer-events: none; overflow: hidden; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.intent-out .dim { color: var(--text-faint); }
.intent-out .ok { color: #7ce8ab; }

/* arrival flash when routed to a section */
.section-title.arrived { animation: arrive-flash 1.5s var(--ease-out); }
@keyframes arrive-flash {
    0% { text-shadow: none; }
    28% { text-shadow: 0 0 36px rgba(110, 168, 255, 0.95), 0 0 80px rgba(139, 92, 246, 0.5); }
    100% { text-shadow: none; }
}

.hero-stats {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px;
    max-width: 980px; border-top: 1px solid var(--border); padding-top: 30px;
}
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-num {
    font-size: clamp(1.55rem, 3vw, 2.1rem); font-weight: 500; color: #fff;
    letter-spacing: -0.01em;
    display: inline-block;
}
.stat-num.stat-pop { animation: stat-pop 0.45s var(--ease-out); }
@keyframes stat-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.14); text-shadow: 0 0 26px rgba(110, 168, 255, 0.9); }
    100% { transform: scale(1); }
}
.stat-num.stat-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { color: var(--text-faint); font-size: 0.85rem; line-height: 1.45; max-width: 21ch; }

.hero-hud {
    position: absolute; right: 30px; bottom: 26px;
    color: var(--text-faint); font-size: 0.72rem; letter-spacing: 0.02em;
    opacity: 0.8; max-width: 46ch; text-align: right;
}
.hero-scroll {
    position: absolute; left: 30px; bottom: 22px;
    display: flex; align-items: center; gap: 12px;
    color: var(--text-faint); font-family: var(--font-mono); font-size: 0.72rem;
    letter-spacing: 0.16em; text-transform: uppercase;
}
.hero-scroll:hover { color: var(--text); }
.scroll-line { width: 54px; height: 1px; background: var(--text-faint); position: relative; overflow: hidden; display: inline-block; }
.scroll-line::after {
    content: ''; position: absolute; inset: 0; background: var(--grad);
    transform: translateX(-100%); animation: scroll-sweep 2.2s var(--ease-out) infinite;
}
@keyframes scroll-sweep { 60% { transform: translateX(0); } 100% { transform: translateX(100%); } }

/* ---------- Hero load-in choreography ---------- */
html.js .hero-fx {
    opacity: 0;
    animation: hero-rise 0.95s var(--ease-out) forwards;
    animation-delay: var(--d, 0s);
}
@keyframes hero-rise {
    from { opacity: 0; transform: translateY(28px); filter: blur(9px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ---------- Frontier tooling strip ---------- */
.strip {
    padding: 30px 0 34px;
    background: var(--bg-alt);
    box-shadow: inset 0 1px 0 var(--border), inset 0 -1px 0 var(--border);
    overflow: hidden;
}
.strip-head {
    color: var(--text-faint); font-size: 0.72rem; letter-spacing: 0.16em;
    text-transform: uppercase; margin-bottom: 20px;
}
.strip-head::before { content: '▸ '; color: var(--pink); }
.marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee + .marquee { margin-top: 12px; }
.marquee-track {
    display: flex; width: max-content;
    animation: marquee-scroll 42s linear infinite;
}
.marquee-rev .marquee-track { animation-direction: reverse; animation-duration: 52s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll { to { transform: translateX(-50%); } }
.marquee-chip {
    font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-dim);
    border: 1px solid var(--border); background: var(--surface);
    border-radius: 999px; padding: 8px 18px; margin-right: 12px; white-space: nowrap;
    transition: color 0.25s ease, border-color 0.25s ease;
}
.marquee-chip:hover { color: var(--text); border-color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: 110px 0; position: relative; scroll-margin-top: 58px; }
.section-alt { background: var(--bg-alt); box-shadow: inset 0 1px 0 var(--border), inset 0 -1px 0 var(--border); }
.section-label {
    color: var(--pink); font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
    margin-bottom: 14px;
}
.section-label::before { content: '// '; color: var(--text-faint); }
.section-title {
    font-family: var(--font-head); font-weight: 700;
    font-size: clamp(1.9rem, 4.6vw, 3rem); letter-spacing: -0.015em;
    line-height: 1.12; margin-bottom: 18px; max-width: 20ch;
    text-wrap: balance;
}
.section-lead, .hero-sub { text-wrap: pretty; }
html.js .section-title::after {
    content: ''; display: block; width: 64px; height: 3px; margin-top: 16px;
    border-radius: 3px; background: var(--grad);
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.9s var(--ease-out) 0.2s;
}
html.js .section-title.is-visible::after { transform: scaleX(1); }
.section-lead { color: var(--text-dim); max-width: 62ch; margin-bottom: 52px; font-size: 1.05rem; }

/* ---------- Method (transformation OS) ---------- */
#method {
    background:
        radial-gradient(55% 44% at 50% 0%, rgba(139, 92, 246, 0.07), transparent 72%);
}
.method-steps {
    list-style: none; position: relative;
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px;
}
.method-steps::before {
    content: ''; position: absolute; top: 30px; left: 2%; right: 2%; height: 2px;
    background: var(--grad); opacity: 0.55; border-radius: 2px;
    transform: scaleX(0); transform-origin: left;
    transition: transform 1.8s var(--ease-out) 0.25s;
}
html.js .method-steps.is-visible::before { transform: scaleX(1); }
html:not(.js) .method-steps::before { transform: scaleX(1); }
.m-step { position: relative; padding-top: 66px; }
.m-node {
    position: absolute; top: 8px; left: 0;
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    background: var(--bg); border: 1px solid var(--border-strong); border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(6, 7, 13, 0.9), 0 0 22px rgba(110, 168, 255, 0.18);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ease-out);
}
.m-num { color: var(--accent); font-size: 0.8rem; }
.m-step:hover .m-node {
    border-color: var(--accent); transform: translateY(-2px);
    box-shadow: 0 0 0 5px rgba(6, 7, 13, 0.9), 0 0 32px rgba(110, 168, 255, 0.5);
}
.m-step h3 { font-family: var(--font-head); font-size: 1.12rem; font-weight: 600; margin-bottom: 9px; }
.m-step > p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 14px; }
.m-out {
    display: inline-block; color: var(--pink); font-size: 0.68rem; letter-spacing: 0.05em;
    border: 1px dashed rgba(236, 72, 153, 0.45); border-radius: 999px; padding: 4px 11px;
}

/* ---------- Orchestrator console ---------- */
.console-window {
    background: linear-gradient(175deg, rgba(13, 16, 28, 0.92), rgba(8, 10, 18, 0.96));
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    box-shadow: var(--shadow-card), 0 0 90px rgba(139, 92, 246, 0.08);
    overflow: hidden;
}
.console-head {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 18px; border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.025);
}
.console-dots { display: flex; gap: 7px; flex-shrink: 0; }
.console-dots i { width: 11px; height: 11px; border-radius: 50%; }
.console-dots i:nth-child(1) { background: #ff5f57; }
.console-dots i:nth-child(2) { background: #febc2e; }
.console-dots i:nth-child(3) { background: #28c840; }
.console-title { color: var(--text-faint); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console-status {
    margin-left: auto; flex-shrink: 0; font-size: 0.68rem; letter-spacing: 0.08em;
    padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border-strong);
    color: var(--text-dim); text-transform: uppercase;
}
.console-status.is-running { color: #6ea8ff; border-color: rgba(110, 168, 255, 0.5); animation: status-blink 1.1s steps(1) infinite; }
.console-status.is-done { color: #3ddc84; border-color: rgba(61, 220, 132, 0.5); }
@keyframes status-blink { 50% { opacity: 0.55; } }
.console-tokens { color: var(--text-faint); font-size: 0.72rem; flex-shrink: 0; min-width: 110px; text-align: right; }

.console-body { display: grid; grid-template-columns: 205px 1fr; }
.console-agents {
    display: flex; flex-direction: column; gap: 10px;
    padding: 18px 16px; border-right: 1px solid var(--border);
}
.agent-chip {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-dim);
    border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px;
    opacity: 0.4; transition: opacity 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.agent-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); flex-shrink: 0; transition: background 0.3s ease; }
.agent-chip.is-active { opacity: 1; border-color: rgba(110, 168, 255, 0.55); box-shadow: 0 0 18px rgba(110, 168, 255, 0.12); color: var(--text); }
.agent-chip.is-active .agent-dot { background: var(--accent); animation: agent-pulse 1s ease-in-out infinite; }
.agent-chip.is-done { opacity: 0.9; color: var(--text); }
.agent-chip.is-done .agent-dot { background: #3ddc84; animation: none; }
@keyframes agent-pulse { 50% { box-shadow: 0 0 0 5px rgba(110, 168, 255, 0.18); } }

.console-log-wrap { position: relative; }
.console-log {
    font-family: var(--font-mono); font-size: 0.83rem; line-height: 1.75;
    padding: 20px 22px; min-height: 340px; max-height: 400px; overflow: hidden;
}
.console-log-wrap::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.016) 0 1px, transparent 1px 3px);
}
.cl { display: flex; gap: 14px; }
html.js .cl { opacity: 0; transform: translateY(7px); animation: cl-in 0.32s var(--ease-out) forwards; }
@keyframes cl-in { to { opacity: 1; transform: none; } }
.cl-tag { flex-shrink: 0; width: 96px; text-align: right; color: var(--text-faint); }
.cl[data-a="sys"] .cl-tag { color: var(--text); }
.cl[data-a="planner"] .cl-tag { color: #6ea8ff; }
.cl[data-a="analyst"] .cl-tag { color: #4dd7d0; }
.cl[data-a="builder"] .cl-tag { color: #a78bfa; }
.cl[data-a="reviewer"] .cl-tag { color: #f472b6; }
.cl[data-a="evals"] .cl-tag { color: #3ddc84; }
.cl-text { color: var(--text-dim); overflow-wrap: anywhere; }
.cl[data-a="sys"] .cl-text { color: var(--text); }
.cl.cl-end .cl-text { color: #7ce8ab; text-shadow: 0 0 18px rgba(61, 220, 132, 0.35); }
.console-cursor {
    display: inline-block; width: 8px; height: 1.05em; margin-left: 6px; vertical-align: text-bottom;
    background: var(--accent); animation: caret-blink 0.85s steps(1) infinite;
}
.console-foot {
    display: flex; justify-content: flex-end; align-items: center;
    padding: 12px 18px; border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}
.console-replay {
    background: var(--surface); color: var(--text-dim); cursor: pointer;
    border: 1px solid var(--border-strong); border-radius: 999px;
    font-size: 0.78rem; letter-spacing: 0.06em; padding: 8px 18px;
    transition: color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.3s ease;
    opacity: 0.5;
}
.console-replay.is-ready { opacity: 1; }
.console-replay:hover { color: #fff; border-color: var(--accent); box-shadow: 0 0 22px rgba(110, 168, 255, 0.3); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: start; }
.about-text p { color: var(--text-dim); margin-bottom: 20px; }
.about-text p strong { color: var(--text); font-weight: 600; }
.about-aside { display: grid; gap: 22px; align-content: start; }
@media (min-height: 980px) {
    .about-aside { position: sticky; top: calc(var(--nav-h) + 20px); }
}
.portrait-card {
    position: relative; overflow: hidden;
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    background: var(--surface); box-shadow: var(--shadow-card);
}
.portrait-card::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
    background: var(--grad); z-index: 1;
}
.portrait-card img { width: 100%; height: auto; }
.portrait-card figcaption {
    position: absolute; inset: auto 0 0 0; z-index: 1;
    padding: 34px 18px 13px; font-size: 0.72rem; letter-spacing: 0.03em;
    color: var(--text-dim); text-align: center;
    background: linear-gradient(180deg, transparent, rgba(6, 7, 13, 0.9) 62%);
}
.now-card {
    background: linear-gradient(160deg, rgba(79, 140, 255, 0.08), rgba(236, 72, 153, 0.05)), var(--surface);
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    padding: 30px 30px 26px; box-shadow: var(--shadow-card);
}
.now-pulse { display: flex; align-items: center; margin-bottom: 14px; }
.now-pulse span {
    width: 9px; height: 9px; border-radius: 50%; background: #3ddc84;
    box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55); animation: pulse-ring 2.1s ease-out infinite;
}
@keyframes pulse-ring { 70% { box-shadow: 0 0 0 12px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
.now-card h3 { color: var(--text-faint); font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500; margin-bottom: 10px; }
.now-role { font-family: var(--font-head); font-weight: 600; font-size: 1.18rem; line-height: 1.35; margin-bottom: 6px; }
.now-loc { color: var(--text-faint); font-size: 0.82rem; margin-bottom: 20px; }
.now-card dl { display: grid; gap: 4px 0; margin-bottom: 20px; }
.now-card dt { color: var(--pink); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; margin-top: 12px; }
.now-card dd { color: var(--text-dim); font-size: 0.95rem; }
.now-open { border-top: 1px solid var(--border); padding-top: 16px; color: var(--accent); font-size: 0.92rem; font-weight: 500; }

/* ---------- Architecture blueprint ---------- */
.arch-figure { margin: 0; }
.arch-scroll {
    overflow-x: auto; overscroll-behavior-x: contain;
    border: 1px solid var(--border); border-radius: var(--radius);
    background:
        radial-gradient(60% 60% at 50% 40%, rgba(79, 140, 255, 0.05), transparent 70%),
        linear-gradient(175deg, rgba(11, 14, 25, 0.9), rgba(7, 9, 16, 0.95));
    box-shadow: var(--shadow-card);
}
#arch-svg { min-width: 780px; width: 100%; height: auto; display: block; padding: 18px 8px 10px; }
.arch-flow { fill: none; stroke: rgba(110, 168, 255, 0.28); stroke-width: 1.6; }
.arch-gate {
    fill: none; stroke: rgba(236, 72, 153, 0.45); stroke-width: 1.4;
    stroke-dasharray: 5 6; animation: arch-ants 1.5s linear infinite;
}
@keyframes arch-ants { to { stroke-dashoffset: -22; } }
.arch-boxes rect {
    fill: #0c101d; stroke: rgba(255, 255, 255, 0.14); stroke-width: 1;
    transition: stroke 0.3s ease;
}
.arch-boxes rect.arch-hub { stroke: rgba(110, 168, 255, 0.45); filter: drop-shadow(0 0 14px rgba(110, 168, 255, 0.18)); }
.arch-boxes rect.arch-side { stroke: rgba(236, 72, 153, 0.35); }
.arch-bracket { stroke: rgba(255, 255, 255, 0.25); stroke-width: 2; }
.arch-labels text {
    fill: var(--text); font-size: 13px; text-anchor: middle;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.arch-labels .arch-sub { fill: var(--text-faint); font-size: 10.5px; }
.arch-labels .arch-sys { fill: var(--text-dim); font-size: 11px; letter-spacing: 0.04em; }
#arch-packets circle { filter: drop-shadow(0 0 6px currentColor); }
.arch-figure figcaption { color: var(--text-faint); font-size: 0.72rem; margin-top: 12px; text-align: center; }

/* ---------- Cards ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; perspective: 1100px; }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 30px 28px; position: relative; overflow: hidden;
    transition: transform 0.35s var(--ease-out), border-color 0.35s ease, background 0.35s ease;
}

/* cursor spotlight (shared by cards, achievements, timeline entries) */
.card::after, .ach::after, .t-entry::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(110, 168, 255, 0.13), transparent 65%);
    opacity: 0; transition: opacity 0.35s ease; pointer-events: none;
}
.card:hover::after, .ach:hover::after, .t-entry:hover::after { opacity: 1; }
.ach, .t-entry { position: relative; overflow: hidden; }
.card::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
    background: var(--grad); opacity: 0; transition: opacity 0.35s ease;
}
.card:hover { transform: translateY(-6px); border-color: var(--border-strong); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card h3 { font-family: var(--font-head); font-size: 1.16rem; font-weight: 600; margin-bottom: 12px; line-height: 1.35; }
.card p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 18px; }
.card-icon { width: 46px; height: 46px; margin-bottom: 20px; color: var(--accent); }
.card-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card:hover .card-icon { color: var(--pink); }
.card-icon, .card:hover .card-icon { transition: color 0.35s ease; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.tags li {
    font-size: 0.72rem; color: var(--text-faint);
    border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px;
    letter-spacing: 0.02em; white-space: nowrap;
}
.card-link { font-size: 0.85rem; letter-spacing: 0.03em; }
.lab-emoji { font-size: 1.9rem; display: block; margin-bottom: 16px; }

/* ---------- Similarity cloud ---------- */
.sim-cloud { display: flex; flex-wrap: wrap; gap: 12px; max-width: 940px; margin-bottom: 26px; }
.sim-chip {
    --sim: 1;
    position: relative;
    font-family: var(--font-mono); font-size: 0.88rem; color: var(--text);
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
    padding: 10px 18px; cursor: pointer;
    opacity: calc(0.25 + 0.75 * var(--sim));
    transition: opacity 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ease-out);
}
.sim-chip:hover, .sim-chip.is-query {
    border-color: var(--accent); color: #fff;
    box-shadow: 0 0 24px rgba(110, 168, 255, 0.35);
    transform: translateY(-2px);
}
.sim-chip .sim-val {
    position: absolute; top: -9px; right: 8px;
    font-size: 0.62rem; color: var(--bg);
    background: var(--accent); border-radius: 6px; padding: 1px 6px;
    opacity: 0; transform: translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    font-weight: 500;
}
.sim-cloud.has-query .sim-chip:not(.is-query) .sim-val { opacity: 1; transform: translateY(0); }
.sim-cloud.has-query .sim-chip.is-strong { border-color: rgba(236, 72, 153, 0.65); }
.sim-note { color: var(--text-faint); font-size: 0.75rem; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 42px; }
.timeline-rail {
    position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px;
    background: linear-gradient(180deg, var(--blue), var(--violet), var(--pink));
    opacity: 0.35; border-radius: 2px;
}
.timeline-pulse {
    position: absolute; left: 50%; top: 0; width: 14px; height: 14px;
    transform: translate(-50%, -50%);
    background: #fff; border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(110, 168, 255, 0.25), 0 0 26px rgba(110, 168, 255, 0.95);
    transition: top 0.12s linear;
}
.phase { margin-bottom: 58px; position: relative; }
.phase:last-child { margin-bottom: 0; }
.phase-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; position: relative; }
.phase-head::before {
    content: ''; position: absolute; left: -40px; top: 6px; width: 12px; height: 12px;
    background: var(--bg); border: 2px solid var(--accent); border-radius: 50%;
    box-shadow: 0 0 16px rgba(110, 168, 255, 0.7);
}
.phase-badge {
    color: var(--pink); font-size: 0.72rem; border: 1px solid rgba(236, 72, 153, 0.4);
    padding: 3px 10px; border-radius: 999px; letter-spacing: 0.08em;
}
.phase-head h3 { font-family: var(--font-head); font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-weight: 600; }
.phase-period { color: var(--text-faint); font-size: 0.8rem; letter-spacing: 0.05em; }

.t-entry {
    display: grid; grid-template-columns: 175px 1fr; gap: 26px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px 28px; margin-bottom: 18px;
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s var(--ease-out);
}
.t-entry:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateX(4px); }
.t-period { color: var(--accent); font-size: 0.78rem; letter-spacing: 0.04em; line-height: 1.6; }
.t-body h4 { font-family: var(--font-head); font-size: 1.12rem; font-weight: 600; margin-bottom: 4px; }
.t-org { color: var(--text-faint); font-size: 0.88rem; margin-bottom: 14px; }
.t-body > ul:not(.tags) { display: grid; gap: 9px; margin-bottom: 16px; }
.t-body > ul:not(.tags) li {
    color: var(--text-dim); font-size: 0.94rem; padding-left: 20px; position: relative;
}
.t-body > ul:not(.tags) li::before {
    content: '›'; position: absolute; left: 2px; top: -1px; color: var(--pink); font-weight: 700;
}
.t-body em { color: var(--text); font-style: italic; }
.t-body strong { color: var(--text); }

/* ---------- Impact ---------- */
.impact-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 54px; align-items: center; margin-bottom: 60px; }
.impact-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 34px 28px; }
.impact-stats .stat-num { font-size: clamp(2rem, 4.2vw, 2.9rem); }
.loss-curve {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px 22px 16px;
}
.loss-grid line { stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; }
.loss-tick { fill: var(--text-faint); font-size: 10px; }
#loss-path {
    stroke: var(--violet); stroke-width: 2.4; stroke-linecap: round;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.65));
}
#loss-ball { fill: var(--pink); filter: drop-shadow(0 0 8px rgba(236, 72, 153, 0.9)); }
.loss-curve figcaption { color: var(--text-faint); font-size: 0.72rem; margin-top: 10px; text-align: center; }

.achievements { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ach {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px 22px; background: var(--surface);
    transition: transform 0.3s var(--ease-out), border-color 0.3s ease;
}
.ach:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.ach-glyph {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 10px; margin-bottom: 14px;
    background: var(--grad); color: #fff; font-size: 0.95rem;
}
.ach h3 { font-family: var(--font-head); font-size: 1.02rem; font-weight: 600; margin-bottom: 8px; }
.ach p { color: var(--text-dim); font-size: 0.88rem; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 14px; max-width: 860px; }
.faq-item {
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
    transition: border-color 0.3s ease, background 0.3s ease; overflow: hidden;
}
.faq-item[open], .faq-item:hover { border-color: var(--border-strong); background: var(--surface-2); }
.faq-item summary {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    cursor: pointer; padding: 20px 24px; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item h3 { font-family: var(--font-head); font-size: 1.05rem; font-weight: 600; line-height: 1.4; }
.faq-caret { color: var(--accent); font-size: 1.25rem; transition: transform 0.3s var(--ease-out); flex-shrink: 0; }
.faq-item[open] .faq-caret { transform: rotate(45deg); }
.faq-item > p { padding: 0 24px 22px; color: var(--text-dim); font-size: 0.95rem; max-width: 72ch; }
.faq-item[open] > p { animation: faq-open 0.4s var(--ease-out); }
@keyframes faq-open { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Leverage calculator ---------- */
.lev-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 34px; align-items: stretch; }
.lev-controls {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 34px 32px; display: flex; flex-direction: column; gap: 30px;
}
.lev-row label {
    display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
    color: var(--text-dim); font-size: 0.95rem; font-weight: 500; margin-bottom: 14px;
}
.lev-row output { color: var(--text); font-size: 1.05rem; }
input[type="range"] {
    -webkit-appearance: none; appearance: none; width: 100%; height: 6px;
    border-radius: 6px; outline: none; cursor: pointer;
    background: linear-gradient(90deg, var(--blue), var(--violet) var(--fill, 50%), rgba(255, 255, 255, 0.09) var(--fill, 50%));
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 22px; height: 22px; border-radius: 50%;
    background: #fff; border: 2px solid var(--violet);
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.65);
    transition: transform 0.15s var(--ease-out);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.18); }
input[type="range"]::-moz-range-thumb {
    width: 20px; height: 20px; border-radius: 50%;
    background: #fff; border: 2px solid var(--violet);
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.65);
}
input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.lev-note { color: var(--text-faint); font-size: 0.72rem; line-height: 1.7; margin-top: auto; }
.lev-results {
    background: linear-gradient(160deg, rgba(79, 140, 255, 0.07), rgba(236, 72, 153, 0.05)), var(--surface);
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    padding: 34px 32px; display: flex; flex-direction: column; gap: 22px;
}
.lev-res { display: flex; flex-direction: column; gap: 3px; }
.lev-num { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 500; color: #fff; letter-spacing: -0.01em; }
.lev-lab { color: var(--text-faint); font-size: 0.85rem; }
.lev-cap-head {
    display: flex; justify-content: space-between; align-items: baseline;
    color: var(--text-dim); font-size: 0.85rem; margin-bottom: 9px;
}
.lev-cap-head .mono { color: var(--accent); }
.lev-bar { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
#lev-bar-fill {
    display: block; height: 100%; width: 0; border-radius: 6px;
    background: var(--grad); box-shadow: 0 0 14px rgba(139, 92, 246, 0.7);
    transition: width 0.45s var(--ease-out);
}
.lev-cta { margin-top: auto; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: 32px; align-items: start; }
.contact-info {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 32px 30px;
    position: sticky; top: calc(var(--nav-h) + 24px);
}
.contact-info h3 { font-family: var(--font-head); font-size: 1.25rem; margin-bottom: 12px; }
.contact-info > p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 22px; }
.contact-facts { display: grid; gap: 14px; margin: 26px 0; }
.contact-facts li { display: flex; gap: 13px; align-items: baseline; color: var(--text-dim); font-size: 0.93rem; }
.fact-ico { color: var(--accent); width: 22px; flex-shrink: 0; text-align: center; }
.privacy-note {
    border-top: 1px solid var(--border); padding-top: 18px;
    color: var(--text-faint); font-size: 0.74rem; line-height: 1.7;
}

.contact-form {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 34px 32px;
}
.contact-form h3 { font-family: var(--font-head); font-size: 1.25rem; margin-bottom: 24px; }
.hp-wrap { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-row { margin-bottom: 20px; }
.form-row label { display: block; font-size: 0.86rem; font-weight: 500; color: var(--text-dim); margin-bottom: 8px; }
.form-row .req { color: var(--pink); }
.form-row .opt { color: var(--text-faint); font-weight: 400; }
.form-row input, .form-row select, .form-row textarea {
    width: 100%; background: rgba(0, 0, 0, 0.3); color: var(--text);
    border: 1px solid var(--border-strong); border-radius: 12px;
    font-family: var(--font-body); font-size: 0.98rem;
    padding: 13px 16px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.form-row textarea { min-height: 150px; resize: vertical; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(110, 168, 255, 0.18);
}
.form-row input::placeholder, .form-row textarea::placeholder { color: var(--text-faint); }
.form-row select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa3bd' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center;
}
.form-row select option { background: #121624; color: var(--text); }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 26px; }
#form-status {
    display: none; margin-top: 18px; padding: 14px 18px; border-radius: 12px;
    font-size: 0.93rem; font-weight: 500;
}
#form-status.ok { display: block; background: rgba(61, 220, 132, 0.12); color: #7ce8ab; border: 1px solid rgba(61, 220, 132, 0.35); }
#form-status.err { display: block; background: rgba(236, 72, 153, 0.1); color: #f6a0c6; border: 1px solid rgba(236, 72, 153, 0.35); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 46px 0 40px; background: var(--bg-alt); }
.footer-inner { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.footer-tag { color: var(--text-dim); font-size: 0.85rem; }
.footer-meta { color: var(--text-faint); font-size: 0.86rem; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.footer-sep { color: var(--text-faint); }
.footer-built { color: var(--text-faint); font-size: 0.76rem; }
.footer-status { color: var(--text-faint); font-size: 0.68rem; letter-spacing: 0.08em; opacity: 0.75; }
.footer-status::before { content: '● '; color: #3ddc84; }

/* ---------- 404 ---------- */
.nf-wrap { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 24px; }
.nf-code { font-family: var(--font-mono); font-size: clamp(4rem, 16vw, 9rem); font-weight: 500; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; margin-bottom: 20px; }
.nf-wrap h1 { font-family: var(--font-head); font-size: clamp(1.4rem, 4vw, 2.2rem); margin-bottom: 14px; }
.nf-wrap p { color: var(--text-dim); margin-bottom: 34px; }

/* ---------- Reveal animations (JS-gated) ---------- */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
html.js .reveal.reveal-left { transform: translateX(-30px); }
html.js .reveal.reveal-right { transform: translateX(30px); }
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1140px) {
    .nav-inner { gap: 20px; }
    .nav-menu { gap: 18px; }
    .nav-links { gap: 17px; }
}
@media (max-width: 1024px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .achievements { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-aside { position: static; max-width: 480px; }
    .impact-grid { grid-template-columns: 1fr; gap: 40px; }
    .lev-grid { grid-template-columns: 1fr; gap: 22px; }
    .method-steps { grid-template-columns: 1fr; gap: 34px; max-width: 640px; }
    .method-steps::before {
        top: 2%; bottom: 2%; left: 21px; right: auto; width: 2px; height: auto;
        transform: scaleY(0); transform-origin: top;
    }
    html.js .method-steps.is-visible::before { transform: scaleY(1); }
    html:not(.js) .method-steps::before { transform: scaleY(1); }
    .m-step { padding-top: 0; padding-left: 68px; }
    .m-node { top: -2px; }
}

@media (max-width: 820px) {
    body { font-size: 16px; }
    .section { padding: 84px 0; }
    .nav-toggle { display: block; }
    .nav-menu {
        position: fixed; inset: 0; z-index: 110;
        flex-direction: column; justify-content: center; gap: 34px;
        background: rgba(6, 7, 13, 0.96);
        -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
        opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
    }
    .nav-menu.open { opacity: 1; pointer-events: auto; }
    .nav-links { flex-direction: column; align-items: center; gap: 10px; }
    .nav-links a { font-size: 1.3rem; padding: 12px 18px; display: inline-block; }
    .lang-switch button { font-size: 1.05rem; padding: 12px 14px; }
    .nav-menu .btn-nav { padding: 14px 30px; font-size: 1rem; }
    /* staggered cascade when the menu opens */
    .nav-menu .nav-links li, .nav-menu .lang-switch, .nav-menu .btn-nav { opacity: 0; transform: translateY(16px); }
    .nav-menu.open .nav-links li, .nav-menu.open .lang-switch, .nav-menu.open .btn-nav {
        animation: menu-in 0.5s var(--ease-out) forwards;
    }
    .nav-menu.open .nav-links li:nth-child(1) { animation-delay: 0.05s; }
    .nav-menu.open .nav-links li:nth-child(2) { animation-delay: 0.1s; }
    .nav-menu.open .nav-links li:nth-child(3) { animation-delay: 0.15s; }
    .nav-menu.open .nav-links li:nth-child(4) { animation-delay: 0.2s; }
    .nav-menu.open .nav-links li:nth-child(5) { animation-delay: 0.25s; }
    .nav-menu.open .nav-links li:nth-child(6) { animation-delay: 0.3s; }
    .nav-menu.open .lang-switch { animation-delay: 0.36s; }
    .nav-menu.open .btn-nav { animation-delay: 0.42s; }
    @keyframes menu-in { to { opacity: 1; transform: none; } }
    .contact-grid { grid-template-columns: 1fr; }
    .contact-info { position: static; }
    .t-entry { grid-template-columns: 1fr; gap: 10px; padding: 24px 22px; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 26px 18px; }
    .hero-hud { display: none; }
    .impact-stats { gap: 26px 20px; }
    .cmdk-chip { display: none; }
    .cmdk-panel { margin-top: 10vh; }
    .console-body { grid-template-columns: 1fr; }
    .console-agents {
        flex-direction: row; flex-wrap: wrap; gap: 8px;
        border-right: 0; border-bottom: 1px solid var(--border); padding: 14px 16px;
    }
    .agent-chip { padding: 6px 11px; font-size: 0.72rem; }
    .console-log { font-size: 0.76rem; min-height: 300px; max-height: 340px; padding: 16px 14px; }
    .cl { gap: 10px; }
    .cl-tag { width: 74px; }
    .console-tokens { display: none; }
}

@media (max-width: 540px) {
    .container { padding: 0 20px; }
    #intent-input { font-size: 16px; }
    .intent-out { font-size: 0.68rem; }
    .cards-grid, .achievements { grid-template-columns: 1fr; }
    .hero { padding-bottom: 110px; }
    .hero-ctas .btn { width: 100%; }
    .timeline { padding-left: 26px; }
    .phase-head::before { left: -24px; }
    .timeline-rail { left: 4px; }
    .contact-form { padding: 26px 20px; }
    .hero-scroll { left: 20px; }
}

/* ---------- Print: recruiter-ready résumé ---------- */
@media print {
    @page { margin: 13mm; }
    body::after, .scroll-progress, nav#site-nav, .rail, .cmdk, .toast,
    #embedding-canvas, .hero-grid, .hero-typed, .intent-form, .hero-ctas, .hero-hud, .hero-scroll,
    .strip, #console, #architecture, #similarity, #lab, #leverage, #faq,
    .contact-form, .now-pulse, .footer-built, .footer-tag, .portrait-card figcaption,
    .loss-curve, .timeline-rail, .timeline-pulse, .card-icon, .lab-emoji,
    .contact-info .btn, .privacy-note { display: none !important; }
    html.js .reveal, html.js .hero-fx { opacity: 1 !important; transform: none !important; animation: none !important; filter: none !important; }
    html.js .section-title::after { display: none !important; }
    body { background: #fff !important; color: #111; font-size: 10.5pt; line-height: 1.5; }
    .hero { min-height: 0; padding: 0 0 10pt; overflow: visible; }
    .hero::before, .hero::after { display: none; }
    .hero-name { font-size: 26pt; margin-bottom: 6pt; color: #000; }
    .hero-eyebrow { color: #444; margin-bottom: 6pt; }
    .hero-eyebrow::before { content: ''; }
    .hero-sub { color: #222; margin-bottom: 12pt; max-width: none; }
    .hero-sub strong { color: #000; }
    .grad-text, .stat-num.stat-text { background: none !important; -webkit-background-clip: initial !important; background-clip: initial !important; color: #000 !important; animation: none !important; }
    .hero-stats { border-top: 1px solid #ccc; padding-top: 8pt; gap: 8pt; }
    .stat-num { color: #000; font-size: 13pt; }
    .stat-label { color: #444; }
    .section { padding: 12pt 0; scroll-margin-top: 0; }
    .section-alt { background: #fff; box-shadow: none; }
    #method { background: none; }
    .section-label { color: #777; margin-bottom: 4pt; }
    .section-label::before { color: #999; }
    .section-title { color: #000; font-size: 15pt; margin-bottom: 6pt; }
    .section-lead { color: #333; margin-bottom: 10pt; }
    .method-steps { grid-template-columns: repeat(5, 1fr); gap: 8pt; max-width: none; }
    .method-steps::before { display: none; }
    .m-step { padding: 0 !important; }
    .m-node { display: none; }
    .m-step h3 { color: #000; font-size: 10.5pt; }
    .m-step > p { color: #333; font-size: 8.5pt; }
    .m-out { color: #555; border-color: #bbb; font-size: 7pt; }
    .cards-grid { grid-template-columns: 1fr 1fr; gap: 8pt; perspective: none; }
    .card, .t-entry, .ach, .now-card, .contact-info, .portrait-card {
        background: #fff; border: 1px solid #ddd; box-shadow: none; break-inside: avoid;
    }
    .card { padding: 9pt 11pt; transform: none !important; }
    .card h3 { color: #000; font-size: 10.5pt; }
    .card p, .ach p { color: #333; font-size: 8.5pt; }
    .card::before, .card::after, .ach::after, .t-entry::after { display: none; }
    .tags li { border-color: #ccc; color: #555; }
    .timeline { padding-left: 0; }
    .phase-head::before { display: none; }
    .phase { margin-bottom: 12pt; }
    .phase-head h3, .t-body h4 { color: #000; }
    .phase-badge { color: #555; border-color: #bbb; }
    .phase-period, .t-org { color: #555; }
    .t-period { color: #333; }
    .t-entry { grid-template-columns: 110pt 1fr; gap: 10pt; padding: 9pt 11pt; margin-bottom: 6pt; transform: none !important; }
    .t-body > ul:not(.tags) li { color: #222; font-size: 9pt; }
    .t-body > ul:not(.tags) li::before { color: #888; }
    .t-body em, .t-body strong, .about-text p strong { color: #000; }
    .about-grid { grid-template-columns: 2.2fr 1fr; gap: 12pt; }
    .about-text p { color: #222; margin-bottom: 8pt; }
    .now-card { padding: 10pt 12pt; }
    .now-card dt { color: #555; }
    .now-card dd, .now-role, .now-loc { color: #222; }
    .now-open { color: #222; border-color: #ccc; }
    .achievements { grid-template-columns: 1fr 1fr; gap: 8pt; }
    .ach { padding: 9pt 11pt; transform: none !important; }
    .ach h3 { color: #000; }
    .ach-glyph { background: #eee; color: #333; }
    .impact-grid { grid-template-columns: 1fr; gap: 8pt; margin-bottom: 10pt; }
    .contact-grid { grid-template-columns: 1fr; }
    .contact-info { position: static; padding: 10pt 12pt; }
    .contact-info h3 { color: #000; }
    .contact-info > p, .contact-facts li { color: #333; }
    .fact-ico { color: #555; }
    footer { background: #fff; border-color: #ccc; padding: 10pt 0; }
    .footer-meta { color: #444; }
    a { color: #111; }
    .footer-meta a[href*="linkedin"]::after { content: " — linkedin.com/in/pascalguay"; color: #444; }
    #typed-target + .type-caret { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; animation-delay: 0s !important; transition-delay: 0s !important; }
    html.js .reveal { opacity: 1; transform: none; }
    html.js .hero-fx { opacity: 1; animation: none; }
    .scroll-line::after { animation: none; }
    .type-caret { animation: none; }
    .grad-text { animation: none; }
    .hero::before, .hero::after { animation: none; }
    .marquee-track { animation: none; flex-wrap: wrap; }
    .marquee { mask-image: none; -webkit-mask-image: none; }
}
