/* ==========================================================================
   DARWNLINZ — operator workspace
   Visual language aligned with ClaudeRouter: slate surfaces, quiet accent,
   no neon wash. Sub-apps (tradiem2026, ClaudeRouter) inherit these tokens.
   ========================================================================== */

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

@property --border-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

:root {
    color-scheme: dark;

    --bg-canvas: #0a0d12;
    --bg-sunken: #0d1117;
    --bg-surface: #151a21;
    --bg-raised: #1a2029;
    --bg-hover: #1f2732;
    --bg-active: #253040;
    --bg-inset: #10151b;

    --border-subtle: #212932;
    --border: #2b343f;
    --border-strong: #3b4756;

    --fg: #e8edf4;
    --fg-muted: #a6b3c2;
    --fg-subtle: #8b98a8;
    --fg-on-solid: #ffffff;

    --accent: #6ba5ff;
    --accent-solid: #2f6fd0;
    --accent-solid-hover: #3a7ce0;
    --accent-quiet: #1b2b42;
    --accent-line: #35558a;

    --tone-running: #6ba5ff;
    --tone-running-quiet: #17263c;
    --tone-success: #63c48d;
    --tone-success-quiet: #14291f;
    --tone-warn: #e0b055;
    --tone-warn-quiet: #2a2416;
    --tone-danger: #ef8080;
    --tone-idle: #8b98a8;
    --tone-idle-quiet: #1c222a;

    --role-director: #e0b055;
    --role-director-quiet: #2a2416;
    --role-manager: #6ba5ff;
    --role-manager-quiet: #17263c;
    --role-worker: #63c48d;
    --role-worker-quiet: #14291f;
    --role-tester: #b799f2;
    --role-tester-quiet: #211c33;

    --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --font-display: var(--font-sans);
    --font-body: var(--font-sans);

    --text-xs: 12px;
    --text-sm: 13px;
    --text-base: 14px;
    --text-md: 15px;
    --text-lg: 17px;
    --text-xl: 20px;
    --text-2xl: 24px;

    --space-1: 2px;
    --space-2: 4px;
    --space-3: 6px;
    --space-4: 8px;
    --space-5: 12px;
    --space-6: 16px;
    --space-7: 20px;
    --space-8: 24px;
    --space-9: 32px;

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 14px;
    --radius-pill: 999px;

    --control-sm: 30px;
    --control-md: 34px;
    --control-lg: 38px;
    --focus-ring: 0 0 0 2px var(--bg-canvas), 0 0 0 4px var(--accent-line);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);

    --dur-fast: 110ms;
    --dur: 150ms;
    --ease: cubic-bezier(0.2, 0, 0.2, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --transition-smooth: all 0.35s var(--ease-out-quart);

    --rail-width: 268px;
    --sidebar-width: 268px;
    --header-pad-x: var(--space-8);

    --c-void: var(--bg-canvas);
    --c-void-soft: var(--bg-sunken);
    --c-void-elevated: var(--bg-surface);
    --c-panel: rgba(21, 26, 33, 0.72);
    --c-panel-solid: var(--bg-surface);
    --c-cyan: var(--accent);
    --c-cyan-dim: var(--accent-solid);
    --c-cyan-soft: var(--accent-quiet);
    --c-blue: var(--accent);
    --c-blue-dim: var(--accent-solid);
    --c-purple: var(--role-tester);
    --c-purple-dim: #6f5aa8;
    --c-magenta: #d47ad0;
    --c-red-glitch: var(--tone-danger);
    --c-text: var(--fg);
    --c-text-dim: var(--fg-muted);
    --c-text-faint: var(--fg-subtle);
    --c-border: var(--border);
    --c-border-strong: var(--border-strong);
    --border-angle: 0deg;
    --grad-signature: linear-gradient(115deg, var(--accent) 0%, var(--role-tester) 100%);
    --grad-conic-border: conic-gradient(from var(--border-angle), var(--accent-line), var(--accent), var(--role-tester), var(--accent-line));
}

html {
    background-color: var(--bg-canvas);
    scroll-behavior: auto;
}

html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.5;
    background-color: var(--bg-canvas);
    color: var(--fg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    cursor: none;
}

@media (hover: none), (pointer: coarse) {
    body { cursor: auto; }
}

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

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: var(--radius-pill);
    background: var(--border-strong);
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
    background: #4a5768;
    background-clip: content-box;
}
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

.skip-link {
    position: absolute;
    left: 12px;
    top: -48px;
    z-index: 10001;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    background: var(--accent-solid);
    color: var(--fg-on-solid);
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Atmosphere — quiet, not a neon overlay */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 9990;
    pointer-events: none;
    opacity: 0.018;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scanline-overlay { display: none; }

.aurora-bg {
    position: fixed;
    inset: 0;
    z-index: -3;
    overflow: hidden;
    background: var(--bg-canvas);
}

.aurora-blob {
    position: absolute;
    width: 48vw;
    height: 48vw;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.16;
    mix-blend-mode: screen;
}

.blob-cyan {
    top: -18%;
    left: -8%;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    animation: aurora-float-a 28s var(--ease) infinite alternate;
}
.blob-purple {
    bottom: -22%;
    right: -12%;
    background: radial-gradient(circle, var(--role-tester) 0%, transparent 70%);
    animation: aurora-float-b 32s var(--ease) infinite alternate;
}
.blob-blue {
    top: 40%;
    left: 42%;
    width: 32vw;
    height: 32vw;
    background: radial-gradient(circle, var(--accent-solid) 0%, transparent 70%);
    animation: aurora-float-c 36s var(--ease) infinite alternate;
}

@keyframes aurora-float-a {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(6vw, 8vh) scale(1.08); }
}
@keyframes aurora-float-b {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-7vw, -6vh) scale(1.1); }
}
@keyframes aurora-float-c {
    0%   { transform: translate(-4vw, 0) scale(0.95); }
    100% { transform: translate(4vw, -6vh) scale(1.05); }
}

.cyber-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(107, 165, 255, 0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(107, 165, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    z-index: -2;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, #000 30%, transparent 100%);
    mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, #000 30%, transparent 100%);
}

/* Cursor */
.cursor-dot, .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
    transform: translate(-50%, -50%);
}

.cursor-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.cursor-ring {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: transparent;
    transition: width 0.3s var(--ease), height 0.3s var(--ease), border-color 0.3s ease;
}

.cursor-ring.is-hover {
    width: 58px;
    height: 58px;
    border-color: var(--accent);
}
.cursor-ring.is-press { width: 28px; height: 28px; }

@media (hover: none), (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none; }
}

/* Shell */
.container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.mobile-header { display: none; }

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    border-right: 1px solid var(--border-subtle);
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 100;
    background: rgba(21, 26, 33, 0.68);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

.sidebar-top { display: flex; flex-direction: column; min-height: 0; }

.brand {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: var(--space-4);
    height: 56px;
    padding: 0 var(--space-5);
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 0;
}

.brand-mark {
    display: grid;
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent-line);
    border-radius: var(--radius-md);
    background: var(--accent-quiet);
    color: var(--accent);
    place-items: center;
    flex: none;
}
.brand-mark.sm { width: 22px; height: 22px; }

.brand .name,
.brand h1.name {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: 650;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin-bottom: 0;
    text-transform: none;
    color: var(--fg);
}

.brand .title {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    color: var(--fg-subtle);
    letter-spacing: 0;
    font-weight: 500;
}

.rail-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6) var(--space-5) var(--space-3);
}

.rail-label > span {
    color: var(--fg-subtle);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nav-menu { padding: 0 var(--space-4); }
.nav-menu ul { list-style: none; }
.nav-menu li { margin-bottom: 2px; }

.nav-link {
    text-decoration: none;
    color: var(--fg-subtle);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0;
    display: flex;
    align-items: center;
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
    position: relative;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
}

.nav-num {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    margin-right: 12px;
    font-weight: 500;
    opacity: 1;
    color: var(--fg-subtle);
}

.nav-link::after { display: none; }

.nav-link:hover {
    color: var(--fg);
    padding-left: 10px;
    text-shadow: none;
    background: var(--bg-raised);
}

.nav-link.active {
    color: var(--fg);
    padding-left: 10px;
    text-shadow: none;
    border-color: var(--accent-line);
    background: var(--accent-quiet);
}

.nav-link:hover .nav-num,
.nav-link.active .nav-num { color: var(--accent); }

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    padding: var(--space-5);
    border-top: 1px solid var(--border-subtle);
}

.backend-state {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--fg-muted);
    font-size: var(--text-xs);
    font-weight: 600;
}

.primary-button,
.secondary-button,
.btn-cv {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    height: var(--control-md);
    min-height: var(--control-md);
    padding: 0 var(--space-5);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.primary-button {
    border-color: var(--accent-solid);
    background: var(--accent-solid);
    color: var(--fg-on-solid);
}
.primary-button:hover { border-color: var(--accent-solid-hover); background: var(--accent-solid-hover); color: var(--fg-on-solid); }

.secondary-button {
    border-color: var(--border);
    background: var(--bg-raised);
    color: var(--fg);
}
.secondary-button:hover { border-color: var(--border-strong); background: var(--bg-hover); }

.btn-cv {
    justify-content: space-between;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: var(--bg-raised);
    color: var(--fg);
    border-color: var(--border);
}

.btn-cv::before { display: none; }
.btn-cv:hover { color: var(--fg); border-color: var(--border-strong); background: var(--bg-hover); }
.icon-download { width: 14px; height: 14px; }
.btn-cv:hover .icon-download { transform: translateY(1px); }

.social-links { display: flex; gap: 8px; }

.social-links a {
    display: grid;
    width: var(--control-md);
    height: var(--control-md);
    place-items: center;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-raised);
    color: var(--fg-muted);
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-1px);
    text-shadow: none;
    border-color: var(--accent-line);
    background: var(--accent-quiet);
}

.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 0 0 96px;
    background: linear-gradient(rgba(13, 17, 23, 0.66), rgba(13, 17, 23, 0.88));
    min-height: 100vh;
}

.workspace-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5) var(--header-pad-x);
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(21, 26, 33, 0.78);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    position: sticky;
    top: 0;
    z-index: 40;
}

.task-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
    overflow: hidden;
    color: var(--fg-subtle);
    font-size: var(--text-sm);
    white-space: nowrap;
}

.task-breadcrumb em { font-style: normal; color: var(--fg-muted); }
.task-breadcrumb i { color: var(--border-strong); font-style: normal; }
.task-breadcrumb .task-id { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--fg); }
.workspace-header .status-pill { margin-left: auto; flex: none; }

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    height: 24px;
    padding: 0 var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--tone-idle-quiet);
    color: var(--fg-muted);
    font-size: var(--text-xs);
    font-weight: 600;
}
.status-pill.tone-active {
    border-color: var(--accent-line);
    background: var(--tone-running-quiet);
    color: var(--tone-running);
}
.status-pill.tone-success {
    border-color: #2a5740;
    background: var(--tone-success-quiet);
    color: var(--tone-success);
}

.status-dot,
.pulse-dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tone-idle);
}
.pulse-dot.live,
.status-dot.status-running { background: var(--tone-running); animation: pulse-soft 2.4s var(--ease) infinite; }
.status-dot.status-passed { background: var(--tone-success); }

@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.42; }
}

.section {
    padding: 56px var(--header-pad-x);
    border-bottom: 1px solid var(--border-subtle);
    perspective: 1200px;
}

.section-title {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-subtle);
    margin-bottom: 28px;
    position: relative;
    display: inline-block;
}
.section-title::before { content: none; }

.eyebrow {
    color: var(--fg-subtle);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.glitch-text { position: relative; display: inline-block; }
.glitch-text::before, .glitch-text::after { content: none; }

.glow-wrap { position: relative; }
.glow-wrap::before { display: none; }

.border-trace { position: relative; isolation: isolate; }
.border-trace::before { display: none; }

.hero-title {
    font-family: var(--font-sans);
    font-size: clamp(2rem, 4.2vw, 3.15rem);
    font-weight: 650;
    letter-spacing: -0.035em;
    line-height: 1.12;
    margin-bottom: 28px;
    text-transform: none;
    background: none;
    color: var(--fg);
    padding-left: 0;
    max-width: 18ch;
}

.bio-text { max-width: 720px; }
.bio-text p {
    font-size: var(--text-md);
    line-height: 1.7;
    color: var(--fg-muted);
    margin-bottom: 16px;
}
.bio-text .p-lead {
    font-size: 1.15rem;
    color: var(--fg);
    font-weight: 400;
    line-height: 1.6;
}

.task-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-3);
    margin-top: 32px;
    max-width: 820px;
}

.task-metrics > div {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-inset);
}

.task-metrics > div > span {
    color: var(--fg-subtle);
    font-size: var(--text-xs);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-metrics strong {
    color: var(--fg);
    font-size: var(--text-lg);
    font-weight: 650;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.quote-wrapper {
    margin-top: 36px;
    padding: 16px 18px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-inset);
    border-radius: var(--radius-lg);
    max-width: 720px;
}

.terminal-quote {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: var(--text-sm);
    color: var(--accent);
}
.terminal-quote::before { content: '$ echo "'; color: var(--fg-subtle); }
.terminal-quote::after  { content: '"'; color: var(--fg-subtle); }

.cli-quote::before { content: '$ '; }
.cli-quote::after { content: none; }

/* Featured ClaudeRouter */
.featured-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.18fr);
    gap: 28px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--bg-surface);
    box-shadow: var(--shadow-md);
}

.featured-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.featured-copy h4 {
    font-size: clamp(1.4rem, 2.4vw, 1.85rem);
    font-weight: 650;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}

.featured-copy > p {
    color: var(--fg-muted);
    line-height: 1.65;
    margin-bottom: 16px;
    max-width: 52ch;
}

.featured-points {
    list-style: none;
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

.featured-points li {
    position: relative;
    padding-left: 16px;
    color: var(--fg-muted);
    font-size: var(--text-sm);
}
.featured-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

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

.workspace-preview:focus { outline: none; }
.workspace-preview:focus-visible { box-shadow: var(--focus-ring); }

.workspace-preview {
    position: relative;
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    min-height: 420px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-canvas);
    box-shadow: var(--shadow-sm);
}

.preview-rail {
    border-right: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    padding: 12px 10px;
    display: grid;
    align-content: start;
    gap: 6px;
}

.preview-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
}
.preview-brand strong {
    display: block;
    font-size: 11px;
    color: var(--fg);
    letter-spacing: -0.02em;
}
.preview-brand small {
    display: block;
    font-size: 9px;
    color: var(--fg-subtle);
    font-weight: 600;
}

.preview-rail-label {
    margin: 4px 2px 0;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fg-subtle);
}

.preview-task,
.preview-cmd,
.preview-metric,
.preview-dock-close,
.mini-node,
.preview-composer button,
.preview-palette-card button {
    appearance: none;
    font: inherit;
    color: inherit;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
}

.preview-task {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    padding: 8px;
    border-radius: var(--radius-md);
    font-size: 11px;
    color: var(--fg-subtle);
    font-weight: 600;
    text-align: left;
    transition:
        background var(--dur-fast) var(--ease),
        border-color var(--dur-fast) var(--ease),
        color var(--dur-fast) var(--ease),
        transform var(--dur-fast) var(--ease);
}
.preview-task:hover {
    background: var(--bg-hover);
    color: var(--fg);
}
.preview-task:active { transform: scale(0.98); }
.preview-task.is-active {
    background: var(--accent-quiet);
    color: var(--fg);
    border-color: var(--accent-line);
}

.preview-task-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-strong);
    flex: none;
}
.preview-task-dot.is-live {
    background: var(--tone-success);
    box-shadow: 0 0 0 3px var(--tone-success-quiet);
}

.preview-cmd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    color: var(--fg-subtle);
    font-size: 10px;
    font-weight: 650;
}
.preview-cmd:hover {
    border-color: var(--accent-line);
    color: var(--fg);
    background: var(--accent-quiet);
}
.preview-cmd kbd {
    font-family: var(--font-mono);
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg-inset);
}

.preview-main {
    padding: 12px;
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 0;
}

.preview-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--fg-subtle);
}

.preview-crumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.preview-crumbs i { color: var(--border-strong); font-style: normal; }
.preview-crumbs strong {
    color: var(--fg);
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-preview .status-pill {
    cursor: pointer;
    user-select: none;
}
.workspace-preview .status-pill:hover { border-color: var(--accent-line); }

.preview-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.preview-metric {
    padding: 8px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-inset);
    text-align: left;
    transition:
        border-color var(--dur-fast) var(--ease),
        background var(--dur-fast) var(--ease),
        transform var(--dur-fast) var(--ease);
}
.preview-metric:hover {
    border-color: var(--accent-line);
    background: var(--bg-raised);
}
.preview-metric:active { transform: scale(0.98); }
.preview-metric.is-active {
    border-color: var(--accent-line);
    background: var(--accent-quiet);
}
.preview-metric small {
    display: block;
    font-size: 9px;
    color: var(--fg-subtle);
    font-weight: 600;
}
.preview-metric b {
    display: block;
    margin-top: 2px;
    font-size: 16px;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.mini-org {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 10px 8px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--bg-inset);
}

.mini-trunk {
    width: 1px;
    height: 10px;
    background: var(--border-strong);
}

.mini-managers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.mini-branch {
    display: grid;
    justify-items: center;
    gap: 6px;
    min-width: 72px;
    padding: 8px 6px;
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-md);
}

.mini-workers {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.mini-node {
    display: grid;
    justify-items: center;
    gap: 1px;
    min-width: 54px;
    padding: 6px 8px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    transition:
        transform var(--dur-fast) var(--ease),
        box-shadow var(--dur-fast) var(--ease),
        border-color var(--dur-fast) var(--ease);
}
.mini-node span {
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}
.mini-node small {
    font-size: 9px;
    color: var(--fg-subtle);
    font-weight: 600;
}
.mini-node.worker,
.mini-node.tester {
    min-width: 24px;
    width: 24px;
    height: 24px;
    padding: 0;
    place-items: center;
    font-size: 10px;
    font-weight: 700;
}
.mini-node.director { color: var(--role-director); border-color: #5b4a22; }
.mini-node.manager { color: var(--role-manager); border-color: var(--accent-line); }
.mini-node.worker { color: var(--role-worker); border-color: #2a5740; background: var(--role-worker-quiet); }
.mini-node.tester { color: var(--role-tester); border-color: #4a3d6e; background: var(--role-tester-quiet); }
.mini-node:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.mini-node:active { transform: scale(0.96); }
.mini-node.is-active {
    box-shadow: var(--focus-ring);
}

.preview-dock {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    overflow: hidden;
}
.preview-dock[hidden] { display: none; }
.preview-dock header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-subtle);
}
.preview-dock header strong {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.preview-dock-close {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-sm);
    color: var(--fg-subtle);
    font-size: 16px;
    line-height: 1;
}
.preview-dock-close:hover {
    background: var(--bg-hover);
    color: var(--fg);
}

.preview-stream {
    margin: 0;
    padding: 10px 12px;
    max-height: 88px;
    overflow: auto;
    font-family: var(--font-mono);
    font-size: 10px;
    line-height: 1.65;
    color: var(--fg-muted);
    white-space: pre-wrap;
}

.preview-composer {
    display: flex;
    gap: 6px;
}
.preview-composer input {
    flex: 1;
    min-width: 0;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-inset);
    color: var(--fg);
    font-family: var(--font-sans);
    font-size: 12px;
    outline: none;
}
.preview-composer input:focus {
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
}
.preview-composer button {
    height: 34px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    border-color: var(--accent-line);
    background: var(--accent-solid);
    color: var(--fg-on-solid);
    font-size: 12px;
    font-weight: 650;
}
.preview-composer button:hover { background: var(--accent-solid-hover); }
.preview-composer button:active { transform: scale(0.97); }

.preview-palette {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    align-content: start;
    justify-items: center;
    padding: 48px 16px 16px;
    background: rgba(10, 13, 18, 0.72);
    backdrop-filter: blur(8px);
}
.preview-palette[hidden] { display: none; }
.preview-palette-card {
    width: min(280px, 100%);
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-raised);
    box-shadow: var(--shadow-lg);
}
.preview-palette-card p {
    padding: 4px 8px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-subtle);
}
.preview-palette-card button,
.preview-palette-card a {
    display: block;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    text-align: left;
    text-decoration: none;
    color: var(--fg);
    font-size: 12px;
    font-weight: 600;
}
.preview-palette-card button:hover,
.preview-palette-card a:hover,
.preview-palette-card button.is-active {
    background: var(--accent-quiet);
}

.role-chip {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 650;
    border: 1px solid transparent;
}
.role-chip.director { color: var(--role-director); background: var(--role-director-quiet); border-color: #5b4a22; }
.role-chip.manager { color: var(--role-manager); background: var(--role-manager-quiet); border-color: var(--accent-line); }
.role-chip.worker { color: var(--role-worker); background: var(--role-worker-quiet); border-color: #2a5740; }
.role-chip.tester { color: var(--role-tester); background: var(--role-tester-quiet); border-color: #4a3d6e; }

/* Hero 3D stage */
.hero-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    margin-bottom: 32px;
}

.hero-stage {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 320px;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(ellipse 70% 60% at 50% 45%, rgba(107, 165, 255, 0.09), transparent 70%),
        linear-gradient(165deg, rgba(21, 26, 33, 0.9), rgba(10, 13, 18, 0.95));
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.hero-stage::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(107, 165, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(107, 165, 255, 0.05) 1px, transparent 1px);
    background-size: 34px 34px;
    -webkit-mask-image: radial-gradient(ellipse 62% 62% at 50% 50%, #000 10%, transparent 78%);
    mask-image: radial-gradient(ellipse 62% 62% at 50% 50%, #000 10%, transparent 78%);
}

.stage-head,
.stage-foot {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
}

.stage-head {
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(16, 21, 27, 0.55);
}

.stage-title {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--fg-subtle);
    letter-spacing: 0.02em;
}

/* Base behaviour (cursor, sizing, focus ring) lives in /shared/nexus.css so
   this stage and the one on the scores surface stay in step. */
.stage-canvas { min-height: 220px; }

.stage-foot {
    flex-wrap: wrap;
    border-top: 1px solid var(--border-subtle);
    background: rgba(16, 21, 27, 0.55);
}

.stage-key {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 650;
    color: var(--fg-subtle);
}

.stage-key::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.stage-key.director { color: var(--role-director); }
.stage-key.manager { color: var(--role-manager); }
.stage-key.worker { color: var(--role-worker); }
.stage-key.tester { color: var(--role-tester); }

.stage-hint {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--fg-subtle);
    opacity: 0.75;
}

@media (min-width: 1240px) {
    .hero-shell {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 0.82fr);
        gap: 34px;
    }
    .hero-stage { min-height: 396px; }
}

/* Workspace surfaces — the cross-app hub */
.surfaces-lead {
    max-width: 60ch;
    margin: -12px 0 24px;
    color: var(--fg-muted);
    font-size: var(--text-md);
    line-height: 1.65;
}

.surfaces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
    gap: 14px;
}

.surface-card {
    position: relative;
    display: block;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    background: linear-gradient(160deg, rgba(26, 32, 41, 0.92), rgba(16, 21, 27, 0.92));
    text-decoration: none;
    color: inherit;
    transform-style: preserve-3d;
    will-change: transform;
    isolation: isolate;
    overflow: hidden;
    transition:
        border-color var(--dur) var(--ease),
        box-shadow var(--dur) var(--ease);
}

.surface-card::before {
    content: '';
    position: absolute;
    inset: -40% 30% 60% -20%;
    background: radial-gradient(circle, var(--accent) 0%, transparent 68%);
    opacity: 0;
    transition: opacity var(--dur) var(--ease);
    pointer-events: none;
}

.surface-card:hover {
    border-color: var(--accent-line);
    box-shadow: var(--shadow-lg);
}

.surface-card:hover::before { opacity: 0.1; }

.surface-card:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.surface-inner {
    position: relative;
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 20px;
    min-height: 244px;
    transform-style: preserve-3d;
}

.surface-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.surface-index {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--fg-subtle);
    letter-spacing: 0.08em;
}

.surface-glyph {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-inset);
    color: var(--accent);
    transform: translateZ(34px);
    transition:
        color var(--dur) var(--ease),
        border-color var(--dur) var(--ease),
        background var(--dur) var(--ease);
}

.surface-glyph svg { width: 21px; height: 21px; }
.surface-glyph.home { color: var(--role-director); }
.surface-glyph.app { color: var(--role-manager); }
.surface-glyph.scores { color: var(--role-worker); }

.surface-card:hover .surface-glyph {
    border-color: currentColor;
    background: var(--bg-raised);
}

.surface-card h4 {
    font-size: 1.12rem;
    font-weight: 650;
    letter-spacing: -0.025em;
    transform: translateZ(22px);
}

.surface-card p {
    color: var(--fg-muted);
    font-size: var(--text-sm);
    line-height: 1.62;
    transform: translateZ(14px);
}

.surface-meta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    padding-top: 6px;
    color: var(--accent);
    font-size: var(--text-xs);
    font-weight: 650;
    letter-spacing: 0.02em;
    transform: translateZ(18px);
}

.surface-meta i {
    font-size: 10px;
    transition: transform var(--dur) var(--ease);
}

.surface-card:hover .surface-meta i { transform: translateX(4px); }

.surface-card.is-current {
    border-color: var(--accent-line);
    background: linear-gradient(160deg, var(--accent-quiet), rgba(16, 21, 27, 0.94));
}

.surface-card.is-current .surface-meta {
    color: var(--fg-subtle);
    font-family: var(--font-mono);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.project-card-3d {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    transform-style: preserve-3d;
    will-change: transform;
    isolation: isolate;
    border-radius: var(--radius-xl);
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.project-card-3d::before,
.project-card-3d::after { display: none; }

.project-card-3d:hover {
    border-color: var(--accent-line);
    background: var(--bg-raised);
    box-shadow: var(--shadow-lg);
}

.project-card-inner {
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 10px;
}

.project-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    color: var(--accent);
    border: 1px solid var(--accent-line);
    background: var(--accent-quiet);
    padding: 3px 8px;
    border-radius: var(--radius-pill);
}

.project-year {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--fg-subtle);
}

.project-name {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 650;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
    color: var(--fg);
}

.project-desc {
    font-size: var(--text-sm);
    color: var(--fg-muted);
    line-height: 1.65;
    margin-bottom: 20px;
}

.project-link {
    text-decoration: none;
    color: var(--accent);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}
.project-link i { font-size: 0.7rem; transition: var(--transition-smooth); }
.project-card-3d:hover .project-link i { transform: translateX(4px); }
.project-card-3d:hover .project-link { text-shadow: none; }

/* Skills */
.skills-container {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 820px;
}

.skills-category h5 {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 12px;
    color: var(--fg-subtle);
}
.skills-category h5::before,
.skills-category h5::after { content: none; }

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

.skill-badge {
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--fg-muted);
    background: var(--bg-inset);
    border: 1px solid var(--border-subtle);
    padding: 7px 12px;
    transition: var(--transition-smooth);
    border-radius: var(--radius-md);
}

.skill-badge:hover {
    color: var(--fg);
    background: var(--accent-quiet);
    border-color: var(--accent-line);
    box-shadow: none;
    transform: translateY(-1px);
}

/* Timeline */
.timeline { position: relative; max-width: 820px; }

.timeline::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 200px;
    width: 1px;
    height: calc(100% - 10px);
    background: var(--border);
}

.timeline-item { display: flex; margin-bottom: 40px; }
.timeline-item:last-child { margin-bottom: 0; }

.time-meta {
    width: 160px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.duration {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--accent);
}

.location { font-size: var(--text-xs); color: var(--fg-subtle); }

.time-content { padding-left: 52px; position: relative; }

.time-content::before {
    content: '';
    position: absolute;
    top: 6px;
    left: -5px;
    width: 9px;
    height: 9px;
    background: var(--bg-sunken);
    border: 2px solid var(--accent);
    border-radius: 50%;
    box-shadow: none;
}

.time-content h4 {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 650;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
    color: var(--fg);
}

.role-subtitle {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--fg-subtle);
    margin-bottom: 12px;
}

.time-content p { font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.65; }

/* Contact */
.contact-wrapper { max-width: 720px; }

.contact-lead {
    font-size: 1.05rem;
    color: var(--fg-muted);
    line-height: 1.65;
    margin-bottom: 28px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.contact-card {
    position: relative;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--fg);
    transition: var(--transition-smooth);
    overflow: hidden;
    isolation: isolate;
    border-radius: var(--radius-lg);
}

.contact-card::before { display: none; }

.contact-card i {
    font-size: 1.3rem;
    color: var(--fg-subtle);
    transition: var(--transition-smooth);
}

.card-text span {
    display: block;
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--fg-subtle);
    margin-bottom: 2px;
}

.card-text strong {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 650;
}

.contact-card:hover {
    background: var(--bg-raised);
    border-color: var(--accent-line);
}
.contact-card:hover i { color: var(--accent); transform: none; text-shadow: none; }

.site-footer { padding: 32px var(--header-pad-x) 8px; text-align: left; }
.site-footer p {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    color: var(--fg-subtle);
    letter-spacing: 0;
}

.reveal-target { will-change: transform, opacity, filter; }

/* ClaudeRouter product page extras */
.product-hero {
    display: grid;
    gap: 18px;
    max-width: 760px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.feature-card {
    padding: 18px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
}

.feature-card h4 {
    font-size: var(--text-md);
    font-weight: 650;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.feature-card p {
    color: var(--fg-muted);
    font-size: var(--text-sm);
    line-height: 1.6;
}

.arch-list {
    display: grid;
    gap: 8px;
    max-width: 720px;
}

.arch-row {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-inset);
}

.arch-row strong {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--accent);
}

.arch-row span { color: var(--fg-muted); font-size: var(--text-sm); }

.note-banner {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid var(--accent-line);
    border-radius: var(--radius-lg);
    background: var(--accent-quiet);
    color: var(--fg-muted);
    font-size: var(--text-sm);
    max-width: 720px;
}

.note-banner code,
.quote-wrapper code {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--fg);
}

.hierarchy-board > p {
    margin: 8px 0 0;
    font-size: var(--text-sm);
    color: var(--fg-muted);
    line-height: 1.65;
}

.hierarchy-board {
    display: grid;
    gap: 14px;
    padding: 22px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    background: var(--bg-surface);
}

/* Responsive */
@media (max-width: 1100px) {
    .featured-panel { grid-template-columns: 1fr; }
    .task-metrics { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
    :root { --sidebar-width: 240px; --rail-width: 240px; }
    .hero-title { font-size: 2.2rem; }
    .timeline::before { left: 150px; }
    .time-meta { width: 120px; }
    .time-content { padding-left: 36px; }
}

@media (max-width: 768px) {
    .container { flex-direction: column; }

    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        background: rgba(21, 26, 33, 0.92);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border-subtle);
        z-index: 1000;
    }

    .mobile-logo {
        display: flex;
        align-items: center;
        gap: 8px;
        font-family: var(--font-sans);
        font-weight: 650;
        font-size: 0.95rem;
        color: var(--fg);
    }

    .menu-toggle {
        background: none;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        cursor: pointer;
        display: flex;
        flex-direction: column;
        gap: 5px;
        padding: 8px;
        width: var(--control-md);
        height: var(--control-md);
        align-items: center;
        justify-content: center;
    }

    .menu-toggle .bar {
        width: 16px;
        height: 1.5px;
        background: var(--fg);
        transition: var(--transition-smooth);
    }

    .menu-toggle.active .bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

    .sidebar {
        width: 100vw;
        height: calc(100vh - 56px);
        top: 56px;
        left: -100vw;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        padding: 0;
        transition: left 0.35s var(--ease);
    }

    .sidebar.active { left: 0; }
    .brand { display: none; }
    .nav-menu { padding: 16px; }
    .nav-menu li { margin-bottom: 4px; }
    .nav-link { font-size: 1rem; padding: 12px; }

    .main-content { margin-left: 0; width: 100%; padding: 56px 0 40px; }
    .workspace-header { top: 56px; padding: 12px 16px; }
    .section { padding: 40px 16px; }

    .hero-title { font-size: 1.85rem; margin-bottom: 22px; max-width: none; }
    .bio-text .p-lead { font-size: 1.02rem; }

    .projects-grid,
    .contact-grid,
    .feature-grid,
    .task-metrics { grid-template-columns: 1fr; }

    .workspace-preview {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .preview-rail {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        padding: 10px;
    }
    .preview-brand {
        width: 100%;
        margin: 0;
        padding: 0 0 8px;
    }
    .preview-rail-label { display: none; }
    .preview-task { width: auto; }
    .preview-cmd { width: auto; margin-top: 0; margin-left: auto; }

    .arch-row { grid-template-columns: 1fr; gap: 4px; }

    .timeline::before { left: 8px; }
    .timeline-item { flex-direction: column; gap: 10px; }
    .time-meta { width: 100%; flex-direction: row; gap: 16px; align-items: center; }
    .time-content { padding-left: 24px; }
    .time-content::before { left: -20px; top: 5px; }

    .cursor-dot, .cursor-ring { display: none; }
    body { cursor: auto; }
}

a:focus-visible,
button:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .noise-overlay, .aurora-blob { animation: none !important; }
}
